3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
6 * \author Allan Rae <rae@lyx.org>
7 * \author Angus Leeming <a.leeming@ic.ac.uk>
13 #pragma implementation
21 Qt2BC::Qt2BC(string const & cancel, string const & close)
22 : GuiBC<QButton, QWidget>(cancel, close)
26 void Qt2BC::setButtonEnabled(QButton * obj, bool enabled)
28 obj->setEnabled(enabled);
32 void Qt2BC::setWidgetEnabled(QWidget * obj, bool enabled)
34 obj->setEnabled(enabled);
35 QWidget::FocusPolicy const p =
36 (enabled) ? QWidget::StrongFocus : QWidget::NoFocus;
37 obj->setFocusPolicy(p);
41 void Qt2BC::setButtonLabel(QButton * obj, string const & label)
43 obj->setText(label.c_str());