┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphindetailsview.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-05-31 16:14:47 +0000
committerPeter Penz <[email protected]>2007-05-31 16:14:47 +0000
commit8d0e873f670cab8e7bc8df902abed6ebc17dd09d (patch)
treedf69760063202d89f516e369c81bb64bce8e8b57 /src/dolphindetailsview.h
parent83cda27db7d749946deee2defe8428a99a188011 (diff)
Provide a rubberband for the Details View when selecting items. This assures a consistent behavior with the Icons View and the selection style of other file managers (in opposite to QListView it is not possible in QTreeView to show a rubberband automatically within Qt 4.3 :-().
svn path=/trunk/KDE/kdebase/apps/; revision=670181
Diffstat (limited to 'src/dolphindetailsview.h')
-rw-r--r--src/dolphindetailsview.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/dolphindetailsview.h b/src/dolphindetailsview.h
index 03f1b8d53..da3f2ec90 100644
--- a/src/dolphindetailsview.h
+++ b/src/dolphindetailsview.h
@@ -27,6 +27,7 @@
#include <libdolphin_export.h>
class DolphinController;
+class QRubberBand;
/**
* @brief Represents the details view which shows the name, size,
@@ -48,6 +49,8 @@ protected:
virtual bool event(QEvent* event);
virtual QStyleOptionViewItem viewOptions() const;
virtual void contextMenuEvent(QContextMenuEvent* event);
+ virtual void mousePressEvent(QMouseEvent* event);
+ virtual void mouseMoveEvent(QMouseEvent* event);
virtual void mouseReleaseEvent(QMouseEvent* event);
virtual void dragEnterEvent(QDragEnterEvent* event);
virtual void dropEvent(QDropEvent* event);
@@ -81,6 +84,12 @@ private slots:
*/
void slotEntered(const QModelIndex& index);
+ /**
+ * Updates the geometry of the rubberband dependent from the current
+ * mouse position and the starting origin \a m_origin.
+ */
+ void updateRubberBandGeometry();
+
void zoomIn();
void zoomOut();
@@ -96,9 +105,15 @@ private:
*/
void updateDecorationSize();
+ /** Return the upper left position in pixels of the viewport content. */
+ QPoint contentsPos() const;
+
private:
DolphinController* m_controller;
QStyleOptionViewItem m_viewOptions;
+
+ QRubberBand* m_rubberBand;
+ QPoint m_origin;
};
#endif