Quantum GIS API Documentation
1.8
|
00001 /*************************************************************************** 00002 qgsdetaileditemdata.h - A data represenation for a rich QItemData subclass 00003 ------------------- 00004 begin : Sat May 17 2008 00005 copyright : (C) 2008 Tim Sutton 00006 email : [email protected] 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 #ifndef QGSDETAILEDITEMDATA_H 00018 #define QGSDETAILEDITEMDATA_H 00019 00020 00021 #include <QMetaType> 00022 #include <QString> 00023 #include <QPixmap> 00024 00029 class GUI_EXPORT QgsDetailedItemData 00030 { 00031 public: 00032 QgsDetailedItemData(); 00033 ~QgsDetailedItemData(); 00034 void setTitle( const QString theTitle ); 00035 void setDetail( const QString theDetail ); 00036 void setCategory( const QString theCategory ); 00037 void setIcon( const QPixmap theIcon ); 00038 void setCheckable( const bool theFlag ); 00039 void setChecked( const bool theFlag ); 00040 void setEnabled( bool theFlag ); 00047 void setRenderAsWidget( bool theFlag ); 00048 00049 QString title() const; 00050 QString detail() const; 00051 QString category() const; 00052 QPixmap icon() const; 00053 bool isCheckable() const; 00054 bool isChecked() const; 00055 bool isEnabled() const; 00056 bool isRenderedAsWidget() const; 00057 00058 private: 00059 QString mTitle; 00060 QString mDetail; 00061 QString mCategory; 00062 QString mLibraryName; 00063 QPixmap mPixmap; 00064 bool mCheckableFlag; 00065 bool mCheckedFlag; 00066 bool mEnabledFlag; 00067 bool mRenderAsWidgetFlag; 00068 }; 00069 00070 // Make QVariant aware of this data type (see qtdocs star 00071 // rating delegate example for more details) 00072 Q_DECLARE_METATYPE( QgsDetailedItemData ) 00073 #endif //QGSDETAILEDITEMDATA_H