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

KDEUI

  • 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
29class QPainter;
30class QModelIndex;
31class QStyleOption;
32
33class KCategorizedView;
34
43class KDEUI_EXPORT KCategoryDrawer
44{
45public:
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
100private:
101 class Private;
102 Private *const d;
103};
104
105
113class KDEUI_EXPORT KCategoryDrawerV2
114 : public QObject
115 , public KCategoryDrawer
116{
117 Q_OBJECT
118
119public:
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
131Q_SIGNALS:
135 void collapseOrExpandClicked(const QModelIndex &index);
136
144 void actionRequested(int action, const QModelIndex &index);
145};
146
150class KDEUI_EXPORT KCategoryDrawerV3
151 : public KCategoryDrawerV2
152{
153 friend class KCategorizedView;
154
155public:
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
168protected:
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
225private:
226 class Private;
227 Private *const d;
228};
229
230#endif // KCATEGORYDRAWER_H
KCategorizedView
Item view for listing items in a categorized fashion optionally.
Definition: kcategorizedview.h:81
KCategoryDrawerV2
Definition: kcategorydrawer.h:116
KCategoryDrawerV2::actionRequested
void actionRequested(int action, const QModelIndex &index)
Emit this signal on your subclass implementation to notify that something happened.
KCategoryDrawerV2::collapseOrExpandClicked
void collapseOrExpandClicked(const QModelIndex &index)
This signal becomes emitted when collapse or expand has been clicked.
KCategoryDrawerV2::mouseButtonPressed
virtual void mouseButtonPressed(const QModelIndex &index, QMouseEvent *event)
Definition: kcategorydrawer.cpp:209
KCategoryDrawerV2::mouseButtonDoubleClicked
virtual void mouseButtonDoubleClicked(const QModelIndex &index, QMouseEvent *event)
Definition: kcategorydrawer.cpp:224
KCategoryDrawerV2::mouseButtonReleased
virtual void mouseButtonReleased(const QModelIndex &index, QMouseEvent *event)
Definition: kcategorydrawer.cpp:214
KCategoryDrawerV3
Definition: kcategorydrawer.h:152
KCategoryDrawer
Definition: kcategorydrawer.h:44
QObject
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