QGIS API Documentation  3.14.0-Pi (9f7028fd23)
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 }
QgsDetailedItemData::icon
QPixmap icon() const
Returns the item's icon.
Definition: qgsdetaileditemdata.cpp:70
QgsDetailedItemData::category
QString category() const
Returns the item's category.
Definition: qgsdetaileditemdata.cpp:65
QgsDetailedItemData::isChecked
bool isChecked() const
Returns true if the item is checked.
Definition: qgsdetaileditemdata.cpp:80
QgsDetailedItemData::setTitle
void setTitle(const QString &title)
Sets the title for the item.
Definition: qgsdetaileditemdata.cpp:20
QgsDetailedItemData::isCheckable
bool isCheckable() const
Returns true if the item is checkable.
Definition: qgsdetaileditemdata.cpp:75
QgsDetailedItemData::title
QString title() const
Returns the item's title.
Definition: qgsdetaileditemdata.cpp:55
QgsDetailedItemData::setCategory
void setCategory(const QString &category)
Sets the item's category.
Definition: qgsdetaileditemdata.cpp:30
QgsDetailedItemData::isRenderedAsWidget
bool isRenderedAsWidget() const
Returns true if the item will be rendered using a widget.
Definition: qgsdetaileditemdata.cpp:85
QgsDetailedItemData::setCheckable
void setCheckable(bool flag)
Sets whether the item is checkable.
Definition: qgsdetaileditemdata.cpp:40
qgsdetaileditemdata.h
QgsDetailedItemData::setChecked
void setChecked(bool flag)
Sets whether the item is checked.
Definition: qgsdetaileditemdata.cpp:45
QgsDetailedItemData::setEnabled
void setEnabled(bool flag)
Sets whether the item is enabled.
Definition: qgsdetaileditemdata.cpp:90
QgsDetailedItemData::isEnabled
bool isEnabled() const
Returns true if the item is enabled.
Definition: qgsdetaileditemdata.cpp:95
QgsDetailedItemData::detail
QString detail() const
Returns the detailed description for the item.
Definition: qgsdetaileditemdata.cpp:60
QgsDetailedItemData::setRenderAsWidget
void setRenderAsWidget(bool flag)
This is a hint to the delegate to render using a widget rather than manually painting every part of t...
Definition: qgsdetaileditemdata.cpp:50
QgsDetailedItemData::setIcon
void setIcon(const QPixmap &icon)
Sets the item's icon.
Definition: qgsdetaileditemdata.cpp:35
QgsDetailedItemData::setDetail
void setDetail(const QString &detail)
Sets the detailed description for the item.
Definition: qgsdetaileditemdata.cpp:25