Commit 9d3fa363 authored by Thiago Santini's avatar Thiago Santini

Adds .ini extension to config files

parent 15825fb1
......@@ -25,7 +25,7 @@ Camera::Camera(QString id, QObject *parent)
connect(ui, SIGNAL(setViewfinderSettings(QCameraViewfinderSettings)), this, SLOT(setViewfinderSettings(QCameraViewfinderSettings)) );
connect(ui, SIGNAL(setColorCode(int)), this, SLOT(setColorCode(int)) );
connect(ui, SIGNAL(setParameter(QString,float)), this, SLOT(setParameter(QString,float)) );
settings = new QSettings(gCfgDir + "/" + id + " Camera", QSettings::IniFormat);
settings = new QSettings(gCfgDir + "/" + id + " Camera.ini", QSettings::IniFormat);
}
Camera::~Camera()
......
......@@ -8,7 +8,7 @@
CommandManager::CommandManager(QObject *parent)
{
Q_UNUSED(parent);
QString settingsFileName = QString("%1/CommandManager").arg(gCfgDir);
QString settingsFileName = QString("%1/CommandManager.ini").arg(gCfgDir);
bool hasSettings = QFile::exists(settingsFileName);
QSettings *settings = new QSettings(settingsFileName, QSettings::IniFormat);
if (hasSettings) {
......
......@@ -8,7 +8,7 @@
// 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)
template<typename T> void reset(const QSettings *settings, const QString key, T &v)
{
if (!settings)
return;
......@@ -55,9 +55,9 @@ public slots:
}
settings->sync();
erset(settings, id + " Pos", pos);
erset(settings, id + " Size", size);
erset(settings, id + " Visible", visible);
reset(settings, id + " Pos", pos);
reset(settings, id + " Size", size);
reset(settings, id + " Visible", visible);
move(pos);
resize(size);
......
......@@ -22,7 +22,7 @@ EyeImageProcessor::EyeImageProcessor(QString id, QObject *parent)
#ifdef SWIRSKI
availablePupilDetectionMethods.push_back(new Swirski());
#endif
settings = new QSettings(gCfgDir + "/" + id + " ImageProcessor", QSettings::IniFormat);
settings = new QSettings(gCfgDir + "/" + id + " ImageProcessor.ini", QSettings::IniFormat);
updateConfig();
pmIdx = gPerformanceMonitor.enrol(id, "Image Processor");
......
......@@ -15,7 +15,7 @@ FieldImageProcessor::FieldImageProcessor(QString id, QObject *parent)
cameraCalibration(NULL),
QObject(parent)
{
settings = new QSettings(gCfgDir + "/" + id + " ImageProcessor", QSettings::IniFormat);
settings = new QSettings(gCfgDir + "/" + id + " ImageProcessor.ini", QSettings::IniFormat);
updateConfig();
dict = getPredefinedDictionary(DICT_4X4_250);
......
......@@ -54,7 +54,7 @@ GazeEstimationWidget::GazeEstimationWidget(QString id, QWidget *parent) :
this, SLOT(updateStatus(bool,QString)) );
// TODO: right now options from widget and gaze estimation are mixed in a single file, separate them
settings = new QSettings(gCfgDir + "/" + "Gaze Estimation", QSettings::IniFormat);
settings = new QSettings(gCfgDir + "/" + "Gaze Estimation.ini", QSettings::IniFormat);
cfg.load(settings);
// QSignalBlocker blocker(this) does not block the GUI elements
......
......@@ -24,7 +24,7 @@ MainWindow::MainWindow(QWidget *parent) :
createExtraMenus();
connect(ui->menuBar, SIGNAL(triggered(QAction*)), this, SLOT(menuOption(QAction*)) );
settings = new QSettings(gCfgDir + "/" + "EyeRecToo", QSettings::IniFormat);
settings = new QSettings(gCfgDir + "/" + "EyeRecToo.ini", QSettings::IniFormat);
cfg.load(settings);
ui->statusBar->showMessage( QString("This is version %1").arg(VERSION) );
......@@ -564,7 +564,7 @@ void MainWindow::showAboutDialog()
void MainWindow::setupWidget(ERWidget *widget, QSettings* settings, QPushButton *button)
{
// TODO: we might consider eventually move each ERWidget settings to their own file
// TODO: we might consider eventually moving each ERWidget settings to their own file
widget->load(settings);
widget->setup();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment