diff options
| author | Peter Penz <[email protected]> | 2007-05-12 10:22:01 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-05-12 10:22:01 +0000 |
| commit | 794911106c265c8691689f601e4aed0862aff0b8 (patch) | |
| tree | a5f2765fb289ee37d87d6c41601efe4acb993dce /src/dolphinview.cpp | |
| parent | d03b27f28850e25d087f946e3a5c99b21c76f359 (diff) | |
provide a hover information in the statusbar if the mouse cursor enters an item
svn path=/trunk/KDE/kdebase/apps/; revision=663779
Diffstat (limited to 'src/dolphinview.cpp')
| -rw-r--r-- | src/dolphinview.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 4188959f1..8360f037d 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -157,6 +157,10 @@ DolphinView::DolphinView(DolphinMainWindow* mainWindow, this, SLOT(emitSelectionChangedSignal())); connect(m_controller, SIGNAL(activated()), this, SLOT(requestActivation())); + connect(m_controller, SIGNAL(itemEntered(const QModelIndex&)), + this, SLOT(showHoverInformation(const QModelIndex&))); + connect(m_controller, SIGNAL(viewportEntered()), + this, SLOT(clearHoverInformation())); createView(); @@ -1179,6 +1183,25 @@ void DolphinView::updateCutItems() applyCutItemEffect(); } +void DolphinView::showHoverInformation(const QModelIndex& index) +{ + if (hasSelection()) { + return; + } + + const KFileItem* item = fileItem(index); + if (item != 0) { + m_statusBar->setMessage(item->getStatusBarInfo(), DolphinStatusBar::Default); + emit requestItemInfo(item->url()); + } +} + +void DolphinView::clearHoverInformation() +{ + m_statusBar->clear(); +} + + void DolphinView::createView() { // delete current view |
