2001-03-23 22:07:56 +00:00
|
|
|
// -*- C++ -*-
|
2001-08-19 13:25:15 +00:00
|
|
|
/**
|
2001-06-16 14:48:12 +00:00
|
|
|
* \file qt2BC.h
|
2001-08-19 13:25:15 +00:00
|
|
|
* Copyright 2001 the LyX Team
|
|
|
|
* Read the file COPYING
|
|
|
|
*
|
2001-06-16 14:48:12 +00:00
|
|
|
* \author Allan Rae, rae@lyx.org
|
|
|
|
* \author Angus Leeming, a.leeming@ic.ac.uk
|
|
|
|
* \author Baruch Even, baruch.even@writeme.com
|
2001-03-23 22:07:56 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef QT2BC_H
|
|
|
|
#define QT2BC_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2001-06-16 14:48:12 +00:00
|
|
|
#include "ButtonController.h"
|
|
|
|
|
2001-03-29 18:58:47 +00:00
|
|
|
class QWidget;
|
2001-03-23 22:07:56 +00:00
|
|
|
class QButton;
|
|
|
|
|
|
|
|
/** General purpose button controller for up to four buttons.
|
|
|
|
Controls the activation of the OK, Apply and Cancel buttons.
|
|
|
|
Actually supports 4 buttons in all and it's up to the user to decide on
|
|
|
|
the activation policy and which buttons correspond to which output of the
|
|
|
|
state machine.
|
|
|
|
*/
|
2001-06-16 14:48:12 +00:00
|
|
|
class qt2BC : public GuiBC<QButton, QWidget>
|
2001-03-23 22:07:56 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
qt2BC(string const &, string const &);
|
|
|
|
|
2001-06-16 14:48:12 +00:00
|
|
|
private:
|
|
|
|
/// Updates the button sensitivity (enabled/disabled)
|
|
|
|
void setButtonEnabled(QButton *, bool enabled);
|
2001-03-23 22:07:56 +00:00
|
|
|
|
2001-06-16 14:48:12 +00:00
|
|
|
/// Updates the widget sensitivity (enabled/disabled)
|
|
|
|
void setWidgetEnabled(QWidget *, bool enabled);
|
2001-03-23 22:07:56 +00:00
|
|
|
|
2001-06-16 14:48:12 +00:00
|
|
|
/// Set the label on the button
|
|
|
|
void setButtonLabel(QButton *, string const & label);
|
2001-03-23 22:07:56 +00:00
|
|
|
};
|
|
|
|
|
2001-06-16 14:48:12 +00:00
|
|
|
#endif // QT2BC_H
|