BlinkenArea - GitList
Repositories
Blog
Wiki
libetherpix
Code
Commits
Branches
Tags
Search
Tree:
5c70d9d
Branches
Tags
master
libetherpix
simulator
main_window.h
implement receiving packets
Stefan Schuermans
commited
5c70d9d
at 2017-06-11 15:48:14
main_window.h
Blame
History
Raw
/* * EtherPix simulator * * Copyright 2017 Stefan Schuermans <stefan schuermans info> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, version 3 of the License. * * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef MAIN_WINDOW_H #define MAIN_WINDOW_H #include <gtkmm.h> #include "config.h" #include "draw.h" /// main window of StateTracker GUI class MainWindow: public Gtk::Window { public: /** * @brief constructor * @param[in] Gtk Window object (a C object) * @param[in] builder reference to GTK builder object */ MainWindow(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &builder); /// virtual destructor virtual ~MainWindow(); /// set configuration object void setConfig(Config & config); protected: /// window is being hidden void on_hide(); /// set status bar text void set_status(std::string const &txt); /// timer callback bool on_timer(int timerno); protected: /// reference to GTK builder object Glib::RefPtr<Gtk::Builder> m_builder; /// drawing area Draw *m_draw; /// status bar Gtk::Statusbar *m_status; /// configuration object Config *m_config; /// timer connection sigc::connection m_timer; /// packet count per second //@{ unsigned long m_packets; ///< packet counter unsigned long m_time_ms; ///< time counter //@} }; #endif // #ifndef MAIN_WINDOW_H