• 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
kcategorydrawer.h
Go to the documentation of this file.
1 
21 #ifndef KCATEGORYDRAWER_H
22 #define KCATEGORYDRAWER_H
23 
24 #include <kdeui_export.h>
25 
26 #include <QtCore/QObject>
27 #include <QtGui/QMouseEvent>
28 
29 class QPainter;
30 class QModelIndex;
31 class QStyleOption;
32 
33 class KCategorizedView;
34 
43 class KDEUI_EXPORT KCategoryDrawer
44 {
45 public:
46  KDE_DEPRECATED KCategoryDrawer();
47 
48  virtual ~KCategoryDrawer();
49 
57  virtual void drawCategory(const QModelIndex &index,
58  int sortRole,
59  const QStyleOption &option,
60  QPainter *painter) const;
61 
66  virtual int categoryHeight(const QModelIndex &index, const QStyleOption &option) const;
67 
68  //TODO KDE5: make virtual as leftMargin
74  int leftMargin() const;
75 
81  void setLeftMargin(int leftMargin);
82 
83  //TODO KDE5: make virtual as rightMargin
89  int rightMargin() const;
90 
96  void setRightMargin(int rightMargin);
97 
98  KCategoryDrawer &operator=(const KCategoryDrawer &cd);
99 
100 private:
101  class Private;
102  Private *const d;
103 };
104 
105 
113 class KDEUI_EXPORT KCategoryDrawerV2
114  : public QObject
115  , public KCategoryDrawer
116 {
117  Q_OBJECT
118 
119 public:
120  KDE_DEPRECATED KCategoryDrawerV2(QObject *parent = 0);
121  virtual ~KCategoryDrawerV2();
122 
123  KDE_DEPRECATED virtual void mouseButtonPressed(const QModelIndex &index, QMouseEvent *event);
124 
125  KDE_DEPRECATED virtual void mouseButtonReleased(const QModelIndex &index, QMouseEvent *event);
126 
127  KDE_DEPRECATED virtual void mouseButtonMoved(const QModelIndex &index, QMouseEvent *event);
128 
129  KDE_DEPRECATED virtual void mouseButtonDoubleClicked(const QModelIndex &index, QMouseEvent *event);
130 
131 Q_SIGNALS:
135  void collapseOrExpandClicked(const QModelIndex &index);
136 
144  void actionRequested(int action, const QModelIndex &index);
145 };
146 
150 class KDEUI_EXPORT KCategoryDrawerV3
151  : public KCategoryDrawerV2
152 {
153  friend class KCategorizedView;
154 
155 public:
156  KCategoryDrawerV3(KCategorizedView *view);
157  virtual ~KCategoryDrawerV3();
158 
162  KCategorizedView *view() const;
163 
164  using KCategoryDrawerV2::mouseButtonPressed;
165  using KCategoryDrawerV2::mouseButtonReleased;
166  using KCategoryDrawerV2::mouseButtonDoubleClicked;
167 
168 protected:
180  virtual void mouseButtonPressed(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event);
181 
193  virtual void mouseButtonReleased(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event);
194 
202  virtual void mouseMoved(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event);
203 
215  virtual void mouseButtonDoubleClicked(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event);
216 
223  virtual void mouseLeft(const QModelIndex &index, const QRect &blockRect);
224 
225 private:
226  class Private;
227  Private *const d;
228 };
229 
230 #endif // KCATEGORYDRAWER_H
QObject
KCategoryDrawer
Definition: kcategorydrawer.h:43
KCategorizedView
Item view for listing items in a categorized fashion optionally.
Definition: kcategorizedview.h:79
KCategoryDrawerV2::mouseButtonDoubleClicked
virtual void mouseButtonDoubleClicked(const QModelIndex &index, QMouseEvent *event)
Definition: kcategorydrawer.cpp:224
KCategoryDrawerV3
Definition: kcategorydrawer.h:150
KCategoryDrawerV2
Definition: kcategorydrawer.h:113
QRect
KCategoryDrawerV2::mouseButtonPressed
virtual void mouseButtonPressed(const QModelIndex &index, QMouseEvent *event)
Definition: kcategorydrawer.cpp:209
kdeui_export.h
KCategoryDrawerV2::mouseButtonReleased
virtual void mouseButtonReleased(const QModelIndex &index, QMouseEvent *event)
Definition: kcategorydrawer.cpp:214
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