summaryrefslogtreecommitdiff
path: root/client/widgets/window.cc
diff options
context:
space:
mode:
authordeva <deva>2010-08-12 10:57:04 +0000
committerdeva <deva>2010-08-12 10:57:04 +0000
commitd9338083192084613e5530b02710b796252d342b (patch)
treee0ec2b36e0de62328e5fd5d3b597f6ee71d1b18f /client/widgets/window.cc
parentdbab8458dcce186e7eb7a114a83f759d7db5445a (diff)
New scripting system part2.
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;
}