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.
16 #include "controllers/ControlERT.h"
18 #include <QRadioButton>
19 #include <QPushButton>
20 #include <QCloseEvent>
26 /////////////////////////////////////////////////////////////////////
30 /////////////////////////////////////////////////////////////////////
33 QERTDialog::QERTDialog(QERT * form)
37 connect(okPB, SIGNAL(clicked()), form, SLOT(slotOK()));
38 connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose()));
39 connect(collapsedRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
40 connect(openRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
44 void QERTDialog::closeEvent(QCloseEvent * e)
51 void QERTDialog::change_adaptor()
57 /////////////////////////////////////////////////////////////////////
61 /////////////////////////////////////////////////////////////////////
63 typedef QController<ControlERT, QView<QERTDialog> > ERTBase;
66 QERT::QERT(Dialog & parent)
67 : ERTBase(parent, _("TeX Code Settings"))
72 void QERT::build_dialog()
74 dialog_.reset(new QERTDialog(this));
76 bcview().setOK(dialog_->okPB);
77 bcview().setCancel(dialog_->closePB);
83 if (dialog_->openRB->isChecked())
84 controller().setStatus(Inset::Open);
86 controller().setStatus(Inset::Collapsed);
90 void QERT::update_contents()
92 QRadioButton * rb = 0;
94 switch (controller().status()) {
95 case InsetERT::Open: rb = dialog_->openRB; break;
96 case InsetERT::Collapsed: rb = dialog_->collapsedRB; break;
102 } // namespace frontend
105 #include "QERT_moc.cpp"