Browse Source

added ability to select a source by string name. Basically accessor functions to the SetSourceCmd class

master
Theodoros Papatheodorou 8 years ago
parent
commit
9357530b34
  1. 13
      src/Application/Application.cpp
  2. 1
      src/Application/Application.h
  3. 4
      src/ofxPiMapper.cpp
  4. 1
      src/ofxPiMapper.h

13
src/Application/Application.cpp

@ -463,6 +463,19 @@ void Application::setNextSource(){
}
}
void Application::setFboSource(string sourceId){
if(getSurfaceManager()->getSelectedSurface() != 0){
getCmdManager()->exec(
new SetSourceCmd(
SourceType::SOURCE_TYPE_FBO,
sourceId,
getSurfaceManager()->getSelectedSurface(),
&Gui::instance()->getSourcesEditorWidget()));
}else{
getCmdManager()->exec(new SelNextSurfaceCmd(getSurfaceManager()));
}
}
void Application::addGridRow(){
if(getSurfaceManager()->getSelectedSurface() != 0){
if(getSurfaceManager()->getSelectedSurface()->getType() ==

1
src/Application/Application.h

@ -125,6 +125,7 @@ class Application {
void scaleDown();
void duplicateSurface();
void setNextSource();
void setFboSource(string sourceId);
void addGridRow();
void addGridColumn();
void removeGridRow();

4
src/ofxPiMapper.cpp

@ -166,6 +166,10 @@ void ofxPiMapper::setNextSource(){
_application.setNextSource();
}
void ofxPiMapper::setFboSource(string sourceId){
_application.setFboSource(sourceId);
}
void ofxPiMapper::reboot(){
_application.reboot();
}

1
src/ofxPiMapper.h

@ -72,6 +72,7 @@ class ofxPiMapper {
// Sources, selected surface
void setNextSource();
void setFboSource(string sourceId);
// System commands
void reboot();

Loading…
Cancel
Save