Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
plugin-GUI
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
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
yehaojie
plugin-GUI
Commits
f6d050e5
Commit
f6d050e5
authored
10 years ago
by
jsiegle
Browse files
Options
Downloads
Patches
Plain Diff
Add some logic for loading and saving PRB files
parent
1d914232
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/Processors/ChannelMappingNode/ChannelMappingEditor.cpp
+51
-2
51 additions, 2 deletions
...ce/Processors/ChannelMappingNode/ChannelMappingEditor.cpp
Source/Processors/ChannelMappingNode/ChannelMappingEditor.h
+3
-0
3 additions, 0 deletions
Source/Processors/ChannelMappingNode/ChannelMappingEditor.h
with
54 additions
and
2 deletions
Source/Processors/ChannelMappingNode/ChannelMappingEditor.cpp
+
51
−
2
View file @
f6d050e5
...
...
@@ -539,11 +539,47 @@ void ChannelMappingEditor::buttonEvent(Button* button)
}
else
if
(
button
==
saveButton
)
{
std
::
cout
<<
"Save button clicked."
<<
std
::
endl
;
//std::cout << "Save button clicked." << std::endl;
if
(
!
acquisitionIsActive
)
{
FileChooser
fc
(
"Choose the file name..."
,
File
::
getCurrentWorkingDirectory
(),
"*"
,
true
);
if
(
fc
.
browseForFileToSave
(
true
))
{
File
fileToSave
=
fc
.
getResult
();
std
::
cout
<<
fileToSave
.
getFileName
()
<<
std
::
endl
;
sendActionMessage
(
writePrbFile
(
fileToSave
));
}
}
else
{
sendActionMessage
(
"Stop acquisition before saving the channel map."
);
}
}
else
if
(
button
==
loadButton
)
{
std
::
cout
<<
"Load button clicked."
<<
std
::
endl
;
//std::cout << "Load button clicked." << std::endl;
if
(
!
acquisitionIsActive
)
{
FileChooser
fc
(
"Choose a file to load..."
,
File
::
getCurrentWorkingDirectory
(),
"*"
,
true
);
if
(
fc
.
browseForFileToOpen
())
{
File
fileToOpen
=
fc
.
getResult
();
std
::
cout
<<
fileToOpen
.
getFileName
()
<<
std
::
endl
;
sendActionMessage
(
loadPrbFile
(
fileToOpen
));
}
}
else
{
sendActionMessage
(
"Stop acquisition before saving the channel map."
);
}
}
}
...
...
@@ -898,4 +934,17 @@ void ChannelMappingEditor::startAcquisition()
if
(
reorderActive
)
modifyButton
->
setToggleState
(
false
,
sendNotificationSync
);
GenericEditor
::
startAcquisition
();
}
String
ChannelMappingEditor
::
writePrbFile
(
File
filename
)
{
return
"Saved "
+
filename
.
getFileName
();
}
String
ChannelMappingEditor
::
loadPrbFile
(
File
filename
)
{
return
"Loaded "
+
filename
.
getFileName
();
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Source/Processors/ChannelMappingNode/ChannelMappingEditor.h
+
3
−
0
View file @
f6d050e5
...
...
@@ -71,6 +71,9 @@ public:
void
startAcquisition
();
String
writePrbFile
(
File
filename
);
String
loadPrbFile
(
File
filename
);
private:
void
setChannelReference
(
ElectrodeButton
*
button
);
...
...
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