QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
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
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
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}
This class is the data only representation of a QgsDetailedItemWidget, designed to be used in custom ...
QString category() const
Returns the item's category.
bool isCheckable() const
Returns true if the item is checkable.
QString title() const
Returns the item's title.
QPixmap icon() const
Returns the item's icon.
QString detail() const
Returns the detailed description for the item.
bool isChecked() const
Returns true if the item is checked.
QgsDetailedItemWidget(QWidget *parent=nullptr)
Constructor for QgsDetailedItemWidget.
void setData(const QgsDetailedItemData &data)