summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeva <deva>2008-09-10 08:52:38 +0000
committerdeva <deva>2008-09-10 08:52:38 +0000
commitb1175cefcd9d9e67ee0f9e1b0b91bb8360b510b7 (patch)
tree8d673e7b0c04ac79f17e6b68d8660d22d76c4195
parent700fb8b935d6495f458e00d044aa69d893d9a695 (diff)
Added enable/disable methods on frame and groupbox.
-rw-r--r--client/widgetbuilder.cc2
-rw-r--r--client/widgets/frame.cc9
-rw-r--r--client/widgets/frame.h3
-rw-r--r--client/widgets/groupbox.cc10
-rw-r--r--client/widgets/groupbox.h3
5 files changed, 27 insertions, 0 deletions
diff --git a/client/widgetbuilder.cc b/client/widgetbuilder.cc
index 99294f6..a6b815c 100644
--- a/client/widgetbuilder.cc
+++ b/client/widgetbuilder.cc
@@ -42,9 +42,11 @@ QVector< Widget* > widgetBuilder(QDomNode xml_node, QWidget *parent, MacroWindow
} else if(xml_elem.tagName() == "frame") {
if(xml_elem.hasAttribute("caption")) {
GroupBox *frame = new GroupBox(xml_elem, macrowindow);
+ widgets.push_back(frame);
widget = frame;
} else {
Frame *frame = new Frame(xml_elem, macrowindow);
+ widgets.push_back(frame);
widget = frame;
}
diff --git a/client/widgets/frame.cc b/client/widgets/frame.cc
index 872c3fc..79e060b 100644
--- a/client/widgets/frame.cc
+++ b/client/widgets/frame.cc
@@ -39,3 +39,12 @@ Frame::Frame(QDomNode &node, MacroWindow *macrowindow)
layout()->setContentsMargins(0,0,0,0);
}
+void Frame::enable()
+{
+ setEnabled(true);
+}
+
+void Frame::disable()
+{
+ setEnabled(false);
+}
diff --git a/client/widgets/frame.h b/client/widgets/frame.h
index 33ccc29..4fabd40 100644
--- a/client/widgets/frame.h
+++ b/client/widgets/frame.h
@@ -35,6 +35,9 @@ class Frame : public QFrame, public Widget
{
public:
Frame(QDomNode &node, MacroWindow *macrowindow);
+
+ void enable();
+ void disable();
};
#endif/*__PRACRO_FRAME_H__*/
diff --git a/client/widgets/groupbox.cc b/client/widgets/groupbox.cc
index 2bf696f..c3947a7 100644
--- a/client/widgets/groupbox.cc
+++ b/client/widgets/groupbox.cc
@@ -44,3 +44,13 @@ GroupBox::GroupBox(QDomNode &node, MacroWindow *macrowindow)
setTitle(elem.attribute("caption"));
}
}
+
+void GroupBox::enable()
+{
+ setEnabled(true);
+}
+
+void GroupBox::disable()
+{
+ setEnabled(false);
+}
diff --git a/client/widgets/groupbox.h b/client/widgets/groupbox.h
index aa3e61f..99e05ce 100644
--- a/client/widgets/groupbox.h
+++ b/client/widgets/groupbox.h
@@ -35,6 +35,9 @@ class GroupBox : public QGroupBox, public Widget
{
public:
GroupBox(QDomNode &node, MacroWindow *macrowindow);
+
+ void enable();
+ void disable();
};
#endif/*__PRACRO_GROUPBOX_H__*/