24 #ifndef _LIBS_GUI_UTILS_LOGVIEW_H_ 25 #define _LIBS_GUI_UTILS_LOGVIEW_H_ 27 #include <logging/logger.h> 33 class FawkesNetworkClient;
34 class FawkesNetworkMessage;
35 class ConnectionDispatcher;
41 LogView(
const char *hostname,
unsigned short int port);
42 LogView(BaseObjectType *cobject,
const Glib::RefPtr<Gtk::Builder> &builder);
50 const char * component,
52 const char * message);
59 virtual void on_row_inserted(
const Gtk::TreeModel::Path & path,
60 const Gtk::TreeModel::iterator &iter);
62 virtual void on_client_connected();
63 virtual void on_client_disconnected();
64 #if GTK_VERSION_GE(3, 0) 65 virtual bool on_draw(
const Cairo::RefPtr<Cairo::Context> &cr);
67 virtual void on_expose_notify(GdkEventExpose *event);
70 void ctor(
const char *hostname = NULL,
unsigned short int port = 0);
73 class LogRecord :
public Gtk::TreeModelColumnRecord
79 Gtk::TreeModelColumn<Glib::ustring> loglevel;
80 Gtk::TreeModelColumn<Glib::ustring> time;
81 Gtk::TreeModelColumn<Glib::ustring> component;
82 Gtk::TreeModelColumn<Glib::ustring> message;
83 Gtk::TreeModelColumn<Gdk::Color> foreground;
84 Gtk::TreeModelColumn<Gdk::Color> background;
90 Glib::RefPtr<Gtk::ListStore> list_;
94 bool have_recently_added_path_;
95 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.