Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Thiago Santini
EyeRecToo
Commits
9d3fa363
Commit
9d3fa363
authored
May 01, 2018
by
Thiago Santini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds .ini extension to config files
parent
15825fb1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
11 deletions
+11
-11
EyeRecToo/src/Camera.cpp
EyeRecToo/src/Camera.cpp
+1
-1
EyeRecToo/src/CommandManager.cpp
EyeRecToo/src/CommandManager.cpp
+1
-1
EyeRecToo/src/ERWidget.h
EyeRecToo/src/ERWidget.h
+4
-4
EyeRecToo/src/EyeImageProcessor.cpp
EyeRecToo/src/EyeImageProcessor.cpp
+1
-1
EyeRecToo/src/FieldImageProcessor.cpp
EyeRecToo/src/FieldImageProcessor.cpp
+1
-1
EyeRecToo/src/GazeEstimationWidget.cpp
EyeRecToo/src/GazeEstimationWidget.cpp
+1
-1
EyeRecToo/src/MainWindow.cpp
EyeRecToo/src/MainWindow.cpp
+2
-2
No files found.
EyeRecToo/src/Camera.cpp
View file @
9d3fa363
...
...
@@ -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
()
...
...
EyeRecToo/src/CommandManager.cpp
View file @
9d3fa363
...
...
@@ -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
)
{
...
...
EyeRecToo/src/ERWidget.h
View file @
9d3fa363
...
...
@@ -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
e
rset
(
const
QSettings
*
settings
,
const
QString
key
,
T
&
v
)
template
<
typename
T
>
void
r
e
set
(
const
QSettings
*
settings
,
const
QString
key
,
T
&
v
)
{
if
(
!
settings
)
return
;
...
...
@@ -55,9 +55,9 @@ public slots:
}
settings
->
sync
();
e
rset
(
settings
,
id
+
" Pos"
,
pos
);
e
rset
(
settings
,
id
+
" Size"
,
size
);
e
rset
(
settings
,
id
+
" Visible"
,
visible
);
r
e
set
(
settings
,
id
+
" Pos"
,
pos
);
r
e
set
(
settings
,
id
+
" Size"
,
size
);
r
e
set
(
settings
,
id
+
" Visible"
,
visible
);
move
(
pos
);
resize
(
size
);
...
...
EyeRecToo/src/EyeImageProcessor.cpp
View file @
9d3fa363
...
...
@@ -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"
);
...
...
EyeRecToo/src/FieldImageProcessor.cpp
View file @
9d3fa363
...
...
@@ -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
);
...
...
EyeRecToo/src/GazeEstimationWidget.cpp
View file @
9d3fa363
...
...
@@ -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
...
...
EyeRecToo/src/MainWindow.cpp
View file @
9d3fa363
...
...
@@ -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 mov
e
each ERWidget settings to their own file
// TODO: we might consider eventually mov
ing
each ERWidget settings to their own file
widget
->
load
(
settings
);
widget
->
setup
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment