summaryrefslogtreecommitdiff
path: root/test/uitests/framewidgettest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/uitests/framewidgettest.cc')
-rw-r--r--test/uitests/framewidgettest.cc60
1 files changed, 30 insertions, 30 deletions
diff --git a/test/uitests/framewidgettest.cc b/test/uitests/framewidgettest.cc
index 4f0e0fd..97f9ed0 100644
--- a/test/uitests/framewidgettest.cc
+++ b/test/uitests/framewidgettest.cc
@@ -40,65 +40,65 @@
// TODO: fix segfault on close
-class Widget1 : public GUI::Widget
+class Widget1 : 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::Widget
+class Widget2 : public dggui::Widget
{
public:
- Widget2(GUI::Widget* parent) : GUI::Widget(parent)
+ Widget2(dggui::Widget* parent) : dggui::Widget(parent)
{
layout.setSpacing(10);
layout.setResizeChildren(true);
- layout.setVAlignment(GUI::VAlignment::top);
+ layout.setVAlignment(dggui::VAlignment::top);
label1.setText("Label1");
- label1.setAlignment(GUI::TextAlignment::right);
+ label1.setAlignment(dggui::TextAlignment::right);
layout.addItem(&label1);
label2.setText("Label2");
- label2.setAlignment(GUI::TextAlignment::left);
+ label2.setAlignment(dggui::TextAlignment::left);
layout.addItem(&label2);
layout.addItem(&checkbox);
}
private:
- GUI::HBoxLayout layout{this};
- GUI::Label label1{this};
- GUI::Label label2{this};
- GUI::CheckBox checkbox{this};
+ dggui::HBoxLayout layout{this};
+ dggui::Label label1{this};
+ dggui::Label label2{this};
+ dggui::CheckBox checkbox{this};
};
-class TestWindow : public GUI::Window
+class TestWindow : public dggui::Window
{
public:
- TestWindow() : GUI::Window(nullptr)
+ TestWindow() : dggui::Window(nullptr)
{
setCaption("FrameWidgetTest Window");
CONNECT(eventHandler(), closeNotifier, this,
@@ -107,7 +107,7 @@ public:
layout.setSpacing(10);
layout.setResizeChildren(true);
- layout.setHAlignment(GUI::HAlignment::center);
+ layout.setHAlignment(dggui::HAlignment::center);
layout.addItem(&frame1);
layout.addItem(&frame2);
@@ -141,22 +141,22 @@ 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::VBoxLayout layout{this};
+ dggui::VBoxLayout layout{this};
- GUI::FrameWidget frame1{this, true};
- GUI::FrameWidget frame2{this, false};
- GUI::FrameWidget frame3{this, true};
- GUI::FrameWidget frame4{this, false};
+ dggui::FrameWidget frame1{this, true};
+ dggui::FrameWidget frame2{this, false};
+ dggui::FrameWidget frame3{this, true};
+ dggui::FrameWidget frame4{this, false};
Widget1 w1_1{this};
Widget1 w1_2{this};