summaryrefslogtreecommitdiff
path: root/test/uitests/tabwidgettest.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-01-03 11:50:41 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2021-01-03 11:50:41 +0100
commit756da05c384e3d9258fc07cf9441d899238503f1 (patch)
treeb3385216148d51a2378a2bed5dfc3f0a27d4f1ec /test/uitests/tabwidgettest.cc
parent645250e1cd8ce9bc1faea599df7a1b05836bfeb8 (diff)
Add dggui namespace to libdggui components.
Diffstat (limited to 'test/uitests/tabwidgettest.cc')
-rw-r--r--test/uitests/tabwidgettest.cc48
1 files changed, 24 insertions, 24 deletions
diff --git a/test/uitests/tabwidgettest.cc b/test/uitests/tabwidgettest.cc
index 36a69cc..804e979 100644
--- a/test/uitests/tabwidgettest.cc
+++ b/test/uitests/tabwidgettest.cc
@@ -38,67 +38,67 @@
#include <dggui/painter.h>
class Widget1
- : public GUI::Widget
+ : public dggui::Widget
{
public:
- Widget1(GUI::Widget* parent)
- : GUI::Widget(parent)
+ Widget1(dggui::Widget* parent)
+ : dggui::Widget(parent)
{
layout.setResizeChildren(true);
- layout.setHAlignment(GUI::HAlignment::center);
+ layout.setHAlignment(dggui::HAlignment::center);
label1.setText("Label1");
- label1.setAlignment(GUI::TextAlignment::left);
+ label1.setAlignment(dggui::TextAlignment::left);
layout.addItem(&label1);
label2.setText("Label2");
- label2.setAlignment(GUI::TextAlignment::center);
+ label2.setAlignment(dggui::TextAlignment::center);
layout.addItem(&label2);
label3.setText("Label3");
- label3.setAlignment(GUI::TextAlignment::right);
+ label3.setAlignment(dggui::TextAlignment::right);
layout.addItem(&label3);
}
private:
- GUI::VBoxLayout layout{this};
- GUI::Label label1{this};
- GUI::Label label2{this};
- GUI::Label label3{this};
+ dggui::VBoxLayout layout{this};
+ dggui::Label label1{this};
+ dggui::Label label2{this};
+ dggui::Label label3{this};
};
class Widget2
- : public GUI::Button
+ : public dggui::Button
{
public:
- Widget2(GUI::Widget* parent)
- : GUI::Button(parent)
+ Widget2(dggui::Widget* parent)
+ : dggui::Button(parent)
{
setText("Widget2");
}
};
class Widget3
- : public GUI::Widget
+ : public dggui::Widget
{
public:
- Widget3(GUI::Widget* parent)
- : GUI::Widget(parent)
+ Widget3(dggui::Widget* parent)
+ : dggui::Widget(parent)
{
label.move(100, 80);
label.resize(100, 20);
label.setText("Widget3");
}
private:
- GUI::Label label{this};
+ dggui::Label label{this};
};
class TestWindow
- : public GUI::Window
+ : public dggui::Window
{
public:
TestWindow()
- : GUI::Window(nullptr)
+ : dggui::Window(nullptr)
{
setCaption("TabWidgetTest Window");
CONNECT(eventHandler(), closeNotifier,
@@ -126,16 +126,16 @@ public:
return !closing;
}
- void repaintEvent(GUI::RepaintEvent* repaintEvent) override
+ void repaintEvent(dggui::RepaintEvent* repaintEvent) override
{
- GUI::Painter painter(*this);
- painter.setColour(GUI::Colour(0.85));
+ dggui::Painter painter(*this);
+ painter.setColour(dggui::Colour(0.85));
painter.drawFilledRectangle(0, 0, width() - 1, height() - 1);
}
private:
bool closing{false};
- GUI::TabWidget tabs{this};
+ dggui::TabWidget tabs{this};
Widget1 widget1{this};
Widget2 widget2{this};
Widget3 widget3{this};