9 #include <mars/utils/misc.h> 19 cfg(NULL), dataBroker(NULL), num(0) {
39 fprintf(stderr,
"******* gui_cfg: couldn't find cfg_manager\n");
51 tmpString.append(
"/");
52 tmpString.append(
"DataBrokerPlotter.yaml");
65 std::map<std::string, DataBrokerPlotter*>::iterator itMap;
73 std::string tmpString =
configPath + std::string(
"/DataBrokerPlotter.yaml");
79 fprintf(stderr,
"Delete DataBrokerPlotterLib\n");
93 std::map<std::string, DataBrokerPlotter*>::iterator it;
97 sprintf(text,
"plot%d", ++
num);
98 name = std::string(text);
105 dataBrokerPlotter->show();
115 std::map<std::string, DataBrokerPlotter*>::iterator itMap;
118 std::list<DataBrokerPlotter*>::iterator it;
132 itMap->second->update();
virtual void addDockWidget(void *window, int priority=0, int area=0, bool possibleCentralWidget=false)=0
Makes a widget dockable in the main window.
virtual void menuAction(int action, bool checked=false)
Called whenever a menu item is selected.
std::map< std::string, DataBrokerPlotter * > plotWindows
The abstract GuiInterface class provides the menu and docking functionality of the GUI...
DataBrokerPlotterLib(lib_manager::LibManager *theManager)
virtual const cfgPropertyStruct getOrCreateProperty(const std::string &_group, const std::string &_name, bool val, CFGClient *newClient=0)=0
std::list< DataBrokerPlotter * > toDelete
mars::data_broker::DataBrokerInterface * dataBroker
void timerEvent(QTimerEvent *event)
virtual void removeDockWidget(void *window, int priority=0)=0
Removes a widget from the dockables.
void setupGUI(std::string rPath=std::string("."))
CREATE_LIB(data_broker_plotter::DataBrokerPlotterLib)
virtual ~DataBrokerPlotterLib(void)
mars::main_gui::GuiInterface * gui
T * getLibraryAs(const std::string &libName, bool load=false)
virtual void writeConfig(const char *filename, const char *group, const unsigned char saveOption=saveOnClose) const =0
mars::cfg_manager::CFGManagerInterface * cfg
void destroyPlotWindow(DataBrokerPlotter *)
bool pathExists(const std::string &path)
check whether a file or directory exists.
virtual void addGenericMenuAction(const std::string &path, int action, MenuInterface *menu, int qtKey=0, const std::string &icon="", bool toolbar=0, int checkable=0)=0
Adds a menu/menu item with its corresponding action.
The interface every DataBroker should implement.
DESTROY_LIB(data_broker_plotter::DataBrokerPlotterLib)
virtual bool loadConfig(const char *filename)=0
ErrorNumber releaseLibrary(const std::string &libName)
Releases a previously acquired library.