~ubuntu-branches/debian/jessie/ugene/jessie

« back to all changes in this revision

Viewing changes to src/libs_3rdparty/qtbindings_gui/src/qtscriptshell_QUndoStack.cpp

  • Committer: Package Import Robot
  • Author(s): Steffen Moeller
  • Date: 2011-11-02 13:29:07 UTC
  • mfrom: (1.2.1) (3.1.11 natty)
  • Revision ID: package-import@ubuntu.com-20111102132907-o34gwnt0uj5g6hen
Tags: 1.9.8+repack-1
* First release to Debian
  - added README.Debian
  - increased policy version to 3.9.2
  - added URLs for version control system
* Added debug package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*****************************************************************
2
 
* Unipro UGENE - Integrated Bioinformatics Suite
3
 
* Copyright (C) 2008 Unipro, Russia (http://ugene.unipro.ru)
4
 
* All Rights Reserved
5
 
6
 
*     This source code is distributed under the terms of the
7
 
*     GNU General Public License. See the files COPYING and LICENSE
8
 
*     for details.
9
 
*****************************************************************/
10
 
 
11
 
#include "qtscriptshell_QUndoStack.h"
12
 
 
13
 
#include <QtScript/QScriptEngine>
14
 
#include <QVariant>
15
 
#include <qaction.h>
16
 
#include <qbytearray.h>
17
 
#include <qcoreevent.h>
18
 
#include <qlist.h>
19
 
#include <qobject.h>
20
 
#include <qundostack.h>
21
 
 
22
 
#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000)
23
 
 
24
 
Q_DECLARE_METATYPE(QChildEvent*)
25
 
Q_DECLARE_METATYPE(QEvent*)
26
 
Q_DECLARE_METATYPE(QTimerEvent*)
27
 
 
28
 
QtScriptShell_QUndoStack::QtScriptShell_QUndoStack(QObject*  parent)
29
 
    : QUndoStack(parent) {}
30
 
 
31
 
QtScriptShell_QUndoStack::~QtScriptShell_QUndoStack() {}
32
 
 
33
 
void QtScriptShell_QUndoStack::childEvent(QChildEvent*  arg__1)
34
 
{
35
 
    QScriptValue _q_function = __qtscript_self.property("childEvent");
36
 
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
37
 
        || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) {
38
 
        QUndoStack::childEvent(arg__1);
39
 
    } else {
40
 
        QScriptEngine *_q_engine = __qtscript_self.engine();
41
 
        _q_function.call(__qtscript_self,
42
 
            QScriptValueList()
43
 
            << qScriptValueFromValue(_q_engine, arg__1));
44
 
    }
45
 
}
46
 
 
47
 
void QtScriptShell_QUndoStack::customEvent(QEvent*  arg__1)
48
 
{
49
 
    QScriptValue _q_function = __qtscript_self.property("customEvent");
50
 
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
51
 
        || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) {
52
 
        QUndoStack::customEvent(arg__1);
53
 
    } else {
54
 
        QScriptEngine *_q_engine = __qtscript_self.engine();
55
 
        _q_function.call(__qtscript_self,
56
 
            QScriptValueList()
57
 
            << qScriptValueFromValue(_q_engine, arg__1));
58
 
    }
59
 
}
60
 
 
61
 
bool  QtScriptShell_QUndoStack::event(QEvent*  arg__1)
62
 
{
63
 
    QScriptValue _q_function = __qtscript_self.property("event");
64
 
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
65
 
        || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) {
66
 
        return QUndoStack::event(arg__1);
67
 
    } else {
68
 
        QScriptEngine *_q_engine = __qtscript_self.engine();
69
 
        return qscriptvalue_cast<bool >(_q_function.call(__qtscript_self,
70
 
            QScriptValueList()
71
 
            << qScriptValueFromValue(_q_engine, arg__1)));
72
 
    }
73
 
}
74
 
 
75
 
bool  QtScriptShell_QUndoStack::eventFilter(QObject*  arg__1, QEvent*  arg__2)
76
 
{
77
 
    QScriptValue _q_function = __qtscript_self.property("eventFilter");
78
 
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
79
 
        || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) {
80
 
        return QUndoStack::eventFilter(arg__1, arg__2);
81
 
    } else {
82
 
        QScriptEngine *_q_engine = __qtscript_self.engine();
83
 
        return qscriptvalue_cast<bool >(_q_function.call(__qtscript_self,
84
 
            QScriptValueList()
85
 
            << qScriptValueFromValue(_q_engine, arg__1)
86
 
            << qScriptValueFromValue(_q_engine, arg__2)));
87
 
    }
88
 
}
89
 
 
90
 
void QtScriptShell_QUndoStack::timerEvent(QTimerEvent*  arg__1)
91
 
{
92
 
    QScriptValue _q_function = __qtscript_self.property("timerEvent");
93
 
    if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function)
94
 
        || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) {
95
 
        QUndoStack::timerEvent(arg__1);
96
 
    } else {
97
 
        QScriptEngine *_q_engine = __qtscript_self.engine();
98
 
        _q_function.call(__qtscript_self,
99
 
            QScriptValueList()
100
 
            << qScriptValueFromValue(_q_engine, arg__1));
101
 
    }
102
 
}
103