libyui
 
Loading...
Searching...
No Matches
YMultiProgressMeter.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
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: YMultiProgressMeter.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25#ifndef YMultiProgressMeter_h
26#define YMultiProgressMeter_h
27
28#include "YWidget.h"
29#include <vector>
30
32
33
65{
66protected:
71 YUIDimension dim,
72 const std::vector<float> & maxValues );
73
74public:
78 virtual ~YMultiProgressMeter();
79
84 virtual const char * widgetClass() const { return "YMultiProgressMeter"; }
85
89 YUIDimension dimension() const;
90
94 bool horizontal() const;
95
99 bool vertical() const;
100
104 int segments() const;
105
109 float maxValue( int segment ) const;
110
115 float currentValue( int segment ) const;
116
123 void setCurrentValue( int segment, float value );
124
128 void setCurrentValues( const std::vector<float> & values );
129
140 virtual bool setProperty( const std::string & propertyName,
141 const YPropertyValue & val );
142
149 virtual YPropertyValue getProperty( const std::string & propertyName );
150
157 virtual const YPropertySet & propertySet();
158
163 virtual void doUpdate() = 0;
164
165
166private:
167
169
170};
171
172
173#endif // YMultiProgressMeter_h
Definition ImplPtr.h:43
float currentValue(int segment) const
Definition YMultiProgressMeter.cc:109
bool vertical() const
Definition YMultiProgressMeter.cc:89
int segments() const
Definition YMultiProgressMeter.cc:95
void setCurrentValues(const std::vector< float > &values)
Definition YMultiProgressMeter.cc:131
bool horizontal() const
Definition YMultiProgressMeter.cc:83
virtual const char * widgetClass() const
Definition YMultiProgressMeter.h:84
void setCurrentValue(int segment, float value)
Definition YMultiProgressMeter.cc:117
YUIDimension dimension() const
Definition YMultiProgressMeter.cc:77
float maxValue(int segment) const
Definition YMultiProgressMeter.cc:101
virtual const YPropertySet & propertySet()
Definition YMultiProgressMeter.cc:143
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Definition YMultiProgressMeter.cc:161
virtual ~YMultiProgressMeter()
Definition YMultiProgressMeter.cc:70
virtual void doUpdate()=0
virtual YPropertyValue getProperty(const std::string &propertyName)
Definition YMultiProgressMeter.cc:176
YMultiProgressMeter(YWidget *parent, YUIDimension dim, const std::vector< float > &maxValues)
Definition YMultiProgressMeter.cc:57
Definition YProperty.h:198
Definition YProperty.h:105
YWidget(YWidget *parent)
Definition YWidget.cc:106
YWidget * parent() const
Definition YWidget.cc:277
Definition YMultiProgressMeter.cc:37