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

KDEUI

kcategorydrawer.h

Go to the documentation of this file.
00001 
00021 #ifndef KCATEGORYDRAWER_H
00022 #define KCATEGORYDRAWER_H
00023 
00024 #include <kdeui_export.h>
00025 
00026 #include <QtCore/QObject>
00027 #include <QtGui/QMouseEvent>
00028 
00029 class QPainter;
00030 class QModelIndex;
00031 class QStyleOption;
00032 
00033 class KCategorizedView;
00034 
00043 class KDEUI_EXPORT KCategoryDrawer
00044 {
00045 public:
00046     KDE_DEPRECATED KCategoryDrawer();
00047 
00048     virtual ~KCategoryDrawer();
00049 
00057     virtual void drawCategory(const QModelIndex &index,
00058                               int sortRole,
00059                               const QStyleOption &option,
00060                               QPainter *painter) const;
00061 
00066     virtual int categoryHeight(const QModelIndex &index, const QStyleOption &option) const;
00067 
00068     //TODO KDE5: make virtual as leftMargin
00074     int leftMargin() const;
00075 
00081     void setLeftMargin(int leftMargin);
00082 
00083     //TODO KDE5: make virtual as rightMargin
00089     int rightMargin() const;
00090 
00096     void setRightMargin(int rightMargin);
00097 
00098     KCategoryDrawer &operator=(const KCategoryDrawer &cd);
00099 
00100 private:
00101     class Private;
00102     Private *const d;
00103 };
00104 
00105 
00113 class KDEUI_EXPORT KCategoryDrawerV2
00114     : public QObject
00115     , public KCategoryDrawer
00116 {
00117     Q_OBJECT
00118 
00119 public:
00120     KDE_DEPRECATED KCategoryDrawerV2(QObject *parent = 0);
00121     virtual ~KCategoryDrawerV2();
00122 
00123     KDE_DEPRECATED virtual void mouseButtonPressed(const QModelIndex &index, QMouseEvent *event);
00124 
00125     KDE_DEPRECATED virtual void mouseButtonReleased(const QModelIndex &index, QMouseEvent *event);
00126 
00127     KDE_DEPRECATED virtual void mouseButtonMoved(const QModelIndex &index, QMouseEvent *event);
00128 
00129     KDE_DEPRECATED virtual void mouseButtonDoubleClicked(const QModelIndex &index, QMouseEvent *event);
00130 
00131 Q_SIGNALS:
00135     void collapseOrExpandClicked(const QModelIndex &index);
00136 
00144     void actionRequested(int action, const QModelIndex &index);
00145 };
00146 
00150 class KDEUI_EXPORT KCategoryDrawerV3
00151     : public KCategoryDrawerV2
00152 {
00153     friend class KCategorizedView;
00154 
00155 public:
00156     KCategoryDrawerV3(KCategorizedView *view);
00157     virtual ~KCategoryDrawerV3();
00158 
00162     KCategorizedView *view() const;
00163 
00164     using KCategoryDrawerV2::mouseButtonPressed;
00165     using KCategoryDrawerV2::mouseButtonReleased;
00166     using KCategoryDrawerV2::mouseButtonDoubleClicked;
00167 
00168 protected:
00180     virtual void mouseButtonPressed(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event);
00181 
00193     virtual void mouseButtonReleased(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event);
00194 
00202     virtual void mouseMoved(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event);
00203 
00215     virtual void mouseButtonDoubleClicked(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event);
00216 
00223     virtual void mouseLeft(const QModelIndex &index, const QRect &blockRect);
00224 
00225 private:
00226     class Private;
00227     Private *const d;
00228 };
00229 
00230 #endif // KCATEGORYDRAWER_H

KDEUI

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • 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
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal