QGIS API Documentation  3.2.0-Bonn (bc43194)
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 
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 }
void setDetail(const QString &detail)
Sets the detailed description for the item.
bool isRenderedAsWidget() const
Returns true if the item will be rendered using a widget.
bool isEnabled() const
Returns true if the item is enabled.
bool isChecked() const
Returns true if the item is checked.
QString category() const
Returns the item's category.
QPixmap icon() const
Returns the item's icon.
void setChecked(bool flag)
Sets whether the item is checked.
QString title() const
Returns the item's title.
void setEnabled(bool flag)
Sets whether the item is enabled.
void setTitle(const QString &title)
Sets the title for the item.
void setCheckable(bool flag)
Sets whether the item is checkable.
void setIcon(const QPixmap &icon)
Sets the item's icon.
void setCategory(const QString &category)
Sets the item's category.
bool isCheckable() const
Returns true if the item is checkable.
void setRenderAsWidget(bool flag)
This is a hint to the delegate to render using a widget rather than manually painting every part of t...
QString detail() const
Returns the detailed description for the item.