removed warning, updated lohmann::json, fix qt6 static assertion error
This commit is contained in:
parent
ac2d532b0c
commit
c18845fce5
@ -346,17 +346,17 @@ bool CompoundDeviceEditDialog::eventFilter(QObject *object, QEvent *event)
|
||||
insertIndicator->setMaximumSize(2, frameSize);
|
||||
insertIndicator->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
insertIndicator->setStyleSheet("background-color:red;");
|
||||
updateInsertIndicator(dragEvent->pos().x());
|
||||
updateInsertIndicator(dragEvent->position().toPoint().x());
|
||||
return true;
|
||||
}
|
||||
} else if(event->type() == QEvent::DragMove) {
|
||||
auto dragEvent = static_cast<QDragMoveEvent*>(event);
|
||||
updateInsertIndicator(dragEvent->pos().x());
|
||||
updateInsertIndicator(dragEvent->position().toPoint().x());
|
||||
return true;
|
||||
} else if(event->type() == QEvent::Drop) {
|
||||
auto dragEvent = static_cast<QDropEvent*>(event);
|
||||
delete insertIndicator;
|
||||
addFrameAtPosition(dragEvent->pos().x(), dropFrame);
|
||||
addFrameAtPosition(dragEvent->position().toPoint().x(), dropFrame);
|
||||
return true;
|
||||
} else if(event->type() == QEvent::DragLeave) {
|
||||
dropPending = false;
|
||||
|
@ -200,6 +200,7 @@ bool SSA3000XDriver::setSA(const DeviceDriver::SASettings &s, std::function<void
|
||||
windowName = "HAMMing"; // kaiser is not available
|
||||
break;
|
||||
case SASettings::Window::None:
|
||||
case SASettings::Window::Last:
|
||||
windowName = "RECTangular";
|
||||
break;
|
||||
}
|
||||
@ -217,6 +218,7 @@ bool SSA3000XDriver::setSA(const DeviceDriver::SASettings &s, std::function<void
|
||||
detName = "NEGative";
|
||||
break;
|
||||
case SASettings::Detector::PPeak:
|
||||
case SASettings::Detector::Last:
|
||||
detName = "POSitive";
|
||||
break;
|
||||
case SASettings::Detector::Sample:
|
||||
@ -287,6 +289,8 @@ QStringList SSA3000XDriver::availableExtRefOutSettings()
|
||||
|
||||
bool SSA3000XDriver::setExtRef(QString option_in, QString option_out)
|
||||
{
|
||||
Q_UNUSED(option_in)
|
||||
Q_UNUSED(option_out)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -10,9 +10,9 @@ template<typename T, int minUnchanged>
|
||||
class TraceDifferenceGenerator {
|
||||
public:
|
||||
TraceDifferenceGenerator(std::function<void(const T&)> changeCallback) :
|
||||
nextCallbackIndex(0),
|
||||
last{},
|
||||
callback(changeCallback),
|
||||
nextCallbackIndex(0)
|
||||
callback(changeCallback)
|
||||
{}
|
||||
|
||||
void reset() {
|
||||
|
@ -523,7 +523,7 @@ void TracePlot::dragEnterEvent(QDragEnterEvent *event)
|
||||
void TracePlot::dropEvent(QDropEvent *event)
|
||||
{
|
||||
if(dropTrace) {
|
||||
traceDropped(dropTrace, event->pos() - - QPoint(marginLeft, marginTop));
|
||||
traceDropped(dropTrace, event->position().toPoint() - - QPoint(marginLeft, marginTop));
|
||||
}
|
||||
dropPending = false;
|
||||
dropTrace = nullptr;
|
||||
|
@ -9,7 +9,7 @@ public:
|
||||
: ptr(static_cast<void*>(ptr)),
|
||||
variant(QVariant(*ptr)){}
|
||||
void setValue(const QVariant &value) {
|
||||
auto destType = variant.type();
|
||||
auto destType = variant.metaType();
|
||||
if(!value.canConvert(destType)) {
|
||||
throw std::runtime_error("Unable to convert QVariant to requested type");
|
||||
}
|
||||
|
@ -428,17 +428,17 @@ bool MatchingNetwork::eventFilter(QObject *object, QEvent *event)
|
||||
insertIndicator->setMaximumSize(2, imageHeight);
|
||||
insertIndicator->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
insertIndicator->setStyleSheet("background-color:red;");
|
||||
updateInsertIndicator(dragEvent->pos().x());
|
||||
updateInsertIndicator(dragEvent->position().toPoint().x());
|
||||
return true;
|
||||
}
|
||||
} else if(event->type() == QEvent::DragMove) {
|
||||
auto dragEvent = static_cast<QDragMoveEvent*>(event);
|
||||
updateInsertIndicator(dragEvent->pos().x());
|
||||
updateInsertIndicator(dragEvent->position().toPoint().x());
|
||||
return true;
|
||||
} else if(event->type() == QEvent::Drop) {
|
||||
auto dragEvent = static_cast<QDropEvent*>(event);
|
||||
delete insertIndicator;
|
||||
addComponentAtPosition(dragEvent->pos().x(), dropComponent);
|
||||
addComponentAtPosition(dragEvent->position().toPoint().x(), dropComponent);
|
||||
return true;
|
||||
} else if(event->type() == QEvent::DragLeave) {
|
||||
dropPending = false;
|
||||
|
@ -1,6 +1,7 @@
|
||||
#ifndef APPWINDOW_H
|
||||
#define APPWINDOW_H
|
||||
|
||||
#include "json.hpp"
|
||||
#include "Traces/traceplot.h"
|
||||
#include "Traces/tracemodel.h"
|
||||
#include "Traces/Marker/markermodel.h"
|
||||
@ -66,11 +67,11 @@ private slots:
|
||||
void DeviceStatusUpdated();
|
||||
void DeviceFlagsUpdated();
|
||||
void DeviceInfoUpdated();
|
||||
nlohmann::json SaveSetup();
|
||||
void SaveSetup(QString filename);
|
||||
void LoadSetup(QString filename);
|
||||
void LoadSetup(nlohmann::json j);
|
||||
private:
|
||||
nlohmann::json SaveSetup();
|
||||
void LoadSetup(nlohmann::json j);
|
||||
|
||||
enum class DeviceStatusBar {
|
||||
Connected,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -50,7 +50,7 @@ public:
|
||||
}
|
||||
// json library does not now about QVariant, handle used cases
|
||||
auto val = e.var.value();
|
||||
switch(static_cast<QMetaType::Type>(val.type())) {
|
||||
switch(val.metaType().id()) {
|
||||
case QMetaType::Double: e.var.setValue((*json_entry).get<double>()); break;
|
||||
case QMetaType::Int: e.var.setValue((*json_entry).get<int>()); break;
|
||||
case QMetaType::UInt: e.var.setValue((*json_entry).get<unsigned int>()); break;
|
||||
@ -80,7 +80,7 @@ public:
|
||||
}
|
||||
// json library does not now about QVariant, handle used cases
|
||||
auto val = e.var.value();
|
||||
switch(static_cast<QMetaType::Type>(val.type())) {
|
||||
switch(val.metaType().id()) {
|
||||
case QMetaType::Double: *json_entry = val.toDouble(); break;
|
||||
case QMetaType::Int: *json_entry = val.toInt(); break;
|
||||
case QMetaType::UInt: *json_entry = val.toUInt(); break;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
||||
export LD_LIBRARY_PATH
|
||||
QT_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins${QT_PLUGIN_PATH:+:$QT_PLUGIN_PATH}
|
||||
QT_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt6/plugins${QT_PLUGIN_PATH:+:$QT_PLUGIN_PATH}
|
||||
export QT_PLUGIN_PATH
|
||||
exec "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user