SensorsFrame.h

См. документацию.
00001 /***************************************************************************
00002 * This file is part of the UniSetGraphics library                          *
00003 * Copyright (C) 2001-2002 SET Research Institute. All rights reserved.     *
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   //Tree model columns:
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 //      Gtk::TreeModelColumn<UniSetTypes::ObjectId> id;
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 // -------------------------------------------------------------------------

Документация по UniSetGraphics-gtk2. Последние изменения: Sat Feb 17 16:32:02 2007. Создано системой  doxygen 1.5.1