Fawkes API  Fawkes Development Version
fuse_viewer_gui.h
1 
2 /***************************************************************************
3  * fuse_viewer.h - Fuse (network camera) Viewer Gui
4  *
5  * Created: Thu Dec 18 14:16:23 2008
6  * Copyright 2008-2009 Christof Rath <c.rath@student.tugraz.at>
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 __FIREVISION_TOOLS_LOC_VIEWER_LOC_VIEWER_GUI_H_
24 #define __FIREVISION_TOOLS_LOC_VIEWER_LOC_VIEWER_GUI_H_
25 
26 #define FUSE_PLUGIN_NAME "fvfountain"
27 #define FOUNTAIN_PORT_PATH "/firevision/fountain/tcp_port"
28 
29 #include <netcomm/dns-sd/avahi_thread.h>
30 
31 #include <map>
32 
33 #include <gtkmm.h>
34 
35 namespace firevision {
36  class NetworkCamera;
37  class FuseImageListWidget;
38  class ImageWidget;
39 }
40 namespace fawkes {
41  class AvahiDispatcher;
42 }
43 
44 class FuseViewerGtkWindow : public Gtk::Window
45 {
46 public:
47  FuseViewerGtkWindow(BaseObjectType* cobject,
48  const Glib::RefPtr<Gtk::Builder> builder);
49  virtual ~FuseViewerGtkWindow();
50 
51 private:
52  void on_service_added(fawkes::NetworkService* service);
53  void on_service_removed(fawkes::NetworkService* service);
54 
55  void on_fuse_image_selected();
56  void on_auto_save_cbt_change();
57  void on_save_type_change();
58  void on_save_image_clicked();
59 
60  void close_image();
61  void set_status(std::string img_id, std::string host = "", unsigned short port = 0);
62 
63 private:
64  // widgets
65  Gtk::ScrolledWindow *__image_list_scroll;
66  Gtk::Viewport *__image_viewport;
67  Gtk::AspectFrame *__save_box;
68  Gtk::ComboBoxText *__save_type;
69  Gtk::FileChooserButton *__save_filechooser;
70  Gtk::CheckButton *__auto_save;
71  Gtk::Button *__save_btn;
72  Gtk::Statusbar *__statusbar;
73 
74  fawkes::AvahiThread *__avahi_thread;
75  fawkes::AvahiDispatcher *__avahi_dispatcher;
76 
77  firevision::FuseImageListWidget *__img_list_widget;
78 
79  firevision::ImageWidget *__img_widget;
81 
82 
83  std::map<std::string, std::string> __host_service_map;
84 
85  std::string __cur_service_name;
86  unsigned int __img_num;
87 };
88 
89 #endif /* __FIREVISION_TOOLS_LOC_VIEWER_LOC_VIEWER_GUI_H_ */
This class is an image container to display fawkes cameras (or image buffers) inside a Gtk::Container...
Definition: image_widget.h:45
Avahi dispatcher.
This widget displays all available Fuse images in a tree view.
Fawkes library namespace.
Fawkes network camera viewer.
Avahi main thread.
Definition: avahi_thread.h:54
Representation of a service announced or found via service discovery (i.e.
Definition: service.h:37
Network camera.
Definition: net.h:42