libyui-qt  2.46.13
YQPushButton.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: YQPushButton.h
20 
21  Author: Stefan Hundhammer <sh@suse.de>
22 
23 /-*/
24 
25 
26 #ifndef YQPushButton_h
27 #define YQPushButton_h
28 
29 #include "YQGenericButton.h"
30 
31 
32 class YQDialog;
33 
35 {
36  Q_OBJECT
37 
38 public:
39  /**
40  * Constructor.
41  **/
42  YQPushButton( YWidget * parent,
43  const std::string & label );
44 
45  /**
46  * Destructor.
47  **/
48  virtual ~YQPushButton();
49 
50  /**
51  * Preferred width of the widget.
52  *
53  * Reimplemented from YWidget.
54  **/
55  virtual int preferredWidth();
56 
57  /**
58  * Preferred height of the widget.
59  *
60  * Reimplemented from YWidget.
61  **/
62  virtual int preferredHeight();
63 
64  /**
65  * Set the new size of the widget.
66  *
67  * Reimplemented from YWidget.
68  **/
69  virtual void setSize( int newWidth, int newHeight );
70 
71 
72 public slots:
73 
74  /**
75  * Triggered when the button is activated (clicked or via keyboard).
76  * Notifies the the ui about this.
77  **/
78  void hit();
79 };
80 
81 #endif // YQPushButton_h
virtual void setSize(int newWidth, int newHeight)
Set the new size of the widget.
Definition: YQPushButton.cc:75
Abstract base class for push button and similar widgets - all that can become a YQDialog's "default b...
virtual int preferredWidth()
Preferred width of the widget.
Definition: YQPushButton.cc:63
void hit()
Triggered when the button is activated (clicked or via keyboard).
Definition: YQPushButton.cc:83
virtual ~YQPushButton()
Destructor.
Definition: YQPushButton.cc:58
virtual int preferredHeight()
Preferred height of the widget.
Definition: YQPushButton.cc:69
YQPushButton(YWidget *parent, const std::string &label)
Constructor.
Definition: YQPushButton.cc:37