summaryrefslogtreecommitdiff
path: root/client/widgets/window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/widgets/window.cc')
-rw-r--r--client/widgets/window.cc45
1 files changed, 15 insertions, 30 deletions
diff --git a/client/widgets/window.cc b/client/widgets/window.cc
index ea27321..f51cfd9 100644
--- a/client/widgets/window.cc
+++ b/client/widgets/window.cc
@@ -27,54 +27,39 @@
#include "window.h"
#include "common.h"
+#include <QWidget>
#include <QIcon>
Window::Window(QDomNode &node, MacroWindow *macrowindow)
- : QWidget(NULL), Widget(node, macrowindow)
+ : Widget(node, macrowindow)
{
- setWindowFlags(Qt::WindowContextHelpButtonHint | Qt::WindowSystemMenuHint);
+ widget = new QWidget(NULL);
- setWindowIcon(QIcon(":/icons/icon.png"));
+ widget->setWindowFlags(Qt::WindowContextHelpButtonHint |
+ Qt::WindowSystemMenuHint);
- setCommonAttributes(this, node);
- setCommonLayout(this, node);
+ widget->setWindowIcon(QIcon(":/icons/icon.png"));
+
+ setCommonAttributes(widget, node);
+ setCommonLayout(widget, node);
QDomElement elem = node.toElement();
if(elem.hasAttribute("fixed")) {
if(elem.attribute("fixed") == "true") {
- setFixedSize(width(), height());
+ widget->setFixedSize(widget->width(), widget->height());
}
}
if(elem.hasAttribute("caption")) {
- setWindowTitle(elem.attribute("caption"));
+ widget->setWindowTitle(elem.attribute("caption"));
}
-}
-
-void Window::connectFrom(const char *signal,
- const QObject *receiver, const char *method)
-{
- connect(this, signal, receiver, method);
-}
-
-void Window::connectTo(const QObject *sender, const char *signal,
- const char *method)
-{
- connect(sender, signal, this, method);
-}
-
-void Window::enable()
-{
- setEnabled(true);
-}
-void Window::disable()
-{
- setEnabled(false);
+ addChildren(node);
}
-bool Window::isDisabled()
+Window::~Window()
{
- return isEnabled() == false;
+ printf("Delete (Window) %p\n", this); fflush(stdout);
+ // delete widget;
}