QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
qgsdetaileditemdata.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsdetaileditemdata.h - A data representation for a rich QItemData subclass
3 -------------------
4 begin : Sat May 17 2008
5 copyright : (C) 2008 Tim Sutton
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17#ifndef QGSDETAILEDITEMDATA_H
18#define QGSDETAILEDITEMDATA_H
19
20
21#include <QMetaType>
22#include <QString>
23#include <QPixmap>
24#include "qgis_gui.h"
25
31class GUI_EXPORT QgsDetailedItemData
32{
33 public:
34
39
44 void setTitle( const QString &title );
45
50 void setDetail( const QString &detail );
51
56 void setCategory( const QString &category );
57
62 void setIcon( const QPixmap &icon );
63
68 void setCheckable( bool flag );
69
74 void setChecked( bool flag );
75
80 void setEnabled( bool flag );
81
90 void setRenderAsWidget( bool flag );
91
96 QString title() const;
97
102 QString detail() const;
103
108 QString category() const;
109
114 QPixmap icon() const;
115
120 bool isCheckable() const;
121
126 bool isChecked() const;
127
132 bool isEnabled() const;
133
138 bool isRenderedAsWidget() const;
139
140 private:
141 QString mTitle;
142 QString mDetail;
143 QString mCategory;
144 QString mLibraryName;
145 QPixmap mPixmap;
146 bool mCheckableFlag = false;
147 bool mCheckedFlag = false;
148 bool mEnabledFlag = true;
149 bool mRenderAsWidgetFlag = false;
150};
151
152// Make QVariant aware of this data type (see qtdocs star
153// rating delegate example for more details)
155#endif //QGSDETAILEDITEMDATA_H
This class is the data only representation of a QgsDetailedItemWidget, designed to be used in custom ...
QgsDetailedItemData()=default
Constructor for QgsDetailedItemData.
Q_DECLARE_METATYPE(QgsDatabaseQueryLogEntry)