SensorsFrame.h
См. документацию.00001
00002
00003
00004
00011
00012 #ifndef SensorsFrame_H_
00013 #define SensorsFrame_H_
00014
00015 #include "BaseTypes.h"
00016 #include <gtkmm.h>
00017 #include <string>
00018
00019 using namespace std;
00020
00021 class SensorsFrame:
00022 public Gtk::Frame
00023 {
00024 public:
00025 SensorsFrame();
00026 ~SensorsFrame();
00027
00028 void attach( UniSetTypes::ObjectId sid, UniSetTypes::KeyType& key,
00029 UniSetTypes::ObjectId ownerid, string& name, string& owner,
00030 long& val, string& txtname );
00031
00032 void detach( UniSetTypes::KeyType& key );
00033 void detach( UniSetTypes::ObjectId ownerid );
00034
00035
00036 protected:
00037
00038
00039 class ModelColumns : public Gtk::TreeModel::ColumnRecord
00040 {
00041 public:
00042
00043 ModelColumns()
00044 {
00045 add(sname); add(value); add(owner); add(textname);
00046 add(ownerid); add(key); add(bg_color); add(fg_color);
00047 add(id);
00048 }
00049
00050 Gtk::TreeModelColumn<Glib::ustring> sname;
00051 Gtk::TreeModelColumn<long> value;
00052 Gtk::TreeModelColumn<Glib::ustring> owner;
00053 Gtk::TreeModelColumn<Glib::ustring> textname;
00054 Gtk::TreeModelColumn<Glib::ustring> fg_color;
00055 Gtk::TreeModelColumn<Glib::ustring> bg_color;
00056 Gtk::TreeModelColumn<UniSetTypes::ObjectId> ownerid;
00057 Gtk::TreeModelColumn<UniSetTypes::KeyType> key;
00058
00059 Gtk::TreeModelColumn<long> id;
00060 };
00061
00062 private:
00063
00064 ModelColumns columns;
00065 Glib::RefPtr<Gtk::ListStore> refTreeModel;
00066 Gtk::TreeView *treeview;
00067 };
00068
00069 #endif
00070