libyui-qt
Loading...
Searching...
No Matches
YQCustomStatusItemSelector.h
1/*
2 Copyright (C) 2019 SUSE LLC
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: YQCustomStatusItemSelector.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25
26#ifndef YQCustomStatusItemSelector_h
27#define YQCustomStatusItemSelector_h
28
29#include "YQItemSelector.h"
30
31
33
34
42{
43 Q_OBJECT
44
45public:
46
50 YQCustomStatusItemSelector( YWidget * parent,
51 const YItemCustomStatusVector & customStates );
52
57
63 virtual void addItem( YItem * item );
64
70 virtual void selectItem( YItem * item, bool selected = true );
71
75 const QIcon & statusIcon( int status ) const;
76
82 virtual void activateItem( YItem * item );
83
84protected slots:
85
91
92
93protected:
94
98 void preloadStatusIcons();
99
105 virtual void updateCustomStatusIndicator( YItem * item );
106
107
108 // Data members
109
110 QList<QIcon> _statusIcons;
111
112}; // class YQCustomStatusItemSelector
113
114
115
120{
121 Q_OBJECT
122
123public:
124
129 YItem * item );
130
135
139 void setStatusIcon();
140
141signals:
142
148
149protected slots:
150
154 void slotClicked();
155
156protected:
157
164 virtual QAbstractButton * createHeadingToggle( const std::string & label,
165 QWidget * parent );
166
170 void setStatusIcon( QAbstractButton * toggle );
171
177 virtual int itemDescriptionIndent() const;
178
179}; // class YQCustomStatusSelectorItemWidget
180
181
182#endif // YQCustomStatusItemSelector_h
Definition YQCustomStatusItemSelector.h:42
const QIcon & statusIcon(int status) const
Definition YQCustomStatusItemSelector.cc:88
virtual ~YQCustomStatusItemSelector()
Definition YQCustomStatusItemSelector.cc:44
virtual void activateItem(YItem *item)
Definition YQCustomStatusItemSelector.cc:144
virtual void selectItem(YItem *item, bool selected=true)
Definition YQCustomStatusItemSelector.cc:80
virtual void updateCustomStatusIndicator(YItem *item)
Definition YQCustomStatusItemSelector.cc:99
void preloadStatusIcons()
Definition YQCustomStatusItemSelector.cc:50
void itemClicked(YQCustomStatusSelectorItemWidget *itemWidget)
Definition YQCustomStatusItemSelector.cc:114
virtual void addItem(YItem *item)
Definition YQCustomStatusItemSelector.cc:59
Definition YQCustomStatusItemSelector.h:120
void slotClicked()
Definition YQCustomStatusItemSelector.cc:236
virtual int itemDescriptionIndent() const
Definition YQCustomStatusItemSelector.cc:220
void clicked(YQCustomStatusSelectorItemWidget *itemWidget)
virtual QAbstractButton * createHeadingToggle(const std::string &label, QWidget *parent)
Definition YQCustomStatusItemSelector.cc:173
void setStatusIcon()
Definition YQCustomStatusItemSelector.cc:192
virtual ~YQCustomStatusSelectorItemWidget()
Definition YQCustomStatusItemSelector.cc:166
Definition YQItemSelector.h:43
Definition YQItemSelector.h:212