diff options
| author | Peter Penz <[email protected]> | 2011-10-08 21:40:34 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-10-08 21:43:55 +0200 |
| commit | 6551c000fc68134932cdc21f2cc7086b34bff30b (patch) | |
| tree | f4892d247c13f988ee68de37ea1700aaf6e80ab2 /src/kitemviews/kitemlistview.h | |
| parent | b1b5a6db2e8b9b1fc175d068ba393925d95c9dc6 (diff) | |
Context menu cleanups
- Open the context menu on the mouse-press event, not on the
mouse-release event.
- Provide an explicit position-information and don't use
QCursor::pos(). This fixes the issue that opening a context-menu
by the keyboard opens below the cursor.
- Provide different signals in the KItemListController for
the different context-menu types (item vs. view vs. header).
- Implement turning on/off roles by the header-context-menu.
Diffstat (limited to 'src/kitemviews/kitemlistview.h')
| -rw-r--r-- | src/kitemviews/kitemlistview.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h index 47de53e20..e1678145d 100644 --- a/src/kitemviews/kitemlistview.h +++ b/src/kitemviews/kitemlistview.h @@ -181,6 +181,13 @@ public: bool isTransactionActive() const; /** + * Turns on the header if \p show is true. Per default the + * header is not shown. + */ + void setHeaderShown(bool show); + bool isHeaderShown() const; + + /** * @return Pixmap that is used for a drag operation based on the * items given by \a indexes. The default implementation returns * a null-pixmap. @@ -347,12 +354,6 @@ private: void updateStretchedVisibleRolesSizes(); /** - * Turns on the header if \p show is true. Per default the - * header is not shown. - */ - void setHeaderShown(bool show); - - /** * @return Sum of the widths of all visible roles. */ qreal visibleRolesSizesWidthSum() const; @@ -363,6 +364,12 @@ private: qreal visibleRolesSizesHeightSum() const; /** + * @return Boundaries of the header. An empty rectangle is returned + * if no header is shown. + */ + QRectF headerBoundaries() const; + + /** * Helper function for triggerAutoScrolling(). * @param pos Logical position of the mouse relative to the range. * @param range Range of the visible area. |
