libyui
 
Loading...
Searching...
No Matches
YItemCustomStatus.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: YItemCustomStatus.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25#ifndef YItemCustomStatus_h
26#define YItemCustomStatus_h
27
28#include <string>
29#include <vector>
30
31
45{
46public:
50 YItemCustomStatus( const std::string & iconName,
51 const std::string & textIndicator,
52 int nextStatus = -1 )
53 : _iconName( iconName )
54 , _textIndicator( textIndicator )
55 , _nextStatus( nextStatus )
56 {}
57
62 const std::string & iconName() const { return _iconName; }
63
71 const std::string & textIndicator() const { return _textIndicator; }
72
82 int nextStatus() const { return _nextStatus; }
83
88 void setNextStatus( int value ) { _nextStatus = value; }
89
94 bool hasNextStatus() const { return _nextStatus != -1; }
95
96protected:
97
98 std::string _iconName;
99 std::string _textIndicator;
100 int _nextStatus;
101};
102
103
104typedef std::vector<YItemCustomStatus> YItemCustomStatusVector;
105
106
107#endif // YItemCustomStatus_h
YItemCustomStatus(const std::string &iconName, const std::string &textIndicator, int nextStatus=-1)
Definition YItemCustomStatus.h:50
int nextStatus() const
Definition YItemCustomStatus.h:82
const std::string & textIndicator() const
Definition YItemCustomStatus.h:71
const std::string & iconName() const
Definition YItemCustomStatus.h:62
void setNextStatus(int value)
Definition YItemCustomStatus.h:88
bool hasNextStatus() const
Definition YItemCustomStatus.h:94