]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/Qt2BC.h
dont use pragma impementation and interface anymore
[lyx.git] / src / frontends / qt2 / Qt2BC.h
1 // -*- C++ -*-
2 /**
3  * \file Qt2BC.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Allan Rae
8  * \author Angus Leeming
9  * \author Baruch Even
10  *
11  * Full author contact details are available in file CREDITS
12  */
13
14 #ifndef QT2BC_H
15 #define QT2BC_H
16
17
18 #include "ButtonController.h"
19
20 class QWidget;
21 class QButton;
22
23 /** General purpose button controller for up to four buttons.
24     Controls the activation of the OK, Apply and Cancel buttons.
25     Actually supports 4 buttons in all and it's up to the user to decide on
26     the activation policy and which buttons correspond to which output of the
27     state machine.
28 */
29 class Qt2BC : public GuiBC<QButton, QWidget> {
30 public:
31         ///
32         Qt2BC(string const &, string const &);
33 private:
34         /// Updates the button sensitivity (enabled/disabled)
35         void setButtonEnabled(QButton *, bool enabled);
36
37         /// Updates the widget sensitivity (enabled/disabled)
38         void setWidgetEnabled(QWidget *, bool enabled);
39
40         /// Set the label on the button
41         void setButtonLabel(QButton *, string const & label);
42 };
43
44 #endif // QT2BC_H