forked from bavc/qctools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
225 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include "yminmaxselector.h" | ||
#include "ui_yminmaxselector.h" | ||
|
||
YMinMaxSelector::YMinMaxSelector(QWidget *parent) | ||
: QWidget(parent) | ||
, ui(new Ui::YMinMaxSelector) | ||
{ | ||
ui->setupUi(this); | ||
|
||
connect(ui->customMinMax_radioButton, &QRadioButton::toggled, this, &YMinMaxSelector::activateCustomMinMax); | ||
} | ||
|
||
YMinMaxSelector::~YMinMaxSelector() | ||
{ | ||
delete ui; | ||
} | ||
|
||
void YMinMaxSelector::activateCustomMinMax(bool value) | ||
{ | ||
ui->min_label->setEnabled(value); | ||
ui->min_doubleSpinBox->setEnabled(value); | ||
ui->max_label->setEnabled(value); | ||
ui->max_doubleSpinBox->setEnabled(value); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef YMINMAXSELECTOR_H | ||
#define YMINMAXSELECTOR_H | ||
|
||
#include <QWidget> | ||
|
||
namespace Ui { | ||
class YMinMaxSelector; | ||
} | ||
|
||
class YMinMaxSelector : public QWidget | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit YMinMaxSelector(QWidget *parent = nullptr); | ||
~YMinMaxSelector(); | ||
|
||
private Q_SLOTS: | ||
void activateCustomMinMax(bool value); | ||
|
||
private: | ||
Ui::YMinMaxSelector *ui; | ||
}; | ||
|
||
#endif // YMINMAXSELECTOR_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>YMinMaxSelector</class> | ||
<widget class="QWidget" name="YMinMaxSelector"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>400</width> | ||
<height>156</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Form</string> | ||
</property> | ||
<property name="autoFillBackground"> | ||
<bool>true</bool> | ||
</property> | ||
<layout class="QGridLayout" name="gridLayout_2"> | ||
<item row="0" column="0"> | ||
<widget class="QGroupBox" name="groupBox"> | ||
<property name="title"> | ||
<string>Select y-axis min/max</string> | ||
</property> | ||
<layout class="QGridLayout" name="gridLayout"> | ||
<item row="0" column="0"> | ||
<widget class="QRadioButton" name="minMaxOfThePlot_radioButton"> | ||
<property name="text"> | ||
<string>min/max value of the plot</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="1" column="0"> | ||
<widget class="QRadioButton" name="minMaxSystemProvided_radioButton"> | ||
<property name="text"> | ||
<string>system provided min/max</string> | ||
</property> | ||
<property name="checked"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="2" column="0"> | ||
<layout class="QHBoxLayout" name="horizontalLayout"> | ||
<item> | ||
<widget class="QRadioButton" name="customMinMax_radioButton"> | ||
<property name="text"> | ||
<string>custom</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="min_label"> | ||
<property name="enabled"> | ||
<bool>false</bool> | ||
</property> | ||
<property name="text"> | ||
<string>min:</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QDoubleSpinBox" name="min_doubleSpinBox"> | ||
<property name="enabled"> | ||
<bool>false</bool> | ||
</property> | ||
<property name="sizePolicy"> | ||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> | ||
<horstretch>0</horstretch> | ||
<verstretch>0</verstretch> | ||
</sizepolicy> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="max_label"> | ||
<property name="enabled"> | ||
<bool>false</bool> | ||
</property> | ||
<property name="text"> | ||
<string>max:</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QDoubleSpinBox" name="max_doubleSpinBox"> | ||
<property name="enabled"> | ||
<bool>false</bool> | ||
</property> | ||
<property name="sizePolicy"> | ||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> | ||
<horstretch>0</horstretch> | ||
<verstretch>0</verstretch> | ||
</sizepolicy> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
</layout> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections/> | ||
</ui> |