QGIS API Documentation  2.2.0-Valmiera
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgsdetaileditemdata.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsdetailedlistdata.cpp - A data represenation 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"
20 {
21  mRenderAsWidgetFlag = false;
22  mEnabledFlag = true;
23 }
24 
26 {
27 }
28 
29 void QgsDetailedItemData::setTitle( const QString theTitle )
30 {
31  mTitle = theTitle;
32 }
33 
34 void QgsDetailedItemData::setDetail( const QString theDetail )
35 {
36  mDetail = theDetail;
37 }
38 
39 void QgsDetailedItemData::setCategory( const QString theCategory )
40 {
41  mCategory = theCategory;
42 }
43 
44 void QgsDetailedItemData::setIcon( const QPixmap theIcon )
45 {
46  mPixmap = theIcon;
47 }
48 
49 void QgsDetailedItemData::setCheckable( const bool theFlag )
50 {
51  mCheckableFlag = theFlag;
52 }
53 
54 void QgsDetailedItemData::setChecked( const bool theFlag )
55 {
56  mCheckedFlag = theFlag;
57 }
58 
59 void QgsDetailedItemData::setRenderAsWidget( const bool theFlag )
60 {
61  mRenderAsWidgetFlag = theFlag;
62 }
63 
65 {
66  return mTitle;
67 }
68 
70 {
71  return mDetail;
72 }
73 
75 {
76  return mCategory;
77 }
78 
80 {
81  return mPixmap;
82 }
83 
85 {
86  return mCheckableFlag;
87 }
88 
90 {
91  return mCheckedFlag;
92 }
93 
95 {
96  return mRenderAsWidgetFlag;
97 }
98 
99 void QgsDetailedItemData::setEnabled( bool theFlag )
100 {
101  mEnabledFlag = theFlag;
102 }
103 
105 {
106  return mEnabledFlag;
107 }