}
-GuiBox::GuiBox(GuiView & lv)
- : InsetDialog(lv, BOX_CODE, LFUN_BOX_INSERT, "box", "Box Settings")
+GuiBox::GuiBox(QWidget * parent) : InsetParamsWidget(parent)
{
setupUi(this);
for (int i = 0; i != ids_spec_.size(); ++i)
heightUnitsLC->addItem(gui_names_spec_[i], ids_spec_[i]);
- connect(widthED, SIGNAL(textChanged(QString)), this, SLOT(applyView()));
+ connect(widthED, SIGNAL(textChanged(QString)), this, SIGNAL(changed()));
connect(widthUnitsLC, SIGNAL(selectionChanged(lyx::Length::UNIT)),
- this, SLOT(applyView()));
- connect(valignCO, SIGNAL(highlighted(QString)), this, SLOT(applyView()));
- connect(heightED, SIGNAL(textChanged(QString)), this, SLOT(applyView()));
+ this, SIGNAL(changed()));
+ connect(valignCO, SIGNAL(highlighted(QString)), this, SIGNAL(changed()));
+ connect(heightED, SIGNAL(textChanged(QString)), this, SIGNAL(changed()));
connect(heightUnitsLC, SIGNAL(selectionChanged(lyx::Length::UNIT)),
- this, SLOT(applyView()));
- connect(halignCO, SIGNAL(activated(int)), this, SLOT(applyView()));
- connect(ialignCO, SIGNAL(activated(int)), this, SLOT(applyView()));
+ this, SIGNAL(changed()));
+ connect(halignCO, SIGNAL(activated(int)), this, SIGNAL(changed()));
+ connect(ialignCO, SIGNAL(activated(int)), this, SIGNAL(changed()));
heightED->setValidator(unsignedLengthValidator(heightED));
widthED->setValidator(unsignedLengthValidator(widthED));
}
-void GuiBox::enableView(bool enable)
-{
- typeCO->setEnabled(enable);
- innerBoxCO->setEnabled(enable);
- valignCO->setEnabled(enable);
- ialignCO->setEnabled(enable);
- halignCO->setEnabled(enable);
- widthED->setEnabled(enable);
- widthUnitsLC->setEnabled(enable);
- heightCB->setEnabled(enable);
- heightED->setEnabled(enable);
- heightUnitsLC->setEnabled(enable);
- pagebreakCB->setEnabled(enable);
-}
-
-
void GuiBox::on_innerBoxCO_activated(QString const & str)
{
bool const ibox = (str != qt_("None"));
heightCB->setEnabled(ibox);
pagebreakCB->setEnabled(!ibox && typeCO->currentIndex() == 1);
setSpecial(ibox);
- applyView();
+ changed();
}
widthED->setEnabled(index != 5);
widthUnitsLC->setEnabled(index != 5);
setInnerType(frameless, itype);
- applyView();
+ changed();
}
&& (state == Qt::Checked);
heightED->setEnabled(enable);
heightUnitsLC->setEnabled(enable);
- applyView();
+ changed();
}
heightED->setEnabled(false);
heightUnitsLC->setEnabled(false);
setSpecial(false);
- applyView();
+ changed();
}
}
}
-
-Dialog * createGuiBox(GuiView & lv) { return new GuiBox(lv); }
-
-
} // namespace frontend
} // namespace lyx