24 #ifndef __LIBS_GUI_UTILS_LOGVIEW_H_ 25 #define __LIBS_GUI_UTILS_LOGVIEW_H_ 29 #include <logging/logger.h> 36 class FawkesNetworkClient;
37 class FawkesNetworkMessage;
38 class ConnectionDispatcher;
41 :
public Gtk::TreeView
45 LogView(
const char *hostname,
unsigned short int port);
46 LogView(BaseObjectType* cobject,
47 const Glib::RefPtr<Gtk::Builder> &builder);
54 const char *component,
bool is_exception,
62 virtual void on_row_inserted(
const Gtk::TreeModel::Path& path,
63 const Gtk::TreeModel::iterator& iter);
65 virtual void on_client_connected();
66 virtual void on_client_disconnected();
67 #if GTK_VERSION_GE(3,0) 68 virtual bool on_draw(
const Cairo::RefPtr<Cairo::Context> &cr);
70 virtual void on_expose_notify(GdkEventExpose *event);
73 void ctor(
const char *hostname = NULL,
unsigned short int port = 0);
76 class LogRecord :
public Gtk::TreeModelColumnRecord
82 Gtk::TreeModelColumn<Glib::ustring> loglevel;
83 Gtk::TreeModelColumn<Glib::ustring> time;
84 Gtk::TreeModelColumn<Glib::ustring> component;
85 Gtk::TreeModelColumn<Glib::ustring> message;
86 Gtk::TreeModelColumn<Gdk::Color> foreground;
87 Gtk::TreeModelColumn<Gdk::Color> background;
93 Glib::RefPtr<Gtk::ListStore> __list;
97 bool __have_recently_added_path;
98 Gtk::TreeModel::Path __recently_added_path;
ConnectionDispatcher * get_connection_dispatcher() const
Get ConnectionDispatcher instance that is used internally.
Simple Fawkes network client.
void clear()
Clear all records.
FawkesNetworkClient * get_client()
Get the used FawkesNetworkClient.
Fawkes library namespace.
Representation of a message that is sent over the network.
void append_message(Logger::LogLevel log_level, struct timeval t, const char *component, bool is_exception, const char *message)
Append a single message.
void set_client(FawkesNetworkClient *client)
Set FawkesNetworkClient instance.
Watches network client events and dispatches them as signals.