Quantum GIS API Documentation
1.7.4
|
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 : tim@linfiniti.com 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 /* $Id:$ */ 00018 #ifndef QGSDETAILEDITEMDATA_H 00019 #define QGSDETAILEDITEMDATA_H 00020 00021 00022 #include <QMetaType> 00023 #include <QString> 00024 #include <QPixmap> 00025 00030 class GUI_EXPORT QgsDetailedItemData 00031 { 00032 public: 00033 QgsDetailedItemData(); 00034 ~QgsDetailedItemData(); 00035 void setTitle( const QString theTitle ); 00036 void setDetail( const QString theDetail ); 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 QPixmap icon() const; 00052 bool isCheckable() const; 00053 bool isChecked() const; 00054 bool isEnabled() const; 00055 bool isRenderedAsWidget() const; 00056 00057 private: 00058 QString mTitle; 00059 QString mDetail; 00060 QString mLibraryName; 00061 QPixmap mPixmap; 00062 bool mCheckableFlag; 00063 bool mCheckedFlag; 00064 bool mEnabledFlag; 00065 bool mRenderAsWidgetFlag; 00066 }; 00067 00068 // Make QVariant aware of this data type (see qtdocs star 00069 // rating delegate example for more details) 00070 Q_DECLARE_METATYPE( QgsDetailedItemData ) 00071 #endif //QGSDETAILEDITEMDATA_H