Commit f5cb85c6 authored by Thiago Santini's avatar Thiago Santini

Refactoring ERWidgets config

parent e0c49286
...@@ -5,8 +5,7 @@ using namespace std; ...@@ -5,8 +5,7 @@ using namespace std;
using namespace cv; using namespace cv;
CameraWidget::CameraWidget(QString id, ImageProcessor::Type type, QWidget *parent) : CameraWidget::CameraWidget(QString id, ImageProcessor::Type type, QWidget *parent) :
ERWidget(parent), ERWidget(id, parent),
id(id),
type(type), type(type),
sROI(QPoint(0,0)), sROI(QPoint(0,0)),
eROI(QPoint(0,0)), eROI(QPoint(0,0)),
...@@ -17,10 +16,10 @@ CameraWidget::CameraWidget(QString id, ImageProcessor::Type type, QWidget *paren ...@@ -17,10 +16,10 @@ CameraWidget::CameraWidget(QString id, ImageProcessor::Type type, QWidget *paren
cameraCalibrationSampleRequested(false), cameraCalibrationSampleRequested(false),
ui(new Ui::CameraWidget) ui(new Ui::CameraWidget)
{ {
ui->setupUi(this); ui->setupUi(this);
ui->viewFinder->setScaledContents(false); ui->viewFinder->setScaledContents(false);
ui->viewFinder->setAttribute(Qt::WA_OpaquePaintEvent, true); ui->viewFinder->setAttribute(Qt::WA_OpaquePaintEvent, true);
ui->viewFinder->setCursor(Qt::CrossCursor); ui->viewFinder->setCursor(Qt::CrossCursor);
switch (type) { switch (type) {
case ImageProcessor::Eye: case ImageProcessor::Eye:
...@@ -38,7 +37,6 @@ CameraWidget::CameraWidget(QString id, ImageProcessor::Type type, QWidget *paren ...@@ -38,7 +37,6 @@ CameraWidget::CameraWidget(QString id, ImageProcessor::Type type, QWidget *paren
gPerformanceMonitor.enrol(id, "Image Processor"); gPerformanceMonitor.enrol(id, "Image Processor");
gPerformanceMonitor.enrol(id, "Data Recorder"); gPerformanceMonitor.enrol(id, "Data Recorder");
setWindowTitle(id + " Widget");
camera = NULL; camera = NULL;
imageProcessor = NULL; imageProcessor = NULL;
......
...@@ -70,7 +70,6 @@ public slots: ...@@ -70,7 +70,6 @@ public slots:
void onCameraCalibrationFinished(bool success); void onCameraCalibrationFinished(bool success);
private: private:
QString id;
ImageProcessor::Type type; ImageProcessor::Type type;
Ui::CameraWidget *ui; Ui::CameraWidget *ui;
......
...@@ -10,6 +10,12 @@ ...@@ -10,6 +10,12 @@
<height>240</height> <height>240</height>
</rect> </rect>
</property> </property>
<property name="minimumSize">
<size>
<width>320</width>
<height>240</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
......
#include "ERWidget.h" #include "ERWidget.h"
#include <QDebug>
ERWidget::ERWidget(QWidget *parent) : QMainWindow(parent) ERWidget::ERWidget(QString id, QWidget *parent) :
id(id),
QMainWindow(parent)
{ {
setDefaults();
} }
...@@ -3,12 +3,25 @@ ...@@ -3,12 +3,25 @@
#include <QMainWindow> #include <QMainWindow>
#include <QObject> #include <QObject>
#include <QSettings>
// We can't include utils.h here because of the global access used for the log
// and performance monitor widgets. So we define an alternative set function
// here for convenience
template<typename T> void erset(const QSettings *settings, const QString key, T &v)
{
if (!settings)
return;
QVariant variant = settings->value(key);
if (variant.isValid())
v = qvariant_cast<T>(variant);
}
class ERWidget : public QMainWindow class ERWidget : public QMainWindow
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit ERWidget(QWidget *parent = 0); explicit ERWidget(QString id, QWidget *parent = 0);
signals: signals:
void closed(bool b); void closed(bool b);
...@@ -17,11 +30,64 @@ signals: ...@@ -17,11 +30,64 @@ signals:
public slots: public slots:
void save(QSettings *settings)
{
settings->sync();
settings->setValue(id + " Pos", pos());
settings->setValue(id + " Size", size());
settings->setValue(id + " Visible", isVisible());
}
void load(QSettings *settings)
{
QPoint pos = defaultPosition;
QSize size = defaultSize;
bool visible = defaultVisible;
// Size sanity
if (defaultSize.width() <= 0 || defaultSize.height() <= 0) {
defaultSize = minimumSize();
// If we don't have minimum sizes set in the form
if (defaultSize.width() == 0)
defaultSize.setWidth(320);
if (defaultSize.height() == 0)
defaultSize.setHeight(240);
}
settings->sync();
erset(settings, id + " Pos", pos);
erset(settings, id + " Size", size);
erset(settings, id + " Visible", visible);
move(pos);
resize(size);
if (visible)
this->show();
else
this->hide();
}
void setDefaults(bool visible = true, QSize size = {0,0}, QPoint pos = {0, 0})
{
defaultVisible = visible;
defaultSize = size;
defaultPosition = pos;
}
void setup() {
setWindowTitle(id);
}
protected: protected:
void hideEvent(QHideEvent *event) Q_DECL_OVERRIDE { Q_UNUSED(event) emit closed(false); } void hideEvent(QHideEvent *event) Q_DECL_OVERRIDE { Q_UNUSED(event) emit closed(false); }
void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE { Q_UNUSED(event) emit closed(false); } void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE { Q_UNUSED(event) emit closed(false); }
void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE { emit keyPress(event); } void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE { emit keyPress(event); }
void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE { emit keyRelease(event); } void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE { emit keyRelease(event); }
QString id;
QSize defaultSize;
bool defaultVisible;
QPoint defaultPosition;
}; };
#endif // ERWIDGET_H #endif // ERWIDGET_H
...@@ -8,8 +8,8 @@ static int gCollectionTupleId = qRegisterMetaType<CollectionTuple>("CollectionTu ...@@ -8,8 +8,8 @@ static int gCollectionTupleId = qRegisterMetaType<CollectionTuple>("CollectionTu
static int gVectorCollectionTupleId = qRegisterMetaType<std::vector<CollectionTuple> >("std::vector<CollectionTuple>"); static int gVectorCollectionTupleId = qRegisterMetaType<std::vector<CollectionTuple> >("std::vector<CollectionTuple>");
static int gCollectionTupleTypeId = qRegisterMetaType<CollectionTuple::TupleType>("CollectionTuple::TupleType"); static int gCollectionTupleTypeId = qRegisterMetaType<CollectionTuple::TupleType>("CollectionTuple::TupleType");
GazeEstimationWidget::GazeEstimationWidget(QWidget *parent) : GazeEstimationWidget::GazeEstimationWidget(QString id, QWidget *parent) :
ERWidget(parent), ERWidget(id, parent),
isCollecting(false), isCollecting(false),
isSampling(false), isSampling(false),
lastStatus(false), lastStatus(false),
...@@ -19,7 +19,6 @@ GazeEstimationWidget::GazeEstimationWidget(QWidget *parent) : ...@@ -19,7 +19,6 @@ GazeEstimationWidget::GazeEstimationWidget(QWidget *parent) :
{ {
ui->setupUi(this); ui->setupUi(this);
setWindowTitle("Gaze Estimation Widget");
setWindowIcon(QIcon(":/icons/gazeEstimationWidget.png")); setWindowIcon(QIcon(":/icons/gazeEstimationWidget.png"));
gazeEstimationThread = new QThread(); gazeEstimationThread = new QThread();
......
...@@ -23,7 +23,7 @@ class GazeEstimationWidget : public ERWidget ...@@ -23,7 +23,7 @@ class GazeEstimationWidget : public ERWidget
Q_OBJECT Q_OBJECT
public: public:
explicit GazeEstimationWidget(QWidget *parent = 0); explicit GazeEstimationWidget(QString id, QWidget *parent = 0);
~GazeEstimationWidget(); ~GazeEstimationWidget();
signals: signals:
......
#include "LogWidget.h" #include "LogWidget.h"
#include "ui_LogWidget.h" #include "ui_LogWidget.h"
LogWidget::LogWidget(QWidget *parent) : LogWidget::LogWidget(QString id, QWidget *parent) :
ERWidget(parent), ERWidget(id, parent),
ui(new Ui::LogWidget) ui(new Ui::LogWidget)
{ {
ui->setupUi(this); ui->setupUi(this);
setWindowTitle("Log Widget");
setWindowIcon(QIcon(":/icons/logWidget.png")); setWindowIcon(QIcon(":/icons/logWidget.png"));
} }
......
...@@ -17,7 +17,7 @@ class LogWidget : public ERWidget ...@@ -17,7 +17,7 @@ class LogWidget : public ERWidget
Q_OBJECT Q_OBJECT
public: public:
explicit LogWidget(QWidget *parent = 0); explicit LogWidget(QString id, QWidget *parent = 0);
~LogWidget(); ~LogWidget();
public slots: public slots:
......
#include "MainWindow.h" #include "MainWindow.h"
#include "ui_MainWindow.h" #include "ui_MainWindow.h"
// TODO: factor config aware class into ERWidget // TODO: automatically detect suitable window positions on first init
void MainWindow::createExtraMenus() void MainWindow::createExtraMenus()
{ {
...@@ -10,11 +10,11 @@ void MainWindow::createExtraMenus() ...@@ -10,11 +10,11 @@ void MainWindow::createExtraMenus()
} }
MainWindow::MainWindow(QWidget *parent) : MainWindow::MainWindow(QWidget *parent) :
ERWidget(parent), ERWidget("EyeRecToo", parent),
lEyeWidget(NULL), lEyeWidget(),
rEyeWidget(NULL), rEyeWidget(),
fieldWidget(NULL), fieldWidget(),
synchronizer(NULL), synchronizer(),
ui(new Ui::MainWindow) ui(new Ui::MainWindow)
{ {
ui->setupUi(this); ui->setupUi(this);
...@@ -24,8 +24,8 @@ MainWindow::MainWindow(QWidget *parent) : ...@@ -24,8 +24,8 @@ MainWindow::MainWindow(QWidget *parent) :
createExtraMenus(); createExtraMenus();
connect(ui->menuBar, SIGNAL(triggered(QAction*)), this, SLOT(menuOption(QAction*)) ); connect(ui->menuBar, SIGNAL(triggered(QAction*)), this, SLOT(menuOption(QAction*)) );
settings = new QSettings(gCfgDir + "/" + "EyeRecToo", QSettings::IniFormat); settings = new QSettings(gCfgDir + "/" + "EyeRecToo", QSettings::IniFormat);
cfg.load(settings); cfg.load(settings);
setWindowTitle(QString("EyeRecToo v%1").arg(GIT_VERSION)); setWindowTitle(QString("EyeRecToo v%1").arg(GIT_VERSION));
setWindowIcon(QIcon(":/icons/EyeRecToo.png")); setWindowIcon(QIcon(":/icons/EyeRecToo.png"));
...@@ -36,8 +36,9 @@ MainWindow::MainWindow(QWidget *parent) : ...@@ -36,8 +36,9 @@ MainWindow::MainWindow(QWidget *parent) :
ui->blinker->hide(); ui->blinker->hide();
logWidget = new LogWidget(); logWidget = new LogWidget("Log Widget");
setupWidget(logWidget, cfg.logWidgetPos, cfg.logWidgetSize, cfg.logWidgetVisible, ui->log); logWidget->setDefaults( true, {480, 240} );
setupWidget(logWidget, settings, ui->log);
gLogWidget = logWidget; gLogWidget = logWidget;
/* /*
...@@ -53,17 +54,20 @@ MainWindow::MainWindow(QWidget *parent) : ...@@ -53,17 +54,20 @@ MainWindow::MainWindow(QWidget *parent) :
/* /*
* Asynchronous elements * Asynchronous elements
*/ */
lEyeWidget = new CameraWidget("LeftEye", ImageProcessor::Eye); lEyeWidget = new CameraWidget("Left Eye Widget", ImageProcessor::Eye);
lEyeWidget->setWindowIcon(QIcon(":/icons/lEyeWidget.png")); lEyeWidget->setDefaults( true, {320, 240} );
setupWidget(lEyeWidget, cfg.leftEyeWidgetPos, cfg.leftEyeWidgetSize, cfg.leftEyeWidgetVisible, ui->leftEyeCam); lEyeWidget->setWindowIcon(QIcon(":/icons/lEyeWidget.png"));
setupWidget(lEyeWidget, settings, ui->leftEyeCam);
QThread::msleep(200); QThread::msleep(200);
rEyeWidget = new CameraWidget("RightEye", ImageProcessor::Eye); rEyeWidget = new CameraWidget("Right Eye Widget", ImageProcessor::Eye);
rEyeWidget->setWindowIcon(QIcon(":/icons/rEyeWidget.png")); rEyeWidget->setDefaults( true, {320, 240} );
setupWidget(rEyeWidget, cfg.rightEyeWidgetPos, cfg.rightEyeWidgetSize, cfg.rightEyeWidgetVisible, ui->rightEyeCam); rEyeWidget->setWindowIcon(QIcon(":/icons/rEyeWidget.png"));
setupWidget(rEyeWidget, settings, ui->rightEyeCam);
QThread::msleep(200); QThread::msleep(200);
fieldWidget = new CameraWidget("Field", ImageProcessor::Field); fieldWidget = new CameraWidget("Field Widget", ImageProcessor::Field);
fieldWidget->setWindowIcon(QIcon(":/icons/fieldWidget.png")); fieldWidget->setDefaults( true, {854, 480} );
setupWidget(fieldWidget, cfg.fieldWidgetPos, cfg.fieldWidgetSize, cfg.fieldWidgetVisible, ui->fieldCam); fieldWidget->setWindowIcon(QIcon(":/icons/fieldWidget.png"));
setupWidget(fieldWidget, settings, ui->fieldCam);
/* /*
* Synchronizer * Synchronizer
...@@ -79,8 +83,9 @@ MainWindow::MainWindow(QWidget *parent) : ...@@ -79,8 +83,9 @@ MainWindow::MainWindow(QWidget *parent) :
/* /*
* Synchronous elements * Synchronous elements
*/ */
gazeEstimationWidget = new GazeEstimationWidget(); gazeEstimationWidget = new GazeEstimationWidget("Gaze Estimation Widget");
setupWidget(gazeEstimationWidget, cfg.gazeEstimationWidgetPos, cfg.gazeEstimationWidgetSize, cfg.gazeEstimationWidgetVisible, ui->gazeEstimation); gazeEstimationWidget->setDefaults( false );
setupWidget(gazeEstimationWidget, settings, ui->gazeEstimation);
connect(synchronizer, SIGNAL(newData(DataTuple)), connect(synchronizer, SIGNAL(newData(DataTuple)),
gazeEstimationWidget, SIGNAL(inDataTuple(DataTuple)) ); gazeEstimationWidget, SIGNAL(inDataTuple(DataTuple)) );
connect(fieldWidget, SIGNAL(newClick(Timestamp,QPoint,QSize)), connect(fieldWidget, SIGNAL(newClick(Timestamp,QPoint,QSize)),
...@@ -102,8 +107,9 @@ MainWindow::MainWindow(QWidget *parent) : ...@@ -102,8 +107,9 @@ MainWindow::MainWindow(QWidget *parent) :
networkStream->start(2002); networkStream->start(2002);
connect(gazeEstimationWidget, SIGNAL(outDataTuple(DataTuple)), networkStream, SLOT(push(DataTuple)) ); connect(gazeEstimationWidget, SIGNAL(outDataTuple(DataTuple)), networkStream, SLOT(push(DataTuple)) );
performanceMonitorWidget = new PerformanceMonitorWidget(); performanceMonitorWidget = new PerformanceMonitorWidget("Performance Monitor Widget");
setupWidget(performanceMonitorWidget, cfg.performanceMonitorWidgetPos, cfg.performanceMonitorWidgetSize, cfg.performanceMonitorWidgetVisible, ui->performanceMonitor); performanceMonitorWidget->setDefaults( false );
setupWidget(performanceMonitorWidget, settings, ui->performanceMonitor);
// GUI to Widgets signals // GUI to Widgets signals
connect(this, SIGNAL(startRecording()), connect(this, SIGNAL(startRecording()),
...@@ -130,7 +136,7 @@ MainWindow::MainWindow(QWidget *parent) : ...@@ -130,7 +136,7 @@ MainWindow::MainWindow(QWidget *parent) :
loadSoundEffect(recStartSound, "rec-start.wav"); loadSoundEffect(recStartSound, "rec-start.wav");
loadSoundEffect(recStopSound, "rec-stop.wav"); loadSoundEffect(recStopSound, "rec-stop.wav");
setupWidget(this, cfg.mainWindowPos, cfg.mainWindowSize, true); setupWidget(this, settings);
// Commands // Commands
connect(&commandManager, SIGNAL(toggleCalibration()), connect(&commandManager, SIGNAL(toggleCalibration()),
...@@ -153,6 +159,7 @@ MainWindow::MainWindow(QWidget *parent) : ...@@ -153,6 +159,7 @@ MainWindow::MainWindow(QWidget *parent) :
evaluation->show(); evaluation->show();
QMetaObject::invokeMethod(evaluation, "run", Qt::QueuedConnection); QMetaObject::invokeMethod(evaluation, "run", Qt::QueuedConnection);
#endif #endif
} }
MainWindow::~MainWindow() MainWindow::~MainWindow()
...@@ -172,29 +179,17 @@ void MainWindow::closeEvent(QCloseEvent *event) ...@@ -172,29 +179,17 @@ void MainWindow::closeEvent(QCloseEvent *event)
// ui->recordingToggle->click(); // ui->recordingToggle->click();
} }
cfg.mainWindowPos = pos(); cfg.workingDirectory = QDir::currentPath();
cfg.mainWindowSize = size(); if (settings) {
cfg.logWidgetPos = logWidget->pos(); cfg.save(settings);
cfg.logWidgetSize = logWidget->size(); save(settings);
cfg.logWidgetVisible = logWidget->isVisible(); logWidget->save(settings);
cfg.leftEyeWidgetPos = lEyeWidget->pos(); lEyeWidget->save(settings);
cfg.leftEyeWidgetSize = lEyeWidget->size(); rEyeWidget->save(settings);
cfg.leftEyeWidgetVisible = lEyeWidget->isVisible(); fieldWidget->save(settings);
cfg.rightEyeWidgetPos = rEyeWidget->pos(); gazeEstimationWidget->save(settings);
cfg.rightEyeWidgetSize = rEyeWidget->size(); performanceMonitorWidget->save(settings);
cfg.rightEyeWidgetVisible = rEyeWidget->isVisible(); }
cfg.fieldWidgetPos = fieldWidget->pos();
cfg.fieldWidgetSize = fieldWidget->size();
cfg.fieldWidgetVisible = fieldWidget->isVisible();
cfg.gazeEstimationWidgetPos = gazeEstimationWidget->pos();
cfg.gazeEstimationWidgetSize = gazeEstimationWidget->size();
cfg.gazeEstimationWidgetVisible = gazeEstimationWidget->isVisible();
cfg.performanceMonitorWidgetPos = performanceMonitorWidget->pos();
cfg.performanceMonitorWidgetSize = performanceMonitorWidget->size();
cfg.performanceMonitorWidgetVisible = performanceMonitorWidget->isVisible();
cfg.workingDirectory = QDir::currentPath();
if (settings)
cfg.save(settings);
qInfo() << "Closing Left Eye Widget..."; qInfo() << "Closing Left Eye Widget...";
if ( lEyeWidget ) { if ( lEyeWidget ) {
...@@ -556,24 +551,21 @@ void MainWindow::showAboutDialog() ...@@ -556,24 +551,21 @@ void MainWindow::showAboutDialog()
QMessageBox::about(this, "About", msg); QMessageBox::about(this, "About", msg);
} }
void MainWindow::setupWidget(ERWidget *widget, QPoint &position, const QSize &size, const bool &visible, QPushButton *button) void MainWindow::setupWidget(ERWidget *widget, QSettings* settings, QPushButton *button)
{ {
// Sanitize position first // TODO: we might consider eventually move each ERWidget settings to their own file
widget->load(settings);
widget->setup();
// Sanitize position
bool inScreen = false; bool inScreen = false;
for (int i = 0; i < QApplication::desktop()->screenCount(); i++) for (int i = 0; i < QApplication::desktop()->screenCount(); i++)
inScreen |= QApplication::desktop()->screenGeometry(i).contains(position, true); inScreen |= QApplication::desktop()->screenGeometry(i).contains(widget->pos(), true);
if (!inScreen) if (!inScreen)
position = QApplication::desktop()->screenGeometry().topLeft(); widget->move(QApplication::desktop()->screenGeometry().topLeft());
widget->move(position);
widget->resize(size);
if (visible)
widget->show();
if (button) { if (button) {
button->setChecked(visible); button->setChecked(widget->isVisible());
connect(widget, SIGNAL(closed(bool)), connect(widget, SIGNAL(closed(bool)),
button, SLOT(setChecked(bool)) ); button, SLOT(setChecked(bool)) );
} }
......
...@@ -37,102 +37,22 @@ class MainWindowConfig ...@@ -37,102 +37,22 @@ class MainWindowConfig
{ {
public: public:
MainWindowConfig() : MainWindowConfig() :
mainWindowPos( QPoint(0,0) ), workingDirectory("./")
mainWindowSize( QSize(100, 100)),
logWidgetPos( QPoint(0,0) ),
logWidgetSize( QSize(640, 240)),
logWidgetVisible(true),
leftEyeWidgetPos( QPoint(0,0) ),
leftEyeWidgetSize( QSize(320,240) ),
leftEyeWidgetVisible(true),
rightEyeWidgetPos( QPoint(0,0) ),
rightEyeWidgetSize( QSize(320, 240) ),
rightEyeWidgetVisible(true),
fieldWidgetPos( QPoint(0,0) ),
fieldWidgetSize( QSize(320,240) ),
fieldWidgetVisible(true),
gazeEstimationWidgetPos( QPoint(0,0) ),
gazeEstimationWidgetSize( QSize(100, 100) ),
gazeEstimationWidgetVisible(true),
performanceMonitorWidgetPos( QPoint(0,0) ),
performanceMonitorWidgetSize( QSize(640, 240)),
performanceMonitorWidgetVisible(true),
workingDirectory("./")
{} {}
QPoint mainWindowPos;
QSize mainWindowSize;
QPoint logWidgetPos;
QSize logWidgetSize;
bool logWidgetVisible;
QPoint leftEyeWidgetPos;
QSize leftEyeWidgetSize;
bool leftEyeWidgetVisible;
QPoint rightEyeWidgetPos;
QSize rightEyeWidgetSize;
bool rightEyeWidgetVisible;
QPoint fieldWidgetPos;
QSize fieldWidgetSize;
bool fieldWidgetVisible;
QPoint gazeEstimationWidgetPos;
QSize gazeEstimationWidgetSize;
bool gazeEstimationWidgetVisible;
QPoint performanceMonitorWidgetPos;
QSize performanceMonitorWidgetSize;
bool performanceMonitorWidgetVisible;
QString workingDirectory;
void save(QSettings *settings) void save(QSettings *settings)
{ {
settings->sync(); settings->sync();
settings->setValue("mainWindowPos", mainWindowPos); settings->setValue("workingDirectory", workingDirectory);
settings->setValue("mainWindowSize", mainWindowSize);
settings->setValue("logWidgetPos", logWidgetPos);
settings->setValue("logWidgetSize", logWidgetSize);
settings->setValue("logWidgetVisible", logWidgetVisible);
settings->setValue("leftEyeWidgetPos", leftEyeWidgetPos);
settings->setValue("leftEyeWidgetSize", leftEyeWidgetSize);
settings->setValue("leftEyeWidgetVisible", leftEyeWidgetVisible);
settings->setValue("rightEyeWidgetPos", rightEyeWidgetPos);
settings->setValue("rightEyeWidgetSize", rightEyeWidgetSize);
settings->setValue("rightEyeWidgetVisible", rightEyeWidgetVisible);
settings->setValue("fieldWidgetPos", fieldWidgetPos);
settings->setValue("fieldWidgetSize", fieldWidgetSize);
settings->setValue("fieldWidgetVisible", fieldWidgetVisible);
settings->setValue("gazeEstimationWidgetPos", gazeEstimationWidgetPos);
settings->setValue("gazeEstimationWidgetSize", gazeEstimationWidgetSize);
settings->setValue("gazeEstimationWidgetVisible", gazeEstimationWidgetVisible);
settings->setValue("performanceMonitorWidgetPos", performanceMonitorWidgetPos);
settings->setValue("performanceMonitorWidgetSize", performanceMonitorWidgetSize);
settings->setValue("performanceMonitorWidgetVisible", performanceMonitorWidgetVisible);
settings->se