X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt2%2Flengthcombo.C;h=fb4866af8f211edc501c9701b188f58bf89b57fa;hb=1229a2712d3f4fe1392616a6973e1830cf3124ef;hp=7b300eb952c5aa707614f2d4d07a66ec5cb2e146;hpb=ead11eb6b5fae67d0e19e44aa953e225db219d41;p=lyx.git diff --git a/src/frontends/qt2/lengthcombo.C b/src/frontends/qt2/lengthcombo.C index 7b300eb952..fb4866af8f 100644 --- a/src/frontends/qt2/lengthcombo.C +++ b/src/frontends/qt2/lengthcombo.C @@ -8,29 +8,30 @@ #include #include "gettext.h" - + #include "lengthcombo.h" - -#include + +#include LengthCombo::LengthCombo(QWidget * parent, char * name) : QComboBox(parent, name) { - insertItem(_("Centimetres")); - insertItem(_("Inches")); - insertItem(_("Points")); - insertItem(_("Millimetres")); - insertItem(_("Picas")); - insertItem(_("ex units")); - insertItem(_("em units")); - insertItem(_("Scaled points")); - insertItem(_("Big/PS points")); - insertItem(_("Didot points")); - insertItem(_("Cicero points")); - insertItem(_("Mathematical units")); - insertItem(_("Percent of page")); - insertItem(_("Percent of column")); - insertItem(_("Percent of line width")); + // FIXME: check these should all be here, I think not + insertItem(_("cm")); + insertItem(_("in")); + insertItem(_("pt")); + insertItem(_("mm")); + insertItem(_("pc")); + insertItem(_("ex")); + insertItem(_("em")); + insertItem(_("sp")); + insertItem(_("bp")); + insertItem(_("dd")); + insertItem(_("cc")); + insertItem(_("mu")); + insertItem(_("%p")); + insertItem(_("%c")); + insertItem(_("%l")); connect(this, SIGNAL(activated(int)), this, SLOT(has_activated(int))); @@ -40,7 +41,7 @@ LengthCombo::LengthCombo(QWidget * parent, char * name) LyXLength::UNIT LengthCombo::currentLengthItem() const -{ +{ LyXLength::UNIT unit; int i = currentItem(); switch (i) { @@ -57,21 +58,21 @@ LyXLength::UNIT LengthCombo::currentLengthItem() const case 9: unit = LyXLength::DD; break; case 10: unit = LyXLength::CC; break; case 11: unit = LyXLength::MU; break; - case 12: unit = LyXLength::PP; break; - case 13: unit = LyXLength::PW; break; - case 14: unit = LyXLength::PL; break; - // FIXME: LyXLength::PE ? + case 12: unit = LyXLength::PPW; break; + case 13: unit = LyXLength::PCW; break; + case 14: unit = LyXLength::PLW; break; + // FIXME: LyXLength::PTW ? }; return unit; -} - +} + void LengthCombo::has_activated(int) { emit selectionChanged(currentLengthItem()); } - + void LengthCombo::setCurrentItem(LyXLength::UNIT unit) { int i; @@ -89,10 +90,10 @@ void LengthCombo::setCurrentItem(LyXLength::UNIT unit) case LyXLength::DD: i = 9; break; case LyXLength::CC: i = 10; break; case LyXLength::MU: i = 11; break; - case LyXLength::PP: i = 12; break; - case LyXLength::PW: i = 13; break; - case LyXLength::PL: i = 14; break; - // FIXME: LyXLength::PE ? + case LyXLength::PPW: i = 12; break; + case LyXLength::PCW: i = 13; break; + case LyXLength::PLW: i = 14; break; + // FIXME: LyXLength::PTW ? } QComboBox::setCurrentItem(i); }