~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to libs/widgets/common/kcategorizedview.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-12-21 23:19:11 UTC
  • mfrom: (1.2.33 upstream) (3.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20101221231911-z9jip7s5aht1jqn9
Tags: 2:1.7.0-1ubuntu1
* Merge from Debian Experimental. Remaining Ubuntu changes:
  - Export .pot name and copy to plugins in debian/rules
  - Version build-depends on kipi-plugins-dev to ensure build is against the
    same version on all archs
* Drop debian/patches/kubuntu_01_linker.diff, incoporated upstream
* Remove patches directory and unused patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 */
40
40
class /*KDEUI_EXPORT*/ DIGIKAM_EXPORT KCategorizedView: public QListView
41
41
{
42
 
Q_OBJECT
 
42
    Q_OBJECT
43
43
 
44
44
public:
45
 
    KCategorizedView(QWidget *parent = 0);
 
45
    KCategorizedView(QWidget* parent = 0);
46
46
 
47
47
    ~KCategorizedView();
48
48
 
49
 
    virtual void setModel(QAbstractItemModel *model);
50
 
 
51
 
    void setGridSize(const QSize &size);
52
 
 
53
 
    virtual QRect visualRect(const QModelIndex &index) const;
54
 
 
55
 
    KCategoryDrawer *categoryDrawer() const;
56
 
 
57
 
    void setCategoryDrawer(KCategoryDrawer *categoryDrawer);
58
 
 
59
 
    virtual QModelIndex indexAt(const QPoint &point) const;
 
49
    virtual void setModel(QAbstractItemModel* model);
 
50
 
 
51
    void setGridSize(const QSize& size);
 
52
 
 
53
    virtual QRect visualRect(const QModelIndex& index) const;
 
54
 
 
55
    KCategoryDrawer* categoryDrawer() const;
 
56
 
 
57
    void setCategoryDrawer(KCategoryDrawer* categoryDrawer);
 
58
 
 
59
    virtual QModelIndex indexAt(const QPoint& point) const;
60
60
 
61
61
    /**
62
62
     * This method will return all indexes whose visual rect intersects @p rect.
63
63
     * @param rect rectangle to test intersection with
64
64
     * @note Returns an empty list if the view is not categorized.
65
65
     */
66
 
    virtual QModelIndexList categorizedIndexesIn(const QRect &rect) const;
 
66
    virtual QModelIndexList categorizedIndexesIn(const QRect& rect) const;
67
67
 
68
68
    /**
69
69
     * This method will return the visual rect of the header of the category
70
70
     * in which @p index is sorted.
71
71
     * @note Returns QRect() if the view is not categorized.
72
72
     */
73
 
    virtual QRect categoryVisualRect(const QModelIndex &index) const;
 
73
    virtual QRect categoryVisualRect(const QModelIndex& index) const;
74
74
 
75
75
    /**
76
76
     * This method will return the first index of the category
77
77
     * in the region of which @p point is found.
78
78
     * @note Returns QModelIndex() if the view is not categorized.
79
79
     */
80
 
    virtual QModelIndex categoryAt(const QPoint &point) const;
 
80
    virtual QModelIndex categoryAt(const QPoint& point) const;
81
81
 
82
82
    /**
83
83
     * This method returns the range of indexes contained
84
84
     * in the category in which @p index is sorted.
85
85
     * @note Returns an empty range if the view is no categorized.
86
86
     */
87
 
    virtual QItemSelectionRange categoryRange(const QModelIndex &index) const;
 
87
    virtual QItemSelectionRange categoryRange(const QModelIndex& index) const;
88
88
 
89
89
    /**
90
90
     * Switch on drawing of dragged items. Default: on.
100
100
    virtual void reset();
101
101
 
102
102
protected:
103
 
    virtual void paintEvent(QPaintEvent *event);
104
 
 
105
 
    virtual void resizeEvent(QResizeEvent *event);
106
 
 
107
 
    virtual void setSelection(const QRect &rect,
108
 
                    QItemSelectionModel::SelectionFlags flags);
109
 
 
110
 
    virtual void mouseMoveEvent(QMouseEvent *event);
111
 
 
112
 
    virtual void mousePressEvent(QMouseEvent *event);
113
 
 
114
 
    virtual void mouseReleaseEvent(QMouseEvent *event);
115
 
 
116
 
    virtual void leaveEvent(QEvent *event);
 
103
    virtual void paintEvent(QPaintEvent* event);
 
104
 
 
105
    virtual void resizeEvent(QResizeEvent* event);
 
106
 
 
107
    virtual void setSelection(const QRect& rect,
 
108
                              QItemSelectionModel::SelectionFlags flags);
 
109
 
 
110
    virtual void mouseMoveEvent(QMouseEvent* event);
 
111
 
 
112
    virtual void mousePressEvent(QMouseEvent* event);
 
113
 
 
114
    virtual void mouseReleaseEvent(QMouseEvent* event);
 
115
 
 
116
    virtual void leaveEvent(QEvent* event);
117
117
 
118
118
    virtual void startDrag(Qt::DropActions supportedActions);
119
119
 
120
 
    virtual void dragMoveEvent(QDragMoveEvent *event);
121
 
 
122
 
    virtual void dragLeaveEvent(QDragLeaveEvent *event);
123
 
 
124
 
    virtual void dropEvent(QDropEvent *event);
 
120
    virtual void dragMoveEvent(QDragMoveEvent* event);
 
121
 
 
122
    virtual void dragLeaveEvent(QDragLeaveEvent* event);
 
123
 
 
124
    virtual void dropEvent(QDropEvent* event);
125
125
 
126
126
    virtual QModelIndex moveCursor(CursorAction cursorAction,
127
 
                    Qt::KeyboardModifiers modifiers);
 
127
                                   Qt::KeyboardModifiers modifiers);
128
128
 
129
129
protected Q_SLOTS:
130
 
    virtual void rowsInserted(const QModelIndex &parent, int start, int end);
131
 
 
132
 
    virtual void rowsInsertedArtifficial(const QModelIndex &parent, int start,
133
 
                    int end);
134
 
 
135
 
    virtual void rowsRemoved(const QModelIndex &parent, int start, int end);
 
130
    virtual void rowsInserted(const QModelIndex& parent, int start, int end);
 
131
 
 
132
    virtual void rowsInsertedArtifficial(const QModelIndex& parent, int start,
 
133
                                         int end);
 
134
 
 
135
    virtual void rowsRemoved(const QModelIndex& parent, int start, int end);
136
136
 
137
137
    virtual void updateGeometries();
138
138
 
139
139
    virtual void slotLayoutChanged();
140
140
 
141
 
    virtual void currentChanged(const QModelIndex &current,
142
 
                    const QModelIndex &previous);
 
141
    virtual void currentChanged(const QModelIndex& current,
 
142
                                const QModelIndex& previous);
143
143
 
144
144
private:
145
145
    class Private;
146
 
    Private * const d;
 
146
    Private* const d;
147
147
};
148
148
 
149
149
#endif // KCATEGORIZEDVIEW_H