remove graphic expand buttons, update pip

This commit is contained in:
2020-08-31 18:35:32 +03:00
parent bd5579b8f1
commit 235eb2acb8
7 changed files with 34 additions and 56 deletions

View File

@@ -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)

2
pip

Submodule pip updated: e1f2c90790...a4b3edb3e1

View File

@@ -32,7 +32,7 @@
<item>
<widget class="Graphic" name="graphic">
<property name="buttons">
<set>Graphic::Autofit|Graphic::BorderInputs|Graphic::Clear|Graphic::Configure|Graphic::CursorAxis|Graphic::Fullscreen|Graphic::Legend|Graphic::OnlyExpandY|Graphic::Pause|Graphic::Save</set>
<set>Graphic::Autofit|Graphic::BorderInputs|Graphic::Clear|Graphic::Configure|Graphic::CursorAxis|Graphic::Fullscreen|Graphic::Legend|Graphic::Pause|Graphic::Save</set>
</property>
<property name="borderInputsVisible">
<bool>false</bool>

View File

@@ -1,4 +0,0 @@
<RCC>
<qresource prefix="/">
</qresource>
</RCC>

View File

@@ -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);
}

View File

@@ -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();
};

View File

@@ -89,34 +89,6 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="checkExpandY">
<property name="toolTip">
<string>Only expand Y</string>
</property>
<property name="icon">
<iconset resource="qad_graphic.qrc">
<normaloff>:/icons/expand_s_y.png</normaloff>:/icons/expand_s_y.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="checkExpandX">
<property name="toolTip">
<string>Only expand X</string>
</property>
<property name="icon">
<iconset resource="qad_graphic.qrc">
<normaloff>:/icons/expand_s_x.png</normaloff>:/icons/expand_s_x.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="buttonFullscreen">
<property name="toolTip">
@@ -449,6 +421,25 @@
<string>Trace Y</string>
</property>
</action>
<action name="actionExpandX">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Only expand X</string>
</property>
</action>
<action name="actionExpandY">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Only expand Y</string>
</property>
<property name="toolTip">
<string>Only expand Y</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>