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

KDEUI

kcategorizedsortfilterproxymodel.h

Go to the documentation of this file.
00001 
00022 #ifndef KCATEGORIZEDSORTFILTERPROXYMODEL_H
00023 #define KCATEGORIZEDSORTFILTERPROXYMODEL_H
00024 
00025 #include <QtGui/QSortFilterProxyModel>
00026 
00027 #include <kdeui_export.h>
00028 
00029 class QItemSelection;
00030 
00031 
00045 class KDEUI_EXPORT KCategorizedSortFilterProxyModel
00046     : public QSortFilterProxyModel
00047 {
00048 public:
00049     enum AdditionalRoles {
00050         // Note: use printf "0x%08X\n" $(($RANDOM*$RANDOM))
00051         // to define additional roles.
00052         CategoryDisplayRole = 0x17CE990A,  
00053 
00054         CategorySortRole    = 0x27857E60   
00055 
00056 
00057 
00058 
00059 
00060     };
00061 
00062     KCategorizedSortFilterProxyModel(QObject *parent = 0);
00063     virtual ~KCategorizedSortFilterProxyModel();
00064 
00069     virtual void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
00070 
00074     bool isCategorizedModel() const;
00075 
00081     void setCategorizedModel(bool categorizedModel);
00082 
00086     int sortColumn() const;
00087 
00091     Qt::SortOrder sortOrder() const;
00092 
00100     void setSortCategoriesByNaturalComparison(bool sortCategoriesByNaturalComparison);
00101 
00105     bool sortCategoriesByNaturalComparison() const;
00106 
00114     KDE_DEPRECATED static int naturalCompare(const QString &a, const QString &b);
00115 
00116 protected:
00130     virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
00131 
00138     virtual bool subSortLessThan(const QModelIndex &left, const QModelIndex &right) const;
00139 
00175     virtual int compareCategories(const QModelIndex &left, const QModelIndex &right) const;
00176 
00177 private:
00178     class Private;
00179     Private *const d;
00180 };
00181 
00182 
00183 #endif // KCATEGORIZEDSORTFILTERPROXYMODEL_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
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
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