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

KDEUI

kcategorizedview.h

Go to the documentation of this file.
00001 
00021 #ifndef KCATEGORIZEDVIEW_H
00022 #define KCATEGORIZEDVIEW_H
00023 
00024 #include <QtGui/QListView>
00025 
00026 #include <kdeui_export.h>
00027 
00028 class KCategoryDrawer;
00029 class KCategoryDrawerV2;
00030 
00079 class KDEUI_EXPORT KCategorizedView
00080     : public QListView
00081 {
00082     Q_OBJECT
00083     Q_PROPERTY(int categorySpacing READ categorySpacing WRITE setCategorySpacing)
00084     Q_PROPERTY(bool alternatingBlockColors READ alternatingBlockColors WRITE setAlternatingBlockColors)
00085     Q_PROPERTY(bool collapsibleBlocks READ collapsibleBlocks WRITE setCollapsibleBlocks)
00086 
00087 public:
00088     KCategorizedView(QWidget *parent = 0);
00089 
00090     ~KCategorizedView();
00091 
00095     virtual void setModel(QAbstractItemModel *model);
00096 
00100     void setGridSize(const QSize &size);
00101 
00128     void setGridSizeOwn(const QSize &size);
00129 
00133     virtual QRect visualRect(const QModelIndex &index) const;
00134 
00138     KCategoryDrawer *categoryDrawer() const;
00139 
00143     void setCategoryDrawer(KCategoryDrawer *categoryDrawer);
00144 
00150     int categorySpacing() const;
00151 
00157     void setCategorySpacing(int categorySpacing);
00158 
00164     bool alternatingBlockColors() const;
00165 
00171     void setAlternatingBlockColors(bool enable);
00172 
00178     bool collapsibleBlocks() const;
00179 
00185     void setCollapsibleBlocks(bool enable);
00186 
00192     QModelIndexList block(const QString &category);
00193 
00199     QModelIndexList block(const QModelIndex &representative);
00200 
00204     virtual QModelIndex indexAt(const QPoint &point) const;
00205 
00209     virtual void reset();
00210 
00211 protected:
00215     virtual void paintEvent(QPaintEvent *event);
00216 
00220     virtual void resizeEvent(QResizeEvent *event);
00221 
00225     virtual void setSelection(const QRect &rect,
00226                               QItemSelectionModel::SelectionFlags flags);
00227 
00231     virtual void mouseMoveEvent(QMouseEvent *event);
00232 
00236     virtual void mousePressEvent(QMouseEvent *event);
00237 
00241     virtual void mouseReleaseEvent(QMouseEvent *event);
00242 
00246     virtual void leaveEvent(QEvent *event);
00247 
00251     virtual void startDrag(Qt::DropActions supportedActions);
00252 
00256     virtual void dragMoveEvent(QDragMoveEvent *event);
00257 
00261     virtual void dragEnterEvent(QDragEnterEvent *event);
00262 
00266     virtual void dragLeaveEvent(QDragLeaveEvent *event);
00267 
00271     virtual void dropEvent(QDropEvent *event);
00272 
00276     virtual QModelIndex moveCursor(CursorAction cursorAction,
00277                                    Qt::KeyboardModifiers modifiers);
00278 
00282     virtual void rowsAboutToBeRemoved(const QModelIndex &parent,
00283                                       int start,
00284                                       int end);
00285 
00289     virtual void updateGeometries();
00290 
00294     virtual void currentChanged(const QModelIndex &current,
00295                                 const QModelIndex &previous);
00296 
00300     virtual void dataChanged(const QModelIndex &topLeft,
00301                              const QModelIndex &bottomRight);
00302 
00306     virtual void rowsInserted(const QModelIndex &parent,
00307                               int start,
00308                               int end);
00309 
00310 protected Q_SLOTS:
00315 #ifndef KDE_NO_DEPRECATED
00316     virtual KDE_DEPRECATED void rowsInsertedArtifficial(const QModelIndex &parent,
00317                                                         int start,
00318                                                         int end);
00319 #endif
00320 
00325 #ifndef KDE_NO_DEPRECATED
00326     virtual KDE_DEPRECATED void rowsRemoved(const QModelIndex &parent,
00327                                             int start,
00328                                             int end);
00329 #endif
00330 
00335     virtual void slotLayoutChanged();
00336 
00337 private:
00338     class Private;
00339     Private *const d;
00340 
00341     Q_PRIVATE_SLOT(d, void _k_slotCollapseOrExpandClicked(QModelIndex))
00342 };
00343 
00344 #endif // KCATEGORIZEDVIEW_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