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

KDEUI

  • sources
  • kde-4.12
  • kdelibs
  • 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 
28 class KCategoryDrawer;
29 class KCategoryDrawerV2;
30 
79 class 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 
87 public:
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 
211 protected:
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 
310 protected 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 
337 private:
338  class Private;
339  Private *const d;
340 
341  Q_PRIVATE_SLOT(d, void _k_slotCollapseOrExpandClicked(QModelIndex))
342 };
343 
344 #endif // KCATEGORIZEDVIEW_H
QItemSelectionModel
QWidget
QString
KCategoryDrawer
Definition: kcategorydrawer.h:43
KCategorizedView
Item view for listing items in a categorized fashion optionally.
Definition: kcategorizedview.h:79
QAbstractItemModel
QListView
KCategoryDrawerV2
Definition: kcategorydrawer.h:113
QPoint
QRect
kdeui_export.h
QSize
KStandardGuiItem::reset
KGuiItem reset()
Returns the 'Reset' gui item.
Definition: kstandardguiitem.cpp:258
KStandardShortcut::end
const KShortcut & end()
Goto end of the document.
Definition: kstandardshortcut.cpp:348
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:14 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



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