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 <QRadioButton>
17 #include <QPushButton>
18 #include <QCloseEvent>
24 /////////////////////////////////////////////////////////////////////
28 /////////////////////////////////////////////////////////////////////
31 GuiERTDialog::GuiERTDialog(GuiERT * form)
35 connect(okPB, SIGNAL(clicked()), form, SLOT(slotOK()));
36 connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose()));
37 connect(collapsedRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
38 connect(openRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
42 void GuiERTDialog::closeEvent(QCloseEvent * e)
49 void GuiERTDialog::change_adaptor()
55 /////////////////////////////////////////////////////////////////////
59 /////////////////////////////////////////////////////////////////////
61 GuiERT::GuiERT(GuiDialog & parent)
62 : GuiView<GuiERTDialog>(parent, _("TeX Code Settings"))
67 void GuiERT::build_dialog()
69 dialog_.reset(new GuiERTDialog(this));
71 bc().setOK(dialog_->okPB);
72 bc().setCancel(dialog_->closePB);
76 void GuiERT::applyView()
78 if (dialog_->openRB->isChecked())
79 controller().setStatus(Inset::Open);
81 controller().setStatus(Inset::Collapsed);
85 void GuiERT::update_contents()
87 QRadioButton * rb = 0;
89 switch (controller().status()) {
90 case InsetERT::Open: rb = dialog_->openRB; break;
91 case InsetERT::Collapsed: rb = dialog_->collapsedRB; break;
97 } // namespace frontend
100 #include "GuiERT_moc.cpp"