mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Implement checkWidgets in the remaining InsetParamsWidget derived dialogs.
This commit is contained in:
parent
5aee9e6d63
commit
b309fa5d2b
@ -251,6 +251,18 @@ void FloatPlacement::checkAllowed()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool FloatPlacement::checkWidgets(bool readonly) const
|
||||
{
|
||||
floatTypeCO->setEnabled(!readonly);
|
||||
defaultsCB->setEnabled(!readonly);
|
||||
options->setEnabled(!readonly);
|
||||
spanCB->setEnabled(!readonly);
|
||||
sidewaysCB->setEnabled(!readonly);
|
||||
|
||||
return InsetParamsWidget::checkWidgets();
|
||||
}
|
||||
|
||||
} // namespace frontend
|
||||
} // namespace lyx
|
||||
|
||||
|
@ -37,6 +37,7 @@ public:
|
||||
FuncCode creationCode() const { return LFUN_FLOAT_INSERT; }
|
||||
void paramsToDialog(Inset const *);
|
||||
docstring dialogToParams() const;
|
||||
bool checkWidgets(bool readonly) const;
|
||||
//@}
|
||||
///
|
||||
void useWide();
|
||||
|
@ -411,6 +411,27 @@ docstring GuiBox::dialogToParams() const
|
||||
}
|
||||
|
||||
|
||||
bool GuiBox::checkWidgets(bool readonly) const
|
||||
{
|
||||
pagebreakCB->setEnabled(!readonly);
|
||||
typeCO->setEnabled(!readonly);
|
||||
innerBoxCO->setEnabled(!readonly);
|
||||
valignCO->setEnabled(!readonly);
|
||||
ialignCO->setEnabled(!readonly);
|
||||
halignCO->setEnabled(!readonly);
|
||||
valignCO->setEnabled(!readonly);
|
||||
ialignCO->setEnabled(!readonly);
|
||||
widthCB->setEnabled(!readonly);
|
||||
widthED->setReadOnly(readonly);
|
||||
widthUnitsLC->setEnabled(!readonly);
|
||||
heightED->setReadOnly(readonly);
|
||||
heightUnitsLC->setEnabled(!readonly);
|
||||
heightCB->setEnabled(!readonly);
|
||||
|
||||
return InsetParamsWidget::checkWidgets();
|
||||
}
|
||||
|
||||
|
||||
void GuiBox::setSpecial(bool ibox)
|
||||
{
|
||||
QString const last_item =
|
||||
|
@ -42,6 +42,7 @@ private:
|
||||
FuncCode creationCode() const { return LFUN_BOX_INSERT; }
|
||||
void paramsToDialog(Inset const *);
|
||||
docstring dialogToParams() const;
|
||||
bool checkWidgets(bool readonly) const;
|
||||
//@}
|
||||
|
||||
/// add and remove special lengths
|
||||
|
@ -64,6 +64,14 @@ docstring GuiBranch::dialogToParams() const
|
||||
return from_utf8(InsetBranch::params2string(params));
|
||||
}
|
||||
|
||||
|
||||
bool GuiBranch::checkWidgets(bool readonly) const
|
||||
{
|
||||
branchCO->setEnabled(!readonly);
|
||||
return InsetParamsWidget::checkWidgets();
|
||||
}
|
||||
|
||||
|
||||
} // namespace frontend
|
||||
} // namespace lyx
|
||||
|
||||
|
@ -34,6 +34,7 @@ private:
|
||||
FuncCode creationCode() const { return LFUN_BRANCH_INSERT; }
|
||||
void paramsToDialog(Inset const *);
|
||||
docstring dialogToParams() const;
|
||||
bool checkWidgets(bool readonly) const;
|
||||
//@}
|
||||
};
|
||||
|
||||
|
@ -58,6 +58,14 @@ void GuiERT::paramsToDialog(Inset const * inset)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool GuiERT::checkWidgets(bool readonly) const
|
||||
{
|
||||
ertBG->setEnabled(!readonly);
|
||||
return InsetParamsWidget::checkWidgets();
|
||||
}
|
||||
|
||||
|
||||
} // namespace frontend
|
||||
} // namespace lyx
|
||||
|
||||
|
@ -32,6 +32,7 @@ private:
|
||||
FuncCode creationCode() const { return LFUN_INSET_INSERT; }
|
||||
void paramsToDialog(Inset const *);
|
||||
docstring dialogToParams() const;
|
||||
bool checkWidgets(bool readonly) const;
|
||||
//@}
|
||||
};
|
||||
|
||||
|
@ -1012,6 +1012,46 @@ void GuiTabular::paramsToDialog(Inset const * inset)
|
||||
}
|
||||
|
||||
|
||||
bool GuiTabular::checkWidgets(bool readonly) const
|
||||
{
|
||||
tabularRowED->setReadOnly(readonly);
|
||||
tabularColumnED->setReadOnly(readonly);
|
||||
multicolumnCB->setEnabled(!readonly);
|
||||
multirowCB->setEnabled(!readonly);
|
||||
specialAlignmentED->setReadOnly(readonly);
|
||||
rotateCellCB->setEnabled(!readonly);
|
||||
rotateCellAngleSB->setEnabled(!readonly);
|
||||
rotateTabularCB->setEnabled(!readonly);
|
||||
rotateTabularAngleSB->setEnabled(!readonly);
|
||||
longTabularCB->setEnabled(!readonly);
|
||||
borders->setEnabled(!readonly);
|
||||
tabularWidthED->setReadOnly(readonly);
|
||||
tabularWidthUnitLC->setEnabled(!readonly);
|
||||
columnWidthED->setReadOnly(readonly);
|
||||
columnWidthUnitLC->setEnabled(!readonly);
|
||||
multirowOffsetED->setReadOnly(readonly);
|
||||
multirowOffsetUnitLC->setEnabled(!readonly);
|
||||
setBordersGB->setEnabled(!readonly);
|
||||
allBordersGB->setEnabled(!readonly);
|
||||
borderStyleGB->setEnabled(!readonly);
|
||||
booktabsRB->setEnabled(!readonly);
|
||||
topspaceCO->setEnabled(!readonly);
|
||||
topspaceUnitLC->setEnabled(!readonly);
|
||||
bottomspaceCO->setEnabled(!readonly);
|
||||
bottomspaceUnitLC->setEnabled(!readonly);
|
||||
interlinespaceCO->setEnabled(!readonly);
|
||||
interlinespaceUnitLC->setEnabled(!readonly);
|
||||
hAlignCO->setEnabled(!readonly);
|
||||
decimalPointED->setReadOnly(readonly);
|
||||
vAlignCO->setEnabled(!readonly);
|
||||
TableAlignCO->setEnabled(!readonly);
|
||||
longtableGB->setEnabled(!readonly);
|
||||
alignmentGB->setEnabled(!readonly);
|
||||
|
||||
return InsetParamsWidget::checkWidgets();
|
||||
}
|
||||
|
||||
|
||||
bool GuiTabular::funcEnabled(Tabular::Feature f) const
|
||||
{
|
||||
string cmd = "tabular " + featureAsString(f);
|
||||
|
@ -44,6 +44,7 @@ private:
|
||||
FuncCode creationCode() const { return LFUN_TABULAR_INSERT; }
|
||||
void paramsToDialog(Inset const *);
|
||||
docstring dialogToParams() const;
|
||||
bool checkWidgets(bool readonly) const;
|
||||
//@}
|
||||
|
||||
///
|
||||
|
@ -146,6 +146,17 @@ void GuiVSpace::paramsToDialog(Inset const * inset)
|
||||
enableCustom(spacingCO->currentIndex());
|
||||
}
|
||||
|
||||
|
||||
bool GuiVSpace::checkWidgets(bool readonly) const
|
||||
{
|
||||
valueLE->setReadOnly(readonly);
|
||||
spacingCO->setEnabled(!readonly);
|
||||
unitCO->setEnabled(!readonly);
|
||||
keepCB->setEnabled(!readonly);
|
||||
|
||||
return InsetParamsWidget::checkWidgets();
|
||||
}
|
||||
|
||||
} // namespace frontend
|
||||
} // namespace lyx
|
||||
|
||||
|
@ -39,6 +39,7 @@ private:
|
||||
FuncCode creationCode() const { return LFUN_INSET_INSERT; }
|
||||
void paramsToDialog(Inset const *);
|
||||
docstring dialogToParams() const;
|
||||
bool checkWidgets(bool readonly) const;
|
||||
//@}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user