#include "pv/mainwindow.hpp"
#include "pv/session.hpp"
#include "pv/util.hpp"
+#include "pv/data/segment.hpp"
#ifdef ANDROID
#include <libsigrokandroidutils/libsigrokandroidutils.h>
#ifdef _WIN32
#include <QtPlugin>
+#ifdef QT_STATIC
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
Q_IMPORT_PLUGIN(QSvgPlugin)
#endif
+#endif
using std::exception;
using std::ifstream;
for (int i = 0; i < argc; i++)
open_files.emplace_back(argv[i]);
- qRegisterMetaType<pv::util::Timestamp>("util::Timestamp");
qRegisterMetaType<uint64_t>("uint64_t");
+ qRegisterMetaType<pv::util::Timestamp>("util::Timestamp");
+ qRegisterMetaType<SharedPtrToSegment>("SharedPtrToSegment");
+ qRegisterMetaType<shared_ptr<pv::data::SignalBase>>("shared_ptr<SignalBase>");
// Prepare the global settings since logging needs them early on
pv::GlobalSettings settings;
+ settings.add_change_handler(&a); // Only the application object can't register itself
settings.save_internal_defaults();
settings.set_defaults_where_needed();
+ settings.apply_language();
settings.apply_theme();
pv::logging.init();
// Create the device manager, initialise the drivers
pv::DeviceManager device_manager(context, driver, do_scan);
- a.collect_version_info(context);
+ a.collect_version_info(device_manager);
if (show_version) {
a.print_version_info();
} else {
#ifdef ENABLE_SIGNALS
if (SignalHandler::prepare_signals()) {
SignalHandler *const handler = new SignalHandler(&w);
- QObject::connect(handler, SIGNAL(int_received()),
- &w, SLOT(close()));
- QObject::connect(handler, SIGNAL(term_received()),
- &w, SLOT(close()));
+ QObject::connect(handler, SIGNAL(int_received()), &w, SLOT(close()));
+ QObject::connect(handler, SIGNAL(term_received()), &w, SLOT(close()));
+ QObject::connect(handler, SIGNAL(usr1_received()), &w, SLOT(on_run_stop_clicked()));
} else
qWarning() << "Could not prepare signal handler.";
#endif