GuiPhantom::GuiPhantom(GuiView & lv) : GuiDialog(lv, "phantom", qt_("Phantom Settings")) { setupUi(this); connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK())); connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose())); connect(phantomRB, SIGNAL(clicked()), this, SLOT(change_adaptor())); connect(hphantomRB, SIGNAL(clicked()), this, SLOT(change_adaptor())); connect(vphantomRB, SIGNAL(clicked()), this, SLOT(change_adaptor())); bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy); bc().setOK(okPB); bc().setCancel(closePB); }
GuiNomenclature::GuiNomenclature(GuiView & lv) : GuiDialog(lv, "nomenclature", qt_("Nomenclature")), params_(insetCode("nomenclature")) { setupUi(this); connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK())); connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose())); connect(symbolED, SIGNAL(textChanged(QString)), this, SLOT(change_adaptor())); connect(descriptionTE, SIGNAL(textChanged()), this, SLOT(change_adaptor())); setFocusProxy(descriptionTE); bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy); bc().setOK(okPB); bc().setCancel(closePB); bc().addReadOnly(symbolED); bc().addReadOnly(descriptionTE); bc().addReadOnly(prefixED); }
GuiPrintNomencl::GuiPrintNomencl(GuiView & lv) : GuiDialog(lv, "nomencl_print", qt_("Nomenclature settings")), params_(insetCode("nomencl_print")) { setupUi(this); connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK())); connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply())); connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose())); connect(valueLE, SIGNAL(textChanged(QString)), this, SLOT(change_adaptor())); connect(unitLC, SIGNAL(selectionChanged(lyx::Length::UNIT)), this, SLOT(change_adaptor())); valueLE->setValidator(unsignedLengthValidator(valueLE)); // Manage the ok, apply, restore and cancel/close buttons bc().setPolicy(ButtonPolicy::OkApplyCancelReadOnlyPolicy); bc().setOK(okPB); bc().setApply(applyPB); bc().setCancel(closePB); // disable for read-only documents bc().addReadOnly(valueLE); bc().addReadOnly(unitLC); // initialize the length validator bc().addCheckedLineEdit(valueLE, valueLA); setWidthCO->addItem(qt_("Default"), QVariant(toqstr("none"))); setWidthCO->addItem(qt_("Longest label width"), QVariant(toqstr("auto"))); setWidthCO->addItem(qt_("Custom"), QVariant(toqstr("custom"))); }