• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • kdeui
  • itemviews
kcategorizedview.h
Go to the documentation of this file.
1
20
21#ifndef KCATEGORIZEDVIEW_H
22#define KCATEGORIZEDVIEW_H
23
24#include <QtGui/QListView>
25
26#include <kdeui_export.h>
27
28class KCategoryDrawer;
29class KCategoryDrawerV2;
30
79class KDEUI_EXPORT KCategorizedView
80 : public QListView
81{
82 Q_OBJECT
83 Q_PROPERTY(int categorySpacing READ categorySpacing WRITE setCategorySpacing)
84 Q_PROPERTY(bool alternatingBlockColors READ alternatingBlockColors WRITE setAlternatingBlockColors)
85 Q_PROPERTY(bool collapsibleBlocks READ collapsibleBlocks WRITE setCollapsibleBlocks)
86
87public:
88 KCategorizedView(QWidget *parent = 0);
89
90 ~KCategorizedView();
91
95 virtual void setModel(QAbstractItemModel *model);
96
100 void setGridSize(const QSize &size);
101
128 void setGridSizeOwn(const QSize &size);
129
133 virtual QRect visualRect(const QModelIndex &index) const;
134
138 KCategoryDrawer *categoryDrawer() const;
139
143 void setCategoryDrawer(KCategoryDrawer *categoryDrawer);
144
150 int categorySpacing() const;
151
157 void setCategorySpacing(int categorySpacing);
158
164 bool alternatingBlockColors() const;
165
171 void setAlternatingBlockColors(bool enable);
172
178 bool collapsibleBlocks() const;
179
185 void setCollapsibleBlocks(bool enable);
186
192 QModelIndexList block(const QString &category);
193
199 QModelIndexList block(const QModelIndex &representative);
200
204 virtual QModelIndex indexAt(const QPoint &point) const;
205
209 virtual void reset();
210
211protected:
215 virtual void paintEvent(QPaintEvent *event);
216
220 virtual void resizeEvent(QResizeEvent *event);
221
225 virtual void setSelection(const QRect &rect,
226 QItemSelectionModel::SelectionFlags flags);
227
231 virtual void mouseMoveEvent(QMouseEvent *event);
232
236 virtual void mousePressEvent(QMouseEvent *event);
237
241 virtual void mouseReleaseEvent(QMouseEvent *event);
242
246 virtual void leaveEvent(QEvent *event);
247
251 virtual void startDrag(Qt::DropActions supportedActions);
252
256 virtual void dragMoveEvent(QDragMoveEvent *event);
257
261 virtual void dragEnterEvent(QDragEnterEvent *event);
262
266 virtual void dragLeaveEvent(QDragLeaveEvent *event);
267
271 virtual void dropEvent(QDropEvent *event);
272
276 virtual QModelIndex moveCursor(CursorAction cursorAction,
277 Qt::KeyboardModifiers modifiers);
278
282 virtual void rowsAboutToBeRemoved(const QModelIndex &parent,
283 int start,
284 int end);
285
289 virtual void updateGeometries();
290
294 virtual void currentChanged(const QModelIndex &current,
295 const QModelIndex &previous);
296
300 virtual void dataChanged(const QModelIndex &topLeft,
301 const QModelIndex &bottomRight);
302
306 virtual void rowsInserted(const QModelIndex &parent,
307 int start,
308 int end);
309
310protected Q_SLOTS:
315#ifndef KDE_NO_DEPRECATED
316 virtual KDE_DEPRECATED void rowsInsertedArtifficial(const QModelIndex &parent,
317 int start,
318 int end);
319#endif
320
325#ifndef KDE_NO_DEPRECATED
326 virtual KDE_DEPRECATED void rowsRemoved(const QModelIndex &parent,
327 int start,
328 int end);
329#endif
330
335 virtual void slotLayoutChanged();
336
337private:
338 class Private;
339 Private *const d;
340
341 Q_PRIVATE_SLOT(d, void _k_slotCollapseOrExpandClicked(QModelIndex))
342};
343
344#endif // KCATEGORIZEDVIEW_H
KCategorizedView::KCategorizedView
KCategorizedView(QWidget *parent=0)
Definition kcategorizedview.cpp:503
KCategorizedView::alternatingBlockColors
bool alternatingBlockColors
Definition kcategorizedview.h:84
KCategorizedView::setCategorySpacing
void setCategorySpacing(int categorySpacing)
Stablishes the category spacing.
Definition kcategorizedview.cpp:659
KCategorizedView::updateGeometries
virtual void updateGeometries()
Reimplemented from QAbstractItemView.
Definition kcategorizedview.cpp:1357
KCategorizedView::rowsAboutToBeRemoved
virtual void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
Reimplemented from QAbstractItemView.
Definition kcategorizedview.cpp:1235
KCategorizedView::setModel
virtual void setModel(QAbstractItemModel *model)
Reimplemented from QAbstractItemView.
Definition kcategorizedview.cpp:514
KCategorizedView::paintEvent
virtual void paintEvent(QPaintEvent *event)
Reimplemented from QWidget.
Definition kcategorizedview.cpp:788
KCategorizedView::dragMoveEvent
virtual void dragMoveEvent(QDragMoveEvent *event)
Reimplemented from QAbstractItemView.
Definition kcategorizedview.cpp:1095
KCategorizedView::dragLeaveEvent
virtual void dragLeaveEvent(QDragLeaveEvent *event)
Reimplemented from QAbstractItemView.
Definition kcategorizedview.cpp:1106
KCategorizedView::rowsInsertedArtifficial
virtual void rowsInsertedArtifficial(const QModelIndex &parent, int start, int end)
Definition kcategorizedview.cpp:1501
KCategorizedView::mouseReleaseEvent
virtual void mouseReleaseEvent(QMouseEvent *event)
Reimplemented from QWidget.
Definition kcategorizedview.cpp:1042
KCategorizedView::rowsInserted
virtual void rowsInserted(const QModelIndex &parent, int start, int end)
Reimplemented from QAbstractItemView.
Definition kcategorizedview.cpp:1486
KCategorizedView::rowsRemoved
virtual void rowsRemoved(const QModelIndex &parent, int start, int end)
Definition kcategorizedview.cpp:1512
KCategorizedView::categoryDrawer
KCategoryDrawer * categoryDrawer() const
Returns the current category drawer.
Definition kcategorizedview.cpp:632
KCategorizedView::dragEnterEvent
virtual void dragEnterEvent(QDragEnterEvent *event)
Reimplemented from QAbstractItemView.
Definition kcategorizedview.cpp:1101
KCategorizedView::setCollapsibleBlocks
void setCollapsibleBlocks(bool enable)
Sets whether blocks can be collapsed or not.
Definition kcategorizedview.cpp:688
KCategorizedView::leaveEvent
virtual void leaveEvent(QEvent *event)
Reimplemented from QWidget.
Definition kcategorizedview.cpp:1073
KCategorizedView::setAlternatingBlockColors
void setAlternatingBlockColors(bool enable)
Sets whether blocks should be drawn with alternating colors.
Definition kcategorizedview.cpp:678
KCategorizedView::moveCursor
virtual QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers)
Reimplemented from QAbstractItemView.
Definition kcategorizedview.cpp:1118
KCategorizedView::visualRect
virtual QRect visualRect(const QModelIndex &index) const
Reimplemented from QAbstractItemView.
Definition kcategorizedview.cpp:551
KCategorizedView::mouseMoveEvent
virtual void mouseMoveEvent(QMouseEvent *event)
Reimplemented from QWidget.
Definition kcategorizedview.cpp:949
KCategorizedView::collapsibleBlocks
bool collapsibleBlocks
Definition kcategorizedview.h:85
KCategorizedView::currentChanged
virtual void currentChanged(const QModelIndex &current, const QModelIndex &previous)
Reimplemented from QAbstractItemView.
Definition kcategorizedview.cpp:1448
KCategorizedView::mousePressEvent
virtual void mousePressEvent(QMouseEvent *event)
Reimplemented from QWidget.
Definition kcategorizedview.cpp:1008
KCategorizedView::setCategoryDrawer
void setCategoryDrawer(KCategoryDrawer *categoryDrawer)
The category drawer that will be used for drawing categories.
Definition kcategorizedview.cpp:637
KCategorizedView::startDrag
virtual void startDrag(Qt::DropActions supportedActions)
Reimplemented from QAbstractItemView.
Definition kcategorizedview.cpp:1090
KCategorizedView::dropEvent
virtual void dropEvent(QDropEvent *event)
Reimplemented from QAbstractItemView.
Definition kcategorizedview.cpp:1111
KCategorizedView::reset
virtual void reset()
Reimplemented from QAbstractItemView.
Definition kcategorizedview.cpp:782
KCategorizedView::block
QModelIndexList block(const QString &category)
Definition kcategorizedview.cpp:693
KCategorizedView::setSelection
virtual void setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags flags)
Reimplemented from QAbstractItemView.
Definition kcategorizedview.cpp:905
KCategorizedView::indexAt
virtual QModelIndex indexAt(const QPoint &point) const
Reimplemented from QAbstractItemView.
Definition kcategorizedview.cpp:716
KCategorizedView::setGridSizeOwn
void setGridSizeOwn(const QSize &size)
Definition kcategorizedview.cpp:545
KCategorizedView::dataChanged
virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
Reimplemented from QAbstractItemView.
Definition kcategorizedview.cpp:1454
KCategorizedView::categorySpacing
int categorySpacing
Definition kcategorizedview.h:83
KCategorizedView::slotLayoutChanged
virtual void slotLayoutChanged()
Definition kcategorizedview.cpp:1522
KCategorizedView::setGridSize
void setGridSize(const QSize &size)
Calls to setGridSizeOwn().
Definition kcategorizedview.cpp:540
KCategorizedView::resizeEvent
virtual void resizeEvent(QResizeEvent *event)
Reimplemented from QWidget.
Definition kcategorizedview.cpp:899
KCategoryDrawerV2
Definition kcategorydrawer.h:116
KCategoryDrawer
Definition kcategorydrawer.h:44
QAbstractItemModel
QItemSelectionModel
QListView
QWidget
kdeui_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal