]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/Qt2BC.h
better selection and scrolling behaviour
[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 #ifdef __GNUG__
18 #pragma interface
19 #endif
20
21 #include "ButtonController.h"
22
23 class QWidget;
24 class QButton;
25
26 /** General purpose button controller for up to four buttons.
27     Controls the activation of the OK, Apply and Cancel buttons.
28     Actually supports 4 buttons in all and it's up to the user to decide on
29     the activation policy and which buttons correspond to which output of the
30     state machine.
31 */
32 class Qt2BC : public GuiBC<QButton, QWidget> {
33 public:
34         ///
35         Qt2BC(string const &, string const &);
36 private:
37         /// Updates the button sensitivity (enabled/disabled)
38         void setButtonEnabled(QButton *, bool enabled);
39
40         /// Updates the widget sensitivity (enabled/disabled)
41         void setWidgetEnabled(QWidget *, bool enabled);
42
43         /// Set the label on the button
44         void setButtonLabel(QButton *, string const & label);
45 };
46
47 #endif // QT2BC_H