-----------------------------------------------------------------------------
| 251 | |
| 252 | //----------------------------------------------------------------------------- |
| 253 | void pqPythonTabWidget::createNewEmptyTab() |
| 254 | { |
| 255 | pqPythonTextArea* widget = new pqPythonTextArea(this); |
| 256 | |
| 257 | this->insertTab(this->count() - 1, widget, ""); |
| 258 | this->setCurrentIndex(this->indexOf(widget)); |
| 259 | this->lastFocus = widget; |
| 260 | |
| 261 | this->updateTab(widget); |
| 262 | |
| 263 | this->connect(widget, &pqPythonTextArea::fileOpened, |
| 264 | [this, widget](const QString&) { this->updateTab(widget); }); |
| 265 | |
| 266 | this->connect(widget, &pqPythonTextArea::fileSaved, |
| 267 | [this, widget](const QString&) { this->updateTab(widget); }); |
| 268 | |
| 269 | #if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) |
| 270 | QObject::connect(QApplication::styleHints(), &QStyleHints::colorSchemeChanged, this, |
| 271 | [this, widget](Qt::ColorScheme) { this->updateTab(widget); }); |
| 272 | #endif |
| 273 | |
| 274 | this->connect( |
| 275 | widget, &pqPythonTextArea::contentChanged, [this, widget]() { this->updateTab(widget); }); |
| 276 | |
| 277 | this->connect(widget, &pqPythonTextArea::fileOpened, this, &pqPythonTabWidget::fileOpened); |
| 278 | this->connect(widget, &pqPythonTextArea::fileSaved, this, &pqPythonTabWidget::fileSaved); |
| 279 | this->setTabCloseButton(widget); |
| 280 | } |
| 281 | |
| 282 | //----------------------------------------------------------------------------- |
| 283 | void pqPythonTabWidget::setTabCloseButton(pqPythonTextArea* widget) |
no test coverage detected