From 235eb2acb812fcf46d8f15bf7a88b59641904317 Mon Sep 17 00:00:00 2001 From: andrey Date: Mon, 31 Aug 2020 18:35:32 +0300 Subject: [PATCH] remove graphic expand buttons, update pip --- CMakeLists.txt | 2 +- pip | 2 +- piqt/libs/qcd/qcd_graphic.ui | 2 +- piqt/utils/piconnedit/piconnedit.qrc | 4 --- qad/libs/graphic/graphic.cpp | 26 ++++++--------- qad/libs/graphic/graphic.h | 7 ++--- qad/libs/graphic/graphic.ui | 47 +++++++++++----------------- 7 files changed, 34 insertions(+), 56 deletions(-) delete mode 100644 piqt/utils/piconnedit/piconnedit.qrc diff --git a/CMakeLists.txt b/CMakeLists.txt index 342bd71..275f12c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,7 @@ else() endif() set(_QAD_MAJOR 1) -set(_QAD_MINOR 8) +set(_QAD_MINOR 9) set(_QAD_REVISION 0) set(_QAD_SUFFIX ) set(_QAD_COMPANY SHS) diff --git a/pip b/pip index e1f2c90..a4b3edb 160000 --- a/pip +++ b/pip @@ -1 +1 @@ -Subproject commit e1f2c90790b473c2d0a8049c982498101d7d68b2 +Subproject commit a4b3edb3e1226ad7501bdd7a738b13b6d636d779 diff --git a/piqt/libs/qcd/qcd_graphic.ui b/piqt/libs/qcd/qcd_graphic.ui index f08198f..658977d 100644 --- a/piqt/libs/qcd/qcd_graphic.ui +++ b/piqt/libs/qcd/qcd_graphic.ui @@ -32,7 +32,7 @@ - Graphic::Autofit|Graphic::BorderInputs|Graphic::Clear|Graphic::Configure|Graphic::CursorAxis|Graphic::Fullscreen|Graphic::Legend|Graphic::OnlyExpandY|Graphic::Pause|Graphic::Save + Graphic::Autofit|Graphic::BorderInputs|Graphic::Clear|Graphic::Configure|Graphic::CursorAxis|Graphic::Fullscreen|Graphic::Legend|Graphic::Pause|Graphic::Save false diff --git a/piqt/utils/piconnedit/piconnedit.qrc b/piqt/utils/piconnedit/piconnedit.qrc deleted file mode 100644 index d378e6b..0000000 --- a/piqt/utils/piconnedit/piconnedit.qrc +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/qad/libs/graphic/graphic.cpp b/qad/libs/graphic/graphic.cpp index d4fcb41..5dfd304 100644 --- a/qad/libs/graphic/graphic.cpp +++ b/qad/libs/graphic/graphic.cpp @@ -50,6 +50,8 @@ Graphic::Graphic(QWidget * parent): QFrame(parent), canvas(0), line_x_min(this), ui->checkGuides->addAction(ui->actionGuidesFree ); ui->checkGuides->addAction(ui->actionGuidesTraceX); ui->checkGuides->addAction(ui->actionGuidesTraceY); + ui->buttonAutofit->addAction(ui->actionExpandX); + ui->buttonAutofit->addAction(ui->actionExpandY); line_x_min.setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); line_x_max.setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); ((QBoxLayout * )ui->widgetLY->layout())->insertWidget(0, &line_y_min); @@ -593,18 +595,12 @@ void Graphic::setMaxVisibleTime(double val) { void Graphic::setOnlyExpandY(bool yes) { - only_expand_y = yes; - ui->checkExpandY->blockSignals(true); - ui->checkExpandY->setCheckable(yes); - ui->checkExpandY->blockSignals(false); + ui->actionExpandY->setChecked(yes); } void Graphic::setOnlyExpandX(bool yes) { - only_expand_x = yes; - ui->checkExpandX->blockSignals(true); - ui->checkExpandX->setCheckable(yes); - ui->checkExpandX->blockSignals(false); + ui->actionExpandX->setChecked(yes); } @@ -655,8 +651,6 @@ void Graphic::setButtons(Graphic::Buttons b) { ui->buttonAutofit->setVisible(b.testFlag(Autofit)); ui->checkGrid->setVisible(b.testFlag(Grid)); ui->checkGuides->setVisible(b.testFlag(CursorAxis)); - ui->checkExpandY->setVisible(b.testFlag(OnlyExpandY)); - ui->checkExpandX->setVisible(b.testFlag(OnlyExpandX)); ui->buttonFullscreen->setVisible(b.testFlag(Fullscreen)); ui->checkBorderInputs->setVisible(b.testFlag(BorderInputs)); ui->checkLegend->setVisible(b.testFlag(Legend)); @@ -1791,15 +1785,15 @@ void Graphic::setLegendVisible(bool visible) { } -void Graphic::on_checkExpandY_toggled(bool checked) { - only_expand_y = checked; - ui->checkExpandY->setIcon(checked ? icon_exp_y : icon_exp_sy); +void Graphic::on_actionExpandX_triggered(bool checked) { + only_expand_x = checked; + ui->actionExpandX->setIcon(checked ? icon_exp_x : icon_exp_sx); } -void Graphic::on_checkExpandX_toggled(bool checked) { - only_expand_x = checked; - ui->checkExpandX->setIcon(checked ? icon_exp_x : icon_exp_sx); +void Graphic::on_actionExpandY_triggered(bool checked) { + only_expand_y = checked; + ui->actionExpandY->setIcon(checked ? icon_exp_y : icon_exp_sy); } diff --git a/qad/libs/graphic/graphic.h b/qad/libs/graphic/graphic.h index b66381f..609ad7a 100644 --- a/qad/libs/graphic/graphic.h +++ b/qad/libs/graphic/graphic.h @@ -129,8 +129,6 @@ public: Autofit = 0x01, Grid = 0x02, CursorAxis = 0x04, - OnlyExpandY = 0x08, - OnlyExpandX = 0x10, Fullscreen = 0x20, BorderInputs = 0x40, Legend = 0x80, @@ -423,8 +421,8 @@ protected slots: void on_buttonSave_clicked() {saveImage();} void on_checkGrid_toggled(bool checked) {grid = checked; update();} void on_checkGuides_toggled(bool checked); - void on_checkExpandY_toggled(bool checked); - void on_checkExpandX_toggled(bool checked); + void on_actionExpandX_triggered(bool checked); + void on_actionExpandY_triggered(bool checked); void on_checkBorderInputs_toggled(bool checked) {setBorderInputsVisible(checked);} void on_checkLegend_toggled(bool checked) {setLegendVisible(checked);} void on_checkPause_toggled(bool checked) {setPaused(checked);} @@ -443,7 +441,6 @@ signals: void cleared(); void visualRectChanged(); void graphicSettingsChanged(); - }; diff --git a/qad/libs/graphic/graphic.ui b/qad/libs/graphic/graphic.ui index 3fd5dc1..096f8a0 100644 --- a/qad/libs/graphic/graphic.ui +++ b/qad/libs/graphic/graphic.ui @@ -89,34 +89,6 @@ - - - - Only expand Y - - - - :/icons/expand_s_y.png:/icons/expand_s_y.png - - - true - - - - - - - Only expand X - - - - :/icons/expand_s_x.png:/icons/expand_s_x.png - - - true - - - @@ -449,6 +421,25 @@ Trace Y + + + true + + + Only expand X + + + + + true + + + Only expand Y + + + Only expand Y + +