Fawkes API  Fawkes Development Version
netloggui.h
1 
2 /***************************************************************************
3  * netloggui.h - NetLog GUI
4  *
5  * Created: Tue Nov 03 23:38:11 2008
6  * Copyright 2008 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Library General Public License for more details.
19  *
20  * Read the full text in the LICENSE.GPL file in the doc directory.
21  */
22 
23 #ifndef _TOOLS_NETLOGGUI_NETLOGGUI_H_
24 #define _TOOLS_NETLOGGUI_NETLOGGUI_H_
25 
26 #include <gtkmm.h>
27 
28 namespace fawkes {
29 class AvahiThread;
30 class LogView;
31 class NetworkService;
32 class AvahiDispatcher;
33 } // namespace fawkes
34 
35 class NetLogGuiGtkWindow : public Gtk::Window
36 {
37 public:
38  NetLogGuiGtkWindow(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &builder);
40 
41 private:
42  int on_service_added(fawkes::NetworkService *service);
43  void on_service_removed(fawkes::NetworkService *service);
44 
45  void on_connection_clicked();
46  void on_exit_clicked();
47  void on_clear_clicked();
48 
49  void on_connbut_clicked(Gtk::Image *image, fawkes::LogView *logview);
50  void on_connected(Gtk::Image *image);
51  void on_disconnected(Gtk::Image *image);
52 
53 private:
54  fawkes::AvahiThread * avahi_thread;
55  fawkes::AvahiDispatcher *avahi_dispatcher;
56 
57  Gtk::VBox * vbox_main;
58  Gtk::Label * lab_no_connection;
59  Gtk::ToolButton *tb_connection;
60  Gtk::ToolButton *tb_exit;
61  Gtk::ToolButton *tb_clear;
62 
63  Gtk::Notebook ntb_logviewers;
64 };
65 
66 #endif
NetLog GUI main window.
Definition: netloggui.h:36
~NetLogGuiGtkWindow()
Destructor.
Definition: netloggui.cpp:75
NetLogGuiGtkWindow(BaseObjectType *cobject, const Glib::RefPtr< Gtk::Builder > &builder)
Constructor.
Definition: netloggui.cpp:46
Avahi main thread.
Definition: avahi_thread.h:55
Log View widget.
Definition: logview.h:38
Representation of a service announced or found via service discovery (i.e.
Definition: service.h:38
Fawkes library namespace.