MCPcopy Create free account
hub / github.com/cpvrlab/ImagePlay / MainWindow

Method MainWindow

ImagePlay/src/MainWindow.cpp:23–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21#include "ui_MainWindow.h"
22
23MainWindow::MainWindow(QWidget *parent) :
24 QMainWindow(parent),
25 ui(new Ui::MainWindow)
26{
27 ui->setupUi(this);
28
29 _activeProcessStep = NULL;
30 _lastActiveProcessStep = NULL;
31 _allowChangeActiveProcessStep = false;
32 _synchronizeViews = true;
33 _isPlaying = false;
34 _lastAutosaveTimestamp = 0;
35 _autosaveEnabled = true;
36 _logFileEnabled = false;
37 _autosaveInterval = 10; // 10 seconds
38 _unsavedChanges = false;
39 _useOpenCV = true;
40 _threadRunning = false;
41
42 _imageViewer = new ImageViewerWindow(this);
43 _settingsWindow = new SettingsWindow(this);
44
45 _pluginManager = new IPPluginManager();
46
47 _scene = ui->graphicsView->scene();
48
49 // timer
50 _timer = new QTimer(this);
51 // update and execute graphics view on time out
52 connect(_timer, SIGNAL(timeout()), this, SLOT(execute()));
53
54 // autosave timer
55 _autosaveTimer = new QTimer(this);
56 _autosaveTimer->setInterval(_autosaveInterval*1000);
57 connect(_autosaveTimer, &QTimer::timeout, this, &MainWindow::on_autosaveTimer);
58
59 if(_autosaveEnabled)
60 _autosaveTimer->start();
61
62 // message timer
63 _messageLabelTimer = new QTimer(this);
64 ui->messageLabel->hide();
65
66 // sequence control widget
67 // (at the moment not working. it was used for the control of imageloading in sequence loader process.)
68 //ui->toolBar->addWidget(ui->sequenceControlWidget);
69 ui->sequenceControlWidget->setEnabled(false);
70 ui->sequenceControlWidget->hide();
71
72 connect(ui->graphicsView, &IPProcessGrid::sequenceChanged, this, &MainWindow::on_sequenceChanged);
73 //connect(_pluginFileSystemWatcher, &QFileSystemWatcher::fileChanged, this, &MainWindow::on_pluginDirectoryChanged);
74 //connect(_pluginFileSystemTimer, &QTimer::timeout, this, &MainWindow::reloadPlugins);
75
76 // read and apply settings
77 readSettings();
78
79 ui->actionSynchronizeViews->setChecked(_synchronizeViews);
80

Callers

nothing calls this directly

Calls 7

sceneMethod · 0.80
startMethod · 0.80
loadPluginsMethod · 0.80
lengthMethod · 0.80
setMainWindowMethod · 0.45
initMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected