summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/widgets/groupbox.cc13
-rw-r--r--client/widgets/pushbutton.cc12
-rw-r--r--client/widgets/pushbutton.h3
3 files changed, 16 insertions, 12 deletions
diff --git a/client/widgets/groupbox.cc b/client/widgets/groupbox.cc
index 8ac2fc8..03fe538 100644
--- a/client/widgets/groupbox.cc
+++ b/client/widgets/groupbox.cc
@@ -39,24 +39,13 @@ GroupBox::GroupBox(QDomNode node)
setTitle(elem.attribute(""));
}
- /*
- if(elem.hasAttribute("border")) {
- if(elem.attribute("border") == "true") {
- setFlat(false);
- } else {
- setFlat(true);
- }
- } else {
- setFlat(true);
- }
- */
if(elem.hasAttribute("layout")) {
if(elem.attribute("layout") == "hbox") {
QHBoxLayout *layout = new QHBoxLayout();
setLayout(layout);
} else if (elem.attribute("layout") == "vbox") {
QVBoxLayout *layout = new QVBoxLayout();
- setLayout(layout);
+ setLayout(layout);
}
}
}
diff --git a/client/widgets/pushbutton.cc b/client/widgets/pushbutton.cc
index 1e22190..8d74e4e 100644
--- a/client/widgets/pushbutton.cc
+++ b/client/widgets/pushbutton.cc
@@ -41,6 +41,10 @@ PushButton::PushButton(QDomNode node)
//resize(width(), elem.attribute("height").toInt());
setMinimumHeight(elem.attribute("height").toInt());
}
+
+ if(elem.hasAttribute("field")) {
+ field = elem.attribute("field");
+ }
if(elem.hasAttribute("caption")) {
setText(elem.attribute("caption"));
@@ -55,6 +59,8 @@ PushButton::PushButton(QDomNode node)
connect(this, SIGNAL(clicked()), this, SLOT(reset()));
} else if(elem.attribute("action") == "cancel") {
connect(this, SIGNAL(clicked()), this, SLOT(cancel()));
+ } else if(elem.attribute("action") == "continue") {
+ connect(this, SIGNAL(clicked()), this, SLOT(cont()));
}
} else {
setEnabled(false);
@@ -83,3 +89,9 @@ void PushButton::cancel()
emit act_cancel();
printf("Emit: cancel\n");
}
+
+void PushButton::cont()
+{
+ emit act_continue();
+ printf("Emit: continue\n");
+}
diff --git a/client/widgets/pushbutton.h b/client/widgets/pushbutton.h
index b4fde52..663be79 100644
--- a/client/widgets/pushbutton.h
+++ b/client/widgets/pushbutton.h
@@ -39,17 +39,20 @@ Q_OBJECT
public:
PushButton(QDomNode node);
+ QString field;
public slots:
QString getValue();
void commit();
void reset();
void cancel();
+ void cont();
signals:
void act_commit();
void act_reset();
void act_cancel();
+ void act_continue();
private: