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