]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/qt2BC.h
Fix for qt2 citation dialog crash when selecting first key
[lyx.git] / src / frontends / qt2 / qt2BC.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ====================================================== 
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 2000-2001 The LyX Team.
8  *
9  * ======================================================
10  *
11  * \file qt2BC.h
12  * \author Allan Rae, rae@lyx.org
13  * \author Angus Leeming, a.leeming@ic.ac.uk
14  * \author Baruch Even, baruch.even@writeme.com
15  */
16
17 #ifndef QT2BC_H
18 #define QT2BC_H
19
20 #ifdef __GNUG__
21 #pragma interface
22 #endif
23
24 #include "ButtonController.h"
25
26 class QWidget;
27 class QButton;
28
29 /** General purpose button controller for up to four buttons.
30     Controls the activation of the OK, Apply and Cancel buttons.
31     Actually supports 4 buttons in all and it's up to the user to decide on
32     the activation policy and which buttons correspond to which output of the
33     state machine.
34 */
35 class qt2BC : public GuiBC<QButton, QWidget>
36 {
37 public:
38         ///
39         qt2BC(string const &, string const &);
40
41 private:
42         /// Updates the button sensitivity (enabled/disabled)
43         void setButtonEnabled(QButton *, bool enabled);
44
45         /// Updates the widget sensitivity (enabled/disabled)
46         void setWidgetEnabled(QWidget *, bool enabled);
47
48         /// Set the label on the button
49         void setButtonLabel(QButton *, string const & label);
50 };
51
52 #endif // QT2BC_H