3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
10 * Full author contact details are available in file CREDITS.
16 #include "support/gettext.h"
17 #include "FuncRequest.h"
19 #include <QRadioButton>
20 #include <QPushButton>
27 GuiERT::GuiERT(GuiView & lv)
28 : GuiDialog(lv, "ert", qt_("TeX Code Settings")), status_(InsetERT::Collapsed)
32 connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
33 connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
34 connect(collapsedRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
35 connect(openRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
37 bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy);
39 bc().setCancel(closePB);
43 void GuiERT::change_adaptor()
49 void GuiERT::applyView()
51 if (openRB->isChecked())
52 status_ = Inset::Open;
54 status_ = Inset::Collapsed;
58 void GuiERT::updateContents()
61 case InsetERT::Open: openRB->setChecked(true); break;
62 case InsetERT::Collapsed: collapsedRB->setChecked(true); break;
67 bool GuiERT::initialiseParams(string const & data)
69 InsetERTMailer::string2params(data, status_);
74 void GuiERT::clearParams()
76 status_ = InsetERT::Collapsed;
80 void GuiERT::dispatchParams()
82 dispatch(FuncRequest(getLfun(), InsetERTMailer::params2string(status_)));
86 Dialog * createGuiERT(GuiView & lv) { return new GuiERT(lv); }
89 } // namespace frontend
92 #include "GuiERT_moc.cpp"