diff options
Diffstat (limited to 'app/src/widgets')
| -rw-r--r-- | app/src/widgets/participant_list_row.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/app/src/widgets/participant_list_row.cpp b/app/src/widgets/participant_list_row.cpp new file mode 100644 index 0000000..bc3108e --- /dev/null +++ b/app/src/widgets/participant_list_row.cpp @@ -0,0 +1,38 @@ +#include "turns/app/widgets/participant_list_row.hpp" + +#include <glibmm/ustring.h> + +namespace turns::app::widgets +{ + namespace + { + auto constexpr static TYPE_NAME = "participant_list_row"; + auto constexpr static TEMPLATE = "/turns/widgets/participant_list_row.ui"; + } // namespace + + participant_list_row::participant_list_row() + : Glib::ObjectBase(TYPE_NAME) + , template_widget<participant_list_row, Gtk::ListBoxRow>{TEMPLATE} + { + m_header = get_widget<Gtk::Box>("header"); + m_image = get_widget<Gtk::Image>("image"); + m_prefixes = get_widget<Gtk::Box>("prefixes"); + m_subtitle = get_widget<Gtk::Label>("subtitle"); + m_suffixes = get_widget<Gtk::Box>("suffixes"); + m_title = get_widget<Gtk::Label>("title"); + m_title_box = get_widget<Gtk::Box>("title_box"); + } + + auto participant_list_row::set_subtitle(Glib::ustring const & value) -> void + { + m_subtitle->set_text(value); + m_subtitle->set_visible(!value.empty()); + } + + auto participant_list_row::set_title(Glib::ustring const & value) -> void + { + m_title->set_text(value); + m_title->set_visible(!value.empty()); + } + +} // namespace turns::app::widgets
\ No newline at end of file |
