retriever_config_plugin.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __TOOLS_CONFIG_EDITOR_RETRIEVER_CONFIG_PLUGIN_H_
00024 #define __TOOLS_CONFIG_EDITOR_RETRIEVER_CONFIG_PLUGIN_H_
00025
00026 #include "config_editor_plugin.h"
00027
00028 #include <gtkmm.h>
00029 #include <libglademm/xml.h>
00030
00031 #include <string>
00032
00033 class RetrieverConfigDialog : public Gtk::Dialog
00034 {
00035 public:
00036 RetrieverConfigDialog( BaseObjectType* cobject,
00037 const Glib::RefPtr< Gnome::Glade::Xml >& ref_xml );
00038 virtual ~RetrieverConfigDialog();
00039
00040 void add_camera( std::string camera_name,
00041 std::string camera_string,
00042 bool record_images = false,
00043 std::string save_path = "" );
00044
00045 std::map< std::string, std::string > get_cameras() const;
00046
00047 private:
00048 class CameraRecord : public Gtk::TreeModelColumnRecord
00049 {
00050 public:
00051 CameraRecord()
00052 {
00053 add( name );
00054 add( type );
00055 add( id );
00056 add( params );
00057 add( record_images );
00058 add( save_path );
00059 }
00060
00061 Gtk::TreeModelColumn< Glib::ustring > name;
00062 Gtk::TreeModelColumn< Glib::ustring > type;
00063 Gtk::TreeModelColumn< Glib::ustring > id;
00064 Gtk::TreeModelColumn< Glib::ustring > params;
00065 Gtk::TreeModelColumn< bool > record_images;
00066 Gtk::TreeModelColumn< Glib::ustring > save_path;
00067 };
00068
00069
00070 void on_add_clicked();
00071 void on_delete_clicked();
00072
00073 CameraRecord m_camera_record;
00074 Glib::RefPtr< Gtk::ListStore > m_camera_list;
00075 Gtk::TreeView* m_trv_cameras;
00076
00077 Gtk::Button* m_btn_add_camera;
00078 Gtk::Button* m_btn_delete_camera;
00079 };
00080
00081 class RetrieverConfigPlugin : public ConfigEditorPlugin
00082 {
00083 public:
00084 RetrieverConfigPlugin( std::string glade_path );
00085 virtual ~RetrieverConfigPlugin();
00086
00087 protected:
00088 virtual void pre_run();
00089 virtual void post_run( int response );
00090
00091 virtual Gtk::Dialog* load_dialog();
00092
00093 };
00094
00095 #endif