2001-03-23 22:07:56 +00:00
|
|
|
// -*- C++ -*-
|
2001-08-19 13:25:15 +00:00
|
|
|
/**
|
2001-08-23 21:21:50 +00:00
|
|
|
* \file Qt2BC.h
|
2002-09-24 13:57:09 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2001-08-19 13:25:15 +00:00
|
|
|
*
|
2002-09-24 13:57:09 +00:00
|
|
|
* \author Allan Rae
|
|
|
|
* \author Angus Leeming
|
|
|
|
* \author Baruch Even
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
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-08-23 21:21:50 +00:00
|
|
|
class Qt2BC : public GuiBC<QButton, QWidget>
|
2001-03-23 22:07:56 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
///
|
2001-08-23 21:21:50 +00:00
|
|
|
Qt2BC(string const &, string const &);
|
2001-03-23 22:07:56 +00:00
|
|
|
|
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
|