From d8ad05cc1a32b8f6f593b59455850f389093e9c6 Mon Sep 17 00:00:00 2001 From: Edwin Leuven Date: Thu, 4 Oct 2007 07:48:26 +0000 Subject: [PATCH] cleanup dialog git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20727 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiWrap.cpp | 23 -- src/frontends/qt4/GuiWrap.h | 4 - src/frontends/qt4/ui/WrapUi.ui | 674 +++++++++++++++------------------ 3 files changed, 299 insertions(+), 402 deletions(-) diff --git a/src/frontends/qt4/GuiWrap.cpp b/src/frontends/qt4/GuiWrap.cpp index c6171078f6..c86f870343 100644 --- a/src/frontends/qt4/GuiWrap.cpp +++ b/src/frontends/qt4/GuiWrap.cpp @@ -60,9 +60,6 @@ GuiWrapDialog::GuiWrapDialog(LyXView & lv) connect(linesSB, SIGNAL(valueChanged(int)), this, SLOT(change_adaptor())); - connect(overhangCB, SIGNAL(stateChanged(int)), this, SLOT(overhangChecked(int))); - connect(linesCB, SIGNAL(stateChanged(int)), this, SLOT(linesChecked(int))); - widthED->setValidator(unsignedLengthValidator(widthED)); // FIXME: // overhang can be negative, but the unsignedLengthValidator allows this @@ -108,26 +105,6 @@ void GuiWrapDialog::change_adaptor() } -void GuiWrapDialog::overhangChecked(int checkState) -{ - if (checkState == Qt::Checked) { - overhangED->setEnabled(true); - overhangUnitLC->setEnabled(true); - } else { - overhangED->setEnabled(false); - overhangUnitLC->setEnabled(false); - } -} - -void GuiWrapDialog::linesChecked(int checkState) -{ - if (checkState == Qt::Checked) - linesSB->setEnabled(true); - else - linesSB->setEnabled(false); -} - - void GuiWrapDialog::applyView() { double const width_value = widthED->text().toDouble(); diff --git a/src/frontends/qt4/GuiWrap.h b/src/frontends/qt4/GuiWrap.h index 7fc097b396..9fa79f2e5b 100644 --- a/src/frontends/qt4/GuiWrap.h +++ b/src/frontends/qt4/GuiWrap.h @@ -28,10 +28,6 @@ public: private Q_SLOTS: void change_adaptor(); - /// overhang checkbox - void overhangChecked(int); - /// lines checkbox - void linesChecked(int); private: void closeEvent(QCloseEvent * e); diff --git a/src/frontends/qt4/ui/WrapUi.ui b/src/frontends/qt4/ui/WrapUi.ui index c2eecb2f63..48723ed7fb 100644 --- a/src/frontends/qt4/ui/WrapUi.ui +++ b/src/frontends/qt4/ui/WrapUi.ui @@ -5,8 +5,8 @@ 0 0 - 411 - 199 + 359 + 152 @@ -15,391 +15,266 @@ true - - - - 10 - 10 - 281 - 42 - + + + 9 - - - 0 - - - 6 - - - - - - 1 - 0 - 0 - 0 - - - - Width value - - - - - - - &Unit: - - - widthUnitLC - - - - - - - - 3 - 0 - 0 - 0 - - - - - 40 - 22 - - - - Qt::StrongFocus - - - Unit of width value - - - - - - - &Width: - - - widthED - - - - - - - - - 10 - 120 - 242 - 22 - + + 6 - - - 0 - - - 6 - - - - - false - - - number of needed lines - - - - - - - use number of lines - - - &Number of needed lines (optional): - - - - - - - - - 303 - 11 - 100 - 41 - - - - - 0 - - - 6 - - - - - &Placement: - - - valignCO - - - - - - - Vertical alignment - - + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + false + + + number of needed lines + + + + + + + use number of lines + + + &Line span: + + + + + + + + 3 + 0 + 0 + 0 + + + + + 40 + 22 + + + + Qt::StrongFocus + + + Unit of width value + + + + + + + &Width: + + + widthED + + + + + + + + 1 + 0 + 0 + 0 + + + + Width value + + + + + + + 0 + + + 6 + + + + + + - Outer (default) + &Restore + + + false + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + - - - Inner + &OK + + + false + + + + + + + - - - Left + &Apply + + + false - - + + + + - Right + &Close - - - - - - - - - 10 - 60 - 261 - 48 - - - - - 0 - - - 6 - - - - - 0 - - - 6 - - - - - &Unit: - - - widthUnitLC - - - - - - - false - - - - 13 - 13 - 0 - 0 - - - - - 0 - 0 - - - - Qt::StrongFocus - - - Unit of overhang value - - - - - - - - - 0 - - - 6 - - - - - use overhang - - - &Overhang (optional): - - - false - - - - - - - false - - - - 1 - 0 - 0 - 0 - - - - Overhang value - - - - - - - - - - - 10 - 150 - 392 - 45 - - - - - 0 - - - 6 - - - - - Qt::Vertical - - - QSizePolicy::Expanding + + true + + + + + + + + + &Placement: + + + valignCO + + + + + + + Vertical alignment + + + + Outer (default) - - - 390 - 10 - + + + + Inner - - - - - - 0 + + + + Left - - 6 + + + + Right - - - - - - - &Restore - - - false - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - - - - - - - - &OK - - - false - - - - - - - - - - &Apply - - - false - - - - - - - &Close - - - true - - - - - - - + + + + + + + use overhang + + + Over&hang: + + + false + + + + + + + false + + + + 1 + 0 + 0 + 0 + + + + Overhang value + + + + + + + false + + + + 13 + 13 + 0 + 0 + + + + + 0 + 0 + + + + Qt::StrongFocus + + + Unit of overhang value + + + + @@ -409,9 +284,9 @@ + valignCO widthED widthUnitLC - valignCO overhangCB overhangED overhangUnitLC @@ -426,5 +301,54 @@ qt_helpers.h - + + + overhangCB + toggled(bool) + overhangED + setEnabled(bool) + + + 52 + 71 + + + 124 + 70 + + + + + overhangCB + toggled(bool) + overhangUnitLC + setEnabled(bool) + + + 54 + 80 + + + 259 + 80 + + + + + linesCB + toggled(bool) + linesSB + setEnabled(bool) + + + 13 + 93 + + + 164 + 101 + + + + -- 2.39.2