m_dolphinModel(dolphinModel),
m_dirLister(dirLister),
m_proxyModel(proxyModel),
- m_iconManager(0)
+ m_iconManager(0),
+ m_toolTipManager(0)
{
setFocusPolicy(Qt::StrongFocus);
m_topLayout = new QVBoxLayout(this);
return;
}
+ if (m_toolTipManager != 0) {
+ m_toolTipManager->hideTip();
+ }
emit itemTriggered(item); // caught by DolphinViewContainer or DolphinPart
}
item = fileItem(index);
}
+ if (m_toolTipManager != 0) {
+ m_toolTipManager->hideTip();
+ }
+
m_isContextMenuOpen = true; // TODO: workaround for Qt-issue xxxxxx
emit requestContextMenu(item, url());
m_isContextMenuOpen = false;
m_iconManager->setShowPreview(m_showPreview);
if (DolphinSettings::instance().generalSettings()->showToolTips()) {
- new ToolTipManager(view, m_proxyModel);
+ m_toolTipManager = new ToolTipManager(view, m_proxyModel);
}
m_topLayout->insertWidget(1, view);
m_columnView = 0;
m_fileItemDelegate = 0;
m_iconManager = 0;
+ m_toolTipManager = 0;
}
}
class KFileItemDelegate;
class KUrl;
class KToggleAction;
+class ToolTipManager;
class QModelIndex;
class ViewProperties;
DolphinSortFilterProxyModel* m_proxyModel;
IconManager* m_iconManager;
+ ToolTipManager* m_toolTipManager;
KUrl m_rootUrl;
};
{
}
+void ToolTipManager::hideTip()
+{
+ hideToolTip();
+}
+
bool ToolTipManager::eventFilter(QObject* watched, QEvent* event)
{
if ((watched == m_view->viewport()) && (event->type() == QEvent::Leave)) {
DolphinSortFilterProxyModel* model);
virtual ~ToolTipManager();
+ /**
+ * Hides the currently shown tooltip. Invoking this method is
+ * only needed when the tooltip should be hidden although
+ * an item is hovered.
+ */
+ void hideTip();
+
protected:
virtual bool eventFilter(QObject* watched, QEvent* event);