summaryrefslogtreecommitdiff
path: root/gui/include
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-05-30 11:45:54 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-05-30 11:45:54 +0200
commitbfa30ed79cffee4f5c0d33b7fe7bd64581be3fdf (patch)
tree48e451c1aafcbd0d58d45292499ee81effcc82bc /gui/include
parent8ef970b679505ea82ea41e94ffa972a732731eae (diff)
downloadturns-bfa30ed79cffee4f5c0d33b7fe7bd64581be3fdf.tar.xz
turns-bfa30ed79cffee4f5c0d33b7fe7bd64581be3fdf.zip
gui: reintroduce ParticipantRow
Diffstat (limited to 'gui/include')
-rw-r--r--gui/include/init.hpp14
-rw-r--r--gui/include/participant_row.hpp16
-rw-r--r--gui/include/template_widget.hpp13
3 files changed, 28 insertions, 15 deletions
diff --git a/gui/include/init.hpp b/gui/include/init.hpp
new file mode 100644
index 0000000..d83544e
--- /dev/null
+++ b/gui/include/init.hpp
@@ -0,0 +1,14 @@
+/*
+ * SPDX-FileCopyrightText: 2025 Felix Morgner <felix.morgner@gmail.com>
+ * SPDX-License-Identifier: LGPL-2.1-only
+ */
+
+#ifndef TURNS_GUI_INIT_HPP
+#define TURNS_GUI_INIT_HPP
+
+namespace Turns::gui
+{
+ auto init() -> void;
+} // namespace Turns::gui
+
+#endif \ No newline at end of file
diff --git a/gui/include/participant_row.hpp b/gui/include/participant_row.hpp
index 81b3610..1388e41 100644
--- a/gui/include/participant_row.hpp
+++ b/gui/include/participant_row.hpp
@@ -3,16 +3,16 @@
* SPDX-License-Identifier: LGPL-2.1-only
*/
-#ifndef TURNS_UI_PARTICIPANT_ROW_HPP
-#define TURNS_UI_PARTICIPANT_ROW_HPP
+#ifndef TURNS_GUI_PARTICIPANT_ROW_HPP
+#define TURNS_GUI_PARTICIPANT_ROW_HPP
-#include "turns/core/fwd.hpp"
-#include "turns/ui/template_widget.hpp"
+#include "template_widget.hpp"
+
+#include <turnsmm/participant.hpp>
#include <glibmm/property.h>
#include <glibmm/propertyproxy.h>
#include <glibmm/refptr.h>
-
#include <gtkmm/button.h>
#include <gtkmm/label.h>
#include <gtkmm/listboxrow.h>
@@ -20,7 +20,7 @@
#include <array>
-namespace turns::ui
+namespace Turns::gui
{
struct ParticipantRow : template_widget<ParticipantRow, Gtk::ListBoxRow>
{
@@ -32,7 +32,7 @@ namespace turns::ui
"toggle_defeated",
};
- ParticipantRow(Glib::RefPtr<core::Participant> participant);
+ ParticipantRow(Glib::RefPtr<Turns::Participant> participant);
auto delete_enabled() -> Glib::PropertyProxy<bool>;
auto edit_enabled() -> Glib::PropertyProxy<bool>;
@@ -50,6 +50,6 @@ namespace turns::ui
Glib::Property<bool> m_delete_enabled;
Glib::Property<bool> m_edit_enabled;
};
-} // namespace turns::ui::widgets
+} // namespace Turns::gui
#endif \ No newline at end of file
diff --git a/gui/include/template_widget.hpp b/gui/include/template_widget.hpp
index f90b473..34bc5ff 100644
--- a/gui/include/template_widget.hpp
+++ b/gui/include/template_widget.hpp
@@ -6,20 +6,19 @@
#ifndef TURNS_UI_TEMPLATE_WIDGET_HPP
#define TURNS_UI_TEMPLATE_WIDGET_HPP
+#include <glib-object.h>
+#include <glib.h>
+#include <gtk/gtk.h>
+
#include <glibmm/extraclassinit.h>
#include <glibmm/ustring.h>
#include <glibmm/wrap.h>
-
#include <gtkmm/widget.h>
-#include <glib-object.h>
-#include <glib.h>
-#include <gtk/gtk.h>
-
#include <algorithm>
#include <utility>
-namespace turns::ui
+namespace Turns::gui
{
template<typename CustomWidgetType, typename BaseWidgetType>
@@ -67,6 +66,6 @@ namespace turns::ui
}
};
-} // namespace turns::ui::widgets
+} // namespace Turns::gui
#endif \ No newline at end of file