• 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
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
Item view for listing items in a categorized fashion optionally.
Definition: kcategorizedview.h:81
KCategoryDrawerV2
Definition: kcategorydrawer.h:116
KCategoryDrawer
Definition: kcategorydrawer.h:44
QAbstractItemModel
QListView
QWidget
kdeui_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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
  • Modules
  • 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