libyui
Loading...
Searching...
No Matches
YPushButton.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: YPushButton.h
20
21
Author: Stefan Hundhammer <shundhammer@suse.de>
22
23
/-*/
24
25
#ifndef YPushButton_h
26
#define YPushButton_h
27
28
#include "YWidget.h"
29
30
class
YPushButtonPrivate
;
31
32
33
37
class
YPushButton
:
public
YWidget
38
{
39
protected
:
43
YPushButton
(
YWidget
*
parent
,
const
std::string &
label
);
44
45
public
:
49
virtual
~YPushButton
();
50
55
virtual
const
char
*
widgetClass
()
const
{
return
"YPushButton"
; }
56
60
std::string
label
()
const
;
61
68
virtual
void
setLabel
(
const
std::string &
label
);
69
77
virtual
void
setIcon
(
const
std::string & iconName ) {}
78
84
bool
isDefaultButton
()
const
;
85
92
virtual
void
setDefaultButton
(
bool
def
=
true
);
93
113
virtual
void
setRole
( YButtonRole
role
);
114
118
YButtonRole
role
()
const
;
119
129
virtual
void
setFunctionKey
(
int
fkey_no
);
130
131
145
bool
isHelpButton
()
const
;
146
153
virtual
void
setHelpButton
(
bool
helpButton
=
true
);
154
164
bool
isRelNotesButton
()
const
;
165
172
virtual
void
setRelNotesButton
(
bool
relNotesButton
=
true
);
173
184
virtual
bool
setProperty
(
const
std::string &
propertyName
,
185
const
YPropertyValue
&
val
);
186
193
virtual
YPropertyValue
getProperty
(
const
std::string &
propertyName
);
194
201
virtual
const
YPropertySet
&
propertySet
();
202
208
virtual
std::string
shortcutString
()
const
{
return
label
(); }
209
215
virtual
void
setShortcutString
(
const
std::string &
str
)
216
{
setLabel
(
str
); }
217
218
224
virtual
void
activate
() = 0;
225
226
private
:
227
228
ImplPtr<YPushButtonPrivate>
priv;
229
};
230
231
232
std::ostream &
operator<<
( std::ostream &
stream
, YButtonRole role );
233
234
235
typedef
YPushButton
YIconButton
;
236
237
238
#endif
// YPushButton_h
TreeItem
Definition
TreeItem.h:41
YPropertySet
Definition
YProperty.h:198
YPropertyValue
Definition
YProperty.h:105
YPushButton
Definition
YPushButton.h:38
YPushButton::activate
virtual void activate()=0
YPushButton::isDefaultButton
bool isDefaultButton() const
Definition
YPushButton.cc:92
YPushButton::setRole
virtual void setRole(YButtonRole role)
Definition
YPushButton.cc:154
YPushButton::setRelNotesButton
virtual void setRelNotesButton(bool relNotesButton=true)
Definition
YPushButton.cc:145
YPushButton::shortcutString
virtual std::string shortcutString() const
Definition
YPushButton.h:208
YPushButton::setShortcutString
virtual void setShortcutString(const std::string &str)
Definition
YPushButton.h:215
YPushButton::setLabel
virtual void setLabel(const std::string &label)
Definition
YPushButton.cc:80
YPushButton::~YPushButton
virtual ~YPushButton()
Definition
YPushButton.cc:69
YPushButton::setIcon
virtual void setIcon(const std::string &iconName)
Definition
YPushButton.h:77
YPushButton::isHelpButton
bool isHelpButton() const
Definition
YPushButton.cc:127
YPushButton::widgetClass
virtual const char * widgetClass() const
Definition
YPushButton.h:55
YPushButton::setHelpButton
virtual void setHelpButton(bool helpButton=true)
Definition
YPushButton.cc:133
YPushButton::label
std::string label() const
Definition
YPushButton.cc:86
YPushButton::YPushButton
YPushButton(YWidget *parent, const std::string &label)
Definition
YPushButton.cc:58
YPushButton::isRelNotesButton
bool isRelNotesButton() const
Definition
YPushButton.cc:139
YPushButton::role
YButtonRole role() const
Definition
YPushButton.cc:178
YPushButton::setProperty
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Definition
YPushButton.cc:230
YPushButton::setDefaultButton
virtual void setDefaultButton(bool def=true)
Definition
YPushButton.cc:98
YPushButton::setFunctionKey
virtual void setFunctionKey(int fkey_no)
Definition
YPushButton.cc:186
YPushButton::propertySet
virtual const YPropertySet & propertySet()
Definition
YPushButton.cc:212
YPushButton::getProperty
virtual YPropertyValue getProperty(const std::string &propertyName)
Definition
YPushButton.cc:245
YWidget
Definition
YWidget.h:55
YWidget::parent
YWidget * parent() const
Definition
YWidget.cc:277
YPushButtonPrivate
Definition
YPushButton.cc:39
src
YPushButton.h
Generated by
1.10.0