summaryrefslogtreecommitdiffstats
path: root/kjsembed/qtbindings/qframe_imp.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit90825e2392b2d70e43c7a25b8a3752299a933894 (patch)
treee33aa27f02b74604afbfd0ea4f1cfca8833d882a /kjsembed/qtbindings/qframe_imp.cpp
downloadtdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.tar.gz
tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kjsembed/qtbindings/qframe_imp.cpp')
-rw-r--r--kjsembed/qtbindings/qframe_imp.cpp64
1 files changed, 64 insertions, 0 deletions
diff --git a/kjsembed/qtbindings/qframe_imp.cpp b/kjsembed/qtbindings/qframe_imp.cpp
new file mode 100644
index 00000000..92254a8b
--- /dev/null
+++ b/kjsembed/qtbindings/qframe_imp.cpp
@@ -0,0 +1,64 @@
+
+#include <kjs/object.h>
+
+#include <kjsembed/global.h>
+#include <kjsembed/jsobjectproxy.h>
+#include <kjsembed/jsbinding.h>
+
+#include <qframe.h>
+#include "qframe_imp.h"
+
+/**
+ * Namespace containing the KJSEmbed library.
+ */
+namespace KJSEmbed {
+void QFrameImp::addBindings( KJS::ExecState *exec, KJS::Object &object )
+{
+ //
+ // Define the enum constants
+ //
+ struct EnumValue {
+ const char *id;
+ int val;
+ };
+
+ EnumValue enums[] = {
+
+ // enum Shape
+ { "NoFrame", QFrame::NoFrame },
+ { "Box", QFrame::Box },
+ { "Panel", QFrame::Panel },
+ { "WinPanel", QFrame::WinPanel },
+ { "HLine", QFrame::HLine },
+ { "VLine", QFrame::VLine },
+ { "StyledPanel", QFrame::StyledPanel },
+ { "PopupPanel", QFrame::PopupPanel },
+ { "MenuBarPanel", QFrame::MenuBarPanel },
+ { "ToolBarPanel", QFrame::ToolBarPanel },
+ { "LineEditPanel", QFrame::LineEditPanel },
+ { "TabWidgetPanel", QFrame::TabWidgetPanel },
+ { "GroupBoxPanel", QFrame::GroupBoxPanel },
+ { "MShape", QFrame::MShape },
+ // enum Shadow
+ { "Plain", QFrame::Plain },
+ { "Raised", QFrame::Raised },
+ { "Sunken", QFrame::Sunken },
+ { "MShadow", QFrame::MShadow },
+ { 0, 0 }
+ };
+
+ int enumidx = 0;
+ do {
+ object.put( exec, enums[enumidx].id, KJS::Number(enums[enumidx].val), KJS::ReadOnly );
+ ++enumidx;
+ } while( enums[enumidx].id );
+
+}
+
+} // namespace KJSEmbed
+
+// Local Variables:
+// c-basic-offset: 4
+// End:
+
+