[tor-commits] [vidalia/alpha] Migrate VidaliaTab prototype to a full extension

chiiph at torproject.org chiiph at torproject.org
Sat Jul 21 19:17:47 UTC 2012


commit ac160b2f18170050a9aadb36495ab7ca58cc8728
Author: Tomás Touceda <chiiph at torproject.org>
Date:   Sat Jul 21 15:48:04 2012 -0300

    Migrate VidaliaTab prototype to a full extension
---
 changes/pluginEngineImprovements                   |    3 +
 src/vidalia/CMakeLists.txt                         |    4 +-
 src/vidalia/VidaliaTab.h                           |    5 +-
 src/vidalia/plugin/PluginEngine.cpp                |    8 +-
 src/vidalia/plugin/PluginEngine.h                  |    2 +-
 .../plugin/extensions/VidaliaExtensionsInit.cpp    |    8 +-
 .../plugin/extensions/qtscript_VidaliaTab.cpp      |  248 ++++++++
 .../plugin/extensions/qtscriptshell_VidaliaTab.cpp |  622 ++++++++++++++++++++
 .../plugin/extensions/qtscriptshell_VidaliaTab.h   |   59 ++
 .../plugin/prototypes/VidaliaTabPrototype.cpp      |   75 ---
 .../plugin/prototypes/VidaliaTabPrototype.h        |   42 --
 11 files changed, 950 insertions(+), 126 deletions(-)

