diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2014-07-18 11:43:15 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-07-18 10:20:00 -0700 |
commit | 6e4ebe3c5427b178808c0b0579803c56c5cf53d5 (patch) | |
tree | f2c8e5e293bb0dcd19827d913515ddb3e8fdf45e /qt-ui/printoptions.cpp | |
parent | 3e669481f6c1285c381df03cd17994c75b695a26 (diff) | |
download | subsurface-6e4ebe3c5427b178808c0b0579803c56c5cf53d5.tar.gz |
Print: remove the height sliders from the PrintOptions class
These were hidden and we don't really support them because
our print layouting is not that flexible in Qt!
Note: printoptions.ui is now converted to UNIX line breaks.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/printoptions.cpp')
-rw-r--r-- | qt-ui/printoptions.cpp | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/qt-ui/printoptions.cpp b/qt-ui/printoptions.cpp index 5db665ab4..ac5f6550c 100644 --- a/qt-ui/printoptions.cpp +++ b/qt-ui/printoptions.cpp @@ -14,18 +14,7 @@ PrintOptions::PrintOptions(QWidget *parent, struct options *printOpt) void PrintOptions::setup(struct options *printOpt) { - /* these options are not supported ATM and we hide them. - * basically the entire PrintDialog class needs re-implementation, so that - * the paper size, DPI and all other options are displayed in one dialog. - * this way we can print directly or do an optional preview first. - */ - ui.sizingHeights->setVisible(false); - printOptions = printOpt; - // layout height sliders - initSliderWithLabel(ui.sliderPHeight, ui.valuePHeight, printOptions->profile_height); - initSliderWithLabel(ui.sliderOHeight, ui.valueOHeight, printOptions->notes_height); - initSliderWithLabel(ui.sliderNHeight, ui.valueNHeight, printOptions->tanks_height); // print type radio buttons switch (printOptions->type) { case options::PRETTY: @@ -52,9 +41,6 @@ void PrintOptions::setup(struct options *printOpt) // connect slots only once if (hasSetupSlots) return; - connect(ui.sliderPHeight, SIGNAL(sliderMoved(int)), this, SLOT(sliderPHeightMoved(int))); - connect(ui.sliderOHeight, SIGNAL(sliderMoved(int)), this, SLOT(sliderOHeightMoved(int))); - connect(ui.sliderNHeight, SIGNAL(sliderMoved(int)), this, SLOT(sliderNHeightMoved(int))); connect(ui.radioSixDives, SIGNAL(clicked(bool)), this, SLOT(radioSixDivesClicked(bool))); connect(ui.radioTwoDives, SIGNAL(clicked(bool)), this, SLOT(radioTwoDivesClicked(bool))); @@ -68,37 +54,6 @@ void PrintOptions::setup(struct options *printOpt) hasSetupSlots = true; } -// layout height sliders -void PrintOptions::initSliderWithLabel(QSlider *slider, QLabel *label, int value) -{ - slider->setValue(value); - label->setText(formatSliderValueText(value)); -} - -QString PrintOptions::formatSliderValueText(int value) -{ - QString str = QString("%1%").arg(QString::number(value)); - return str; -} - -void PrintOptions::sliderPHeightMoved(int value) -{ - ui.valuePHeight->setText(formatSliderValueText(value)); - printOptions->profile_height = value; -} - -void PrintOptions::sliderOHeightMoved(int value) -{ - ui.valueOHeight->setText(formatSliderValueText(value)); - printOptions->notes_height = value; -} - -void PrintOptions::sliderNHeightMoved(int value) -{ - ui.valueNHeight->setText(formatSliderValueText(value)); - printOptions->tanks_height = value; -} - // print type radio buttons void PrintOptions::radioSixDivesClicked(bool check) { |