Changeset View
Changeset View
Standalone View
Standalone View
src/elementdataviewer.cpp
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | 59 | { | |||
---|---|---|---|---|---|
99 | connect(ui.from, QOverload<int>::of(&QSpinBox::valueChanged), | 99 | connect(ui.from, QOverload<int>::of(&QSpinBox::valueChanged), | ||
100 | this, &ElementDataViewer::rangeChanged); | 100 | this, &ElementDataViewer::rangeChanged); | ||
101 | connect(ui.to, QOverload<int>::of(&QSpinBox::valueChanged), | 101 | connect(ui.to, QOverload<int>::of(&QSpinBox::valueChanged), | ||
102 | this, &ElementDataViewer::rangeChanged); | 102 | this, &ElementDataViewer::rangeChanged); | ||
103 | connect(buttonBox->button(QDialogButtonBox::Help), &QPushButton::clicked, | 103 | connect(buttonBox->button(QDialogButtonBox::Help), &QPushButton::clicked, | ||
104 | this, &ElementDataViewer::slotHelp); | 104 | this, &ElementDataViewer::slotHelp); | ||
105 | connect(ui.full, &QPushButton::clicked, | 105 | connect(ui.full, &QPushButton::clicked, | ||
106 | this, &ElementDataViewer::fullRange); | 106 | this, &ElementDataViewer::fullRange); | ||
107 | connect(ui.swapXYAxis, &QPushButton::clicked, | ||||
108 | this, &ElementDataViewer::swapXYAxis); | ||||
107 | drawPlot(); | 109 | drawPlot(); | ||
108 | 110 | | |||
109 | resize(650, 500); | 111 | resize(650, 500); | ||
110 | } | 112 | } | ||
111 | 113 | | |||
112 | ElementDataViewer::~ElementDataViewer() | 114 | ElementDataViewer::~ElementDataViewer() | ||
113 | { | 115 | { | ||
114 | delete m_yData; | 116 | delete m_yData; | ||
Show All 16 Lines | |||||
131 | } | 133 | } | ||
132 | 134 | | |||
133 | void ElementDataViewer::fullRange() | 135 | void ElementDataViewer::fullRange() | ||
134 | { | 136 | { | ||
135 | ui.from ->setValue(1); | 137 | ui.from ->setValue(1); | ||
136 | ui.to ->setValue(116); | 138 | ui.to ->setValue(116); | ||
137 | } | 139 | } | ||
138 | 140 | | |||
141 | void ElementDataViewer::swapXYAxis() | ||||
142 | { | ||||
143 | int x = ui.KCB_x->currentIndex(); | ||||
144 | int y = ui.KCB_y->currentIndex(); | ||||
145 | | ||||
146 | ui.KCB_x->setCurrentIndex(y); | ||||
147 | ui.KCB_y->setCurrentIndex(x); | ||||
148 | | ||||
149 | rangeChanged(); | ||||
150 | } | ||||
139 | 151 | | |||
140 | void ElementDataViewer::setLimits() | 152 | void ElementDataViewer::setLimits() | ||
141 | { | 153 | { | ||
142 | qDebug() << "ElementDataViewer::setLimits()"; | 154 | qDebug() << "ElementDataViewer::setLimits()"; | ||
143 | 155 | | |||
144 | double x1 = 0.0, x2 = 0.0, y1 = 0.0, y2 = 0.0; | 156 | double x1 = 0.0, x2 = 0.0, y1 = 0.0, y2 = 0.0; | ||
145 | 157 | | |||
146 | getMinMax(x1, x2, m_xData); | 158 | getMinMax(x1, x2, m_xData); | ||
▲ Show 20 Lines • Show All 399 Lines • Show Last 20 Lines |