Compare commits
3 Commits
04d9cf6edf
...
32da3d029d
| Author | SHA1 | Date | |
|---|---|---|---|
| 32da3d029d | |||
| 681a79a672 | |||
| 88bcc7f2e9 |
@@ -2315,12 +2315,29 @@ void Graphic::on_graphic_buttonAutofit_clicked() {
|
|||||||
|
|
||||||
void Graphic::on_graphic_buttonConfigure_clicked() {
|
void Graphic::on_graphic_buttonConfigure_clicked() {
|
||||||
conf->graphicItems.clear();
|
conf->graphicItems.clear();
|
||||||
for (int i = 0; i < graphics.size(); i++) {
|
int all_checks[2] = {-1, -1};
|
||||||
GraphicConf::GraphicItem item;
|
auto addAllChecks = [](int & out, bool is_vis) {
|
||||||
item.icon = graphics[i].icon;
|
if (out < 0)
|
||||||
item.name = graphics[i].name;
|
out = is_vis ? Qt::Checked : Qt::Unchecked;
|
||||||
conf->graphicItems.append(item);
|
else {
|
||||||
|
if (is_vis && out == Qt::Unchecked) out = Qt::PartiallyChecked;
|
||||||
|
if (!is_vis && out == Qt::Checked) out = Qt::PartiallyChecked;
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
for (const auto & g: graphics) {
|
||||||
|
GraphicConf::GraphicItem item;
|
||||||
|
item.icon = g.icon;
|
||||||
|
item.name = g.name;
|
||||||
|
conf->graphicItems.append(item);
|
||||||
|
addAllChecks(all_checks[0], g.lines);
|
||||||
|
addAllChecks(all_checks[1], g.points);
|
||||||
|
}
|
||||||
|
conf->ui->checkLinesAll->blockSignals(true);
|
||||||
|
conf->ui->checkPointsAll->blockSignals(true);
|
||||||
|
conf->ui->checkLinesAll->setCheckState((Qt::CheckState)all_checks[0]);
|
||||||
|
conf->ui->checkPointsAll->setCheckState((Qt::CheckState)all_checks[1]);
|
||||||
|
conf->ui->checkLinesAll->blockSignals(false);
|
||||||
|
conf->ui->checkPointsAll->blockSignals(false);
|
||||||
conf->ui->colorGrid->setColor(grid_pen.color());
|
conf->ui->colorGrid->setColor(grid_pen.color());
|
||||||
conf->ui->comboStyleGrid->setCurrentIndex((int)grid_pen.style());
|
conf->ui->comboStyleGrid->setCurrentIndex((int)grid_pen.style());
|
||||||
conf->ui->spinWidthGrid->setValue(grid_pen.widthF());
|
conf->ui->spinWidthGrid->setValue(grid_pen.widthF());
|
||||||
|
|||||||
@@ -182,6 +182,7 @@ void GraphicAnalysis::updateGraphic(int index) {
|
|||||||
void GraphicAnalysis::updateAllGraphic() {
|
void GraphicAnalysis::updateAllGraphic() {
|
||||||
for (int i = 0; i < graphicsCount(); ++i)
|
for (int i = 0; i < graphicsCount(); ++i)
|
||||||
updateGraphic(i);
|
updateGraphic(i);
|
||||||
|
updateGraphics();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -261,11 +262,13 @@ void GraphicAnalysis::addPoint(const QPointF & p, int graphic, bool update_) {
|
|||||||
|
|
||||||
void GraphicAnalysis::setGraphicTransformFunction(std::function<QPolygonF(const QPolygonF &)> f) {
|
void GraphicAnalysis::setGraphicTransformFunction(std::function<QPolygonF(const QPolygonF &)> f) {
|
||||||
tf_gr = f;
|
tf_gr = f;
|
||||||
|
updateAllGraphic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GraphicAnalysis::setSpectrumTransformFunction(std::function<QPolygonF(const QPolygonF &)> f) {
|
void GraphicAnalysis::setSpectrumTransformFunction(std::function<QPolygonF(const QPolygonF &)> f) {
|
||||||
tf_fft = f;
|
tf_fft = f;
|
||||||
|
updateAllGraphic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
MapViewTileProvider_OSM::MapViewTileProvider_OSM() {
|
MapViewTileProvider_OSM::MapViewTileProvider_OSM() {
|
||||||
nam = new QNetworkAccessManager();
|
nam = new QNetworkAccessManager();
|
||||||
PIValueTree p;
|
PIValueTree p;
|
||||||
p.addChild(PIValueTree("url", "http://tile.openstreetmap.org"));
|
p.addChild(PIValueTree("url", "https://tile.openstreetmap.org"));
|
||||||
initParameters(p);
|
initParameters(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -608,7 +608,7 @@ void PIValueTreeEdit::applyVariantEdit(PIVariantEdit * ve, const PIValueTree & v
|
|||||||
ve->setAttributes(attributesWithRO(vt.attributes()));
|
ve->setAttributes(attributesWithRO(vt.attributes()));
|
||||||
ve->setValue(vt.value());
|
ve->setValue(vt.value());
|
||||||
ve->setFullEditMode(is_full_edit);
|
ve->setFullEditMode(is_full_edit);
|
||||||
ve->setToolTip(PI2QString(vt.attribute(PIValueTree::Attribute::toolTip).toString()));
|
ve->setToolTip(PIVariantEditorBase::vtTr(vt.attribute(PIValueTree::Attribute::toolTip).toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user