]> icculus.org git repositories - duncan/yast2-qt4.git/blob - src/YQPushButton.h
don't create QObjects in ycp thread - make timeouts work
[duncan/yast2-qt4.git] / src / YQPushButton.h
1 /*---------------------------------------------------------------------\
2 |                                                                      |
3 |                      __   __    ____ _____ ____                      |
4 |                      \ \ / /_ _/ ___|_   _|___ \                     |
5 |                       \ V / _` \___ \ | |   __) |                    |
6 |                        | | (_| |___) || |  / __/                     |
7 |                        |_|\__,_|____/ |_| |_____|                    |
8 |                                                                      |
9 |                               core system                            |
10 |                                                        (C) SuSE GmbH |
11 \----------------------------------------------------------------------/
12
13   File:       YQPushButton.h
14
15   Author:     Stefan Hundhammer <sh@suse.de>
16
17 /-*/
18
19
20 #ifndef YQPushButton_h
21 #define YQPushButton_h
22
23 #include "YQGenericButton.h"
24
25
26 class YQDialog;
27
28 class YQPushButton : public YQGenericButton
29 {
30     Q_OBJECT
31     
32 public:
33     /**
34      * Constructor.
35      **/
36     YQPushButton( YWidget *             parent,
37                   const std::string &   label );
38
39     /**
40      * Destructor.
41      **/
42     virtual ~YQPushButton();
43
44     /**
45      * Preferred width of the widget.
46      *
47      * Reimplemented from YWidget.
48      **/
49     virtual int preferredWidth();
50
51     /**
52      * Preferred height of the widget.
53      *
54      * Reimplemented from YWidget.
55      **/
56     virtual int preferredHeight();
57
58     /**
59      * Set the new size of the widget.
60      *
61      * Reimplemented from YWidget.
62      **/
63     virtual void setSize( int newWidth, int newHeight );
64
65     
66 public slots:
67
68     /**
69      * Triggered when the button is activated (clicked or via keyboard).
70      * Notifies the the ui about this.
71      **/
72     void hit();
73 };
74
75 #endif // YQPushButton_h