Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
PeTrack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pedestrian Dynamics Empiricism
PeTrack
Commits
f380a0df
Commit
f380a0df
authored
3 years ago
by
d.kilic
Browse files
Options
Downloads
Patches
Plain Diff
Allow selection of multiple MoCap files at once
parent
7ab1d292
No related branches found
No related tags found
1 merge request
!135
Allow selection of multiple files at once
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/moCapSelectionWidget.h
+1
-0
1 addition, 0 deletions
include/moCapSelectionWidget.h
src/moCapSelectionWidget.cpp
+15
-1
15 additions, 1 deletion
src/moCapSelectionWidget.cpp
src/openMoCapDialog.cpp
+15
-1
15 additions, 1 deletion
src/openMoCapDialog.cpp
with
31 additions
and
2 deletions
include/moCapSelectionWidget.h
+
1
−
0
View file @
f380a0df
...
@@ -29,6 +29,7 @@ public:
...
@@ -29,6 +29,7 @@ public:
~
MoCapSelectionWidget
()
override
;
~
MoCapSelectionWidget
()
override
;
void
setFileName
();
void
setFileName
();
void
setFileName
(
QString
filename
);
MoCapPersonMetadata
getMetadata
()
const
;
MoCapPersonMetadata
getMetadata
()
const
;
bool
isFilledOut
()
const
;
bool
isFilledOut
()
const
;
...
...
This diff is collapsed.
Click to expand it.
src/moCapSelectionWidget.cpp
+
15
−
1
View file @
f380a0df
...
@@ -21,7 +21,7 @@ MoCapSelectionWidget::MoCapSelectionWidget(QWidget *parent, const QMap<QString,
...
@@ -21,7 +21,7 @@ MoCapSelectionWidget::MoCapSelectionWidget(QWidget *parent, const QMap<QString,
mUi
->
offSetSpinBox
->
setRange
(
-
offsetRange
,
offsetRange
);
mUi
->
offSetSpinBox
->
setRange
(
-
offsetRange
,
offsetRange
);
mUi
->
offSetSpinBox
->
setSingleStep
(
0.01
);
mUi
->
offSetSpinBox
->
setSingleStep
(
0.01
);
connect
(
mUi
->
browseFileButton
,
&
QPushButton
::
clicked
,
this
,
&
MoCapSelectionWidget
::
setFileName
);
connect
(
mUi
->
browseFileButton
,
&
QPushButton
::
clicked
,
this
,
QOverload
<>::
of
(
&
MoCapSelectionWidget
::
setFileName
)
)
;
connect
(
mUi
->
btnDelete
,
&
QPushButton
::
clicked
,
this
,
&
MoCapSelectionWidget
::
deleteLater
);
connect
(
mUi
->
btnDelete
,
&
QPushButton
::
clicked
,
this
,
&
MoCapSelectionWidget
::
deleteLater
);
}
}
...
@@ -69,6 +69,20 @@ void MoCapSelectionWidget::setFileName()
...
@@ -69,6 +69,20 @@ void MoCapSelectionWidget::setFileName()
extensionsString
<<
")"
;
extensionsString
<<
")"
;
QString
filename
=
QFileDialog
::
getOpenFileName
(
QString
filename
=
QFileDialog
::
getOpenFileName
(
this
,
tr
(
"Open C3D File"
),
QDir
::
currentPath
(),
QString
::
fromStdString
(
extensionsString
.
str
()));
this
,
tr
(
"Open C3D File"
),
QDir
::
currentPath
(),
QString
::
fromStdString
(
extensionsString
.
str
()));
setFileName
(
filename
);
}
/**
* @brief Sets the filename to the given string
*
* Sets filePathLabel. Also sets mFilledOut to true if
* a file was selected, i.e. name != "" or false if
* name == ""
*
* @param filename name of MoCap-file
*/
void
MoCapSelectionWidget
::
setFileName
(
QString
filename
)
{
mUi
->
filePathLabel
->
clear
();
mUi
->
filePathLabel
->
clear
();
mUi
->
filePathLabel
->
setText
(
filename
);
mUi
->
filePathLabel
->
setText
(
filename
);
mFilledOut
=
!
filename
.
isEmpty
();
mFilledOut
=
!
filename
.
isEmpty
();
...
...
This diff is collapsed.
Click to expand it.
src/openMoCapDialog.cpp
+
15
−
1
View file @
f380a0df
...
@@ -105,5 +105,19 @@ OpenMoCapDialog::~OpenMoCapDialog()
...
@@ -105,5 +105,19 @@ OpenMoCapDialog::~OpenMoCapDialog()
void
OpenMoCapDialog
::
on_btnAddSelection_clicked
()
void
OpenMoCapDialog
::
on_btnAddSelection_clicked
()
{
{
mUi
->
moCapSelections
->
layout
()
->
addWidget
(
new
MoCapSelectionWidget
(
this
,
mMoCapSystems
));
std
::
stringstream
extensions
;
extensions
<<
"All MoCap File Types ("
;
for
(
const
auto
&
extension
:
moCapFileExtensions
)
{
extensions
<<
" *."
<<
extension
.
second
;
}
extensions
<<
")"
;
auto
selectedFiles
=
QFileDialog
::
getOpenFileNames
(
this
,
tr
(
"Open C3D File"
),
QDir
::
currentPath
(),
QString
::
fromStdString
(
extensions
.
str
()));
for
(
const
auto
&
file
:
selectedFiles
)
{
MoCapSelectionWidget
*
widget
=
new
MoCapSelectionWidget
(
this
,
mMoCapSystems
);
widget
->
setFileName
(
file
);
mUi
->
moCapSelections
->
layout
()
->
addWidget
(
widget
);
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment