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
be70d18a
Commit
be70d18a
authored
8 years ago
by
Aaron Cuevas Lopez
Browse files
Options
Downloads
Patches
Plain Diff
Add CoreServices methods to set and get the selected record engine
parent
d4c7a7ed
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Source/CoreServices.cpp
+11
-1
11 additions, 1 deletion
Source/CoreServices.cpp
Source/CoreServices.h
+8
-0
8 additions, 0 deletions
Source/CoreServices.h
Source/UI/ControlPanel.cpp
+24
-0
24 additions, 0 deletions
Source/UI/ControlPanel.cpp
Source/UI/ControlPanel.h
+4
-0
4 additions, 0 deletions
Source/UI/ControlPanel.h
with
47 additions
and
1 deletion
Source/CoreServices.cpp
+
11
−
1
View file @
be70d18a
...
...
@@ -107,6 +107,16 @@ void setAppendTextToRecordingDir(String text)
getControlPanel
()
->
setAppendText
(
text
);
}
String
getSelectedRecordEngineId
()
{
return
getControlPanel
()
->
getSelectedRecordEngineId
();
}
bool
setSelectedRecordEngineId
(
String
id
)
{
return
getControlPanel
()
->
setSelectedRecordEngineId
(
id
);
}
namespace
RecordNode
{
void
createNewrecordingDir
()
...
...
@@ -145,7 +155,7 @@ int addSpikeElectrode(SpikeRecordInfo* elec)
}
};
PLUGIN_API
const
char
*
getApplicationResource
(
const
char
*
name
,
int
&
size
)
const
char
*
getApplicationResource
(
const
char
*
name
,
int
&
size
)
{
return
BinaryData
::
getNamedResource
(
name
,
size
);
}
...
...
This diff is collapsed.
Click to expand it.
Source/CoreServices.h
+
8
−
0
View file @
be70d18a
...
...
@@ -78,6 +78,14 @@ PLUGIN_API void setPrependTextToRecordingDir(String text);
/** Manually set the text to be appended to the recording directory */
PLUGIN_API
void
setAppendTextToRecordingDir
(
String
text
);
/** Gets the ID fo the selected Record Engine*/
PLUGIN_API
String
getSelectedRecordEngineId
();
/** Sets a specific RecordEngine to be used based on its id.
Return true if there is an engine with the specified ID and it's possible to
change the current engine or false otherwise. */
PLUGIN_API
bool
setSelectedRecordEngineId
(
String
id
);
namespace
RecordNode
{
/** Forces creation of new directory on recording */
...
...
This diff is collapsed.
Click to expand it.
Source/UI/ControlPanel.cpp
+
24
−
0
View file @
be70d18a
...
...
@@ -552,6 +552,30 @@ void ControlPanel::updateRecordEngineList()
recordSelector
->
setSelectedId
(
selectedEngine
,
sendNotification
);
}
String
ControlPanel
::
getSelectedRecordEngineId
()
{
return
recordEngines
[
recordSelector
->
getSelectedId
()
-
1
]
->
getID
();
}
bool
ControlPanel
::
setSelectedRecordEngineId
(
String
id
)
{
if
(
getAcquisitionState
())
{
return
false
;
}
int
nEngines
=
recordEngines
.
size
();
for
(
int
i
=
0
;
i
<
nEngines
;
++
i
)
{
if
(
recordEngines
[
i
]
->
getID
()
==
id
)
{
recordSelector
->
setSelectedId
(
i
+
1
,
sendNotificationSync
);
return
true
;
}
}
return
false
;
}
void
ControlPanel
::
createPaths
()
{
/* int w = getWidth() - 325;
...
...
This diff is collapsed.
Click to expand it.
Source/UI/ControlPanel.h
+
4
−
0
View file @
be70d18a
...
...
@@ -365,6 +365,10 @@ public:
void
updateRecordEngineList
();
String
getSelectedRecordEngineId
();
bool
setSelectedRecordEngineId
(
String
id
);
ScopedPointer
<
RecordButton
>
recordButton
;
private
:
ScopedPointer
<
PlayButton
>
playButton
;
...
...
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