libyui
2.42.5
Main Page
Classes
Files
File List
All
Classes
Functions
Variables
Enumerations
Friends
YProgressBar.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: YProgressBar.h
20
21
Author: Stefan Hundhammer <sh@suse.de>
22
23
/-*/
24
25
#ifndef YProgressBar_h
26
#define YProgressBar_h
27
28
#include "YWidget.h"
29
30
class
YProgressBarPrivate
;
31
32
33
class
YProgressBar
:
public
YWidget
34
{
35
protected
:
36
/**
37
* Constructor.
38
**/
39
YProgressBar
(
YWidget
*
parent
,
40
const
std::string &
label
,
41
int
maxValue
= 100 );
42
43
public
:
44
/**
45
* Destructor.
46
**/
47
virtual
~YProgressBar
();
48
49
/**
50
* Returns a descriptive name of this widget class for logging,
51
* debugging etc.
52
**/
53
virtual
const
char
*
widgetClass
()
const
{
return
"YProgressBar"
; }
54
55
/**
56
* Get the label (the caption above the progress bar).
57
**/
58
std::string
label
();
59
60
/**
61
* Set the label (the caption above the progress bar).
62
*
63
* Derived classes are free to reimplement this, but they should call this
64
* base class method at the end of the overloaded function.
65
**/
66
virtual
void
setLabel
(
const
std::string & label );
67
68
/**
69
* Return the maximum progress value.
70
* Notice that this value can only be set in the constructor.
71
**/
72
int
maxValue
()
const
;
73
74
/**
75
* Return the current progress value.
76
**/
77
int
value
()
const
;
78
79
/**
80
* Set the current progress value ( <= maxValue() ).
81
*
82
* Derived classes should reimplement this, but they should call this
83
* base class method at the end of the overloaded function.
84
**/
85
virtual
void
setValue
(
int
newValue );
86
87
/**
88
* Set a property.
89
* Reimplemented from YWidget.
90
*
91
* This function may throw YUIPropertyExceptions.
92
*
93
* This function returns 'true' if the value was successfully set and
94
* 'false' if that value requires special handling (not in error cases:
95
* those are covered by exceptions).
96
**/
97
virtual
bool
setProperty
(
const
std::string & propertyName,
98
const
YPropertyValue
& val );
99
100
/**
101
* Get a property.
102
* Reimplemented from YWidget.
103
*
104
* This method may throw YUIPropertyExceptions.
105
**/
106
virtual
YPropertyValue
getProperty
(
const
std::string & propertyName );
107
108
/**
109
* Return this class's property set.
110
* This also initializes the property upon the first call.
111
*
112
* Reimplemented from YWidget.
113
**/
114
virtual
const
YPropertySet
&
propertySet
();
115
116
117
private
:
118
119
ImplPtr<YProgressBarPrivate>
priv;
120
};
121
122
123
#endif // YProgressBar_h
src
YProgressBar.h
Generated by
1.8.3