Definition at line 365 of file KisMainWindow.cpp.
◆ TabBarFilter()
| TabBarFilter::TabBarFilter |
( |
QMdiArea * | mdi | ) |
|
|
inline |
◆ eventFilter()
| bool TabBarFilter::eventFilter |
( |
QObject * | watched, |
|
|
QEvent * | event ) |
|
inlineoverride |
Definition at line 372 of file KisMainWindow.cpp.
373 {
374
375 QTabBar *tabBar = dynamic_cast<QTabBar *>(watched);
376 if (!tabBar) {
377
378 return false;
379 }
380
381 if (event->type() != QEvent::ToolTip) {
382 return false;
383 }
384
385 QHelpEvent *ev = dynamic_cast<QHelpEvent *>(event);
386 if (!ev) {
387 return false;
388 }
389
390 int tabIndex = tabBar->tabAt(ev->pos());
391
392 if (tabIndex == -1 || tabIndex > (
mdi->subWindowList().count() - 1)) {
393 return false;
394 }
395
396 QMdiSubWindow *
win =
mdi->subWindowList()[tabIndex];
397
398 if (!win) {
399 return false;
400 }
401
403 if (!view) {
404 return false;
405 }
406
408
409 if (view->
document()->isModified()) {
410 title += "*";
411 }
412
413 tabBar->setTabToolTip(tabIndex, title);
414
415 return false;
416 };
QPointer< KisDocument > document
References KisView::document, KisView::getTitle(), and mdi.
◆ mdi
| QMdiArea* TabBarFilter::mdi |
|
private |
The documentation for this class was generated from the following file: