From 19674f64699ba883f24a97a04505ca2c7f12634e Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 17 Oct 2010 12:48:20 +0200 Subject: Implemented hovering in FilesystemWidget Hovering over dirs and pictures show either the content of the directory or a scaled image of the picture. This is a strange commit, though. When the archive was the last opened tab the program crashes when changing to FilesystemView. I don't have the slightest clue, why, so I simply removed setting the last opened tab on startup. Also there is some strange behavior regarding the position of the HoverWindow and what Qt thinks the global position is... --- fileview.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'fileview.h') diff --git a/fileview.h b/fileview.h index 2bf81b2..6e6e303 100644 --- a/fileview.h +++ b/fileview.h @@ -16,6 +16,8 @@ class QResizeEvent; class MessageDialog; class QModelIndex; class QAction; +class HoverWindow; +class QEvent; class FileView : public QTreeView { Q_OBJECT @@ -33,7 +35,6 @@ class FileView : public QTreeView { void markFiles(); void unmarkFiles(); void createFolder(); - //void refresh(); private slots: void doMark(); @@ -43,11 +44,14 @@ class FileView : public QTreeView { virtual void contextMenuEvent(QContextMenuEvent *e); virtual void keyPressEvent(QKeyEvent *e); virtual void resizeEvent(QResizeEvent *e); + virtual bool event(QEvent *event); private: MessageDialog *mMarkDialog; MessageDialog *mCreateFolderDialog; QAction *mDeleteA; + HoverWindow *mHoverWin; + QModelIndex mCurHover; }; #endif -- cgit v1.2.3-70-g09d2