QGIS API Documentation  3.20.0-Odense (decaadbb31)
qgsdetaileditemdata.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsdetailedlistdata.cpp - A data representation for a rich QItemData subclass
3  -------------------
4  begin : Sat May 17 2008
5  copyright : (C) 2008 Tim Sutton
6  email : [email protected]
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 
18 #include "qgsdetaileditemdata.h"
19 
20 void QgsDetailedItemData::setTitle( const QString &title )
21 {
22  mTitle = title;
23 }
24 
25 void QgsDetailedItemData::setDetail( const QString &detail )
26 {
27  mDetail = detail;
28 }
29 
30 void QgsDetailedItemData::setCategory( const QString &category )
31 {
32  mCategory = category;
33 }
34 
35 void QgsDetailedItemData::setIcon( const QPixmap &icon )
36 {
37  mPixmap = icon;
38 }
39 
40 void QgsDetailedItemData::setCheckable( const bool flag )
41 {
42  mCheckableFlag = flag;
43 }
44 
45 void QgsDetailedItemData::setChecked( const bool flag )
46 {
47  mCheckedFlag = flag;
48 }
49 
51 {
52  mRenderAsWidgetFlag = flag;
53 }
54 
56 {
57  return mTitle;
58 }
59 
61 {
62  return mDetail;
63 }
64 
66 {
67  return mCategory;
68 }
69 
71 {
72  return mPixmap;
73 }
74 
76 {
77  return mCheckableFlag;
78 }
79 
81 {
82  return mCheckedFlag;
83 }
84 
86 {
87  return mRenderAsWidgetFlag;
88 }
89 
91 {
92  mEnabledFlag = flag;
93 }
94 
96 {
97  return mEnabledFlag;
98 }
QString category() const
Returns the item's category.
void setCheckable(bool flag)
Sets whether the item is checkable.
void setDetail(const QString &detail)
Sets the detailed description for the item.
void setEnabled(bool flag)
Sets whether the item is enabled.
void setTitle(const QString &title)
Sets the title for the item.
void setChecked(bool flag)
Sets whether the item is checked.
bool isCheckable() const
Returns true if the item is checkable.
bool isEnabled() const
Returns true if the item is enabled.
QString title() const
Returns the item's title.
bool isRenderedAsWidget() const
Returns true if the item will be rendered using a widget.
QPixmap icon() const
Returns the item's icon.
QString detail() const
Returns the detailed description for the item.
void setIcon(const QPixmap &icon)
Sets the item's icon.
void setCategory(const QString &category)
Sets the item's category.
void setRenderAsWidget(bool flag)
This is a hint to the delegate to render using a widget rather than manually painting every part of t...
bool isChecked() const
Returns true if the item is checked.