Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef _WINDOW2_HH
00038 # include "window2_glade.hh"
00039 # define _WINDOW2_HH
00040 #include <gtkmm/treestore.h>
00041 #include <vector>
00042 #include <string>
00043 #include <sstream>
00044 #include "stats.h"
00045
00046
00047
00048 struct QoSD{
00049 int flow_id;
00050 int msg_id;
00051 };
00052
00053 class main_window;
00054 class window2 : public window2_glade{
00055
00056 void on_button10_clicked();
00057 void on_button11_clicked();
00058 void on_button12_clicked();
00059 void on_button20_clicked();
00060 void on_button21_clicked();
00061 void on_cursor_changed();
00062 void on_button22_clicked();
00063 bool on_treeview2_button_press_event(GdkEventButton *ev);
00064 void time_graph();
00065 void dist_graph_1000();
00066 void dist_graph_100();
00067 void dist_graph_10();
00068 void dist_graph_a5();
00069 void dist_graph_100_5();
00070 void dist_graph();
00071 void write_to_file();
00072 std::vector<std::string> xrow_name;
00073 Gtk::Menu m_Menu_Popup;
00074 int selected;
00075 int range_setted,min_c,max_c;
00076 int level, old_level;
00077 bool already_created;
00078 main_window* mw;
00079 FILE * sfile;
00080 char stats[100000];
00081 char filename[256];
00082 std::ostringstream oss;
00083 class ModelColumns : public Gtk::TreeModel::ColumnRecord {
00084 public:
00085 ModelColumns() {
00086 add(m_col_id);
00087 add(m_col_uid);
00088 add(m_col_name);
00089 add(m_col_value);
00090 add(m_col_type);
00091 }
00092 Gtk::TreeModelColumn<int> m_col_type;
00093 Gtk::TreeModelColumn<int> m_col_id;
00094 Gtk::TreeModelColumn<int> m_col_uid;
00095 Gtk::TreeModelColumn<Glib::ustring> m_col_name;
00096 Gtk::TreeModelColumn<Glib::ustring> m_col_value;
00097
00098 };
00099 ModelColumns m_Columns;
00100 Gtk::TreeModel::Row row, xrow, actual;
00101 Gtk::TreeModel::Row subrow, raiz;
00102 Gtk::TreeModel::Row row_level[10];
00103 Gtk::TreeNodeChildren * arow;
00104 int rowSelected;
00105 public:
00106 Glib::RefPtr<Gtk::TreeStore> m_refTreeModel;
00107 int get_selected();
00108 window2(main_window *);
00109 void show_statistics(char * filename = NULL);
00110 void show_statistics_from_values();
00111
00112 void row_append(int id, const char* txt, long long value,const char* uni);
00113 void row_append(int id, const char* txt, int value,const char* uni);
00114 void row_append(int id, const char* txt, float value,const char* uni);
00115
00116
00117 void row_child_append(int id, const char* txt, float value,const char* uni);
00118 void row_child_append(int id, const char* txt, long long value,const char* uni);
00119 void row_child_append(int type, int id, const char* txt, long long value, const char*uni);
00120 void row_child_append(int id, const char* txt, int value,const char* uni);
00121 void row_child_append(int type, int id, const char* txt, int value, const char*uni);
00122
00123 void row_append(int id, const char* txt, const char*uni);
00124 void row_child_child_append(int id, const char* txt, long long value, const char*uni);
00125
00126 void root();
00127 void subSectionBegin();
00128 void subSectionEnd();
00129 void row_create(std::string txt1, std::string txt2, int pos = -1, int uid = -1);
00130 char * getFileName();
00131 std::string getCurrentRowName();
00132
00133 };
00134
00135 #endif