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 <gtkmm.h>
32#include <map>
33
34namespace firevision {
35class NetworkCamera;
36class FuseImageListWidget;
37class ImageWidget;
38} // namespace firevision
39namespace fawkes {
40class AvahiDispatcher;
41}
42
43class FuseViewerGtkWindow : public Gtk::Window
44{
45public:
46 FuseViewerGtkWindow(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> builder);
47 virtual ~FuseViewerGtkWindow();
48
49private:
50 void on_service_added(fawkes::NetworkService *service);
51 void on_service_removed(fawkes::NetworkService *service);
52
53 void on_fuse_image_selected();
54 void on_auto_save_cbt_change();
55 void on_save_type_change();
56 void on_save_image_clicked();
57
58 void close_image();
59 void set_status(std::string img_id, std::string host = "", unsigned short port = 0);
60
61private:
62 // widgets
63 Gtk::ScrolledWindow * image_list_scroll_;
64 Gtk::Viewport * image_viewport_;
65 Gtk::AspectFrame * save_box_;
66 Gtk::ComboBoxText * save_type_;
67 Gtk::FileChooserButton *save_filechooser_;
68 Gtk::CheckButton * auto_save_;
69 Gtk::Button * save_btn_;
70 Gtk::Statusbar * statusbar_;
71
72 fawkes::AvahiThread * avahi_thread_;
73 fawkes::AvahiDispatcher *avahi_dispatcher_;
74
75 firevision::FuseImageListWidget *img_list_widget_;
76
77 firevision::ImageWidget * img_widget_;
79
80 std::map<std::string, std::string> host_service_map_;
81
82 std::string cur_service_name_;
83 unsigned int img_num_;
84};
85
86#endif /* FIREVISION_TOOLS_LOC_VIEWER_LOC_VIEWER_GUI_H__ */
Fawkes network camera viewer.
virtual ~FuseViewerGtkWindow()
Destructor.
FuseViewerGtkWindow(BaseObjectType *cobject, const Glib::RefPtr< Gtk::Builder > builder)
Constructor.
Avahi main thread.
Definition: avahi_thread.h:55
Representation of a service announced or found via service discovery (i.e.
Definition: service.h:38
This widget displays all available Fuse images in a tree view.
This class is an image container to display fawkes cameras (or image buffers) inside a Gtk::Container...
Definition: image_widget.h:43
Network camera.
Definition: net.h:41
Fawkes library namespace.