diff --git a/changes/pluginEngineImprovements b/changes/pluginEngineImprovements
new file mode 100644
index 0000000..a242f84
--- /dev/null
+++ b/changes/pluginEngineImprovements
@@ -0,0 +1,3 @@
+  Internal cleanups and improvements:
+  o VidaliaTab prototype for plugins has been migrated to a full QWidget
+    derived object and an automatically generated extension.
diff --git a/src/vidalia/CMakeLists.txt b/src/vidalia/CMakeLists.txt
index 58d846d..17581d2 100644
--- a/src/vidalia/CMakeLists.txt
+++ b/src/vidalia/CMakeLists.txt
@@ -89,7 +89,6 @@ set(vidalia_SRCS ${vidalia_SRCS}
   plugin/PluginEngine.cpp
   plugin/PluginWrapper.cpp
   plugin/DebugDialog.cpp
-  plugin/prototypes/VidaliaTabPrototype.cpp
   plugin/prototypes/HelperProcessPrototype.cpp
   plugin/prototypes/TorrcPrototype.cpp
   plugin/extensions/VidaliaExtensions.cpp
@@ -110,6 +109,7 @@ set(vidalia_SRCS ${vidalia_SRCS}
   plugin/extensions/qtscript_TorEvents.cpp
   plugin/extensions/qtscript_TorProcess.cpp
   plugin/extensions/qtscript_TorSignal.cpp
+  plugin/extensions/qtscript_VidaliaTab.cpp
   plugin/extensions/qtscriptshell_ControlConnection.cpp
   plugin/extensions/qtscriptshell_ControlMethod.cpp
   plugin/extensions/qtscriptshell_ControlSocket.cpp
@@ -117,12 +117,12 @@ set(vidalia_SRCS ${vidalia_SRCS}
   plugin/extensions/qtscriptshell_TorEvents.cpp
   plugin/extensions/qtscriptshell_TorProcess.cpp
   plugin/extensions/qtscriptshell_TorSignal.cpp
+  plugin/extensions/qtscriptshell_VidaliaTab.cpp
 )
 qt4_wrap_cpp(vidalia_SRCS
   plugin/PluginEngine.h
   plugin/PluginWrapper.h
   plugin/DebugDialog.h
-  plugin/prototypes/VidaliaTabPrototype.h
   plugin/prototypes/HelperProcessPrototype.h
   plugin/prototypes/TorrcPrototype.h
 )
diff --git a/src/vidalia/VidaliaTab.h b/src/vidalia/VidaliaTab.h
index 8bf151b..13688fd 100644
--- a/src/vidalia/VidaliaTab.h
+++ b/src/vidalia/VidaliaTab.h
@@ -26,9 +26,10 @@ class VidaliaTab : public QWidget
 
 public:
   /** Default constructor. */
+  VidaliaTab(QWidget *parent = 0) : QWidget(parent) {}
   VidaliaTab(const QString &title, const QString &name = "General", QWidget *parent = 0);
   /** Destructor. */
-  ~VidaliaTab();
+  virtual ~VidaliaTab();
 
   /** Returns the tab's title */
   QString getTitle() const { return _title; }
@@ -70,5 +71,7 @@ private:
   VSettings* _settings; /**< Object used to store window properties */
 };
 
+Q_DECLARE_METATYPE(VidaliaTab*)
+
 #endif
 
diff --git a/src/vidalia/plugin/PluginEngine.cpp b/src/vidalia/plugin/PluginEngine.cpp
index 93d50c0..82f133d 100644
--- a/src/vidalia/plugin/PluginEngine.cpp
+++ b/src/vidalia/plugin/PluginEngine.cpp
@@ -26,11 +26,15 @@
 PluginEngine::PluginEngine(QObject *parent)
   : QScriptEngine(parent)
 {
+  foreach(QString extension, availableExtensions()) {
+    vDebug(tr("Loading %1...").arg(extension));
+    QScriptEngine::importExtension(extension);
+  }
+
   VidaliaExtensions ve;
   ve.initialize("vidalia", this);
+  QScriptEngine::importExtension("vidalia");
 
-  ADD_PROTOTYPE(VidaliaTabPrototype)
-  MAKE_CREATABLE(VidaliaTabPrototype)
   ADD_PROTOTYPE(HelperProcessPrototype)
   MAKE_CREATABLE(HelperProcessPrototype)
   ADD_PROTOTYPE(TorrcPrototype)
diff --git a/src/vidalia/plugin/PluginEngine.h b/src/vidalia/plugin/PluginEngine.h
index b8b65aa..dd68eba 100644
--- a/src/vidalia/plugin/PluginEngine.h
+++ b/src/vidalia/plugin/PluginEngine.h
@@ -19,9 +19,9 @@
 #include <QtGui>
 #include <QtScript>
 
-#include "VidaliaTabPrototype.h"
 #include "HelperProcessPrototype.h"
 #include "TorrcPrototype.h"
+#include "VidaliaTab.h"
 
 class PluginWrapper;
 
diff --git a/src/vidalia/plugin/extensions/VidaliaExtensionsInit.cpp b/src/vidalia/plugin/extensions/VidaliaExtensionsInit.cpp
index 75b75d6..b09d045 100644
--- a/src/vidalia/plugin/extensions/VidaliaExtensionsInit.cpp
+++ b/src/vidalia/plugin/extensions/VidaliaExtensionsInit.cpp
@@ -1,7 +1,7 @@
 #include <QtScript/QScriptValue>
 #include <QtScript/QScriptEngine>
 
-const int classCount = 16;
+const int classCount = 17;
 
 QScriptValue qtscript_create_TorControl_class(QScriptEngine *engine);
 QScriptValue qtscript_create_Circuit_class(QScriptEngine *engine);
@@ -19,6 +19,7 @@ QScriptValue qtscript_create_TorEvents_class(QScriptEngine *engine);
 QScriptValue qtscript_create_ControlSocket_class(QScriptEngine *engine);
 QScriptValue qtscript_create_SendCommandEvent_class(QScriptEngine *engine);
 QScriptValue qtscript_create_TorProcess_class(QScriptEngine *engine);
+QScriptValue qtscript_create_VidaliaTab_class(QScriptEngine *engine);
 
 static const char * const vidalia_class_names[] = {
     "Circuit"
@@ -37,6 +38,7 @@ static const char * const vidalia_class_names[] = {
     , "ControlSocket"
     , "SendCommandEvent"
     , "TorProcess"
+    , "VidaliaTab"
 };
 
 typedef QScriptValue (*QtBindingCreator)(QScriptEngine *engine);
@@ -57,6 +59,7 @@ static const QtBindingCreator vidalia_class_functions[] = {
     , qtscript_create_ControlSocket_class
     , qtscript_create_SendCommandEvent_class
     , qtscript_create_TorProcess_class
+    , qtscript_create_VidaliaTab_class
 };
 
 void vidalia_initialize_bindings(QScriptValue &extensionObject)
@@ -64,7 +67,6 @@ void vidalia_initialize_bindings(QScriptValue &extensionObject)
     QScriptEngine *engine = extensionObject.engine();
     for (int i = 0; i < classCount; ++i) {
         extensionObject.setProperty(vidalia_class_names[i],
-            vidalia_class_functions[i](engine),
-            QScriptValue::SkipInEnumeration);
+            vidalia_class_functions[i](engine));
     }
 }
diff --git a/src/vidalia/plugin/extensions/qtscript_VidaliaTab.cpp b/src/vidalia/plugin/extensions/qtscript_VidaliaTab.cpp
new file mode 100644
index 0000000..ae3dd37
--- /dev/null
+++ b/src/vidalia/plugin/extensions/qtscript_VidaliaTab.cpp
@@ -0,0 +1,248 @@
+#include <QtScript/QScriptEngine>
+#include <QtScript/QScriptContext>
+#include <QtScript/QScriptValue>
+#include <QtCore/QStringList>
+#include <QtCore/QDebug>
+#include <qmetaobject.h>
+
+#include <VidaliaTab.h>
+#include <QVariant>
+#include <qaction.h>
+#include <qbitmap.h>
+#include <qbytearray.h>
+#include <qcoreevent.h>
+#include <qcursor.h>
+#include <qevent.h>
+#include <qfont.h>
+#include <qgraphicseffect.h>
+#include <qgraphicsproxywidget.h>
+#include <qicon.h>
+#include <qinputcontext.h>
+#include <qkeysequence.h>
+#include <qlayout.h>
+#include <qlist.h>
+#include <qlocale.h>
+#include <qmargins.h>
+#include <qobject.h>
+#include <qpaintdevice.h>
+#include <qpaintengine.h>
+#include <qpainter.h>
+#include <qpalette.h>
+#include <qpoint.h>
+#include <qrect.h>
+#include <qregion.h>
+#include <qsize.h>
+#include <qsizepolicy.h>
+#include <qstyle.h>
+#include <qwidget.h>
+
+#include "qtscriptshell_VidaliaTab.h"
+
+static const char * const qtscript_VidaliaTab_function_names[] = {
+    "VidaliaTab"
+    // static
+    // prototype
+    , "getSetting"
+    , "getTitle"
+    , "saveSetting"
+    , "setOnTop"
+    , "setShortcut"
+    , "setTitle"
+    , "toString"
+};
+
+static const char * const qtscript_VidaliaTab_function_signatures[] = {
+    "String title, String name, QWidget parent"
+    // static
+    // prototype
+    , "String name, Object defaultValue"
+    , ""
+    , "String name, Object value"
+    , "bool top"
+    , "String shortcut, char slot"
+    , "String title"
+""
+};
+
+static const int qtscript_VidaliaTab_function_lengths[] = {
+    3
+    // static
+    // prototype
+    , 2
+    , 0
+    , 2
+    , 1
+    , 2
+    , 1
+    , 0
+};
+
+static QScriptValue qtscript_VidaliaTab_throw_ambiguity_error_helper(
+    QScriptContext *context, const char *functionName, const char *signatures)
+{
+    QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n'));
+    QStringList fullSignatures;
+    for (int i = 0; i < lines.size(); ++i)
+        fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i)));
+    return context->throwError(QString::fromLatin1("VidaliaTab::%0(): could not find a function match; candidates are:\n%1")
+        .arg(functionName).arg(fullSignatures.join(QLatin1String("\n"))));
+}
+
+Q_DECLARE_METATYPE(QtScriptShell_VidaliaTab*)
+Q_DECLARE_METATYPE(char*)
+
+//
+// VidaliaTab
+//
+
+static QScriptValue qtscript_VidaliaTab_prototype_call(QScriptContext *context, QScriptEngine *)
+{
+#if QT_VERSION > 0x040400
+    Q_ASSERT(context->callee().isFunction());
+    uint _id = context->callee().data().toUInt32();
+#else
+    uint _id;
+    if (context->callee().isFunction())
+        _id = context->callee().data().toUInt32();
+    else
+        _id = 0xBABE0000 + 6;
+#endif
+    Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000);
+    _id &= 0x0000FFFF;
+    VidaliaTab* _q_self = qscriptvalue_cast<VidaliaTab*>(context->thisObject());
+    if (!_q_self) {
+        return context->throwError(QScriptContext::TypeError,
+            QString::fromLatin1("VidaliaTab.%0(): this object is not a VidaliaTab")
+            .arg(qtscript_VidaliaTab_function_names[_id+1]));
+    }
+
+    switch (_id) {
+    case 0:
+    if (context->argumentCount() == 2) {
+        QString _q_arg0 = context->argument(0).toString();
+        QVariant _q_arg1 = context->argument(1).toVariant();
+        QVariant _q_result = _q_self->getSetting(_q_arg0, _q_arg1);
+        return qScriptValueFromValue(context->engine(), _q_result);
+    }
+    break;
+
+    case 1:
+    if (context->argumentCount() == 0) {
+        QString _q_result = _q_self->getTitle();
+        return QScriptValue(context->engine(), _q_result);
+    }
+    break;
+
+    case 2:
+    if (context->argumentCount() == 2) {
+        QString _q_arg0 = context->argument(0).toString();
+        QVariant _q_arg1 = context->argument(1).toVariant();
+        _q_self->saveSetting(_q_arg0, _q_arg1);
+        return context->engine()->undefinedValue();
+    }
+    break;
+
+    case 3:
+    if (context->argumentCount() == 1) {
+        bool _q_arg0 = context->argument(0).toBoolean();
+        _q_self->setOnTop(_q_arg0);
+        return context->engine()->undefinedValue();
+    }
+    break;
+
+    case 4:
+    if (context->argumentCount() == 2) {
+        QString _q_arg0 = context->argument(0).toString();
+        char* _q_arg1 = qscriptvalue_cast<char*>(context->argument(1));
+        _q_self->setShortcut(_q_arg0, _q_arg1);
+        return context->engine()->undefinedValue();
+    }
+    break;
+
+    case 5:
+    if (context->argumentCount() == 1) {
+        QString _q_arg0 = context->argument(0).toString();
+        _q_self->setTitle(_q_arg0);
+        return context->engine()->undefinedValue();
+    }
+    break;
+
+    case 6: {
+    QString result = QString::fromLatin1("VidaliaTab");
+    return QScriptValue(context->engine(), result);
+    }
+
+    default:
+    Q_ASSERT(false);
+    }
+    return qtscript_VidaliaTab_throw_ambiguity_error_helper(context,
+        qtscript_VidaliaTab_function_names[_id+1],
+        qtscript_VidaliaTab_function_signatures[_id+1]);
+}
+
+static QScriptValue qtscript_VidaliaTab_static_call(QScriptContext *context, QScriptEngine *)
+{
+    uint _id = context->callee().data().toUInt32();
+    Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000);
+    _id &= 0x0000FFFF;
+    switch (_id) {
+    case 0:
+    if (context->thisObject().strictlyEquals(context->engine()->globalObject())) {
+        return context->throwError(QString::fromLatin1("VidaliaTab(): Did you forget to construct with 'new'?"));
+    }
+    if (context->argumentCount() == 2) {
+        QString _q_arg0 = context->argument(0).toString();
+        QString _q_arg1 = context->argument(1).toString();
+        QtScriptShell_VidaliaTab* _q_cpp_result = new QtScriptShell_VidaliaTab(_q_arg0, _q_arg1);
+        QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (VidaliaTab*)_q_cpp_result, QScriptEngine::AutoOwnership);
+        _q_cpp_result->__qtscript_self = _q_result;
+        return _q_result;
+    } else if (context->argumentCount() == 3) {
+        QString _q_arg0 = context->argument(0).toString();
+        QString _q_arg1 = context->argument(1).toString();
+        QWidget* _q_arg2 = qscriptvalue_cast<QWidget*>(context->argument(2));
+        QtScriptShell_VidaliaTab* _q_cpp_result = new QtScriptShell_VidaliaTab(_q_arg0, _q_arg1, _q_arg2);
+        QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (VidaliaTab*)_q_cpp_result, QScriptEngine::AutoOwnership);
+        _q_cpp_result->__qtscript_self = _q_result;
+        return _q_result;
+    }
+    break;
+
+    default:
+    Q_ASSERT(false);
+    }
+    return qtscript_VidaliaTab_throw_ambiguity_error_helper(context,
+        qtscript_VidaliaTab_function_names[_id],
+        qtscript_VidaliaTab_function_signatures[_id]);
+}
+
+static QScriptValue qtscript_VidaliaTab_toScriptValue(QScriptEngine *engine, VidaliaTab* const &in)
+{
+    return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject);
+}
+
+static void qtscript_VidaliaTab_fromScriptValue(const QScriptValue &value, VidaliaTab* &out)
+{
+    out = qobject_cast<VidaliaTab*>(value.toQObject());
+}
+
+QScriptValue qtscript_create_VidaliaTab_class(QScriptEngine *engine)
+{
+    engine->setDefaultPrototype(qMetaTypeId<VidaliaTab*>(), QScriptValue());
+    QScriptValue proto = engine->newVariant(qVariantFromValue((VidaliaTab*)0));
+    proto.setPrototype(engine->defaultPrototype(qMetaTypeId<QWidget*>()));
+    for (int i = 0; i < 7; ++i) {
+        QScriptValue fun = engine->newFunction(qtscript_VidaliaTab_prototype_call, qtscript_VidaliaTab_function_lengths[i+1]);
+        fun.setData(QScriptValue(engine, uint(0xBABE0000 + i)));
+        proto.setProperty(QString::fromLatin1(qtscript_VidaliaTab_function_names[i+1]),
+            fun);
+    }
+
+    qScriptRegisterMetaType<VidaliaTab*>(engine, qtscript_VidaliaTab_toScriptValue,
+        qtscript_VidaliaTab_fromScriptValue, proto);
+
+    QScriptValue ctor = engine->newFunction(qtscript_VidaliaTab_static_call, proto, qtscript_VidaliaTab_function_lengths[0]);
+    ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0)));
+
+    return ctor;
+}
diff --git a/src/vidalia/plugin/extensions/qtscriptshell_VidaliaTab.cpp b/src/vidalia/plugin/extensions/qtscriptshell_VidaliaTab.cpp
new file mode 100644
index 0000000..84b46c7
--- /dev/null
+++ b/src/vidalia/plugin/extensions/qtscriptshell_VidaliaTab.cpp
@@ -0,0 +1,622 @@
+#include "qtscriptshell_VidaliaTab.h"
+
+#include <QtScript/QScriptEngine>
+#include <QVariant>
+#include <qaction.h>
+#include <qbitmap.h>
+#include <qbytearray.h>
+#include <qcoreevent.h>
+#include <qcursor.h>
+#include <qevent.h>
+#include <qfont.h>
+#include <qgraphicseffect.h>
+#include <qgraphicsproxywidget.h>
+#include <qicon.h>
+#include <qinputcontext.h>
+#include <qkeysequence.h>
+#include <qlayout.h>
+#include <qlist.h>
+#include <qlocale.h>
+#include <qmargins.h>
+#include <qobject.h>
+#include <qpaintdevice.h>
+#include <qpaintengine.h>
+#include <qpainter.h>
+#include <qpalette.h>
+#include <qpoint.h>
+#include <qrect.h>
+#include <qregion.h>
+#include <qsize.h>
+#include <qsizepolicy.h>
+#include <qstyle.h>
+#include <qwidget.h>
+
+#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000)
+
+Q_DECLARE_METATYPE(QActionEvent*)
+Q_DECLARE_METATYPE(QEvent*)
+Q_DECLARE_METATYPE(QChildEvent*)
+Q_DECLARE_METATYPE(QCloseEvent*)
+Q_DECLARE_METATYPE(QContextMenuEvent*)
+Q_DECLARE_METATYPE(QDragEnterEvent*)
+Q_DECLARE_METATYPE(QDragLeaveEvent*)
+Q_DECLARE_METATYPE(QDragMoveEvent*)
+Q_DECLARE_METATYPE(QDropEvent*)
+Q_DECLARE_METATYPE(QFocusEvent*)
+Q_DECLARE_METATYPE(QHideEvent*)
+Q_DECLARE_METATYPE(QInputMethodEvent*)
+Q_DECLARE_METATYPE(Qt::InputMethodQuery)
+Q_DECLARE_METATYPE(QKeyEvent*)
+Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric)
+Q_DECLARE_METATYPE(QMouseEvent*)
+Q_DECLARE_METATYPE(QMoveEvent*)
+Q_DECLARE_METATYPE(QPaintEngine*)
+Q_DECLARE_METATYPE(QPaintEvent*)
+Q_DECLARE_METATYPE(QResizeEvent*)
+Q_DECLARE_METATYPE(QShowEvent*)
+Q_DECLARE_METATYPE(QTabletEvent*)
+Q_DECLARE_METATYPE(QTimerEvent*)
+Q_DECLARE_METATYPE(QWheelEvent*)
+
+QtScriptShell_VidaliaTab::QtScriptShell_VidaliaTab(const QString&  title, const QString&  name, QWidget*  parent)
+    : VidaliaTab(title, name, parent) {}
+
+QtScriptShell_VidaliaTab::~QtScriptShell_VidaliaTab() {}
+
+void QtScriptShell_VidaliaTab::actionEvent(QActionEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("actionEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::actionEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+void QtScriptShell_VidaliaTab::changeEvent(QEvent*  e)
+{
+    QScriptValue _q_function = __qtscript_self.property("changeEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::changeEvent(e);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, e));
+    }
+}
+
+void QtScriptShell_VidaliaTab::childEvent(QChildEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("childEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::childEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+void QtScriptShell_VidaliaTab::closeEvent(QCloseEvent*  event)
+{
+    QScriptValue _q_function = __qtscript_self.property("closeEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::closeEvent(event);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, event));
+    }
+}
+
+void QtScriptShell_VidaliaTab::contextMenuEvent(QContextMenuEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("contextMenuEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::contextMenuEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+void QtScriptShell_VidaliaTab::customEvent(QEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("customEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::customEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+int  QtScriptShell_VidaliaTab::devType() const
+{
+    QScriptValue _q_function = __qtscript_self.property("devType");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) {
+        return VidaliaTab::devType();
+    } else {
+        return qscriptvalue_cast<int >(_q_function.call(__qtscript_self));
+    }
+}
+
+void QtScriptShell_VidaliaTab::dragEnterEvent(QDragEnterEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("dragEnterEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::dragEnterEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+void QtScriptShell_VidaliaTab::dragLeaveEvent(QDragLeaveEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::dragLeaveEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+void QtScriptShell_VidaliaTab::dragMoveEvent(QDragMoveEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("dragMoveEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::dragMoveEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+void QtScriptShell_VidaliaTab::dropEvent(QDropEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("dropEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::dropEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+void QtScriptShell_VidaliaTab::enterEvent(QEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("enterEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::enterEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+bool  QtScriptShell_VidaliaTab::event(QEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("event");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) {
+        return VidaliaTab::event(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        return qscriptvalue_cast<bool >(_q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1)));
+    }
+}
+
+bool  QtScriptShell_VidaliaTab::eventFilter(QObject*  arg__1, QEvent*  arg__2)
+{
+    QScriptValue _q_function = __qtscript_self.property("eventFilter");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) {
+        return VidaliaTab::eventFilter(arg__1, arg__2);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        return qscriptvalue_cast<bool >(_q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1)
+            << qScriptValueFromValue(_q_engine, arg__2)));
+    }
+}
+
+void QtScriptShell_VidaliaTab::focusInEvent(QFocusEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("focusInEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::focusInEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+bool  QtScriptShell_VidaliaTab::focusNextPrevChild(bool  next)
+{
+    QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) {
+        return VidaliaTab::focusNextPrevChild(next);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        return qscriptvalue_cast<bool >(_q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, next)));
+    }
+}
+
+void QtScriptShell_VidaliaTab::focusOutEvent(QFocusEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("focusOutEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::focusOutEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+int  QtScriptShell_VidaliaTab::heightForWidth(int  arg__1) const
+{
+    QScriptValue _q_function = __qtscript_self.property("heightForWidth");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) {
+        return VidaliaTab::heightForWidth(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        return qscriptvalue_cast<int >(_q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1)));
+    }
+}
+
+void QtScriptShell_VidaliaTab::hideEvent(QHideEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("hideEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::hideEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+void QtScriptShell_VidaliaTab::inputMethodEvent(QInputMethodEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("inputMethodEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::inputMethodEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+QVariant  QtScriptShell_VidaliaTab::inputMethodQuery(Qt::InputMethodQuery  arg__1) const
+{
+    QScriptValue _q_function = __qtscript_self.property("inputMethodQuery");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) {
+        return VidaliaTab::inputMethodQuery(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        return qscriptvalue_cast<QVariant >(_q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1)));
+    }
+}
+
+void QtScriptShell_VidaliaTab::keyPressEvent(QKeyEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("keyPressEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::keyPressEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+void QtScriptShell_VidaliaTab::keyReleaseEvent(QKeyEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::keyReleaseEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+void QtScriptShell_VidaliaTab::languageChange()
+{
+    QScriptValue _q_function = __qtscript_self.property("languageChange");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("languageChange") & QScriptValue::QObjectMember)) {
+        VidaliaTab::languageChange();
+    } else {
+        _q_function.call(__qtscript_self);
+    }
+}
+
+void QtScriptShell_VidaliaTab::leaveEvent(QEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("leaveEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::leaveEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+int  QtScriptShell_VidaliaTab::metric(QPaintDevice::PaintDeviceMetric  arg__1) const
+{
+    QScriptValue _q_function = __qtscript_self.property("metric");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) {
+        return VidaliaTab::metric(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        return qscriptvalue_cast<int >(_q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1)));
+    }
+}
+
+QSize  QtScriptShell_VidaliaTab::minimumSizeHint() const
+{
+    QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) {
+        return VidaliaTab::minimumSizeHint();
+    } else {
+        return qscriptvalue_cast<QSize >(_q_function.call(__qtscript_self));
+    }
+}
+
+void QtScriptShell_VidaliaTab::mouseDoubleClickEvent(QMouseEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::mouseDoubleClickEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+void QtScriptShell_VidaliaTab::mouseMoveEvent(QMouseEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::mouseMoveEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+void QtScriptShell_VidaliaTab::mousePressEvent(QMouseEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("mousePressEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::mousePressEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+void QtScriptShell_VidaliaTab::mouseReleaseEvent(QMouseEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::mouseReleaseEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+void QtScriptShell_VidaliaTab::moveEvent(QMoveEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("moveEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::moveEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+QPaintEngine*  QtScriptShell_VidaliaTab::paintEngine() const
+{
+    QScriptValue _q_function = __qtscript_self.property("paintEngine");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) {
+        return VidaliaTab::paintEngine();
+    } else {
+        return qscriptvalue_cast<QPaintEngine* >(_q_function.call(__qtscript_self));
+    }
+}
+
+void QtScriptShell_VidaliaTab::paintEvent(QPaintEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("paintEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::paintEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+void QtScriptShell_VidaliaTab::resizeEvent(QResizeEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("resizeEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::resizeEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+void QtScriptShell_VidaliaTab::retranslateUi()
+{
+    QScriptValue _q_function = __qtscript_self.property("retranslateUi");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("retranslateUi") & QScriptValue::QObjectMember)) {
+        VidaliaTab::retranslateUi();
+    } else {
+        _q_function.call(__qtscript_self);
+    }
+}
+
+void QtScriptShell_VidaliaTab::showEvent(QShowEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("showEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::showEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+QSize  QtScriptShell_VidaliaTab::sizeHint() const
+{
+    QScriptValue _q_function = __qtscript_self.property("getSizeHint");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("getSizeHint") & QScriptValue::QObjectMember)) {
+        return VidaliaTab::sizeHint();
+    } else {
+        return qscriptvalue_cast<QSize >(_q_function.call(__qtscript_self));
+    }
+}
+
+void QtScriptShell_VidaliaTab::tabletEvent(QTabletEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("tabletEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::tabletEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+void QtScriptShell_VidaliaTab::timerEvent(QTimerEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("timerEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::timerEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
+void QtScriptShell_VidaliaTab::wheelEvent(QWheelEvent*  arg__1)
+{
+    QScriptValue _q_function = __qtscript_self.property("wheelEvent");
+    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
+        || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) {
+        VidaliaTab::wheelEvent(arg__1);
+    } else {
+        QScriptEngine *_q_engine = __qtscript_self.engine();
+        _q_function.call(__qtscript_self,
+            QScriptValueList()
+            << qScriptValueFromValue(_q_engine, arg__1));
+    }
+}
+
diff --git a/src/vidalia/plugin/extensions/qtscriptshell_VidaliaTab.h b/src/vidalia/plugin/extensions/qtscriptshell_VidaliaTab.h
new file mode 100644
index 0000000..74021fc
--- /dev/null
+++ b/src/vidalia/plugin/extensions/qtscriptshell_VidaliaTab.h
@@ -0,0 +1,59 @@
+#ifndef QTSCRIPTSHELL_VIDALIATAB_H
+#define QTSCRIPTSHELL_VIDALIATAB_H
+
+#include <VidaliaTab.h>
+
+#include <QtScript/qscriptvalue.h>
+
+class QtScriptShell_VidaliaTab : public VidaliaTab
+{
+public:
+    QtScriptShell_VidaliaTab(const QString&  title, const QString&  name = "General", QWidget*  parent = 0);
+    ~QtScriptShell_VidaliaTab();
+
+    void actionEvent(QActionEvent*  arg__1);
+    void changeEvent(QEvent*  e);
+    void childEvent(QChildEvent*  arg__1);
+    void closeEvent(QCloseEvent*  event);
+    void contextMenuEvent(QContextMenuEvent*  arg__1);
+    void customEvent(QEvent*  arg__1);
+    int  devType() const;
+    void dragEnterEvent(QDragEnterEvent*  arg__1);
+    void dragLeaveEvent(QDragLeaveEvent*  arg__1);
+    void dragMoveEvent(QDragMoveEvent*  arg__1);
+    void dropEvent(QDropEvent*  arg__1);
+    void enterEvent(QEvent*  arg__1);
+    bool  event(QEvent*  arg__1);
+    bool  eventFilter(QObject*  arg__1, QEvent*  arg__2);
+    void focusInEvent(QFocusEvent*  arg__1);
+    bool  focusNextPrevChild(bool  next);
+    void focusOutEvent(QFocusEvent*  arg__1);
+    int  heightForWidth(int  arg__1) const;
+    void hideEvent(QHideEvent*  arg__1);
+    void inputMethodEvent(QInputMethodEvent*  arg__1);
+    QVariant  inputMethodQuery(Qt::InputMethodQuery  arg__1) const;
+    void keyPressEvent(QKeyEvent*  arg__1);
+    void keyReleaseEvent(QKeyEvent*  arg__1);
+    void languageChange();
+    void leaveEvent(QEvent*  arg__1);
+    int  metric(QPaintDevice::PaintDeviceMetric  arg__1) const;
+    QSize  minimumSizeHint() const;
+    void mouseDoubleClickEvent(QMouseEvent*  arg__1);
+    void mouseMoveEvent(QMouseEvent*  arg__1);
+    void mousePressEvent(QMouseEvent*  arg__1);
+    void mouseReleaseEvent(QMouseEvent*  arg__1);
+    void moveEvent(QMoveEvent*  arg__1);
+    QPaintEngine*  paintEngine() const;
+    void paintEvent(QPaintEvent*  arg__1);
+    void resizeEvent(QResizeEvent*  arg__1);
+    void retranslateUi();
+    void showEvent(QShowEvent*  arg__1);
+    QSize  sizeHint() const;
+    void tabletEvent(QTabletEvent*  arg__1);
+    void timerEvent(QTimerEvent*  arg__1);
+    void wheelEvent(QWheelEvent*  arg__1);
+
+    QScriptValue __qtscript_self;
+};
+
+#endif // QTSCRIPTSHELL_VIDALIATAB_H
diff --git a/src/vidalia/plugin/prototypes/VidaliaTabPrototype.cpp b/src/vidalia/plugin/prototypes/VidaliaTabPrototype.cpp
deleted file mode 100644
index 6d902a3..0000000
--- a/src/vidalia/plugin/prototypes/VidaliaTabPrototype.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
-**  This file is part of Vidalia, and is subject to the license terms in the
-**  LICENSE file, found in the top level directory of this distribution. If you
-**  did not receive the LICENSE file with this file, you may obtain it from the
-**  Vidalia source package distributed by the Vidalia Project at
-**  http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-**  including this file, may be copied, modified, propagated, or distributed
-**  except according to the terms described in the LICENSE file.
-*/
-
-/*
-** \file VidaliaTabPrototype.cpp
-** \brief Prototype for VidaliaTab class
-*/
-
-#include "VidaliaTabPrototype.h"
-
-VidaliaTabPrototype::VidaliaTabPrototype(QObject *parent)
-  : QObject(parent)
-{}
-
-QScriptValue
-VidaliaTabPrototype::constructor(QScriptContext *context, QScriptEngine *engine)
-{
-  if((context->argumentCount() > 2) or (context->argumentCount() < 1))
-    return QScriptValue(QScriptValue::NullValue);
-
-  QString title = "";
-  QString name = "";
-
-  title = qscriptvalue_cast<QString>(context->argument(0));
-  if(context->argumentCount() > 1)
-    name = qscriptvalue_cast<QString>(context->argument(1));
-
-  return engine->newQObject(new VidaliaTab(title, name), QScriptEngine::ScriptOwnership);
-}
-
-int
-VidaliaTabPrototype::metaTypeId()
-{
-  return qMetaTypeId<VidaliaTab *>();
-}
-
-QString
-VidaliaTabPrototype::name()
-{
-  return QString("VidaliaTab");
-}
-
-void
-VidaliaTabPrototype::setLayout(QLayout *layout)
-{
-  VidaliaTab *obj = qscriptvalue_cast<VidaliaTab *>(thisObject());
-
-  if(obj)
-    obj->setLayout(layout);
-}
-
-QVariant
-VidaliaTabPrototype::getSetting(QString name, QVariant defaultValue)
-{
-  VidaliaTab *obj = qscriptvalue_cast<VidaliaTab *>(thisObject());
-
-  if(obj)
-    return obj->getSetting(name, defaultValue);
-}
-
-void
-VidaliaTabPrototype::saveSetting(QString name, QVariant value)
-{
-  VidaliaTab *obj = qscriptvalue_cast<VidaliaTab *>(thisObject());
-
-  if(obj)
-    obj->saveSetting(name, value);
-}
diff --git a/src/vidalia/plugin/prototypes/VidaliaTabPrototype.h b/src/vidalia/plugin/prototypes/VidaliaTabPrototype.h
deleted file mode 100644
index 2a79a28..0000000
--- a/src/vidalia/plugin/prototypes/VidaliaTabPrototype.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
-**  This file is part of Vidalia, and is subject to the license terms in the
-**  LICENSE file, found in the top level directory of this distribution. If you
-**  did not receive the LICENSE file with this file, you may obtain it from the
-**  Vidalia source package distributed by the Vidalia Project at
-**  http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
-**  including this file, may be copied, modified, propagated, or distributed
-**  except according to the terms described in the LICENSE file.
-*/
-
-/*
-** \file VidaliaTabPrototype.h
-** \brief Prototype for VidaliaTab class
-*/
-
-#ifndef VIDALIATABPROT_H
-#define VIDALIATABPROT_H
-
-#include <QtGui>
-#include <QtScript>
-
-#include "VidaliaTab.h"
-
-class VidaliaTabPrototype : public QObject, public QScriptable
-{
-  Q_OBJECT
-
-  public:
-    VidaliaTabPrototype(QObject *parent = 0);
-    static QScriptValue constructor(QScriptContext *context, QScriptEngine *engine);
-    static int metaTypeId();
-    static QString name();
-
-    Q_INVOKABLE void setLayout(QLayout *layout);
-    Q_INVOKABLE QVariant getSetting(QString name, QVariant defaultValue);
-    Q_INVOKABLE void saveSetting(QString name, QVariant value);
-};
-
-Q_DECLARE_METATYPE(VidaliaTab *);
-
-#endif
-





More information about the tor-commits mailing list