3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
14 #include "QERTDialog.h"
17 #include "controllers/ControlERT.h"
19 #include <qradiobutton.h>
20 #include <qpushbutton.h>
26 typedef QController<ControlERT, QView<QERTDialog> > base_class;
29 QERT::QERT(Dialog & parent)
30 : base_class(parent, _("TeX Code Settings"))
35 void QERT::build_dialog()
37 dialog_.reset(new QERTDialog(this));
39 bcview().setOK(dialog_->okPB);
40 bcview().setCancel(dialog_->closePB);
46 if (dialog_->openRB->isChecked())
47 controller().setStatus(InsetERT::Open);
48 else if (dialog_->inlineRB->isChecked())
49 controller().setStatus(InsetERT::Inlined);
51 controller().setStatus(InsetERT::Collapsed);
55 void QERT::update_contents()
57 QRadioButton * rb = 0;
59 switch (controller().status()) {
60 case InsetERT::Open: rb = dialog_->openRB; break;
61 case InsetERT::Inlined: rb = dialog_->inlineRB; break;
62 case InsetERT::Collapsed: rb = dialog_->collapsedRB; break;
68 } // namespace frontend