QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgsdetaileditemwidget.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsdetailedlistwidget.cpp - A rich QItemWidget 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 "qgsdetaileditemwidget.h"
20  : QWidget( parent )
21 
22 {
23  setupUi( this );
24 }
25 
27 {
28  lblTitle->setText( data.title() );
29  lblDetail->setText( data.detail() );
30  lblCategory->setText( data.category() );
31  cbx->setVisible( data.isCheckable() );
32  cbx->setChecked( data.isChecked() );
33  lblIcon->setPixmap( data.icon() );
34 }
35 
37 {
38  cbx->setChecked( flag );
39 }
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
QgsDetailedItemWidget::QgsDetailedItemWidget
QgsDetailedItemWidget(QWidget *parent=nullptr)
Constructor for QgsDetailedItemWidget.
Definition: qgsdetaileditemwidget.cpp:19
QgsDetailedItemData
This class is the data only representation of a QgsDetailedItemWidget, designed to be used in custom ...
Definition: qgsdetaileditemdata.h:31
QgsDetailedItemData::isChecked
bool isChecked() const
Returns true if the item is checked.
Definition: qgsdetaileditemdata.cpp:80
QgsDetailedItemWidget::setChecked
void setChecked(bool flag)
Definition: qgsdetaileditemwidget.cpp:36
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
QgsDetailedItemWidget::setData
void setData(const QgsDetailedItemData &data)
Definition: qgsdetaileditemwidget.cpp:26
QgsDetailedItemData::detail
QString detail() const
Returns the detailed description for the item.
Definition: qgsdetaileditemdata.cpp:60
qgsdetaileditemwidget.h