@@ -0,0 +1,23 | |||
|
1 | <?xml version='1.0' encoding='utf-8'?> | |
|
2 | <soc name="Leon"> | |
|
3 | <peripheral vid="32" name="SRCTRLS-0WS" pid="1"> | |
|
4 | <register name="EDAC Control" addOffset="0"> | |
|
5 | <bitField size="4" offset="0" name="BTOS" mode="3" desc="write or read busy to scrub delay configuration"/> | |
|
6 | <bitField size="4" offset="4" name="SCRUBRATE" mode="3" desc="write or read scrub rate period configuration"/> | |
|
7 | <bitField name="RUN" offset="8" size="1" mode="3" desc="when set run the memory configuration"/> | |
|
8 | <bitField name="BPBUSYN" offset="9" size="1" mode="3" desc="make controller to ignore busy signal"/> | |
|
9 | <bitField name="WENSRAM" offset="12" size="8" mode="3" desc="when set write configuration to chip 8 to 1, else read configuration"/> | |
|
10 | <bitField name="BYPASSEDAC" offset="20" size="8" mode="3" desc="bypass edac (for chips 8 to 1)"/> | |
|
11 | <bitField name="WASHMEM" offset="31" size="1" mode="3" desc="Frame error (FE) - indicates that a framing error was detected. Reset value: β0β"/> | |
|
12 | </register> | |
|
13 | </peripheral> | |
|
14 | </soc> | |
|
15 | ||
|
16 | ||
|
17 | ||
|
18 | ||
|
19 | ||
|
20 | ||
|
21 | ||
|
22 | ||
|
23 |
@@ -0,0 +1,71 | |||
|
1 | <?xml version='1.0' encoding='utf-8'?> | |
|
2 | <soc name="Leon"> | |
|
3 | <peripheral vid="25" name="LPP_APB_DAC" pid="7"> | |
|
4 | <register name="DAC Control" addOffset="0"> | |
|
5 | <bitField size="2" offset="0" name="Dac config" mode="3" desc="Set the two configuration bits of the DAC β00β mean normal operation, β01β mean 1kOhms connected to GND, β10β mean 100kOhms connected to GND, β11β mean high impedance"/> | |
|
6 | <bitField size="1" offset="4" name="Reload" mode="3" desc="Reload freq divider to the value N, can be used also to stop dac"/> | |
|
7 | <bitField name="Interleavde" offset="5" size="1" mode="3" desc="Set interleaved mode"/> | |
|
8 | </register> | |
|
9 | <register name="Prescaller" addOffset="4"> | |
|
10 | <bitField size="32" offset="0" name="Pre" mode="3" desc="Set the prescaller division"/> | |
|
11 | </register> | |
|
12 | <register name="Div" addOffset="8"> | |
|
13 | <bitField size="32" offset="0" name="N" mode="3" desc="Set the division factor"/> | |
|
14 | </register> | |
|
15 | <register name="Address" addOffset="12"> | |
|
16 | <bitField size="32" offset="0" name="Address" mode="3" desc="Set the DAC RAM buffer address pointer"/> | |
|
17 | </register> | |
|
18 | <register name="DATA" addOffset="16"> | |
|
19 | <bitField size="32" offset="0" name="DATA" mode="3" desc="DATA to be written in the DAC RAM buffer"/> | |
|
20 | </register> | |
|
21 | </peripheral> | |
|
22 | <peripheral vid="25" name="LPP_LFR_MANAGEMENT" pid="34"> | |
|
23 | <register name="CONTROL" addOffset="0"> | |
|
24 | <bitField size="1" offset="0" name="ctrl" mode="3" desc="NC"/> | |
|
25 | <bitField size="1" offset="1" name="Soft Reset" mode="3" desc="NC "/> | |
|
26 | <bitField name="LFR Soft Reset" offset="5" size="1" mode="3" desc="NC"/> | |
|
27 | </register> | |
|
28 | <register name="COARSE TIME LOAD" addOffset="4"> | |
|
29 | <bitField size="31" offset="0" name="Coarse Time Load" mode="3" desc="NC"/> | |
|
30 | </register> | |
|
31 | <register name="COARSE TIME" addOffset="8"> | |
|
32 | <bitField size="31" offset="0" name="Coarse Time" mode="1" desc="NC"/> | |
|
33 | </register> | |
|
34 | <register name="TEMP0" addOffset="12"> | |
|
35 | <bitField size="16" offset="0" name="HK Temperature 0" mode="1" desc="NC"/> | |
|
36 | </register> | |
|
37 | <register name="TEMP1" addOffset="16"> | |
|
38 | <bitField size="16" offset="0" name="HK Temperature 1" mode="1" desc="NC"/> | |
|
39 | </register> | |
|
40 | <register name="TEMP2" addOffset="20"> | |
|
41 | <bitField size="16" offset="0" name="HK Temperature 2" mode="1" desc="NC"/> | |
|
42 | </register> | |
|
43 | <register name="DAC Control" addOffset="24"> | |
|
44 | <bitField size="2" offset="0" name="Dac config" mode="3" desc="Set the two configuration bits of the DAC β00β mean normal operation, β01β mean 1kOhms connected to GND, β10β mean 100kOhms connected to GND, β11β mean high impedance"/> | |
|
45 | <bitField size="1" offset="4" name="Reload" mode="3" desc="Reload freq divider to the value N, can be used also to stop dac"/> | |
|
46 | <bitField name="Interleavde" offset="5" size="1" mode="3" desc="Set interleaved mode"/> | |
|
47 | <bitField name="Enable" offset="6" size="1" mode="3" desc="Scm cal enable, drives the multiplexer"/> | |
|
48 | </register> | |
|
49 | <register name="Prescaller" addOffset="28"> | |
|
50 | <bitField size="32" offset="0" name="Pre" mode="3" desc="Set the prescaller division"/> | |
|
51 | </register> | |
|
52 | <register name="Div" addOffset="32"> | |
|
53 | <bitField size="32" offset="0" name="N" mode="3" desc="Set the division factor"/> | |
|
54 | </register> | |
|
55 | <register name="Address" addOffset="36"> | |
|
56 | <bitField size="32" offset="0" name="Address" mode="3" desc="Set the DAC RAM buffer address pointer"/> | |
|
57 | </register> | |
|
58 | <register name="DATA" addOffset="40"> | |
|
59 | <bitField size="32" offset="0" name="DATA" mode="3" desc="DATA to be written in the DAC RAM buffer"/> | |
|
60 | </register> | |
|
61 | </peripheral> | |
|
62 | </soc> | |
|
63 | ||
|
64 | ||
|
65 | ||
|
66 | ||
|
67 | ||
|
68 | ||
|
69 | ||
|
70 | ||
|
71 |
@@ -0,0 +1,75 | |||
|
1 | #include "memtester.h" | |
|
2 | #include <socexplorerengine.h> | |
|
3 | #include <socexplorerproxy.h> | |
|
4 | ||
|
5 | MemTester::MemTester(QObject* parent) | |
|
6 | :QObject(parent) | |
|
7 | { | |
|
8 | ||
|
9 | } | |
|
10 | ||
|
11 | MemTester::~MemTester() | |
|
12 | { | |
|
13 | ||
|
14 | } | |
|
15 | ||
|
16 | ||
|
17 | unsigned int p_pow2(unsigned int v) | |
|
18 | { | |
|
19 | static const char LogTable256[256] = | |
|
20 | { | |
|
21 | #define LT(n) n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n | |
|
22 | -1, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, | |
|
23 | LT(4), LT(5), LT(5), LT(6), LT(6), LT(6), LT(6), | |
|
24 | LT(7), LT(7), LT(7), LT(7), LT(7), LT(7), LT(7), LT(7) | |
|
25 | }; | |
|
26 | ||
|
27 | unsigned int r; // r will be lg(v) | |
|
28 | register unsigned int t, tt; // temporaries | |
|
29 | ||
|
30 | if (tt = v >> 16) | |
|
31 | { | |
|
32 | r = (t = tt >> 8) ? 24 + LogTable256[t] : 16 + LogTable256[tt]; | |
|
33 | } | |
|
34 | else | |
|
35 | { | |
|
36 | r = (t = v >> 8) ? 8 + LogTable256[t] : LogTable256[v]; | |
|
37 | } | |
|
38 | return r; | |
|
39 | } | |
|
40 | ||
|
41 | unsigned int MemTester::measureMemSize(socexplorerplugin *plugin, unsigned int address, unsigned int maxSize) | |
|
42 | { | |
|
43 | unsigned int curVal=1,testAddress=address; | |
|
44 | unsigned int size=0; | |
|
45 | if(Q_UNLIKELY(!plugin || !plugin->isConnected()))return 0; | |
|
46 | plugin->Write(&curVal,1,testAddress); | |
|
47 | plugin->Read(&curVal,1,testAddress); | |
|
48 | if(Q_UNLIKELY(curVal!=1)) | |
|
49 | return size; | |
|
50 | unsigned int max= p_pow2((0xFFFFFFFFFFFFFFFF - address))+1; | |
|
51 | register unsigned int maxSizeLg=p_pow2(maxSize)-1; | |
|
52 | if(max>maxSizeLg) | |
|
53 | max=maxSizeLg; | |
|
54 | if(max>32)max=32; | |
|
55 | for(size=2;size<max;size++) //check each address bit | |
|
56 | { | |
|
57 | testAddress = (unsigned int)(address+(1<<size)); | |
|
58 | curVal = (unsigned int)(1<<size); | |
|
59 | plugin->Write(&curVal,1,testAddress); | |
|
60 | plugin->Read(&curVal,1,testAddress); | |
|
61 | if((unsigned int)curVal!=(unsigned int)(1<<size)) | |
|
62 | return (1<<(size)); | |
|
63 | plugin->Read(&curVal,1,address); | |
|
64 | if((curVal==(unsigned int)(1<<size)) && (size!=0)) | |
|
65 | return (1<<(size)); | |
|
66 | } | |
|
67 | return (1<<(size+1)); | |
|
68 | } | |
|
69 | ||
|
70 | unsigned int MemTester::measureMemSize(const QString &plugin, unsigned int address, unsigned int maxSize) | |
|
71 | { | |
|
72 | return measureMemSize(socexplorerproxy::findPlugin(plugin),address,maxSize); | |
|
73 | } | |
|
74 | ||
|
75 |
@@ -0,0 +1,19 | |||
|
1 | #ifndef MEMTESTER_H | |
|
2 | #define MEMTESTER_H | |
|
3 | #include <socexplorerplugin.h> | |
|
4 | #include <QObject> | |
|
5 | ||
|
6 | class MemTester : public QObject | |
|
7 | { | |
|
8 | Q_OBJECT | |
|
9 | public: | |
|
10 | MemTester(QObject *parent=0); | |
|
11 | ~MemTester(); | |
|
12 | ||
|
13 | static unsigned int measureMemSize(socexplorerplugin* plugin, unsigned int address,unsigned int maxSize=0xFFFFFFFF); | |
|
14 | static unsigned int measureMemSize(const QString& plugin, unsigned int address,unsigned int maxSize=0xFFFFFFFF); | |
|
15 | public slots: | |
|
16 | ||
|
17 | }; | |
|
18 | ||
|
19 | #endif // MEMTESTER_H |
@@ -0,0 +1,325 | |||
|
1 | %global upstream_name socexplorer-0.4 | |
|
2 | ||
|
3 | Name: socexplorer | |
|
4 | Version: 0.4 | |
|
5 | Release: 6%{?dist} | |
|
6 | Summary: SocExplorer is an open source generic System On Chip testing software/framework. | |
|
7 | Group: Development/Tools | |
|
8 | License: GPLv2+ | |
|
9 | URL: https://hephaistos.lpp.polytechnique.fr/redmine/projects/socexplorer | |
|
10 | Source0: https://hephaistos.lpp.polytechnique.fr/redmine/attachments/download/376/socexplorer-0.4.zip | |
|
11 | # | |
|
12 | #Patch0: socexplorer_desktop.patch | |
|
13 | ||
|
14 | ||
|
15 | BuildRequires: python2-devel | |
|
16 | BuildRequires: qt5-qtbase-devel | |
|
17 | BuildRequires: qt5-qtwebkit-devel | |
|
18 | BuildRequires: qt5-qttools-static | |
|
19 | BuildRequires: qt5-qttools-devel | |
|
20 | BuildRequires: qt5-qtsvg-devel | |
|
21 | BuildRequires: qt5-qtxmlpatterns-devel | |
|
22 | BuildRequires: qt5-qtmultimedia-devel | |
|
23 | BuildRequires: elfutils-libelf-devel | |
|
24 | BuildRequires: qt5-pythonqt-devel | |
|
25 | BuildRequires: mercurial | |
|
26 | BuildRequires: appdata-tools | |
|
27 | BuildRequires: desktop-file-utils | |
|
28 | ||
|
29 | Requires(post): python2 | |
|
30 | Requires(post): qt5-qtbase | |
|
31 | Requires(post): qt5-qtwebkit | |
|
32 | Requires(post): qt5-qtsvg | |
|
33 | Requires(post): qt5-qtxmlpatterns | |
|
34 | Requires(post): elfutils-libelf | |
|
35 | Requires(post): qt5-pythonqt | |
|
36 | ||
|
37 | Provides: socexplorer = 0.4-6 | |
|
38 | Obsoletes: socexplorer < 0.4-5 | |
|
39 | ||
|
40 | %description | |
|
41 | SocExplorer is an open source generic System On Chip testing software/framework. We write this software for the development and the validation of our instrument, the Low Frequency Receiver(LFR) for the Solar Orbiter mission. This instrument is based on an actel FPGA hosting a LEON3FT processor and some peripherals. To make it more collaborative, we use a plugin based system, the main executable is SocExplorer then all the functionality are provided by plugins. Like this everybody can provide his set of plugins to handle a new SOC or just a new peripheral. SocExplorer uses PythonQt to allow user to automate some tasks such as loading some plugins, configuring them and talking with his device. | |
|
42 | ||
|
43 | %package devel | |
|
44 | Summary: SocExplorer is an open source generic System On Chip testing software/framework. | |
|
45 | Group: Development/Tools | |
|
46 | Requires: %{name}%{?_isa} = %{version}-%{release} | |
|
47 | ||
|
48 | %description devel | |
|
49 | Header files and development libraries for SocExplorer package. SocExplorer is an open source generic System On Chip testing software/framework. | |
|
50 | ||
|
51 | %prep | |
|
52 | %setup -q -n %{upstream_name} | |
|
53 | #%patch0 -p1 -b .desktop | |
|
54 | ||
|
55 | ||
|
56 | ||
|
57 | %build | |
|
58 | %{_qt5_qmake} | |
|
59 | ||
|
60 | make %{?_smp_mflags} | |
|
61 | ||
|
62 | %install | |
|
63 | make install INSTALL_ROOT=%{buildroot} | |
|
64 | appdata-validate --nonet %{buildroot}/%{_datadir}/appdata/socexplorer.appdata.xml | |
|
65 | desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/socexplorer.desktop | |
|
66 | ||
|
67 | %post -p /sbin/ldconfig | |
|
68 | ||
|
69 | %postun -p /sbin/ldconfig | |
|
70 | ||
|
71 | %files | |
|
72 | /etc/SocExplorer/python/PygmentsHighlighter.py | |
|
73 | /etc/SocExplorer/python/PygmentsHighlighter.pyc | |
|
74 | /etc/SocExplorer/python/PygmentsHighlighter.pyo | |
|
75 | /etc/SocExplorer/python/PythonCompleter.py | |
|
76 | /etc/SocExplorer/python/PythonCompleter.pyc | |
|
77 | /etc/SocExplorer/python/PythonCompleter.pyo | |
|
78 | /etc/SocExplorer/python/module_completion.py | |
|
79 | /etc/SocExplorer/python/module_completion.pyc | |
|
80 | /etc/SocExplorer/python/module_completion.pyo | |
|
81 | /etc/SocExplorer/python/pygments/__init__.py | |
|
82 | /etc/SocExplorer/python/pygments/__init__.pyc | |
|
83 | /etc/SocExplorer/python/pygments/__init__.pyo | |
|
84 | /etc/SocExplorer/python/pygments/cmdline.py | |
|
85 | /etc/SocExplorer/python/pygments/cmdline.pyc | |
|
86 | /etc/SocExplorer/python/pygments/cmdline.pyo | |
|
87 | /etc/SocExplorer/python/pygments/console.py | |
|
88 | /etc/SocExplorer/python/pygments/console.pyc | |
|
89 | /etc/SocExplorer/python/pygments/console.pyo | |
|
90 | /etc/SocExplorer/python/pygments/filter.py | |
|
91 | /etc/SocExplorer/python/pygments/filter.pyc | |
|
92 | /etc/SocExplorer/python/pygments/filter.pyo | |
|
93 | /etc/SocExplorer/python/pygments/filters/__init__.py | |
|
94 | /etc/SocExplorer/python/pygments/filters/__init__.pyc | |
|
95 | /etc/SocExplorer/python/pygments/filters/__init__.pyo | |
|
96 | /etc/SocExplorer/python/pygments/formatter.py | |
|
97 | /etc/SocExplorer/python/pygments/formatter.pyc | |
|
98 | /etc/SocExplorer/python/pygments/formatter.pyo | |
|
99 | /etc/SocExplorer/python/pygments/formatters/__init__.py | |
|
100 | /etc/SocExplorer/python/pygments/formatters/__init__.pyc | |
|
101 | /etc/SocExplorer/python/pygments/formatters/__init__.pyo | |
|
102 | /etc/SocExplorer/python/pygments/formatters/_mapping.py | |
|
103 | /etc/SocExplorer/python/pygments/formatters/_mapping.pyc | |
|
104 | /etc/SocExplorer/python/pygments/formatters/_mapping.pyo | |
|
105 | /etc/SocExplorer/python/pygments/formatters/bbcode.py | |
|
106 | /etc/SocExplorer/python/pygments/formatters/bbcode.pyc | |
|
107 | /etc/SocExplorer/python/pygments/formatters/bbcode.pyo | |
|
108 | /etc/SocExplorer/python/pygments/formatters/html.py | |
|
109 | /etc/SocExplorer/python/pygments/formatters/html.pyc | |
|
110 | /etc/SocExplorer/python/pygments/formatters/html.pyo | |
|
111 | /etc/SocExplorer/python/pygments/formatters/img.py | |
|
112 | /etc/SocExplorer/python/pygments/formatters/img.pyc | |
|
113 | /etc/SocExplorer/python/pygments/formatters/img.pyo | |
|
114 | /etc/SocExplorer/python/pygments/formatters/latex.py | |
|
115 | /etc/SocExplorer/python/pygments/formatters/latex.pyc | |
|
116 | /etc/SocExplorer/python/pygments/formatters/latex.pyo | |
|
117 | /etc/SocExplorer/python/pygments/formatters/other.py | |
|
118 | /etc/SocExplorer/python/pygments/formatters/other.pyc | |
|
119 | /etc/SocExplorer/python/pygments/formatters/other.pyo | |
|
120 | /etc/SocExplorer/python/pygments/formatters/rtf.py | |
|
121 | /etc/SocExplorer/python/pygments/formatters/rtf.pyc | |
|
122 | /etc/SocExplorer/python/pygments/formatters/rtf.pyo | |
|
123 | /etc/SocExplorer/python/pygments/formatters/svg.py | |
|
124 | /etc/SocExplorer/python/pygments/formatters/svg.pyc | |
|
125 | /etc/SocExplorer/python/pygments/formatters/svg.pyo | |
|
126 | /etc/SocExplorer/python/pygments/formatters/terminal.py | |
|
127 | /etc/SocExplorer/python/pygments/formatters/terminal.pyc | |
|
128 | /etc/SocExplorer/python/pygments/formatters/terminal.pyo | |
|
129 | /etc/SocExplorer/python/pygments/formatters/terminal256.py | |
|
130 | /etc/SocExplorer/python/pygments/formatters/terminal256.pyc | |
|
131 | /etc/SocExplorer/python/pygments/formatters/terminal256.pyo | |
|
132 | /etc/SocExplorer/python/pygments/lexer.py | |
|
133 | /etc/SocExplorer/python/pygments/lexer.pyc | |
|
134 | /etc/SocExplorer/python/pygments/lexer.pyo | |
|
135 | /etc/SocExplorer/python/pygments/lexers/__init__.py | |
|
136 | /etc/SocExplorer/python/pygments/lexers/__init__.pyc | |
|
137 | /etc/SocExplorer/python/pygments/lexers/__init__.pyo | |
|
138 | /etc/SocExplorer/python/pygments/lexers/_asybuiltins.py | |
|
139 | /etc/SocExplorer/python/pygments/lexers/_asybuiltins.pyc | |
|
140 | /etc/SocExplorer/python/pygments/lexers/_asybuiltins.pyo | |
|
141 | /etc/SocExplorer/python/pygments/lexers/_clbuiltins.py | |
|
142 | /etc/SocExplorer/python/pygments/lexers/_clbuiltins.pyc | |
|
143 | /etc/SocExplorer/python/pygments/lexers/_clbuiltins.pyo | |
|
144 | /etc/SocExplorer/python/pygments/lexers/_luabuiltins.py | |
|
145 | /etc/SocExplorer/python/pygments/lexers/_luabuiltins.pyc | |
|
146 | /etc/SocExplorer/python/pygments/lexers/_luabuiltins.pyo | |
|
147 | /etc/SocExplorer/python/pygments/lexers/_mapping.py | |
|
148 | /etc/SocExplorer/python/pygments/lexers/_mapping.pyc | |
|
149 | /etc/SocExplorer/python/pygments/lexers/_mapping.pyo | |
|
150 | /etc/SocExplorer/python/pygments/lexers/_phpbuiltins.py | |
|
151 | /etc/SocExplorer/python/pygments/lexers/_phpbuiltins.pyc | |
|
152 | /etc/SocExplorer/python/pygments/lexers/_phpbuiltins.pyo | |
|
153 | /etc/SocExplorer/python/pygments/lexers/_postgres_builtins.py | |
|
154 | /etc/SocExplorer/python/pygments/lexers/_postgres_builtins.pyc | |
|
155 | /etc/SocExplorer/python/pygments/lexers/_postgres_builtins.pyo | |
|
156 | /etc/SocExplorer/python/pygments/lexers/_scilab_builtins.py | |
|
157 | /etc/SocExplorer/python/pygments/lexers/_scilab_builtins.pyc | |
|
158 | /etc/SocExplorer/python/pygments/lexers/_scilab_builtins.pyo | |
|
159 | /etc/SocExplorer/python/pygments/lexers/_vimbuiltins.py | |
|
160 | /etc/SocExplorer/python/pygments/lexers/_vimbuiltins.pyc | |
|
161 | /etc/SocExplorer/python/pygments/lexers/_vimbuiltins.pyo | |
|
162 | /etc/SocExplorer/python/pygments/lexers/agile.py | |
|
163 | /etc/SocExplorer/python/pygments/lexers/agile.pyc | |
|
164 | /etc/SocExplorer/python/pygments/lexers/agile.pyo | |
|
165 | /etc/SocExplorer/python/pygments/lexers/asm.py | |
|
166 | /etc/SocExplorer/python/pygments/lexers/asm.pyc | |
|
167 | /etc/SocExplorer/python/pygments/lexers/asm.pyo | |
|
168 | /etc/SocExplorer/python/pygments/lexers/compiled.py | |
|
169 | /etc/SocExplorer/python/pygments/lexers/compiled.pyc | |
|
170 | /etc/SocExplorer/python/pygments/lexers/compiled.pyo | |
|
171 | /etc/SocExplorer/python/pygments/lexers/dotnet.py | |
|
172 | /etc/SocExplorer/python/pygments/lexers/dotnet.pyc | |
|
173 | /etc/SocExplorer/python/pygments/lexers/dotnet.pyo | |
|
174 | /etc/SocExplorer/python/pygments/lexers/functional.py | |
|
175 | /etc/SocExplorer/python/pygments/lexers/functional.pyc | |
|
176 | /etc/SocExplorer/python/pygments/lexers/functional.pyo | |
|
177 | /etc/SocExplorer/python/pygments/lexers/hdl.py | |
|
178 | /etc/SocExplorer/python/pygments/lexers/hdl.pyc | |
|
179 | /etc/SocExplorer/python/pygments/lexers/hdl.pyo | |
|
180 | /etc/SocExplorer/python/pygments/lexers/jvm.py | |
|
181 | /etc/SocExplorer/python/pygments/lexers/jvm.pyc | |
|
182 | /etc/SocExplorer/python/pygments/lexers/jvm.pyo | |
|
183 | /etc/SocExplorer/python/pygments/lexers/math.py | |
|
184 | /etc/SocExplorer/python/pygments/lexers/math.pyc | |
|
185 | /etc/SocExplorer/python/pygments/lexers/math.pyo | |
|
186 | /etc/SocExplorer/python/pygments/lexers/other.py | |
|
187 | /etc/SocExplorer/python/pygments/lexers/other.pyc | |
|
188 | /etc/SocExplorer/python/pygments/lexers/other.pyo | |
|
189 | /etc/SocExplorer/python/pygments/lexers/parsers.py | |
|
190 | /etc/SocExplorer/python/pygments/lexers/parsers.pyc | |
|
191 | /etc/SocExplorer/python/pygments/lexers/parsers.pyo | |
|
192 | /etc/SocExplorer/python/pygments/lexers/shell.py | |
|
193 | /etc/SocExplorer/python/pygments/lexers/shell.pyc | |
|
194 | /etc/SocExplorer/python/pygments/lexers/shell.pyo | |
|
195 | /etc/SocExplorer/python/pygments/lexers/special.py | |
|
196 | /etc/SocExplorer/python/pygments/lexers/special.pyc | |
|
197 | /etc/SocExplorer/python/pygments/lexers/special.pyo | |
|
198 | /etc/SocExplorer/python/pygments/lexers/sql.py | |
|
199 | /etc/SocExplorer/python/pygments/lexers/sql.pyc | |
|
200 | /etc/SocExplorer/python/pygments/lexers/sql.pyo | |
|
201 | /etc/SocExplorer/python/pygments/lexers/templates.py | |
|
202 | /etc/SocExplorer/python/pygments/lexers/templates.pyc | |
|
203 | /etc/SocExplorer/python/pygments/lexers/templates.pyo | |
|
204 | /etc/SocExplorer/python/pygments/lexers/text.py | |
|
205 | /etc/SocExplorer/python/pygments/lexers/text.pyc | |
|
206 | /etc/SocExplorer/python/pygments/lexers/text.pyo | |
|
207 | /etc/SocExplorer/python/pygments/lexers/web.py | |
|
208 | /etc/SocExplorer/python/pygments/lexers/web.pyc | |
|
209 | /etc/SocExplorer/python/pygments/lexers/web.pyo | |
|
210 | /etc/SocExplorer/python/pygments/plugin.py | |
|
211 | /etc/SocExplorer/python/pygments/plugin.pyc | |
|
212 | /etc/SocExplorer/python/pygments/plugin.pyo | |
|
213 | /etc/SocExplorer/python/pygments/scanner.py | |
|
214 | /etc/SocExplorer/python/pygments/scanner.pyc | |
|
215 | /etc/SocExplorer/python/pygments/scanner.pyo | |
|
216 | /etc/SocExplorer/python/pygments/style.py | |
|
217 | /etc/SocExplorer/python/pygments/style.pyc | |
|
218 | /etc/SocExplorer/python/pygments/style.pyo | |
|
219 | /etc/SocExplorer/python/pygments/styles/__init__.py | |
|
220 | /etc/SocExplorer/python/pygments/styles/__init__.pyc | |
|
221 | /etc/SocExplorer/python/pygments/styles/__init__.pyo | |
|
222 | /etc/SocExplorer/python/pygments/styles/autumn.py | |
|
223 | /etc/SocExplorer/python/pygments/styles/autumn.pyc | |
|
224 | /etc/SocExplorer/python/pygments/styles/autumn.pyo | |
|
225 | /etc/SocExplorer/python/pygments/styles/borland.py | |
|
226 | /etc/SocExplorer/python/pygments/styles/borland.pyc | |
|
227 | /etc/SocExplorer/python/pygments/styles/borland.pyo | |
|
228 | /etc/SocExplorer/python/pygments/styles/bw.py | |
|
229 | /etc/SocExplorer/python/pygments/styles/bw.pyc | |
|
230 | /etc/SocExplorer/python/pygments/styles/bw.pyo | |
|
231 | /etc/SocExplorer/python/pygments/styles/colorful.py | |
|
232 | /etc/SocExplorer/python/pygments/styles/colorful.pyc | |
|
233 | /etc/SocExplorer/python/pygments/styles/colorful.pyo | |
|
234 | /etc/SocExplorer/python/pygments/styles/default.py | |
|
235 | /etc/SocExplorer/python/pygments/styles/default.pyc | |
|
236 | /etc/SocExplorer/python/pygments/styles/default.pyo | |
|
237 | /etc/SocExplorer/python/pygments/styles/emacs.py | |
|
238 | /etc/SocExplorer/python/pygments/styles/emacs.pyc | |
|
239 | /etc/SocExplorer/python/pygments/styles/emacs.pyo | |
|
240 | /etc/SocExplorer/python/pygments/styles/friendly.py | |
|
241 | /etc/SocExplorer/python/pygments/styles/friendly.pyc | |
|
242 | /etc/SocExplorer/python/pygments/styles/friendly.pyo | |
|
243 | /etc/SocExplorer/python/pygments/styles/fruity.py | |
|
244 | /etc/SocExplorer/python/pygments/styles/fruity.pyc | |
|
245 | /etc/SocExplorer/python/pygments/styles/fruity.pyo | |
|
246 | /etc/SocExplorer/python/pygments/styles/manni.py | |
|
247 | /etc/SocExplorer/python/pygments/styles/manni.pyc | |
|
248 | /etc/SocExplorer/python/pygments/styles/manni.pyo | |
|
249 | /etc/SocExplorer/python/pygments/styles/monokai.py | |
|
250 | /etc/SocExplorer/python/pygments/styles/monokai.pyc | |
|
251 | /etc/SocExplorer/python/pygments/styles/monokai.pyo | |
|
252 | /etc/SocExplorer/python/pygments/styles/murphy.py | |
|
253 | /etc/SocExplorer/python/pygments/styles/murphy.pyc | |
|
254 | /etc/SocExplorer/python/pygments/styles/murphy.pyo | |
|
255 | /etc/SocExplorer/python/pygments/styles/native.py | |
|
256 | /etc/SocExplorer/python/pygments/styles/native.pyc | |
|
257 | /etc/SocExplorer/python/pygments/styles/native.pyo | |
|
258 | /etc/SocExplorer/python/pygments/styles/pastie.py | |
|
259 | /etc/SocExplorer/python/pygments/styles/pastie.pyc | |
|
260 | /etc/SocExplorer/python/pygments/styles/pastie.pyo | |
|
261 | /etc/SocExplorer/python/pygments/styles/perldoc.py | |
|
262 | /etc/SocExplorer/python/pygments/styles/perldoc.pyc | |
|
263 | /etc/SocExplorer/python/pygments/styles/perldoc.pyo | |
|
264 | /etc/SocExplorer/python/pygments/styles/rrt.py | |
|
265 | /etc/SocExplorer/python/pygments/styles/rrt.pyc | |
|
266 | /etc/SocExplorer/python/pygments/styles/rrt.pyo | |
|
267 | /etc/SocExplorer/python/pygments/styles/tango.py | |
|
268 | /etc/SocExplorer/python/pygments/styles/tango.pyc | |
|
269 | /etc/SocExplorer/python/pygments/styles/tango.pyo | |
|
270 | /etc/SocExplorer/python/pygments/styles/trac.py | |
|
271 | /etc/SocExplorer/python/pygments/styles/trac.pyc | |
|
272 | /etc/SocExplorer/python/pygments/styles/trac.pyo | |
|
273 | /etc/SocExplorer/python/pygments/styles/vim.py | |
|
274 | /etc/SocExplorer/python/pygments/styles/vim.pyc | |
|
275 | /etc/SocExplorer/python/pygments/styles/vim.pyo | |
|
276 | /etc/SocExplorer/python/pygments/styles/vs.py | |
|
277 | /etc/SocExplorer/python/pygments/styles/vs.pyc | |
|
278 | /etc/SocExplorer/python/pygments/styles/vs.pyo | |
|
279 | /etc/SocExplorer/python/pygments/token.py | |
|
280 | /etc/SocExplorer/python/pygments/token.pyc | |
|
281 | /etc/SocExplorer/python/pygments/token.pyo | |
|
282 | /etc/SocExplorer/python/pygments/unistring.py | |
|
283 | /etc/SocExplorer/python/pygments/unistring.pyc | |
|
284 | /etc/SocExplorer/python/pygments/unistring.pyo | |
|
285 | /etc/SocExplorer/python/pygments/util.py | |
|
286 | /etc/SocExplorer/python/pygments/util.pyc | |
|
287 | /etc/SocExplorer/python/pygments/util.pyo | |
|
288 | /etc/SocExplorer/plugin.conf.d/plugins.conf | |
|
289 | %{_bindir}/SocExplorer_TCP_Terminal | |
|
290 | %{_bindir}/socexplorer | |
|
291 | %{_datadir}/SocExplorer/icon.png | |
|
292 | %{_datadir}/SocExplorer/Grlib.xml | |
|
293 | %{_datadir}/SocExplorer/LPP.xml | |
|
294 | %{_datadir}/SocExplorer/IAP.xml | |
|
295 | %{_datadir}/applications/socexplorer.desktop | |
|
296 | %{_datadir}/appdata/socexplorer.appdata.xml | |
|
297 | %{_qt5_libdir}/libsocexplorercommon.so* | |
|
298 | %{_qt5_libdir}/libsocexplorerengine.so* | |
|
299 | ||
|
300 | ||
|
301 | %files devel | |
|
302 | %{_qt5_headerdir}/SocExplorer/ | |
|
303 | %{_qt5_archdatadir}/mkspecs/features/socexplorerplugin.prf | |
|
304 | /usr/share/qtcreator/templates/wizards/SocExplorerPlugin/plugin.cpp | |
|
305 | /usr/share/qtcreator/templates/wizards/SocExplorerPlugin/plugin.h | |
|
306 | /usr/share/qtcreator/templates/wizards/SocExplorerPlugin/project.pro | |
|
307 | /usr/share/qtcreator/templates/wizards/SocExplorerPlugin/wizard.xml | |
|
308 | ||
|
309 | ||
|
310 | %changelog | |
|
311 | * Fri Feb 6 2015 Alexis Jeandet <alexis.jeandet@member.fsf.org> - 0.4 | |
|
312 | - Reseted patches uses r73 as source. | |
|
313 | * Tue Dec 30 2014 Alexis Jeandet <alexis.jeandet@member.fsf.org> - 0.4 | |
|
314 | - Reseted patches uses r72 as source. | |
|
315 | ||
|
316 | * Sun Jun 29 2014 Alexis Jeandet <alexis.jeandet@member.fsf.org> - 0.4 | |
|
317 | - Reseted patches uses r69 as source. | |
|
318 | ||
|
319 | * Sat Jun 28 2014 Alexis Jeandet <alexis.jeandet@member.fsf.org> - 0.4 | |
|
320 | - Applied patch r65 to install also plugin as RPM | |
|
321 | - Applied patch r66 to install xml soc descriptions in /usr/share/SocExplorer | |
|
322 | - Applied patch r67 to add appdata for gnome-software visibility | |
|
323 | ||
|
324 | * Tue Jun 24 2014 Alexis Jeandet <alexis.jeandet@member.fsf.org> - 0.4 | |
|
325 | - Initial Fedora packaging |
@@ -1,91 +1,94 | |||
|
1 | 1 | #------------------------------------------------- |
|
2 | 2 | # |
|
3 | 3 | # Project created by QtCreator 2011-09-19T22:52:10 |
|
4 | 4 | # |
|
5 | 5 | #------------------------------------------------- |
|
6 | 6 | |
|
7 | 7 | TEMPLATE = subdirs |
|
8 | 8 | CONFIG += ordered release |
|
9 | 9 | |
|
10 | 10 | SUBDIRS = \ |
|
11 | 11 | src/common \ |
|
12 | 12 | src/SocExplorerEngine \ |
|
13 | 13 | src \ |
|
14 | 14 | src/SocExplorer_TCP_Terminal |
|
15 | 15 | |
|
16 | 16 | |
|
17 | 17 | socexplorercfg.path = $$[QT_INSTALL_PREFIX]/mkspecs/features |
|
18 | 18 | socexplorercfg.files = \ |
|
19 | 19 | src/SocExplorerEngine/plugins/socexplorerplugin.prf |
|
20 | 20 | |
|
21 | 21 | |
|
22 | 22 | unix{ |
|
23 | 23 | SocExplorerLauncher.path = /usr/share/applications/ |
|
24 | 24 | SocExplorerLauncher.files = unixcfg/socexplorer.desktop |
|
25 | 25 | SocExplorerAppData.path = /usr/share/appdata/ |
|
26 | 26 | SocExplorerAppData.files = unixcfg/socexplorer.appdata.xml |
|
27 | 27 | PluginConfPath.path = /etc/SocExplorer/plugin.conf.d/ |
|
28 | 28 | PluginConfPath.files = unixcfg/plugins.conf |
|
29 | 29 | share.path = /usr/share/SocExplorer |
|
30 | 30 | share.files = ressources/images/icon.png \ |
|
31 | ressources/Grlib.xml | |
|
31 | ressources/Grlib.xml \ | |
|
32 | ressources/LPP.xml \ | |
|
33 | ressources/IAP.xml | |
|
34 | ||
|
32 | 35 | Wizard.path = /usr/share/qtcreator/templates/wizards/SocExplorerPlugin |
|
33 | 36 | Wizard.files = Qt_Creator_Wizard/SocExplorerPlugin/logo-lpp-cutted.png \ |
|
34 | 37 | Qt_Creator_Wizard/SocExplorerPlugin/plugin.cpp \ |
|
35 | 38 | Qt_Creator_Wizard/SocExplorerPlugin/plugin.h \ |
|
36 | 39 | Qt_Creator_Wizard/SocExplorerPlugin/project.pro \ |
|
37 | 40 | Qt_Creator_Wizard/SocExplorerPlugin/wizard.xml |
|
38 | 41 | INSTALLS+=Wizard SocExplorerLauncher share PluginConfPath SocExplorerAppData |
|
39 | 42 | } |
|
40 | 43 | INSTALLS+=socexplorercfg |
|
41 | 44 | |
|
42 | 45 | |
|
43 | 46 | |
|
44 | 47 | |
|
45 | 48 | |
|
46 | 49 | |
|
47 | 50 | |
|
48 | 51 | |
|
49 | 52 | |
|
50 | 53 | |
|
51 | 54 | |
|
52 | 55 | |
|
53 | 56 | |
|
54 | 57 | |
|
55 | 58 | |
|
56 | 59 | |
|
57 | 60 | |
|
58 | 61 | |
|
59 | 62 | |
|
60 | 63 | |
|
61 | 64 | |
|
62 | 65 | |
|
63 | 66 | |
|
64 | 67 | |
|
65 | 68 | |
|
66 | 69 | |
|
67 | 70 | |
|
68 | 71 | |
|
69 | 72 | |
|
70 | 73 | |
|
71 | 74 | |
|
72 | 75 | |
|
73 | 76 | |
|
74 | 77 | |
|
75 | 78 | |
|
76 | 79 | |
|
77 | 80 | |
|
78 | 81 | |
|
79 | 82 | |
|
80 | 83 | |
|
81 | 84 | |
|
82 | 85 | |
|
83 | 86 | |
|
84 | 87 | |
|
85 | 88 | |
|
86 | 89 | |
|
87 | 90 | |
|
88 | 91 | |
|
89 | 92 | |
|
90 | 93 | |
|
91 | 94 |
@@ -1,112 +1,118 | |||
|
1 | 1 | #include "pythonconsole.h" |
|
2 | 2 | #include <QPushButton> |
|
3 | 3 | #include <QFile> |
|
4 | 4 | #include <QTextStream> |
|
5 | 5 | #include <QCustomPlot/qcustomplot.h> |
|
6 | 6 | #include "../common/pythonQtOut/generated_cpp/PySocExplorer/PySocExplorer0.h" |
|
7 | 7 | |
|
8 | 8 | #include <PythonQt.h> |
|
9 | 9 | #include "pluginloader.h" |
|
10 | 10 | #include <socexplorer.h> |
|
11 | 11 | |
|
12 | 12 | void PythonQt_init_PySocExplorer(PyObject* module); |
|
13 | 13 | void PythonQt_init_PySocExplorerEngine(PyObject* module) ; |
|
14 | 14 | |
|
15 | 15 | PythonConsole::PythonConsole(socexplorerproxy *proxy, QWidget *parent) : |
|
16 | 16 | QWidget(parent) |
|
17 | 17 | { |
|
18 | 18 | //PythonQt::init(); |
|
19 | 19 | PythonQt::init(PythonQt::RedirectStdOut); |
|
20 | 20 | PythonQt_QtAll::init(); |
|
21 | 21 | this->proxy = proxy; |
|
22 | 22 | this->mainlayout = new QHBoxLayout; |
|
23 | 23 | this->mainContext = new PythonQtObjectPtr(PythonQt::self()->getMainModule()); |
|
24 | 24 | this->mainContext->addVariable(QString("PYMODULES"),QVariant(QString(PYMODULES))); |
|
25 | 25 | this->console = new PythonQtScriptingConsoleDandD(NULL, PythonQt::self()->getMainModule()); |
|
26 | 26 | this->mainlayout->addWidget(this->console); |
|
27 | 27 | this->setWindowTitle(tr("Python Scripting Console")); |
|
28 | 28 | this->bussdriver = 0; |
|
29 | 29 | this->setAcceptDrops(true); |
|
30 | 30 | this->setLayout(this->mainlayout); |
|
31 | 31 | connect(this->console,SIGNAL(pyConsoleRunFiles(QStringList)),this,SLOT(pyConsoleRunFiles(QStringList))); |
|
32 | 32 | this->mainContext->addObject("proxy", proxy); |
|
33 | 33 | PythonQt_init_PySocExplorer(0); |
|
34 | 34 | PythonQt_init_PySocExplorerEngine(0); |
|
35 | 35 | this->mainContext->evalScript(QString("from PythonQt import *")); |
|
36 | 36 | } |
|
37 | 37 | |
|
38 | 38 | void PythonConsole::addObject(const QString& name, QObject* object) |
|
39 | 39 | { |
|
40 |
|
|
|
40 | this->mainContext->addObject(name, object); | |
|
41 | 41 | } |
|
42 | 42 | |
|
43 | void PythonConsole::removeVariable(const QString& name) | |
|
44 | { | |
|
45 | this->mainContext->removeVariable(name); | |
|
46 | } | |
|
47 | ||
|
48 | ||
|
43 | 49 | void PythonConsole::setBussDriver(socexplorerplugin *driver) |
|
44 | 50 | { |
|
45 | 51 | this->bussdriver = driver; |
|
46 | 52 | this->mainContext->addObject("buss", this->bussdriver); |
|
47 | 53 | } |
|
48 | 54 | |
|
49 | 55 | void PythonConsole::registerObject(QObject* object,const QString& instanceName) |
|
50 | 56 | { |
|
51 | 57 | this->mainContext->addObject(instanceName,object); |
|
52 | 58 | } |
|
53 | 59 | |
|
54 | 60 | void PythonConsole::changeSysDriverInstName(const QString newinstanceName,const QString previnstanceName) |
|
55 | 61 | { |
|
56 | 62 | socexplorerplugin* obj= this->proxy->getSysDriver(previnstanceName); |
|
57 | 63 | if(obj==NULL)obj= this->proxy->getSysDriver(newinstanceName); |
|
58 | 64 | if(obj==NULL)return; |
|
59 | 65 | this->mainContext->addObject(newinstanceName,obj->getPyObjectWrapper()); |
|
60 | 66 | this->mainContext->removeVariable(previnstanceName); |
|
61 | 67 | } |
|
62 | 68 | |
|
63 | 69 | void PythonConsole::removeDriver(const QString& instanceName) |
|
64 | 70 | { |
|
65 | 71 | this->mainContext->removeVariable(instanceName); |
|
66 | 72 | } |
|
67 | 73 | |
|
68 | 74 | void PythonConsole::removeBussDriver() |
|
69 | 75 | { |
|
70 | 76 | this->bussdriver = 0; |
|
71 | 77 | this->mainContext->removeVariable("buss"); |
|
72 | 78 | emit this->rootDriverDelete(); |
|
73 | 79 | } |
|
74 | 80 | |
|
75 | 81 | |
|
76 | 82 | void PythonConsole::pyConsoleRunFiles(const QStringList & pathList) |
|
77 | 83 | { |
|
78 | 84 | for (int i = 0; i < pathList.size() && i < 32; ++i) |
|
79 | 85 | { |
|
80 | 86 | this->pyConsoleRunFile(pathList.at(i)); |
|
81 | 87 | } |
|
82 | 88 | } |
|
83 | 89 | |
|
84 | 90 | void PythonConsole::pyConsoleRunFile(const QString& fileName) |
|
85 | 91 | { |
|
86 | 92 | QString code; |
|
87 | 93 | QFile file; |
|
88 | 94 | QFileInfo fileinfo; |
|
89 | 95 | |
|
90 | 96 | code.clear(); |
|
91 | 97 | file.setFileName(fileName); |
|
92 | 98 | fileinfo.setFile(fileName); |
|
93 | 99 | if(!fileinfo.suffix().compare("py")) |
|
94 | 100 | { |
|
95 | 101 | QString CMD="execfile(\'"+fileName+"\')"; |
|
96 | 102 | this->console->executePythonCommand(CMD); |
|
97 | 103 | } |
|
98 | 104 | } |
|
99 | 105 | |
|
100 | 106 | |
|
101 | 107 | QSize PythonConsole::sizeHint() |
|
102 | 108 | { |
|
103 | 109 | return QSize(800,80); |
|
104 | 110 | } |
|
105 | 111 | |
|
106 | 112 | |
|
107 | 113 | |
|
108 | 114 | |
|
109 | 115 | |
|
110 | 116 | |
|
111 | 117 | |
|
112 | 118 |
@@ -1,72 +1,73 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the SocExplorer Software |
|
3 | 3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 2 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Alexis Jeandet |
|
20 | 20 | -- Mail : alexis.jeandet@lpp.polytechnique.fr |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | #ifndef PYTHONCONSOLE_H |
|
23 | 23 | #define PYTHONCONSOLE_H |
|
24 | 24 | |
|
25 | 25 | #include <QWidget> |
|
26 | 26 | #include <QDockWidget> |
|
27 | 27 | #include <QHBoxLayout> |
|
28 | 28 | #include <QtGui/QDragEnterEvent> |
|
29 | 29 | #include <QtGui/QDragLeaveEvent> |
|
30 | 30 | #include <QtGui/QDragMoveEvent> |
|
31 | 31 | #include <QtGui/QDropEvent> |
|
32 | 32 | #include <QtCore/QMimeData> |
|
33 | 33 | #include <QtCore/QUrl> |
|
34 | 34 | #include <QtCore/QList> |
|
35 | 35 | #include "PythonQt.h" |
|
36 | 36 | #include "PythonQt_QtAll.h" |
|
37 | 37 | #include <gui/PythonQtScriptingConsole.h> |
|
38 | 38 | #include "../plugins/socexplorerplugin.h" |
|
39 | 39 | #include "pythonqtscriptingconsoledandd.h" |
|
40 | 40 | #include <QMainWindow> |
|
41 | 41 | #include "../proxy/socexplorerproxy.h" |
|
42 | 42 | class SocExplorerMainWindow; |
|
43 | 43 | class PythonConsole : public QWidget |
|
44 | 44 | { |
|
45 | 45 | Q_OBJECT |
|
46 | 46 | public: |
|
47 | 47 | explicit PythonConsole(socexplorerproxy* proxy,QWidget *parent = 0); |
|
48 | 48 | |
|
49 | 49 | signals: |
|
50 | 50 | void rootDriverDelete(); |
|
51 | 51 | public slots: |
|
52 | 52 | void setBussDriver(socexplorerplugin* driver); |
|
53 | 53 | void removeBussDriver(); |
|
54 | 54 | void removeDriver(const QString& instanceName); |
|
55 | 55 | void pyConsoleRunFiles(const QStringList&); |
|
56 | 56 | void pyConsoleRunFile(const QString& fileName); |
|
57 | 57 | void registerObject(QObject* object,const QString& instanceName); |
|
58 | 58 | void changeSysDriverInstName(const QString newinstanceName,const QString previnstanceName); |
|
59 | 59 | void addObject(const QString& name, QObject* object); |
|
60 | void removeVariable(const QString& name); | |
|
60 | 61 | protected: |
|
61 | 62 | QSize sizeHint(); |
|
62 | 63 | |
|
63 | 64 | private: |
|
64 | 65 | QHBoxLayout* mainlayout; |
|
65 | 66 | socexplorerplugin* bussdriver; |
|
66 | 67 | PythonQtScriptingConsoleDandD* console; |
|
67 | 68 | PythonQtObjectPtr* mainContext; |
|
68 | 69 | socexplorerproxy* proxy; |
|
69 | 70 | //LPMONMainWindow* mainwin; |
|
70 | 71 | }; |
|
71 | 72 | |
|
72 | 73 | #endif // PYTHONCONSOLE_H |
@@ -1,4 +1,3 | |||
|
1 | 1 | #include <QtCore/QObject> |
|
2 | 2 | #include <QtWidgets/QtWidgets> |
|
3 | 3 | #include "plugins/socexplorerplugin.h" |
|
4 |
@@ -1,162 +1,166 | |||
|
1 | 1 | SOCEXPLORER_ROOT = \"$${PWD}/../..\" |
|
2 | 2 | |
|
3 | 3 | include($${PWD}/../../build_cfg/socexplorer.pri) |
|
4 | 4 | |
|
5 | 5 | TARGET = socexplorerengine$${DEBUG_EXT} |
|
6 | 6 | TEMPLATE = lib |
|
7 | 7 | |
|
8 | 8 | #more verbose plugin loader to debug plugin loading issues such as dependencies issues |
|
9 | 9 | SOCEXPLORER_PLUGIN_LOADER="custom" |
|
10 | 10 | |
|
11 | 11 | SOCEXPLORER_CHAGESETNUM=$$system(hg id) |
|
12 | 12 | isEmpty(SOCEXPLORER_CHAGESETNUM){ |
|
13 |
SOCEXPLORER_CHAGESETNUM= |
|
|
13 | SOCEXPLORER_CHAGESETNUM=c4b98d42ee59 | |
|
14 | 14 | } |
|
15 | 15 | SOCEXPLORER_CHAGESETNUMSTR = '\\"$${SOCEXPLORER_CHAGESETNUM}\\"' |
|
16 | 16 | SOCEXPLORER_BRANCH=$$system(hg branch) |
|
17 | 17 | isEmpty(SOCEXPLORER_BRANCH){ |
|
18 | 18 | SOCEXPLORER_BRANCH=default |
|
19 | 19 | } |
|
20 | 20 | SOCEXPLORER_BRANCHSTR = '\\"$${SOCEXPLORER_BRANCH}\\"' |
|
21 | 21 | |
|
22 |
DEFINES += SOCEXPLORER_VERSION="\"\\\"0.4. |
|
|
22 | DEFINES += SOCEXPLORER_VERSION="\"\\\"0.4.5"\\\"\" | |
|
23 | 23 | DEFINES += SOCEXPLORER_CHAGESET=\"$${SOCEXPLORER_CHAGESETNUMSTR}\" |
|
24 | 24 | DEFINES += SOCEXPLORER_BRANCH=\"$${SOCEXPLORER_BRANCHSTR}\" |
|
25 | 25 | |
|
26 | 26 | |
|
27 | 27 | message("Building SOCEXPLORER changeset $${SOCEXPLORER_CHAGESETNUM}") |
|
28 | 28 | |
|
29 | 29 | DEFINES += SOCEXPLORER_EXPORTS |
|
30 | 30 | |
|
31 | 31 | include ( plugins/socexplorerplugin.prf ) |
|
32 | 32 | include ( PeripheralWidget/PeripheralWidget.pri) |
|
33 | 33 | |
|
34 | 34 | win32:CONFIG += dll |
|
35 | 35 | win32:CONFIG -= static |
|
36 | 36 | win32:LIBS+=-L$${SOCEXPLORER_ROOT}/bin/win32 -lsocexplorercommon$${DEBUG_EXT} |
|
37 | 37 | |
|
38 | 38 | contains(SOCEXPLORER_PLUGIN_LOADER,"custom") |
|
39 | 39 | { |
|
40 | 40 | unix:LIBS+= -ldl |
|
41 | 41 | unix:DEFINES += SOCEXPLORER_CUSTOM_PLUGIN_LOADER |
|
42 | 42 | unix:HEADERS += \ |
|
43 | 43 | pluginloader/unix/unixpluginloader.h |
|
44 | 44 | unix:SOURCES += \ |
|
45 | 45 | pluginloader/unix/unixpluginloader.cpp |
|
46 | 46 | } |
|
47 | 47 | |
|
48 | 48 | target.path = $$[QT_INSTALL_LIBS] |
|
49 | 49 | isEmpty(target.path) { |
|
50 | 50 | error(can\'t get QT_INSTALL_LIBS) |
|
51 | 51 | } |
|
52 | 52 | |
|
53 | 53 | header.path = $$[QT_INSTALL_HEADERS]/SocExplorer |
|
54 | 54 | header.files = engine/socexplorerengine.h \ |
|
55 | 55 | pluginloader/pluginscache.h \ |
|
56 | 56 | plugins/socexplorerplugin.h \ |
|
57 | 57 | proxy/socexplorerproxy.h \ |
|
58 | 58 | engine/socexplorerxmlfile.h \ |
|
59 | 59 | SOC/socexplorerenumdevice.h \ |
|
60 | 60 | plugins/genericPySysdriver.h \ |
|
61 | 61 | XmlEngine/XMLmodel.h \ |
|
62 | 62 | XmlEngine/XMLdata.h \ |
|
63 | 63 | XmlEngine/xmldriver.h \ |
|
64 | 64 | SOC/socmodel.h \ |
|
65 | 65 | SOC/registerdata.h \ |
|
66 | 66 | SOC/socclk.h \ |
|
67 | 67 | PeripheralWidget/src/peripheralwidget.h \ |
|
68 | 68 | PeripheralWidget/src/registerwidget.h \ |
|
69 | PeripheralWidget/src/socregsviewer.h | |
|
69 | PeripheralWidget/src/socregsviewer.h \ | |
|
70 | memtester/memtester.h | |
|
70 | 71 | |
|
71 | 72 | |
|
72 | 73 | |
|
73 | 74 | isEmpty(header.path) { |
|
74 | 75 | error(can\'t get QT_INSTALL_HEADERS) |
|
75 | 76 | } |
|
76 | 77 | |
|
77 | 78 | pluginif.files = pluginsInterface/*.h \ |
|
78 | 79 | pluginsInterface/*.cpp |
|
79 | 80 | |
|
80 | 81 | pluginif.path = $$[QT_INSTALL_HEADERS]/SocExplorer/pluginsInterface |
|
81 | 82 | |
|
82 | 83 | |
|
83 | 84 | INSTALLS += target header pluginif |
|
84 | 85 | |
|
85 | 86 | INCLUDEPATH += engine \ |
|
86 | 87 | pluginloader \ |
|
87 | 88 | pluginsInterface \ |
|
88 | 89 | proxy \ |
|
89 | 90 | plugins \ |
|
90 | 91 | pluginManagerWdgt \ |
|
91 | 92 | ../common \ |
|
92 | 93 | ../common/genericBinaryFiles \ |
|
93 | 94 | ../ \ |
|
94 | 95 | RegisterMVS \ |
|
95 | 96 | XmlEngine \ |
|
96 | 97 | SOC \ |
|
97 | PeripheralWidget/src | |
|
98 | PeripheralWidget/src \ | |
|
99 | memtester | |
|
98 | 100 | |
|
99 | 101 | |
|
100 | 102 | HEADERS += \ |
|
101 | 103 | pluginloader/pluginscache.h \ |
|
102 | 104 | pluginloader/pluginloader.h \ |
|
103 | 105 | plugins/genericPySysdriver.h \ |
|
104 | 106 | pluginManagerWdgt/plugintree.h \ |
|
105 | 107 | pluginManagerWdgt/pluginmanagerWDGT.h \ |
|
106 | 108 | pluginManagerWdgt/pluginlist.h \ |
|
107 | 109 | pluginManagerWdgt/plugininfoswdgt.h \ |
|
108 | 110 | XmlEngine/XMLmodel.h \ |
|
109 | 111 | XmlEngine/XMLdata.h \ |
|
110 | 112 | SOC/socmodel.h \ |
|
111 | 113 | SOC/registerdata.h \ |
|
112 | 114 | XmlEngine/xmldriver.h \ |
|
113 | 115 | PeripheralWidget/src/peripheralwidget.h \ |
|
114 | 116 | PeripheralWidget/src/registerwidget.h \ |
|
115 | 117 | PeripheralWidget/src/socregsviewer.h \ |
|
116 | 118 | SOC/socclk.h \ |
|
117 | 119 | engine/socexplorerengine.h \ |
|
118 | 120 | engine/socexplorerxmlfile.h \ |
|
119 | 121 | plugins/socexplorerplugin.h \ |
|
120 | 122 | pluginsInterface/socexplorerplugininterface.h \ |
|
121 | 123 | pluginsInterface/socexplorerplugininterface_global.h \ |
|
122 | 124 | proxy/socexplorerproxy.h \ |
|
123 | 125 | SOC/socexplorerenumdevice.h \ |
|
124 | PySocExplorerEngine.h | |
|
126 | PySocExplorerEngine.h \ | |
|
127 | memtester/memtester.h | |
|
125 | 128 | |
|
126 | 129 | |
|
127 | 130 | |
|
128 | 131 | |
|
129 | 132 | |
|
130 | 133 | |
|
131 | 134 | SOURCES += \ |
|
132 | 135 | pluginloader/pluginscache.cpp \ |
|
133 | 136 | pluginloader/pluginloader.cpp \ |
|
134 | 137 | pluginManagerWdgt/plugintree.cpp \ |
|
135 | 138 | pluginManagerWdgt/pluginmanagerWDGT.cpp \ |
|
136 | 139 | pluginManagerWdgt/pluginlist.cpp \ |
|
137 | 140 | pluginManagerWdgt/plugininfoswdgt.cpp \ |
|
138 | 141 | XmlEngine/XMLmodel.cpp \ |
|
139 | 142 | XmlEngine/XMLdata.cpp \ |
|
140 | 143 | SOC/socmodel.cpp \ |
|
141 | 144 | SOC/registerdata.cpp \ |
|
142 | 145 | XmlEngine/xmldriver.cpp \ |
|
143 | 146 | PeripheralWidget/src/peripheralwidget.cpp \ |
|
144 | 147 | PeripheralWidget/src/registerwidget.cpp \ |
|
145 | 148 | PeripheralWidget/src/socregsviewer.cpp \ |
|
146 | 149 | SOC/socclk.cpp \ |
|
147 | 150 | plugins/genericPySysdriver.cpp \ |
|
148 | 151 | engine/socexplorerengine.cpp \ |
|
149 | 152 | engine/socexplorerxmlfile.cpp \ |
|
150 | 153 | proxy/socexplorerproxy.cpp \ |
|
151 | 154 | SOC/socexplorerenumdevice.cpp \ |
|
152 | plugins/socexplorerplugin.cpp | |
|
155 | plugins/socexplorerplugin.cpp \ | |
|
156 | memtester/memtester.cpp | |
|
153 | 157 | |
|
154 | 158 | |
|
155 | 159 | OTHER_FILES += \ |
|
156 | 160 | plugins/socexplorerplugin.cpp \ |
|
157 | 161 | pluginsInterface/socexplorerplugininterface.cpp \ |
|
158 | 162 | plugins/socexplorerplugin.prf \ |
|
159 | 163 | pythongenerator.sh \ |
|
160 | 164 | pythonQtgeneratorCfg.txt |
|
161 | 165 | |
|
162 | 166 |
@@ -1,290 +1,300 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the SocExplorer Software |
|
3 | 3 | -- Copyright (C) 2012, Plasma Physics Laboratory - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 2 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Alexis Jeandet |
|
20 | 20 | -- Mail : alexis.jeandet@lpp.polytechnique.fr |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | #include "socexplorerengine.h" |
|
23 | 23 | #include <proxy/socexplorerproxy.h> |
|
24 | 24 | |
|
25 | 25 | SocExplorerEngine* SocExplorerEngine::_self = NULL; |
|
26 | 26 | socExplorerXmlModel* SocExplorerEngine::p_xmlmodel=NULL; |
|
27 | 27 | QMainWindow* SocExplorerEngine::mainWindow=NULL; |
|
28 | 28 | QList<SOCModel*>* SocExplorerEngine::SOCs=NULL; |
|
29 | 29 | int SocExplorerEngine::loglvl=1; |
|
30 | 30 | |
|
31 | 31 | SocExplorerEngine::SocExplorerEngine(QObject *parent) : |
|
32 | 32 | QObject(parent) |
|
33 | 33 | { |
|
34 | 34 | if(SOCs==NULL) |
|
35 | 35 | { |
|
36 | 36 | SOCs = new QList<SOCModel*>; |
|
37 | 37 | } |
|
38 | 38 | |
|
39 | 39 | } |
|
40 | 40 | |
|
41 | 41 | |
|
42 | 42 | void SocExplorerEngine::init() |
|
43 | 43 | { |
|
44 | 44 | QDir dir; |
|
45 | 45 | if(!_self) |
|
46 | 46 | { |
|
47 | 47 | _self= new SocExplorerEngine; |
|
48 | 48 | } |
|
49 | 49 | if(!dir.exists(configFolder())) |
|
50 | 50 | dir.mkdir(configFolder()); |
|
51 | 51 | p_xmlmodel = new socExplorerXmlModel(_self); |
|
52 | 52 | p_xmlmodel->updateSOClist(); |
|
53 | 53 | } |
|
54 | 54 | |
|
55 | 55 | QString SocExplorerEngine::configFolder() |
|
56 | 56 | { |
|
57 | 57 | return QString(SOCEXPLORER_CONFIG_PATH); |
|
58 | 58 | } |
|
59 | 59 | |
|
60 | 60 | QStringList SocExplorerEngine::pluginFolders() |
|
61 | 61 | { |
|
62 | 62 | if(!_self) |
|
63 | 63 | init(); |
|
64 | 64 | QStringList folders; |
|
65 | 65 | QDir pluginFolders(QString(SOCEXPLORER_CONFIG_PATH)+"/plugin.conf.d"); |
|
66 | 66 | if(pluginFolders.exists()) |
|
67 | 67 | { |
|
68 | 68 | pluginFolders.setFilter(QDir::Files | QDir::NoSymLinks); |
|
69 | 69 | QFileInfoList list = pluginFolders.entryInfoList(); |
|
70 | 70 | for (int i = 0; i < list.size(); ++i) |
|
71 | 71 | { |
|
72 | 72 | QFileInfo fileInfo = list.at(i); |
|
73 | 73 | if(fileInfo.suffix()=="conf") |
|
74 | 74 | { |
|
75 | 75 | QFile confFile(fileInfo.absoluteFilePath()); |
|
76 | 76 | if(confFile.open(QIODevice::ReadOnly)) |
|
77 | 77 | { |
|
78 | 78 | while (!confFile.atEnd()) |
|
79 | 79 | { |
|
80 | 80 | QString line = confFile.readLine(); |
|
81 | 81 | QDir plugDir(line.remove("\n")); |
|
82 | 82 | if(plugDir.exists() && !folders.contains(plugDir.absolutePath())) |
|
83 | 83 | { |
|
84 | 84 | folders.append(plugDir.absolutePath()); |
|
85 | 85 | } |
|
86 | 86 | } |
|
87 | 87 | } |
|
88 | 88 | } |
|
89 | 89 | } |
|
90 | 90 | } |
|
91 | 91 | return folders; |
|
92 | 92 | } |
|
93 | 93 | |
|
94 | 94 | SOCModel *SocExplorerEngine::plugin2Soc(socexplorerplugin *plugin) |
|
95 | 95 | { |
|
96 | 96 | if(!_self) |
|
97 | 97 | init(); |
|
98 | 98 | if(plugin) |
|
99 | 99 | { |
|
100 | 100 | while (plugin->parent!=NULL) { |
|
101 | 101 | plugin = plugin->parent; |
|
102 | 102 | } |
|
103 | 103 | for(int i=0;i<SOCs->count();i++) |
|
104 | 104 | { |
|
105 | 105 | if(SOCs->at(i)->isRootDev(plugin)) |
|
106 | 106 | return SOCs->at(i); |
|
107 | 107 | } |
|
108 | 108 | //no soc found so create a new one |
|
109 | 109 | SOCModel* soc=new SOCModel(plugin); |
|
110 | 110 | SOCs->append(soc); |
|
111 | 111 | return soc; |
|
112 | 112 | } |
|
113 | 113 | return NULL; |
|
114 | 114 | } |
|
115 | 115 | |
|
116 | 116 | |
|
117 | 117 | int SocExplorerEngine::addEnumDevice(socexplorerplugin* rootPlugin,int VID, int PID, qint32 baseAddress, const QString &name) |
|
118 | 118 | { |
|
119 | 119 | if(!_self) |
|
120 | 120 | init(); |
|
121 | 121 | SOCModel* soc = plugin2Soc(rootPlugin); |
|
122 | 122 | if(soc && !soc->enumDeviceExists(baseAddress)) |
|
123 | 123 | { |
|
124 | 124 | emit _self->enumDeviceAdded(soc->addEnumDevice(VID,PID,baseAddress,name)); |
|
125 | 125 | return 1; |
|
126 | 126 | } |
|
127 | 127 | return 0; |
|
128 | 128 | } |
|
129 | 129 | |
|
130 | 130 | QList<SOCModel *> *SocExplorerEngine::getSOCs() |
|
131 | 131 | { |
|
132 | 132 | if(!_self) |
|
133 | 133 | init(); |
|
134 | 134 | return SOCs; |
|
135 | 135 | } |
|
136 | 136 | |
|
137 | 137 | qint32 SocExplorerEngine::getEnumDeviceBaseAddress(const QString& rootPlugin,int VID, int PID, int count) |
|
138 | 138 | { |
|
139 | 139 | socexplorerplugin* plugin = socexplorerproxy::findPlugin(rootPlugin); |
|
140 | 140 | if(plugin==NULL)return -1; |
|
141 | 141 | SOCModel* soc = plugin2Soc(plugin); |
|
142 | 142 | if(soc==NULL) |
|
143 | 143 | return -1; |
|
144 | 144 | return soc->getEnumDeviceBaseAddress(VID,PID,count); |
|
145 | 145 | } |
|
146 | 146 | |
|
147 | 147 | qint32 SocExplorerEngine::getEnumDeviceBaseAddress(socexplorerplugin *plugin, int VID, int PID, int count) |
|
148 | 148 | { |
|
149 | 149 | if(plugin==NULL)return -1; |
|
150 | 150 | SOCModel* soc = plugin2Soc(plugin); |
|
151 | 151 | if(soc==NULL) |
|
152 | 152 | return -1; |
|
153 | 153 | return soc->getEnumDeviceBaseAddress(VID,PID,count); |
|
154 | 154 | } |
|
155 | 155 | |
|
156 | 156 | qint32 SocExplorerEngine::getEnumDeviceCount(socexplorerplugin *plugin, int VID, int PID) |
|
157 | 157 | { |
|
158 | 158 | if(plugin==NULL)return 0; |
|
159 | 159 | SOCModel* soc = plugin2Soc(plugin); |
|
160 | 160 | if(soc==NULL) |
|
161 | 161 | return 0; |
|
162 | 162 | return soc->getEnumDeviceCount(VID,PID); |
|
163 | 163 | } |
|
164 | 164 | |
|
165 | 165 | qint32 SocExplorerEngine::getEnumDeviceCount(const QString &rootPlugin, int VID, int PID) |
|
166 | 166 | { |
|
167 | 167 | socexplorerplugin* plugin = socexplorerproxy::findPlugin(rootPlugin); |
|
168 | 168 | if(plugin==NULL)return 0; |
|
169 | 169 | SOCModel* soc = plugin2Soc(plugin); |
|
170 | 170 | if(soc==NULL) |
|
171 | 171 | return 0; |
|
172 | 172 | return soc->getEnumDeviceCount(VID,PID); |
|
173 | 173 | } |
|
174 | 174 | |
|
175 | 175 | int SocExplorerEngine::addEnumDevice(const QString &rootPlugin, int VID, int PID, qint32 baseAddress, const QString &name) |
|
176 | 176 | { |
|
177 | 177 | socexplorerplugin* plugin = socexplorerproxy::findPlugin(rootPlugin); |
|
178 | 178 | if(plugin==NULL)return -1; |
|
179 | 179 | SOCModel* soc = plugin2Soc(plugin); |
|
180 | 180 | if(soc==NULL) |
|
181 | 181 | return -1; |
|
182 | 182 | soc->addEnumDevice(VID,PID,baseAddress,name); |
|
183 | 183 | return 1; |
|
184 | 184 | } |
|
185 | 185 | |
|
186 | unsigned int SocExplorerEngine::memMeasureSize(socexplorerplugin *plugin, unsigned int address, unsigned int maxSize) | |
|
187 | { | |
|
188 | return MemTester::measureMemSize(plugin,address,maxSize); | |
|
189 | } | |
|
190 | ||
|
191 | unsigned int SocExplorerEngine::memMeasureSize(const QString &plugin, unsigned int address, unsigned int maxSize) | |
|
192 | { | |
|
193 | return MemTester::measureMemSize(plugin,address,maxSize); | |
|
194 | } | |
|
195 | ||
|
186 | 196 | |
|
187 | 197 | QString SocExplorerEngine::getDevName(int VID, int PID) |
|
188 | 198 | { |
|
189 | 199 | QList<QDomNodeList> list=p_xmlmodel->getAllNodes("peripheral"); |
|
190 | 200 | for(int i=0;i<list.count();i++) |
|
191 | 201 | { |
|
192 | 202 | QDomNodeList nodes=list.at(i); |
|
193 | 203 | for(int l=0;l<nodes.count();l++) |
|
194 | 204 | { |
|
195 | 205 | QDomElement node=nodes.at(l).toElement(); |
|
196 | 206 | int nodeVID=node.attribute("vid","0").toInt(); |
|
197 | 207 | int nodePID=node.attribute("pid","0").toInt(); |
|
198 | 208 | if((nodeVID==VID)&&(nodePID==PID)) |
|
199 | 209 | { |
|
200 | 210 | return node.attribute("name","Unknow device"); |
|
201 | 211 | } |
|
202 | 212 | } |
|
203 | 213 | } |
|
204 | 214 | return QString("Unknow device"); |
|
205 | 215 | } |
|
206 | 216 | |
|
207 | 217 | QString SocExplorerEngine::SocExplorerVersion(){return QString(SOCEXPLORER_VERSION);} |
|
208 | 218 | |
|
209 | 219 | QString SocExplorerEngine::SocExplorerChangeset(){return QString(SOCEXPLORER_CHAGESET).split(" ").at(0);} |
|
210 | 220 | |
|
211 | 221 | QString SocExplorerEngine::SocExplorerBranch(){return QString(SOCEXPLORER_BRANCH);} |
|
212 | 222 | |
|
213 | 223 | socExplorerXmlModel *SocExplorerEngine::xmlModel() |
|
214 | 224 | { |
|
215 | 225 | if(!_self) |
|
216 | 226 | init(); |
|
217 | 227 | return p_xmlmodel; |
|
218 | 228 | } |
|
219 | 229 | |
|
220 | 230 | void SocExplorerEngine::setMainWindow(QMainWindow *Mainwindow) |
|
221 | 231 | { |
|
222 | 232 | if(!_self) |
|
223 | 233 | init(); |
|
224 | 234 | mainWindow=Mainwindow; |
|
225 | 235 | } |
|
226 | 236 | |
|
227 | 237 | QProgressBar *SocExplorerEngine::getProgressBar(const QString& format, int max) |
|
228 | 238 | { |
|
229 | 239 | if(!_self) |
|
230 | 240 | init(); |
|
231 | 241 | QProgressBar* progressBar; |
|
232 | 242 | if(mainWindow!=NULL) |
|
233 | 243 | { |
|
234 | 244 | progressBar = new QProgressBar(mainWindow); |
|
235 | 245 | mainWindow->statusBar()->addWidget(progressBar); |
|
236 | 246 | } |
|
237 | 247 | else |
|
238 | 248 | { |
|
239 | 249 | progressBar = new QProgressBar(); |
|
240 | 250 | } |
|
241 | 251 | progressBar->setMaximum(max); |
|
242 | 252 | progressBar->setFormat(format); |
|
243 | 253 | return progressBar; |
|
244 | 254 | } |
|
245 | 255 | |
|
246 | 256 | void SocExplorerEngine::deleteProgressBar(QProgressBar *progressBar) |
|
247 | 257 | { |
|
248 | 258 | if(mainWindow!=NULL) |
|
249 | 259 | { |
|
250 | 260 | mainWindow->statusBar()->removeWidget(progressBar); |
|
251 | 261 | } |
|
252 | 262 | delete progressBar; |
|
253 | 263 | } |
|
254 | 264 | |
|
255 | 265 | void SocExplorerEngine::addSOC(socexplorerplugin *rootPlugin) |
|
256 | 266 | { |
|
257 | 267 | plugin2Soc(rootPlugin); |
|
258 | 268 | } |
|
259 | 269 | |
|
260 | 270 | void SocExplorerEngine::removeSOC(socexplorerplugin *rootPlugin) |
|
261 | 271 | { |
|
262 | 272 | SOCModel* soc=plugin2Soc(rootPlugin); |
|
263 | 273 | SOCs->removeAll(soc); |
|
264 | 274 | delete soc; |
|
265 | 275 | } |
|
266 | 276 | |
|
267 | 277 | void SocExplorerEngine::message(socexplorerplugin *sender, const QString &message, int debugLevel) |
|
268 | 278 | { |
|
269 | 279 | // TODO add multi output message manager IE also log in files |
|
270 | 280 | if(!_self) |
|
271 | 281 | init(); |
|
272 | 282 | if(loglvl>=debugLevel) |
|
273 | 283 | qDebug()<< QTime::currentTime().toString()+" " + sender->instanceName()+":"+message; |
|
274 | 284 | } |
|
275 | 285 | |
|
276 | 286 | void SocExplorerEngine::setLogLevel(int level) |
|
277 | 287 | { |
|
278 | 288 | if(!_self) |
|
279 | 289 | init(); |
|
280 | 290 | printf("Set log level to %d\n",level); |
|
281 | 291 | loglvl = level; |
|
282 | 292 | } |
|
283 | 293 | |
|
284 | 294 | bool SocExplorerEngine::isSocLitleEndian(socexplorerplugin *plugin) |
|
285 | 295 | { |
|
286 | 296 | return plugin2Soc(plugin)->isLitleEndian(); |
|
287 | 297 | } |
|
288 | 298 | |
|
289 | 299 | |
|
290 | 300 |
@@ -1,138 +1,141 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the SocExplorer Software |
|
3 | 3 | -- Copyright (C) 2012, Plasma Physics Laboratory - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 2 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Alexis Jeandet |
|
20 | 20 | -- Mail : alexis.jeandet@lpp.polytechnique.fr |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | #ifndef SOCEXPLORERENGINE_H |
|
23 | 23 | #define SOCEXPLORERENGINE_H |
|
24 | 24 | |
|
25 | 25 | #include <stdint.h> |
|
26 | 26 | #include <QObject> |
|
27 | 27 | #include <QtWidgets> |
|
28 | 28 | #include <QStringList> |
|
29 | 29 | #include <QDomDocument> |
|
30 | 30 | #include <QDomElement> |
|
31 | 31 | #include <QDomNodeList> |
|
32 | 32 | #include <QFile> |
|
33 | 33 | #include <QTextStream> |
|
34 | 34 | #include <QDir> |
|
35 | 35 | #include <QApplication> |
|
36 | 36 | #include <QtCore/qglobal.h> |
|
37 | 37 | #include <QFileDialog> |
|
38 | 38 | #include <socexplorerxmlfile.h> |
|
39 | 39 | #include <socexplorerenumdevice.h> |
|
40 | 40 | #include <XMLmodel.h> |
|
41 | 41 | #include <peripheralwidget.h> |
|
42 | 42 | #include <registerwidget.h> |
|
43 | 43 | #include <socmodel.h> |
|
44 | #include <memtester.h> | |
|
44 | 45 | |
|
45 | 46 | #if defined(SOCEXPLORER_SDK_BUILD) |
|
46 | 47 | # define SOCEXPLORER_SDK_EXPORT Q_DECL_EXPORT |
|
47 | 48 | #else |
|
48 | 49 | # define SOCEXPLORER_SDK_EXPORT Q_DECL_IMPORT |
|
49 | 50 | #endif |
|
50 | 51 | |
|
51 | 52 | |
|
52 | 53 | class SOCEXPLORER_SDK_EXPORT SocExplorerAutoProgressBar |
|
53 | 54 | { |
|
54 | 55 | public: |
|
55 | 56 | SocExplorerAutoProgressBar(QProgressBar* progressBar=NULL) |
|
56 | 57 | { |
|
57 | 58 | this->p_progressbar=progressBar; |
|
58 | 59 | } |
|
59 | 60 | ~SocExplorerAutoProgressBar() |
|
60 | 61 | { |
|
61 | 62 | if(p_progressbar) |
|
62 | 63 | { |
|
63 | 64 | delete p_progressbar; |
|
64 | 65 | } |
|
65 | 66 | } |
|
66 | 67 | void setProgressBar(QProgressBar* progressBar) |
|
67 | 68 | { |
|
68 | 69 | this->p_progressbar=progressBar; |
|
69 | 70 | } |
|
70 | 71 | void setValue(int value) |
|
71 | 72 | { |
|
72 | 73 | p_progressbar->setValue(value); |
|
73 | 74 | } |
|
74 | 75 | private: |
|
75 | 76 | QProgressBar* p_progressbar; |
|
76 | 77 | }; |
|
77 | 78 | |
|
78 | 79 | //! SocExplorerEngine is a pure static class which aims to provide services for both SocExplorer software and plugins. |
|
79 | 80 | |
|
80 | 81 | class SOCEXPLORER_SDK_EXPORT SocExplorerEngine : public QObject |
|
81 | 82 | { |
|
82 | 83 | Q_OBJECT |
|
83 | 84 | private: |
|
84 | 85 | static SocExplorerEngine* _self; |
|
85 | 86 | SocExplorerEngine(QObject *parent = 0); |
|
86 | 87 | static void init(); |
|
87 | 88 | |
|
88 | 89 | public: |
|
89 | 90 | static SocExplorerEngine* self(){ if(!_self){_self= new SocExplorerEngine;}return _self;} |
|
90 | 91 | //! Return the configuration folder path, OS dependant. |
|
91 | 92 | SOCEXPLORER_SDK_EXPORT static QString configFolder(); |
|
92 | 93 | //! Return the default plugin folder path, OS dependant. |
|
93 | 94 | static QStringList pluginFolders(); |
|
94 | 95 | static QString configPath(){return QString(SOCEXPLORER_CONFIG_PATH);} |
|
95 | 96 | static QString sharePath(){return QString(SOCEXPLORER_SHARE_PATH);} |
|
96 | 97 | static int addEnumDevice(socexplorerplugin* rootPlugin,int VID,int PID,qint32 baseAddress,const QString& name); |
|
97 | 98 | static QList<SOCModel*>* getSOCs(); |
|
98 | 99 | static QString getDevName(int VID, int PID); |
|
99 | 100 | static QString SocExplorerVersion(); |
|
100 | 101 | static QString SocExplorerChangeset(); |
|
101 | 102 | static QString SocExplorerBranch(); |
|
102 | 103 | static socExplorerXmlModel* xmlModel(); |
|
103 | 104 | static void setMainWindow(QMainWindow* Mainwindow); |
|
104 | 105 | static QProgressBar* getProgressBar(const QString &format, int max); |
|
105 | 106 | static void deleteProgressBar(QProgressBar* progressBar); |
|
106 | 107 | static void addSOC(socexplorerplugin* rootPlugin); |
|
107 | 108 | static void removeSOC(socexplorerplugin* rootPlugin); |
|
108 | 109 | static void message(socexplorerplugin* sender,const QString& message,int debugLevel=0); |
|
109 | 110 | static void setLogLevel(int level); |
|
110 | 111 | static bool isSocLitleEndian(socexplorerplugin* plugin); |
|
111 | 112 | signals: |
|
112 | 113 | void enumDeviceAdded(socExplorerEnumDevice* device); |
|
113 | 114 | public slots: |
|
114 | 115 | QString getSocExplorerVersion(){return SocExplorerEngine::SocExplorerVersion();} |
|
115 | 116 | QString getSocExplorerChangeset(){return SocExplorerEngine::SocExplorerChangeset();} |
|
116 | 117 | QString getSocExplorerBranch(){return SocExplorerEngine::SocExplorerBranch();} |
|
117 | 118 | qint32 getEnumDeviceBaseAddress(const QString& rootPlugin,int VID,int PID,int count=0); |
|
118 | 119 | qint32 getEnumDeviceBaseAddress(socexplorerplugin* plugin,int VID,int PID,int count=0); |
|
119 | 120 | qint32 getEnumDeviceCount(socexplorerplugin* plugin,int VID,int PID); |
|
120 | 121 | qint32 getEnumDeviceCount(const QString& rootPlugin,int VID,int PID); |
|
121 | 122 | int addEnumDevice(const QString& rootPlugin,int VID,int PID,qint32 baseAddress,const QString& name); |
|
123 | unsigned int memMeasureSize(socexplorerplugin* plugin, unsigned int address,unsigned int maxSize=0xFFFFFFFF); | |
|
124 | unsigned int memMeasureSize(const QString& plugin, unsigned int address,unsigned int maxSize=0xFFFFFFFF); | |
|
122 | 125 | |
|
123 | 126 | private: |
|
124 | 127 | static SOCModel* plugin2Soc(socexplorerplugin* plugin); |
|
125 | 128 | static socExplorerXmlModel* p_xmlmodel; |
|
126 | 129 | static QMainWindow* mainWindow; |
|
127 | 130 | static QList<SOCModel*>* SOCs; |
|
128 | 131 | static int loglvl; |
|
129 | 132 | }; |
|
130 | 133 | |
|
131 | 134 | #endif // SOCEXPLORERENGINE_H |
|
132 | 135 | |
|
133 | 136 | |
|
134 | 137 | |
|
135 | 138 | |
|
136 | 139 | |
|
137 | 140 | |
|
138 | 141 |
@@ -1,370 +1,370 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the SocExplorer Software |
|
3 | 3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 2 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Alexis Jeandet |
|
20 | 20 | -- Mail : alexis.jeandet@lpp.polytechnique.fr |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | #include "socexplorerproxy.h" |
|
23 | 23 | #include <pluginmanagerWDGT.h> |
|
24 | 24 | #include <socexplorerengine.h> |
|
25 | 25 | #include <pluginloader.h> |
|
26 | 26 | #include <socexplorerplugin.h> |
|
27 | 27 | |
|
28 | 28 | socexplorerproxy* socexplorerproxy::_self=NULL; |
|
29 | 29 | QMainWindow* socexplorerproxy::mainWindow=NULL; |
|
30 | 30 | QList<socexplorerplugin*>* socexplorerproxy::drivers=NULL; |
|
31 | 31 | QList<socexplorerplugin*>* socexplorerproxy::linearDriverList=NULL; |
|
32 | 32 | socexplorerplugin* socexplorerproxy::root=NULL; |
|
33 | 33 | socexplorerplugin* socexplorerproxy::parent=NULL; |
|
34 | 34 | PluginsCache* socexplorerproxy::cache=NULL; |
|
35 | 35 | |
|
36 | 36 | socexplorerproxy::socexplorerproxy(QObject *parent) : |
|
37 | 37 | QObject(parent) |
|
38 | 38 | { |
|
39 | 39 | cache = new PluginsCache; |
|
40 | 40 | drivers = new QList<socexplorerplugin*>; |
|
41 | 41 | linearDriverList=new QList<socexplorerplugin*>; |
|
42 | 42 | root = NULL; |
|
43 | 43 | } |
|
44 | 44 | |
|
45 | 45 | |
|
46 | 46 | socexplorerproxy::socexplorerproxy(QMainWindow *Mainwindow, QObject *parent): |
|
47 | 47 | QObject(parent) |
|
48 | 48 | { |
|
49 | 49 | mainWindow = Mainwindow; |
|
50 | 50 | cache = new PluginsCache; |
|
51 | 51 | drivers = new QList<socexplorerplugin*>; |
|
52 | 52 | linearDriverList=new QList<socexplorerplugin*>; |
|
53 | 53 | root = NULL; |
|
54 | 54 | } |
|
55 | 55 | |
|
56 | 56 | |
|
57 | 57 | void socexplorerproxy::init() |
|
58 | 58 | { |
|
59 | 59 | if(!_self) |
|
60 | 60 | { |
|
61 | 61 | _self = new socexplorerproxy(); |
|
62 | 62 | mainWindow = NULL; |
|
63 | 63 | } |
|
64 | 64 | |
|
65 | 65 | } |
|
66 | 66 | |
|
67 | 67 | void socexplorerproxy::setMainWindow(QMainWindow *Mainwindow) |
|
68 | 68 | { |
|
69 | 69 | if(!_self)init(); |
|
70 | 70 | mainWindow=Mainwindow; |
|
71 | 71 | } |
|
72 | 72 | |
|
73 | 73 | void socexplorerproxy::loadSysDriver(const QString name) |
|
74 | 74 | { |
|
75 | 75 | if(!_self)init(); |
|
76 | 76 | if(pluginloader::libcanberoot(name)) |
|
77 | 77 | { |
|
78 | 78 | socexplorerplugin* driver = pluginloader::newsocexplorerplugin(name); |
|
79 | 79 | QString driverName = _self->getinstanceName(driver->baseName()); |
|
80 | 80 | loadSysDriver(driver,driverName); |
|
81 | 81 | } |
|
82 | 82 | } |
|
83 | 83 | |
|
84 | 84 | void socexplorerproxy::loadSysDriver(const QString name, const QString instanceName) |
|
85 | 85 | { |
|
86 | 86 | if(!_self)init(); |
|
87 | 87 | if(pluginloader::libcanberoot(name) && !_self->instanceExists(instanceName)) |
|
88 | 88 | { |
|
89 | 89 | socexplorerplugin* driver = pluginloader::newsocexplorerplugin(name); |
|
90 | 90 | loadSysDriver(driver,instanceName); |
|
91 | 91 | } |
|
92 | 92 | } |
|
93 | 93 | |
|
94 | 94 | |
|
95 | 95 | void socexplorerproxy::loadSysDriver(socexplorerplugin *driver, const QString instanceName) |
|
96 | 96 | { |
|
97 | 97 | if(!_self)init(); |
|
98 | 98 | driver->setInstanceName(instanceName); |
|
99 | 99 | driver->parent = NULL; |
|
100 | 100 | drivers->append(driver); |
|
101 | 101 | linearDriverList->append(driver); |
|
102 | 102 | connectChildToProxy(driver); |
|
103 | 103 | emit _self->addPluginGUI(driver); |
|
104 | 104 | emit _self->clearMenu(); |
|
105 | 105 | emit _self->treeChanged(QList<socexplorerplugin*>(*drivers)); |
|
106 | 106 | SocExplorerEngine::addSOC(driver); |
|
107 | 107 | } |
|
108 | 108 | |
|
109 | 109 | void socexplorerproxy::loadChildSysDriver(socexplorerplugin *parent, const QString child) |
|
110 | 110 | { |
|
111 | 111 | if(!_self)init(); |
|
112 | 112 | if(pluginloader::libcanbechild(child)) |
|
113 | 113 | { |
|
114 | 114 | socexplorerplugin* driver = pluginloader::newsocexplorerplugin(child); |
|
115 | 115 | QString driverName = _self->getinstanceName(driver->baseName()); |
|
116 | 116 | bool ok=true; |
|
117 | 117 | if(ok) |
|
118 | 118 | { |
|
119 | 119 | if(parent!=NULL)_self->loadSysDriverToParent(driver,parent,driverName); |
|
120 | 120 | } |
|
121 | 121 | } |
|
122 | 122 | } |
|
123 | 123 | |
|
124 | 124 | void socexplorerproxy::loadSysDriverToParent(const QString name,const QString ParentInst) |
|
125 | 125 | { |
|
126 | 126 | if(!_self)init(); |
|
127 | 127 | if(pluginloader::libcanbechild(name)) |
|
128 | 128 | { |
|
129 | 129 | socexplorerplugin* driver = pluginloader::newsocexplorerplugin(name); |
|
130 | 130 | QString driverName = _self->getinstanceName(driver->baseName()); |
|
131 | 131 | bool ok=true; |
|
132 | 132 | if(ok) |
|
133 | 133 | { |
|
134 | 134 | socexplorerplugin* parent=_self->getSysDriver(ParentInst); |
|
135 | 135 | if(parent!=NULL)loadSysDriverToParent(driver,parent,driverName); |
|
136 | 136 | } |
|
137 | 137 | } |
|
138 | 138 | } |
|
139 | 139 | |
|
140 | 140 | |
|
141 | 141 | void socexplorerproxy::loadSysDriverToParent(const QString name,const QString instanceName,const QString ParentInst) |
|
142 | 142 | { |
|
143 | 143 | if(!_self)init(); |
|
144 | 144 | if(pluginloader::libcanbechild(name) && !_self->instanceExists(instanceName)) |
|
145 | 145 | { |
|
146 | 146 | socexplorerplugin* driver = pluginloader::newsocexplorerplugin(name); |
|
147 | 147 | bool ok=true; |
|
148 | 148 | if(ok) |
|
149 | 149 | { |
|
150 | 150 | socexplorerplugin* parent=_self->getSysDriver(ParentInst); |
|
151 | 151 | if(parent!=NULL)loadSysDriverToParent(driver,parent,instanceName); |
|
152 | 152 | } |
|
153 | 153 | } |
|
154 | 154 | } |
|
155 | 155 | |
|
156 | 156 | void socexplorerproxy::loadSysDriverToParent(socexplorerplugin *driver,socexplorerplugin *parent, const QString instanceName) |
|
157 | 157 | { |
|
158 | 158 | if(!_self)init(); |
|
159 | 159 | linearDriverList->append(driver); |
|
160 | 160 | driver->parent = parent; |
|
161 | 161 | driver->setInstanceName(instanceName); |
|
162 | 162 | parent->childs.append(driver); |
|
163 | 163 | connectChildToProxy(driver); |
|
164 | 164 | connectChildToParent(parent,driver); |
|
165 | 165 | emit _self->clearMenu(); |
|
166 | 166 | emit _self->addPluginGUI(driver); |
|
167 | 167 | emit _self->treeChanged(QList<socexplorerplugin*>(*drivers)); |
|
168 | 168 | driver->postInstantiationTrigger(); |
|
169 | 169 | } |
|
170 | 170 | |
|
171 | 171 | |
|
172 | 172 | void socexplorerproxy::changeSysDriverInstName(const QString instanceName) |
|
173 | 173 | { |
|
174 | 174 | Q_UNUSED(instanceName) |
|
175 | 175 | } |
|
176 | 176 | |
|
177 | 177 | void socexplorerproxy::changeSysDriverInstName(const QString newinstanceName, const QString previnstanceName) |
|
178 | 178 | { |
|
179 | 179 | if(!_self)init(); |
|
180 | 180 | socexplorerplugin*temp=_self->getSysDriver(previnstanceName); |
|
181 | 181 | if(temp!=NULL) |
|
182 | 182 | { |
|
183 | 183 | if(NULL!=_self->getSysDriver(newinstanceName)) |
|
184 | 184 | { |
|
185 | 185 | emit _self->treeChanged(QList<socexplorerplugin*>(*drivers)); |
|
186 | 186 | return; |
|
187 | 187 | } |
|
188 | 188 | temp->setInstanceName(newinstanceName); |
|
189 | 189 | } |
|
190 | 190 | emit _self->treeChanged(QList<socexplorerplugin*>(*drivers)); |
|
191 | 191 | } |
|
192 | 192 | |
|
193 | 193 | |
|
194 | 194 | void socexplorerproxy::connectChildToParent(socexplorerplugin *parent, socexplorerplugin *child) |
|
195 | 195 | { |
|
196 | 196 | if(!_self)init(); |
|
197 | 197 | connect(parent,SIGNAL(activateSig(bool)),child,SLOT(activate(bool))); |
|
198 | 198 | child->activate(parent->isConnected()); |
|
199 | 199 | } |
|
200 | 200 | |
|
201 | 201 | void socexplorerproxy::disconnectChildToParent(socexplorerplugin *child) |
|
202 | 202 | { |
|
203 | 203 | if(!_self)init(); |
|
204 | 204 | disconnect(child->parent,SIGNAL(activateSig(bool)),child,SLOT(activate(bool))); |
|
205 | 205 | } |
|
206 | 206 | |
|
207 | 207 | |
|
208 | 208 | void socexplorerproxy::connectChildToProxy(socexplorerplugin *child) |
|
209 | 209 | { |
|
210 | 210 | if(!_self)init(); |
|
211 | 211 | connect(child,SIGNAL(registerObject(QObject*,QString)),_self,SIGNAL(registerObject(QObject*,QString))); |
|
212 | 212 | connect(child,SIGNAL(closePlugin(socexplorerplugin*)),_self,SLOT(closeSysDriver(socexplorerplugin*))); |
|
213 | 213 | } |
|
214 | 214 | |
|
215 | 215 | void socexplorerproxy::disconnectChildToProxy(socexplorerplugin *child) |
|
216 | 216 | { |
|
217 | 217 | if(!_self)init(); |
|
218 | 218 | disconnect(child,SIGNAL(registerObject(QObject*,QString)),_self,SIGNAL(registerObject(QObject*,QString))); |
|
219 | 219 | disconnect(child,SIGNAL(closePlugin(socexplorerplugin*)),_self,SLOT(closeSysDriverFromDriver(socexplorerplugin*))); |
|
220 | 220 | } |
|
221 | 221 | |
|
222 | 222 | QString socexplorerproxy::getinstanceName(const QString& baseName) |
|
223 | 223 | { |
|
224 | 224 | if(!_self)init(); |
|
225 | 225 | int i=0; |
|
226 | 226 | QString name; |
|
227 | 227 | bool validName = false; |
|
228 | 228 | while(!validName) |
|
229 | 229 | { |
|
230 | 230 | name.clear(); |
|
231 | 231 | name.append(baseName+QString::number(i)); |
|
232 | 232 | validName = instanceNameIsValid(name); |
|
233 | 233 | i++; |
|
234 | 234 | } |
|
235 | 235 | return name; |
|
236 | 236 | } |
|
237 | 237 | |
|
238 | 238 | void socexplorerproxy::changeSysDriverInstName(socexplorerplugin* driver) |
|
239 | 239 | { |
|
240 | 240 | if(!_self)init(); |
|
241 | 241 | QString prevName(driver->instanceName()); |
|
242 | 242 | } |
|
243 | 243 | |
|
244 | 244 | bool socexplorerproxy::instanceNameIsValid(const QString& instanceName) |
|
245 | 245 | { |
|
246 | 246 | if(!_self)init(); |
|
247 | 247 | for(int k=0;k<linearDriverList->count();k++) |
|
248 | 248 | { |
|
249 | 249 | if(!linearDriverList->at(k)->instanceName().compare(instanceName)) |
|
250 | 250 | return false; |
|
251 | 251 | } |
|
252 | 252 | return true; |
|
253 | 253 | } |
|
254 | 254 | |
|
255 | 255 | socexplorerplugin *socexplorerproxy::findPlugin(const QString &instanceName) |
|
256 | 256 | { |
|
257 | 257 | if(!_self)init(); |
|
258 | 258 | for(int k=0;k<linearDriverList->count();k++) |
|
259 | 259 | { |
|
260 | if(linearDriverList->at(k)->instanceName().compare(instanceName)) | |
|
260 | if(!linearDriverList->at(k)->instanceName().compare(instanceName)) | |
|
261 | 261 | return linearDriverList->at(k); |
|
262 | 262 | } |
|
263 | 263 | return NULL; |
|
264 | 264 | } |
|
265 | 265 | |
|
266 | 266 | bool socexplorerproxy::instanceExists(const QString &instanceName) |
|
267 | 267 | { |
|
268 | 268 | return !socexplorerproxy::instanceNameIsValid(instanceName); |
|
269 | 269 | } |
|
270 | 270 | |
|
271 | 271 | void socexplorerproxy::close() |
|
272 | 272 | { |
|
273 | 273 | if(!_self)init(); |
|
274 | 274 | socexplorerplugin* tmpPtr; |
|
275 | 275 | while(drivers->count()>0) |
|
276 | 276 | { |
|
277 | 277 | tmpPtr = drivers->last(); |
|
278 | 278 | drivers->removeLast(); |
|
279 | 279 | _self->closeSysDriver(tmpPtr); |
|
280 | 280 | } |
|
281 | 281 | if(root!=NULL) |
|
282 | 282 | { |
|
283 | 283 | _self->closeSysDriver(root); |
|
284 | 284 | } |
|
285 | 285 | |
|
286 | 286 | } |
|
287 | 287 | |
|
288 | 288 | socexplorerplugin* socexplorerproxy::getSysDriver(const QString instanceName) |
|
289 | 289 | { |
|
290 | 290 | if(!_self)init(); |
|
291 | 291 | for(int i=0;i<linearDriverList->count();i++) |
|
292 | 292 | { |
|
293 | 293 | if(!linearDriverList->at(i)->instanceName().compare(instanceName)) |
|
294 | 294 | return linearDriverList->at(i); |
|
295 | 295 | } |
|
296 | 296 | return NULL; |
|
297 | 297 | } |
|
298 | 298 | |
|
299 | 299 | |
|
300 | 300 | void socexplorerproxy::closeSysDriver(const QString instanceName) |
|
301 | 301 | { |
|
302 | 302 | if(!_self)init(); |
|
303 | 303 | closeSysDriver(getSysDriver(instanceName),false); |
|
304 | 304 | } |
|
305 | 305 | |
|
306 | 306 | void socexplorerproxy::closeSysDriver(socexplorerplugin *driver, bool recursive) |
|
307 | 307 | { |
|
308 | 308 | if(!_self)init(); |
|
309 | 309 | if(driver!=NULL) |
|
310 | 310 | { |
|
311 | 311 | emit _self->removePluginGUI(driver); |
|
312 | 312 | if(driver->parent==NULL)SocExplorerEngine::removeSOC(driver); |
|
313 | 313 | while(driver->childs.count()!=0)closeSysDriver(driver->childs.first()); |
|
314 | 314 | linearDriverList->removeOne(driver); |
|
315 | 315 | if(driver->parent!= NULL) |
|
316 | 316 | { |
|
317 | 317 | driver->parent->childs.removeOne(driver); //Have parent so it's a child |
|
318 | 318 | disconnectChildToParent(driver); |
|
319 | 319 | disconnectChildToProxy(driver); |
|
320 | 320 | delete driver; |
|
321 | 321 | } |
|
322 | 322 | else |
|
323 | 323 | { |
|
324 | 324 | drivers->removeOne(driver); |
|
325 | 325 | disconnectChildToProxy(driver); |
|
326 | 326 | delete driver; |
|
327 | 327 | } |
|
328 | 328 | if(!recursive) |
|
329 | 329 | { |
|
330 | 330 | emit _self->clearMenu(); |
|
331 | 331 | emit _self->registermenu(mainWindow); |
|
332 | 332 | emit _self->treeChanged(QList<socexplorerplugin*>(*drivers)); |
|
333 | 333 | } |
|
334 | 334 | } |
|
335 | 335 | |
|
336 | 336 | } |
|
337 | 337 | |
|
338 | 338 | void socexplorerproxy::geteplugintree() |
|
339 | 339 | { |
|
340 | 340 | if(!_self)init(); |
|
341 | 341 | emit _self->treeChanged(QList<socexplorerplugin*>(*drivers)); |
|
342 | 342 | } |
|
343 | 343 | |
|
344 | 344 | void socexplorerproxy::closeSysDriverFromDriver(socexplorerplugin *driver) |
|
345 | 345 | { |
|
346 | 346 | if(!_self)init(); |
|
347 | 347 | emit _self->closeSysDriverSig(driver); |
|
348 | 348 | } |
|
349 | 349 | |
|
350 | 350 | void socexplorerproxy::updateText() |
|
351 | 351 | { |
|
352 | 352 | if(!_self)init(); |
|
353 | 353 | emit _self->clearMenu(); |
|
354 | 354 | emit _self->registermenu(mainWindow); |
|
355 | 355 | } |
|
356 | 356 | |
|
357 | 357 | |
|
358 | 358 | |
|
359 | 359 | |
|
360 | 360 | |
|
361 | 361 | void socexplorerproxy::makeMenu(QMenu* menu) |
|
362 | 362 | { |
|
363 | 363 | if(!_self)init(); |
|
364 | 364 | for(int i=0;i<drivers->count();i++) |
|
365 | 365 | { |
|
366 | 366 | drivers->at(i)->registermenu(menu); |
|
367 | 367 | } |
|
368 | 368 | } |
|
369 | 369 | |
|
370 | 370 |
This diff has been collapsed as it changes many lines, (830 lines changed) Show them Hide them | |||
@@ -1,1328 +1,1590 | |||
|
1 | 1 | #include "PySocExplorerEngine0.h" |
|
2 | 2 | #include <PythonQtConversion.h> |
|
3 | 3 | #include <PythonQtMethodInfo.h> |
|
4 | 4 | #include <PythonQtSignalReceiver.h> |
|
5 | #include <QIconEngine> | |
|
6 | 5 | #include <QVariant> |
|
7 | 6 | #include <qaction.h> |
|
7 | #include <qbackingstore.h> | |
|
8 | 8 | #include <qbitmap.h> |
|
9 | 9 | #include <qbytearray.h> |
|
10 | 10 | #include <qcoreevent.h> |
|
11 | 11 | #include <qcursor.h> |
|
12 | 12 | #include <qdockwidget.h> |
|
13 | 13 | #include <qevent.h> |
|
14 | 14 | #include <qfont.h> |
|
15 | 15 | #include <qgraphicseffect.h> |
|
16 | 16 | #include <qgraphicsproxywidget.h> |
|
17 | #include <qicon.h> | |
|
17 | 18 | #include <qkeysequence.h> |
|
18 | 19 | #include <qlayout.h> |
|
19 | 20 | #include <qlist.h> |
|
20 | 21 | #include <qlocale.h> |
|
21 | 22 | #include <qmargins.h> |
|
22 | 23 | #include <qmenu.h> |
|
24 | #include <qmetaobject.h> | |
|
23 | 25 | #include <qobject.h> |
|
24 | 26 | #include <qpaintdevice.h> |
|
25 | 27 | #include <qpaintengine.h> |
|
26 | 28 | #include <qpainter.h> |
|
27 | 29 | #include <qpalette.h> |
|
28 | 30 | #include <qpixmap.h> |
|
29 | 31 | #include <qpoint.h> |
|
30 | 32 | #include <qrect.h> |
|
31 | 33 | #include <qregion.h> |
|
32 | 34 | #include <qsize.h> |
|
33 | 35 | #include <qsizepolicy.h> |
|
34 | 36 | #include <qstyle.h> |
|
35 | 37 | #include <qstyleoption.h> |
|
36 | 38 | #include <qwidget.h> |
|
39 | #include <qwindow.h> | |
|
37 | 40 | #include <socexplorerplugin.h> |
|
38 | 41 | |
|
39 | 42 | PythonQtShell_socexplorerplugin::~PythonQtShell_socexplorerplugin() { |
|
40 | 43 | PythonQtPrivate* priv = PythonQt::priv(); |
|
41 | 44 | if (priv) { priv->shellClassDeleted(this); } |
|
42 | 45 | } |
|
43 | 46 | int PythonQtShell_socexplorerplugin::PID() |
|
44 | 47 | { |
|
45 | if (_wrapper) { | |
|
46 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "PID"); | |
|
47 | PyErr_Clear(); | |
|
48 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
48 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
49 | static PyObject* name = PyString_FromString("PID"); | |
|
50 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
51 | if (obj) { | |
|
49 | 52 | static const char* argumentList[] ={"int"}; |
|
50 | 53 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); |
|
51 | 54 | int returnValue; |
|
52 | 55 | void* args[1] = {NULL}; |
|
53 | 56 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
54 | 57 | if (result) { |
|
55 | 58 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
56 | 59 | if (args[0]!=&returnValue) { |
|
57 | 60 | if (args[0]==NULL) { |
|
58 | 61 | PythonQt::priv()->handleVirtualOverloadReturnError("PID", methodInfo, result); |
|
59 | 62 | } else { |
|
60 | 63 | returnValue = *((int*)args[0]); |
|
61 | 64 | } |
|
62 | 65 | } |
|
63 | 66 | } |
|
64 | 67 | if (result) { Py_DECREF(result); } |
|
65 | 68 | Py_DECREF(obj); |
|
66 | 69 | return returnValue; |
|
70 | } else { | |
|
71 | PyErr_Clear(); | |
|
67 | 72 | } |
|
68 | 73 | } |
|
69 | 74 | return socexplorerplugin::PID(); |
|
70 | 75 | } |
|
71 | unsigned int PythonQtShell_socexplorerplugin::Read(unsigned int* Value, unsigned int count, unsigned int address) | |
|
76 | unsigned int PythonQtShell_socexplorerplugin::Read(unsigned int* Value0, unsigned int count1, unsigned int address2) | |
|
72 | 77 | { |
|
73 | if (_wrapper) { | |
|
74 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "Read"); | |
|
75 | PyErr_Clear(); | |
|
76 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
78 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
79 | static PyObject* name = PyString_FromString("Read"); | |
|
80 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
81 | if (obj) { | |
|
77 | 82 | static const char* argumentList[] ={"unsigned int" , "unsigned int*" , "unsigned int" , "unsigned int"}; |
|
78 | 83 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(4, argumentList); |
|
79 | 84 | unsigned int returnValue; |
|
80 | void* args[4] = {NULL, (void*)&Value, (void*)&count, (void*)&address}; | |
|
85 | void* args[4] = {NULL, (void*)&Value0, (void*)&count1, (void*)&address2}; | |
|
81 | 86 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
82 | 87 | if (result) { |
|
83 | 88 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
84 | 89 | if (args[0]!=&returnValue) { |
|
85 | 90 | if (args[0]==NULL) { |
|
86 | 91 | PythonQt::priv()->handleVirtualOverloadReturnError("Read", methodInfo, result); |
|
87 | 92 | } else { |
|
88 | 93 | returnValue = *((unsigned int*)args[0]); |
|
89 | 94 | } |
|
90 | 95 | } |
|
91 | 96 | } |
|
92 | 97 | if (result) { Py_DECREF(result); } |
|
93 | 98 | Py_DECREF(obj); |
|
94 | 99 | return returnValue; |
|
100 | } else { | |
|
101 | PyErr_Clear(); | |
|
95 | 102 | } |
|
96 | 103 | } |
|
97 | return socexplorerplugin::Read(Value, count, address); | |
|
104 | return socexplorerplugin::Read(Value0, count1, address2); | |
|
98 | 105 | } |
|
99 | 106 | int PythonQtShell_socexplorerplugin::VID() |
|
100 | 107 | { |
|
101 | if (_wrapper) { | |
|
102 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "VID"); | |
|
103 | PyErr_Clear(); | |
|
104 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
108 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
109 | static PyObject* name = PyString_FromString("VID"); | |
|
110 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
111 | if (obj) { | |
|
105 | 112 | static const char* argumentList[] ={"int"}; |
|
106 | 113 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); |
|
107 | 114 | int returnValue; |
|
108 | 115 | void* args[1] = {NULL}; |
|
109 | 116 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
110 | 117 | if (result) { |
|
111 | 118 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
112 | 119 | if (args[0]!=&returnValue) { |
|
113 | 120 | if (args[0]==NULL) { |
|
114 | 121 | PythonQt::priv()->handleVirtualOverloadReturnError("VID", methodInfo, result); |
|
115 | 122 | } else { |
|
116 | 123 | returnValue = *((int*)args[0]); |
|
117 | 124 | } |
|
118 | 125 | } |
|
119 | 126 | } |
|
120 | 127 | if (result) { Py_DECREF(result); } |
|
121 | 128 | Py_DECREF(obj); |
|
122 | 129 | return returnValue; |
|
130 | } else { | |
|
131 | PyErr_Clear(); | |
|
123 | 132 | } |
|
124 | 133 | } |
|
125 | 134 | return socexplorerplugin::VID(); |
|
126 | 135 | } |
|
127 | unsigned int PythonQtShell_socexplorerplugin::Write(unsigned int* Value, unsigned int count, unsigned int address) | |
|
136 | unsigned int PythonQtShell_socexplorerplugin::Write(unsigned int* Value0, unsigned int count1, unsigned int address2) | |
|
128 | 137 | { |
|
129 | if (_wrapper) { | |
|
130 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "Write"); | |
|
131 | PyErr_Clear(); | |
|
132 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
138 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
139 | static PyObject* name = PyString_FromString("Write"); | |
|
140 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
141 | if (obj) { | |
|
133 | 142 | static const char* argumentList[] ={"unsigned int" , "unsigned int*" , "unsigned int" , "unsigned int"}; |
|
134 | 143 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(4, argumentList); |
|
135 | 144 | unsigned int returnValue; |
|
136 | void* args[4] = {NULL, (void*)&Value, (void*)&count, (void*)&address}; | |
|
145 | void* args[4] = {NULL, (void*)&Value0, (void*)&count1, (void*)&address2}; | |
|
137 | 146 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
138 | 147 | if (result) { |
|
139 | 148 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
140 | 149 | if (args[0]!=&returnValue) { |
|
141 | 150 | if (args[0]==NULL) { |
|
142 | 151 | PythonQt::priv()->handleVirtualOverloadReturnError("Write", methodInfo, result); |
|
143 | 152 | } else { |
|
144 | 153 | returnValue = *((unsigned int*)args[0]); |
|
145 | 154 | } |
|
146 | 155 | } |
|
147 | 156 | } |
|
148 | 157 | if (result) { Py_DECREF(result); } |
|
149 | 158 | Py_DECREF(obj); |
|
150 | 159 | return returnValue; |
|
160 | } else { | |
|
161 | PyErr_Clear(); | |
|
151 | 162 | } |
|
152 | 163 | } |
|
153 | return socexplorerplugin::Write(Value, count, address); | |
|
164 | return socexplorerplugin::Write(Value0, count1, address2); | |
|
154 | 165 | } |
|
155 | 166 | void PythonQtShell_socexplorerplugin::actionEvent(QActionEvent* arg__1) |
|
156 | 167 | { |
|
157 | if (_wrapper) { | |
|
158 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "actionEvent"); | |
|
159 | PyErr_Clear(); | |
|
160 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
168 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
169 | static PyObject* name = PyString_FromString("actionEvent"); | |
|
170 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
171 | if (obj) { | |
|
161 | 172 | static const char* argumentList[] ={"" , "QActionEvent*"}; |
|
162 | 173 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
163 | 174 | void* args[2] = {NULL, (void*)&arg__1}; |
|
164 | 175 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
165 | 176 | if (result) { Py_DECREF(result); } |
|
166 | 177 | Py_DECREF(obj); |
|
167 | 178 | return; |
|
179 | } else { | |
|
180 | PyErr_Clear(); | |
|
168 | 181 | } |
|
169 | 182 | } |
|
170 | 183 | socexplorerplugin::actionEvent(arg__1); |
|
171 | 184 | } |
|
172 | void PythonQtShell_socexplorerplugin::activate(bool flag) | |
|
185 | void PythonQtShell_socexplorerplugin::activate(bool flag0) | |
|
173 | 186 | { |
|
174 | if (_wrapper) { | |
|
175 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "activate"); | |
|
176 | PyErr_Clear(); | |
|
177 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
187 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
188 | static PyObject* name = PyString_FromString("activate"); | |
|
189 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
190 | if (obj) { | |
|
178 | 191 | static const char* argumentList[] ={"" , "bool"}; |
|
179 | 192 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
180 | void* args[2] = {NULL, (void*)&flag}; | |
|
193 | void* args[2] = {NULL, (void*)&flag0}; | |
|
181 | 194 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
182 | 195 | if (result) { Py_DECREF(result); } |
|
183 | 196 | Py_DECREF(obj); |
|
184 | 197 | return; |
|
198 | } else { | |
|
199 | PyErr_Clear(); | |
|
185 | 200 | } |
|
186 | 201 | } |
|
187 | socexplorerplugin::activate(flag); | |
|
202 | socexplorerplugin::activate(flag0); | |
|
188 | 203 | } |
|
189 | 204 | int PythonQtShell_socexplorerplugin::baseAddress() |
|
190 | 205 | { |
|
191 | if (_wrapper) { | |
|
192 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "baseAddress"); | |
|
193 | PyErr_Clear(); | |
|
194 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
206 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
207 | static PyObject* name = PyString_FromString("baseAddress"); | |
|
208 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
209 | if (obj) { | |
|
195 | 210 | static const char* argumentList[] ={"int"}; |
|
196 | 211 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); |
|
197 | 212 | int returnValue; |
|
198 | 213 | void* args[1] = {NULL}; |
|
199 | 214 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
200 | 215 | if (result) { |
|
201 | 216 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
202 | 217 | if (args[0]!=&returnValue) { |
|
203 | 218 | if (args[0]==NULL) { |
|
204 | 219 | PythonQt::priv()->handleVirtualOverloadReturnError("baseAddress", methodInfo, result); |
|
205 | 220 | } else { |
|
206 | 221 | returnValue = *((int*)args[0]); |
|
207 | 222 | } |
|
208 | 223 | } |
|
209 | 224 | } |
|
210 | 225 | if (result) { Py_DECREF(result); } |
|
211 | 226 | Py_DECREF(obj); |
|
212 | 227 | return returnValue; |
|
228 | } else { | |
|
229 | PyErr_Clear(); | |
|
213 | 230 | } |
|
214 | 231 | } |
|
215 | 232 | return socexplorerplugin::baseAddress(); |
|
216 | 233 | } |
|
217 | 234 | QString PythonQtShell_socexplorerplugin::baseName() |
|
218 | 235 | { |
|
219 | if (_wrapper) { | |
|
220 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "baseName"); | |
|
221 | PyErr_Clear(); | |
|
222 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
236 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
237 | static PyObject* name = PyString_FromString("baseName"); | |
|
238 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
239 | if (obj) { | |
|
223 | 240 | static const char* argumentList[] ={"QString"}; |
|
224 | 241 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); |
|
225 | 242 | QString returnValue; |
|
226 | 243 | void* args[1] = {NULL}; |
|
227 | 244 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
228 | 245 | if (result) { |
|
229 | 246 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
230 | 247 | if (args[0]!=&returnValue) { |
|
231 | 248 | if (args[0]==NULL) { |
|
232 | 249 | PythonQt::priv()->handleVirtualOverloadReturnError("baseName", methodInfo, result); |
|
233 | 250 | } else { |
|
234 | 251 | returnValue = *((QString*)args[0]); |
|
235 | 252 | } |
|
236 | 253 | } |
|
237 | 254 | } |
|
238 | 255 | if (result) { Py_DECREF(result); } |
|
239 | 256 | Py_DECREF(obj); |
|
240 | 257 | return returnValue; |
|
258 | } else { | |
|
259 | PyErr_Clear(); | |
|
241 | 260 | } |
|
242 | 261 | } |
|
243 | 262 | return socexplorerplugin::baseName(); |
|
244 | 263 | } |
|
245 | void PythonQtShell_socexplorerplugin::changeEvent(QEvent* event) | |
|
264 | void PythonQtShell_socexplorerplugin::changeEvent(QEvent* event0) | |
|
246 | 265 | { |
|
247 | if (_wrapper) { | |
|
248 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "changeEvent"); | |
|
249 | PyErr_Clear(); | |
|
250 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
266 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
267 | static PyObject* name = PyString_FromString("changeEvent"); | |
|
268 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
269 | if (obj) { | |
|
251 | 270 | static const char* argumentList[] ={"" , "QEvent*"}; |
|
252 | 271 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
253 | void* args[2] = {NULL, (void*)&event}; | |
|
272 | void* args[2] = {NULL, (void*)&event0}; | |
|
254 | 273 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
255 | 274 | if (result) { Py_DECREF(result); } |
|
256 | 275 | Py_DECREF(obj); |
|
257 | 276 | return; |
|
277 | } else { | |
|
278 | PyErr_Clear(); | |
|
258 | 279 | } |
|
259 | 280 | } |
|
260 | socexplorerplugin::changeEvent(event); | |
|
281 | socexplorerplugin::changeEvent(event0); | |
|
261 | 282 | } |
|
262 | 283 | void PythonQtShell_socexplorerplugin::childEvent(QChildEvent* arg__1) |
|
263 | 284 | { |
|
264 | if (_wrapper) { | |
|
265 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "childEvent"); | |
|
266 | PyErr_Clear(); | |
|
267 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
285 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
286 | static PyObject* name = PyString_FromString("childEvent"); | |
|
287 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
288 | if (obj) { | |
|
268 | 289 | static const char* argumentList[] ={"" , "QChildEvent*"}; |
|
269 | 290 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
270 | 291 | void* args[2] = {NULL, (void*)&arg__1}; |
|
271 | 292 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
272 | 293 | if (result) { Py_DECREF(result); } |
|
273 | 294 | Py_DECREF(obj); |
|
274 | 295 | return; |
|
296 | } else { | |
|
297 | PyErr_Clear(); | |
|
275 | 298 | } |
|
276 | 299 | } |
|
277 | 300 | socexplorerplugin::childEvent(arg__1); |
|
278 | 301 | } |
|
279 | void PythonQtShell_socexplorerplugin::closeEvent(QCloseEvent* event) | |
|
302 | void PythonQtShell_socexplorerplugin::closeEvent(QCloseEvent* event0) | |
|
280 | 303 | { |
|
281 | if (_wrapper) { | |
|
282 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "closeEvent"); | |
|
283 | PyErr_Clear(); | |
|
284 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
304 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
305 | static PyObject* name = PyString_FromString("closeEvent"); | |
|
306 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
307 | if (obj) { | |
|
285 | 308 | static const char* argumentList[] ={"" , "QCloseEvent*"}; |
|
286 | 309 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
287 | void* args[2] = {NULL, (void*)&event}; | |
|
310 | void* args[2] = {NULL, (void*)&event0}; | |
|
288 | 311 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
289 | 312 | if (result) { Py_DECREF(result); } |
|
290 | 313 | Py_DECREF(obj); |
|
291 | 314 | return; |
|
315 | } else { | |
|
316 | PyErr_Clear(); | |
|
292 | 317 | } |
|
293 | 318 | } |
|
294 | socexplorerplugin::closeEvent(event); | |
|
319 | socexplorerplugin::closeEvent(event0); | |
|
295 | 320 | } |
|
296 | 321 | void PythonQtShell_socexplorerplugin::closeMe() |
|
297 | 322 | { |
|
298 | if (_wrapper) { | |
|
299 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "closeMe"); | |
|
300 | PyErr_Clear(); | |
|
301 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
323 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
324 | static PyObject* name = PyString_FromString("closeMe"); | |
|
325 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
326 | if (obj) { | |
|
302 | 327 | static const char* argumentList[] ={""}; |
|
303 | 328 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); |
|
304 | 329 | void* args[1] = {NULL}; |
|
305 | 330 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
306 | 331 | if (result) { Py_DECREF(result); } |
|
307 | 332 | Py_DECREF(obj); |
|
308 | 333 | return; |
|
334 | } else { | |
|
335 | PyErr_Clear(); | |
|
309 | 336 | } |
|
310 | 337 | } |
|
311 | 338 | socexplorerplugin::closeMe(); |
|
312 | 339 | } |
|
313 | 340 | void PythonQtShell_socexplorerplugin::contextMenuEvent(QContextMenuEvent* arg__1) |
|
314 | 341 | { |
|
315 | if (_wrapper) { | |
|
316 |
PyObject* |
|
|
317 | PyErr_Clear(); | |
|
318 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
342 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
343 | static PyObject* name = PyString_FromString("contextMenuEvent"); | |
|
344 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
345 | if (obj) { | |
|
319 | 346 | static const char* argumentList[] ={"" , "QContextMenuEvent*"}; |
|
320 | 347 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
321 | 348 | void* args[2] = {NULL, (void*)&arg__1}; |
|
322 | 349 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
323 | 350 | if (result) { Py_DECREF(result); } |
|
324 | 351 | Py_DECREF(obj); |
|
325 | 352 | return; |
|
353 | } else { | |
|
354 | PyErr_Clear(); | |
|
326 | 355 | } |
|
327 | 356 | } |
|
328 | 357 | socexplorerplugin::contextMenuEvent(arg__1); |
|
329 | 358 | } |
|
330 | 359 | void PythonQtShell_socexplorerplugin::customEvent(QEvent* arg__1) |
|
331 | 360 | { |
|
332 | if (_wrapper) { | |
|
333 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "customEvent"); | |
|
334 | PyErr_Clear(); | |
|
335 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
361 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
362 | static PyObject* name = PyString_FromString("customEvent"); | |
|
363 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
364 | if (obj) { | |
|
336 | 365 | static const char* argumentList[] ={"" , "QEvent*"}; |
|
337 | 366 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
338 | 367 | void* args[2] = {NULL, (void*)&arg__1}; |
|
339 | 368 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
340 | 369 | if (result) { Py_DECREF(result); } |
|
341 | 370 | Py_DECREF(obj); |
|
342 | 371 | return; |
|
372 | } else { | |
|
373 | PyErr_Clear(); | |
|
343 | 374 | } |
|
344 | 375 | } |
|
345 | 376 | socexplorerplugin::customEvent(arg__1); |
|
346 | 377 | } |
|
347 | 378 | int PythonQtShell_socexplorerplugin::devType() const |
|
348 | 379 | { |
|
349 | if (_wrapper) { | |
|
350 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "devType"); | |
|
351 | PyErr_Clear(); | |
|
352 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
380 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
381 | static PyObject* name = PyString_FromString("devType"); | |
|
382 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
383 | if (obj) { | |
|
353 | 384 | static const char* argumentList[] ={"int"}; |
|
354 | 385 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); |
|
355 | 386 | int returnValue; |
|
356 | 387 | void* args[1] = {NULL}; |
|
357 | 388 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
358 | 389 | if (result) { |
|
359 | 390 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
360 | 391 | if (args[0]!=&returnValue) { |
|
361 | 392 | if (args[0]==NULL) { |
|
362 | 393 | PythonQt::priv()->handleVirtualOverloadReturnError("devType", methodInfo, result); |
|
363 | 394 | } else { |
|
364 | 395 | returnValue = *((int*)args[0]); |
|
365 | 396 | } |
|
366 | 397 | } |
|
367 | 398 | } |
|
368 | 399 | if (result) { Py_DECREF(result); } |
|
369 | 400 | Py_DECREF(obj); |
|
370 | 401 | return returnValue; |
|
402 | } else { | |
|
403 | PyErr_Clear(); | |
|
371 | 404 | } |
|
372 | 405 | } |
|
373 | 406 | return socexplorerplugin::devType(); |
|
374 | 407 | } |
|
375 | 408 | void PythonQtShell_socexplorerplugin::dragEnterEvent(QDragEnterEvent* arg__1) |
|
376 | 409 | { |
|
377 | if (_wrapper) { | |
|
378 |
PyObject* |
|
|
379 | PyErr_Clear(); | |
|
380 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
410 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
411 | static PyObject* name = PyString_FromString("dragEnterEvent"); | |
|
412 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
413 | if (obj) { | |
|
381 | 414 | static const char* argumentList[] ={"" , "QDragEnterEvent*"}; |
|
382 | 415 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
383 | 416 | void* args[2] = {NULL, (void*)&arg__1}; |
|
384 | 417 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
385 | 418 | if (result) { Py_DECREF(result); } |
|
386 | 419 | Py_DECREF(obj); |
|
387 | 420 | return; |
|
421 | } else { | |
|
422 | PyErr_Clear(); | |
|
388 | 423 | } |
|
389 | 424 | } |
|
390 | 425 | socexplorerplugin::dragEnterEvent(arg__1); |
|
391 | 426 | } |
|
392 | 427 | void PythonQtShell_socexplorerplugin::dragLeaveEvent(QDragLeaveEvent* arg__1) |
|
393 | 428 | { |
|
394 | if (_wrapper) { | |
|
395 |
PyObject* |
|
|
396 | PyErr_Clear(); | |
|
397 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
429 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
430 | static PyObject* name = PyString_FromString("dragLeaveEvent"); | |
|
431 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
432 | if (obj) { | |
|
398 | 433 | static const char* argumentList[] ={"" , "QDragLeaveEvent*"}; |
|
399 | 434 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
400 | 435 | void* args[2] = {NULL, (void*)&arg__1}; |
|
401 | 436 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
402 | 437 | if (result) { Py_DECREF(result); } |
|
403 | 438 | Py_DECREF(obj); |
|
404 | 439 | return; |
|
440 | } else { | |
|
441 | PyErr_Clear(); | |
|
405 | 442 | } |
|
406 | 443 | } |
|
407 | 444 | socexplorerplugin::dragLeaveEvent(arg__1); |
|
408 | 445 | } |
|
409 | 446 | void PythonQtShell_socexplorerplugin::dragMoveEvent(QDragMoveEvent* arg__1) |
|
410 | 447 | { |
|
411 | if (_wrapper) { | |
|
412 |
PyObject* |
|
|
413 | PyErr_Clear(); | |
|
414 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
448 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
449 | static PyObject* name = PyString_FromString("dragMoveEvent"); | |
|
450 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
451 | if (obj) { | |
|
415 | 452 | static const char* argumentList[] ={"" , "QDragMoveEvent*"}; |
|
416 | 453 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
417 | 454 | void* args[2] = {NULL, (void*)&arg__1}; |
|
418 | 455 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
419 | 456 | if (result) { Py_DECREF(result); } |
|
420 | 457 | Py_DECREF(obj); |
|
421 | 458 | return; |
|
459 | } else { | |
|
460 | PyErr_Clear(); | |
|
422 | 461 | } |
|
423 | 462 | } |
|
424 | 463 | socexplorerplugin::dragMoveEvent(arg__1); |
|
425 | 464 | } |
|
426 | 465 | void PythonQtShell_socexplorerplugin::dropEvent(QDropEvent* arg__1) |
|
427 | 466 | { |
|
428 | if (_wrapper) { | |
|
429 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "dropEvent"); | |
|
430 | PyErr_Clear(); | |
|
431 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
467 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
468 | static PyObject* name = PyString_FromString("dropEvent"); | |
|
469 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
470 | if (obj) { | |
|
432 | 471 | static const char* argumentList[] ={"" , "QDropEvent*"}; |
|
433 | 472 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
434 | 473 | void* args[2] = {NULL, (void*)&arg__1}; |
|
435 | 474 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
436 | 475 | if (result) { Py_DECREF(result); } |
|
437 | 476 | Py_DECREF(obj); |
|
438 | 477 | return; |
|
478 | } else { | |
|
479 | PyErr_Clear(); | |
|
439 | 480 | } |
|
440 | 481 | } |
|
441 | 482 | socexplorerplugin::dropEvent(arg__1); |
|
442 | 483 | } |
|
484 | bool PythonQtShell_socexplorerplugin::dumpMemory(unsigned int address0, unsigned int count1, QString file2) | |
|
485 | { | |
|
486 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
487 | static PyObject* name = PyString_FromString("dumpMemory"); | |
|
488 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
489 | if (obj) { | |
|
490 | static const char* argumentList[] ={"bool" , "unsigned int" , "unsigned int" , "QString"}; | |
|
491 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(4, argumentList); | |
|
492 | bool returnValue; | |
|
493 | void* args[4] = {NULL, (void*)&address0, (void*)&count1, (void*)&file2}; | |
|
494 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | |
|
495 | if (result) { | |
|
496 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | |
|
497 | if (args[0]!=&returnValue) { | |
|
498 | if (args[0]==NULL) { | |
|
499 | PythonQt::priv()->handleVirtualOverloadReturnError("dumpMemory", methodInfo, result); | |
|
500 | } else { | |
|
501 | returnValue = *((bool*)args[0]); | |
|
502 | } | |
|
503 | } | |
|
504 | } | |
|
505 | if (result) { Py_DECREF(result); } | |
|
506 | Py_DECREF(obj); | |
|
507 | return returnValue; | |
|
508 | } else { | |
|
509 | PyErr_Clear(); | |
|
510 | } | |
|
511 | } | |
|
512 | return socexplorerplugin::dumpMemory(address0, count1, file2); | |
|
513 | } | |
|
514 | bool PythonQtShell_socexplorerplugin::dumpMemory(unsigned int address0, unsigned int count1, QString file2, const QString& format3) | |
|
515 | { | |
|
516 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
517 | static PyObject* name = PyString_FromString("dumpMemory"); | |
|
518 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
519 | if (obj) { | |
|
520 | static const char* argumentList[] ={"bool" , "unsigned int" , "unsigned int" , "QString" , "const QString&"}; | |
|
521 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(5, argumentList); | |
|
522 | bool returnValue; | |
|
523 | void* args[5] = {NULL, (void*)&address0, (void*)&count1, (void*)&file2, (void*)&format3}; | |
|
524 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | |
|
525 | if (result) { | |
|
526 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | |
|
527 | if (args[0]!=&returnValue) { | |
|
528 | if (args[0]==NULL) { | |
|
529 | PythonQt::priv()->handleVirtualOverloadReturnError("dumpMemory", methodInfo, result); | |
|
530 | } else { | |
|
531 | returnValue = *((bool*)args[0]); | |
|
532 | } | |
|
533 | } | |
|
534 | } | |
|
535 | if (result) { Py_DECREF(result); } | |
|
536 | Py_DECREF(obj); | |
|
537 | return returnValue; | |
|
538 | } else { | |
|
539 | PyErr_Clear(); | |
|
540 | } | |
|
541 | } | |
|
542 | return socexplorerplugin::dumpMemory(address0, count1, file2, format3); | |
|
543 | } | |
|
443 | 544 | void PythonQtShell_socexplorerplugin::enterEvent(QEvent* arg__1) |
|
444 | 545 | { |
|
445 | if (_wrapper) { | |
|
446 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "enterEvent"); | |
|
447 | PyErr_Clear(); | |
|
448 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
546 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
547 | static PyObject* name = PyString_FromString("enterEvent"); | |
|
548 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
549 | if (obj) { | |
|
449 | 550 | static const char* argumentList[] ={"" , "QEvent*"}; |
|
450 | 551 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
451 | 552 | void* args[2] = {NULL, (void*)&arg__1}; |
|
452 | 553 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
453 | 554 | if (result) { Py_DECREF(result); } |
|
454 | 555 | Py_DECREF(obj); |
|
455 | 556 | return; |
|
557 | } else { | |
|
558 | PyErr_Clear(); | |
|
456 | 559 | } |
|
457 | 560 | } |
|
458 | 561 | socexplorerplugin::enterEvent(arg__1); |
|
459 | 562 | } |
|
460 | bool PythonQtShell_socexplorerplugin::event(QEvent* event) | |
|
563 | bool PythonQtShell_socexplorerplugin::event(QEvent* event0) | |
|
461 | 564 | { |
|
462 | if (_wrapper) { | |
|
463 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "event"); | |
|
464 | PyErr_Clear(); | |
|
465 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
565 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
566 | static PyObject* name = PyString_FromString("event"); | |
|
567 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
568 | if (obj) { | |
|
466 | 569 | static const char* argumentList[] ={"bool" , "QEvent*"}; |
|
467 | 570 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
468 | 571 | bool returnValue; |
|
469 | void* args[2] = {NULL, (void*)&event}; | |
|
572 | void* args[2] = {NULL, (void*)&event0}; | |
|
470 | 573 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
471 | 574 | if (result) { |
|
472 | 575 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
473 | 576 | if (args[0]!=&returnValue) { |
|
474 | 577 | if (args[0]==NULL) { |
|
475 | 578 | PythonQt::priv()->handleVirtualOverloadReturnError("event", methodInfo, result); |
|
476 | 579 | } else { |
|
477 | 580 | returnValue = *((bool*)args[0]); |
|
478 | 581 | } |
|
479 | 582 | } |
|
480 | 583 | } |
|
481 | 584 | if (result) { Py_DECREF(result); } |
|
482 | 585 | Py_DECREF(obj); |
|
483 | 586 | return returnValue; |
|
587 | } else { | |
|
588 | PyErr_Clear(); | |
|
484 | 589 | } |
|
485 | 590 | } |
|
486 | return socexplorerplugin::event(event); | |
|
591 | return socexplorerplugin::event(event0); | |
|
487 | 592 | } |
|
488 | 593 | bool PythonQtShell_socexplorerplugin::eventFilter(QObject* arg__1, QEvent* arg__2) |
|
489 | 594 | { |
|
490 | if (_wrapper) { | |
|
491 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "eventFilter"); | |
|
492 | PyErr_Clear(); | |
|
493 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
595 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
596 | static PyObject* name = PyString_FromString("eventFilter"); | |
|
597 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
598 | if (obj) { | |
|
494 | 599 | static const char* argumentList[] ={"bool" , "QObject*" , "QEvent*"}; |
|
495 | 600 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(3, argumentList); |
|
496 | 601 | bool returnValue; |
|
497 | 602 | void* args[3] = {NULL, (void*)&arg__1, (void*)&arg__2}; |
|
498 | 603 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
499 | 604 | if (result) { |
|
500 | 605 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
501 | 606 | if (args[0]!=&returnValue) { |
|
502 | 607 | if (args[0]==NULL) { |
|
503 | 608 | PythonQt::priv()->handleVirtualOverloadReturnError("eventFilter", methodInfo, result); |
|
504 | 609 | } else { |
|
505 | 610 | returnValue = *((bool*)args[0]); |
|
506 | 611 | } |
|
507 | 612 | } |
|
508 | 613 | } |
|
509 | 614 | if (result) { Py_DECREF(result); } |
|
510 | 615 | Py_DECREF(obj); |
|
511 | 616 | return returnValue; |
|
617 | } else { | |
|
618 | PyErr_Clear(); | |
|
512 | 619 | } |
|
513 | 620 | } |
|
514 | 621 | return socexplorerplugin::eventFilter(arg__1, arg__2); |
|
515 | 622 | } |
|
516 | 623 | void PythonQtShell_socexplorerplugin::focusInEvent(QFocusEvent* arg__1) |
|
517 | 624 | { |
|
518 | if (_wrapper) { | |
|
519 |
PyObject* |
|
|
520 | PyErr_Clear(); | |
|
521 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
625 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
626 | static PyObject* name = PyString_FromString("focusInEvent"); | |
|
627 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
628 | if (obj) { | |
|
522 | 629 | static const char* argumentList[] ={"" , "QFocusEvent*"}; |
|
523 | 630 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
524 | 631 | void* args[2] = {NULL, (void*)&arg__1}; |
|
525 | 632 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
526 | 633 | if (result) { Py_DECREF(result); } |
|
527 | 634 | Py_DECREF(obj); |
|
528 | 635 | return; |
|
636 | } else { | |
|
637 | PyErr_Clear(); | |
|
529 | 638 | } |
|
530 | 639 | } |
|
531 | 640 | socexplorerplugin::focusInEvent(arg__1); |
|
532 | 641 | } |
|
533 | bool PythonQtShell_socexplorerplugin::focusNextPrevChild(bool next) | |
|
642 | bool PythonQtShell_socexplorerplugin::focusNextPrevChild(bool next0) | |
|
534 | 643 | { |
|
535 | if (_wrapper) { | |
|
536 |
PyObject* |
|
|
537 | PyErr_Clear(); | |
|
538 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
644 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
645 | static PyObject* name = PyString_FromString("focusNextPrevChild"); | |
|
646 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
647 | if (obj) { | |
|
539 | 648 | static const char* argumentList[] ={"bool" , "bool"}; |
|
540 | 649 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
541 | 650 | bool returnValue; |
|
542 | void* args[2] = {NULL, (void*)&next}; | |
|
651 | void* args[2] = {NULL, (void*)&next0}; | |
|
543 | 652 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
544 | 653 | if (result) { |
|
545 | 654 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
546 | 655 | if (args[0]!=&returnValue) { |
|
547 | 656 | if (args[0]==NULL) { |
|
548 | 657 | PythonQt::priv()->handleVirtualOverloadReturnError("focusNextPrevChild", methodInfo, result); |
|
549 | 658 | } else { |
|
550 | 659 | returnValue = *((bool*)args[0]); |
|
551 | 660 | } |
|
552 | 661 | } |
|
553 | 662 | } |
|
554 | 663 | if (result) { Py_DECREF(result); } |
|
555 | 664 | Py_DECREF(obj); |
|
556 | 665 | return returnValue; |
|
666 | } else { | |
|
667 | PyErr_Clear(); | |
|
557 | 668 | } |
|
558 | 669 | } |
|
559 | return socexplorerplugin::focusNextPrevChild(next); | |
|
670 | return socexplorerplugin::focusNextPrevChild(next0); | |
|
560 | 671 | } |
|
561 | 672 | void PythonQtShell_socexplorerplugin::focusOutEvent(QFocusEvent* arg__1) |
|
562 | 673 | { |
|
563 | if (_wrapper) { | |
|
564 |
PyObject* |
|
|
565 | PyErr_Clear(); | |
|
566 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
674 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
675 | static PyObject* name = PyString_FromString("focusOutEvent"); | |
|
676 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
677 | if (obj) { | |
|
567 | 678 | static const char* argumentList[] ={"" , "QFocusEvent*"}; |
|
568 | 679 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
569 | 680 | void* args[2] = {NULL, (void*)&arg__1}; |
|
570 | 681 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
571 | 682 | if (result) { Py_DECREF(result); } |
|
572 | 683 | Py_DECREF(obj); |
|
573 | 684 | return; |
|
685 | } else { | |
|
686 | PyErr_Clear(); | |
|
574 | 687 | } |
|
575 | 688 | } |
|
576 | 689 | socexplorerplugin::focusOutEvent(arg__1); |
|
577 | 690 | } |
|
578 | 691 | bool PythonQtShell_socexplorerplugin::hasHeightForWidth() const |
|
579 | 692 | { |
|
580 | if (_wrapper) { | |
|
581 |
PyObject* |
|
|
582 | PyErr_Clear(); | |
|
583 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
693 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
694 | static PyObject* name = PyString_FromString("hasHeightForWidth"); | |
|
695 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
696 | if (obj) { | |
|
584 | 697 | static const char* argumentList[] ={"bool"}; |
|
585 | 698 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); |
|
586 | 699 | bool returnValue; |
|
587 | 700 | void* args[1] = {NULL}; |
|
588 | 701 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
589 | 702 | if (result) { |
|
590 | 703 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
591 | 704 | if (args[0]!=&returnValue) { |
|
592 | 705 | if (args[0]==NULL) { |
|
593 | 706 | PythonQt::priv()->handleVirtualOverloadReturnError("hasHeightForWidth", methodInfo, result); |
|
594 | 707 | } else { |
|
595 | 708 | returnValue = *((bool*)args[0]); |
|
596 | 709 | } |
|
597 | 710 | } |
|
598 | 711 | } |
|
599 | 712 | if (result) { Py_DECREF(result); } |
|
600 | 713 | Py_DECREF(obj); |
|
601 | 714 | return returnValue; |
|
715 | } else { | |
|
716 | PyErr_Clear(); | |
|
602 | 717 | } |
|
603 | 718 | } |
|
604 | 719 | return socexplorerplugin::hasHeightForWidth(); |
|
605 | 720 | } |
|
606 | 721 | int PythonQtShell_socexplorerplugin::heightForWidth(int arg__1) const |
|
607 | 722 | { |
|
608 | if (_wrapper) { | |
|
609 |
PyObject* |
|
|
610 | PyErr_Clear(); | |
|
611 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
723 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
724 | static PyObject* name = PyString_FromString("heightForWidth"); | |
|
725 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
726 | if (obj) { | |
|
612 | 727 | static const char* argumentList[] ={"int" , "int"}; |
|
613 | 728 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
614 | 729 | int returnValue; |
|
615 | 730 | void* args[2] = {NULL, (void*)&arg__1}; |
|
616 | 731 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
617 | 732 | if (result) { |
|
618 | 733 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
619 | 734 | if (args[0]!=&returnValue) { |
|
620 | 735 | if (args[0]==NULL) { |
|
621 | 736 | PythonQt::priv()->handleVirtualOverloadReturnError("heightForWidth", methodInfo, result); |
|
622 | 737 | } else { |
|
623 | 738 | returnValue = *((int*)args[0]); |
|
624 | 739 | } |
|
625 | 740 | } |
|
626 | 741 | } |
|
627 | 742 | if (result) { Py_DECREF(result); } |
|
628 | 743 | Py_DECREF(obj); |
|
629 | 744 | return returnValue; |
|
745 | } else { | |
|
746 | PyErr_Clear(); | |
|
630 | 747 | } |
|
631 | 748 | } |
|
632 | 749 | return socexplorerplugin::heightForWidth(arg__1); |
|
633 | 750 | } |
|
634 | 751 | void PythonQtShell_socexplorerplugin::hideEvent(QHideEvent* arg__1) |
|
635 | 752 | { |
|
636 | if (_wrapper) { | |
|
637 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "hideEvent"); | |
|
638 | PyErr_Clear(); | |
|
639 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
753 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
754 | static PyObject* name = PyString_FromString("hideEvent"); | |
|
755 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
756 | if (obj) { | |
|
640 | 757 | static const char* argumentList[] ={"" , "QHideEvent*"}; |
|
641 | 758 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
642 | 759 | void* args[2] = {NULL, (void*)&arg__1}; |
|
643 | 760 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
644 | 761 | if (result) { Py_DECREF(result); } |
|
645 | 762 | Py_DECREF(obj); |
|
646 | 763 | return; |
|
764 | } else { | |
|
765 | PyErr_Clear(); | |
|
647 | 766 | } |
|
648 | 767 | } |
|
649 | 768 | socexplorerplugin::hideEvent(arg__1); |
|
650 | 769 | } |
|
651 | void PythonQtShell_socexplorerplugin::initPainter(QPainter* painter) const | |
|
770 | void PythonQtShell_socexplorerplugin::initPainter(QPainter* painter0) const | |
|
652 | 771 | { |
|
653 | if (_wrapper) { | |
|
654 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "initPainter"); | |
|
655 | PyErr_Clear(); | |
|
656 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
772 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
773 | static PyObject* name = PyString_FromString("initPainter"); | |
|
774 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
775 | if (obj) { | |
|
657 | 776 | static const char* argumentList[] ={"" , "QPainter*"}; |
|
658 | 777 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
659 | void* args[2] = {NULL, (void*)&painter}; | |
|
778 | void* args[2] = {NULL, (void*)&painter0}; | |
|
660 | 779 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
661 | 780 | if (result) { Py_DECREF(result); } |
|
662 | 781 | Py_DECREF(obj); |
|
663 | 782 | return; |
|
783 | } else { | |
|
784 | PyErr_Clear(); | |
|
664 | 785 | } |
|
665 | 786 | } |
|
666 | socexplorerplugin::initPainter(painter); | |
|
787 | socexplorerplugin::initPainter(painter0); | |
|
667 | 788 | } |
|
668 | 789 | void PythonQtShell_socexplorerplugin::inputMethodEvent(QInputMethodEvent* arg__1) |
|
669 | 790 | { |
|
670 | if (_wrapper) { | |
|
671 |
PyObject* |
|
|
672 | PyErr_Clear(); | |
|
673 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
791 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
792 | static PyObject* name = PyString_FromString("inputMethodEvent"); | |
|
793 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
794 | if (obj) { | |
|
674 | 795 | static const char* argumentList[] ={"" , "QInputMethodEvent*"}; |
|
675 | 796 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
676 | 797 | void* args[2] = {NULL, (void*)&arg__1}; |
|
677 | 798 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
678 | 799 | if (result) { Py_DECREF(result); } |
|
679 | 800 | Py_DECREF(obj); |
|
680 | 801 | return; |
|
802 | } else { | |
|
803 | PyErr_Clear(); | |
|
681 | 804 | } |
|
682 | 805 | } |
|
683 | 806 | socexplorerplugin::inputMethodEvent(arg__1); |
|
684 | 807 | } |
|
685 | 808 | QVariant PythonQtShell_socexplorerplugin::inputMethodQuery(Qt::InputMethodQuery arg__1) const |
|
686 | 809 | { |
|
687 | if (_wrapper) { | |
|
688 |
PyObject* |
|
|
689 | PyErr_Clear(); | |
|
690 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
810 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
811 | static PyObject* name = PyString_FromString("inputMethodQuery"); | |
|
812 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
813 | if (obj) { | |
|
691 | 814 | static const char* argumentList[] ={"QVariant" , "Qt::InputMethodQuery"}; |
|
692 | 815 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
693 | 816 | QVariant returnValue; |
|
694 | 817 | void* args[2] = {NULL, (void*)&arg__1}; |
|
695 | 818 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
696 | 819 | if (result) { |
|
697 | 820 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
698 | 821 | if (args[0]!=&returnValue) { |
|
699 | 822 | if (args[0]==NULL) { |
|
700 | 823 | PythonQt::priv()->handleVirtualOverloadReturnError("inputMethodQuery", methodInfo, result); |
|
701 | 824 | } else { |
|
702 | 825 | returnValue = *((QVariant*)args[0]); |
|
703 | 826 | } |
|
704 | 827 | } |
|
705 | 828 | } |
|
706 | 829 | if (result) { Py_DECREF(result); } |
|
707 | 830 | Py_DECREF(obj); |
|
708 | 831 | return returnValue; |
|
832 | } else { | |
|
833 | PyErr_Clear(); | |
|
709 | 834 | } |
|
710 | 835 | } |
|
711 | 836 | return socexplorerplugin::inputMethodQuery(arg__1); |
|
712 | 837 | } |
|
713 | 838 | int PythonQtShell_socexplorerplugin::isConnected() |
|
714 | 839 | { |
|
715 | if (_wrapper) { | |
|
716 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "isConnected"); | |
|
717 | PyErr_Clear(); | |
|
718 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
840 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
841 | static PyObject* name = PyString_FromString("isConnected"); | |
|
842 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
843 | if (obj) { | |
|
719 | 844 | static const char* argumentList[] ={"int"}; |
|
720 | 845 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); |
|
721 | 846 | int returnValue; |
|
722 | 847 | void* args[1] = {NULL}; |
|
723 | 848 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
724 | 849 | if (result) { |
|
725 | 850 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
726 | 851 | if (args[0]!=&returnValue) { |
|
727 | 852 | if (args[0]==NULL) { |
|
728 | 853 | PythonQt::priv()->handleVirtualOverloadReturnError("isConnected", methodInfo, result); |
|
729 | 854 | } else { |
|
730 | 855 | returnValue = *((int*)args[0]); |
|
731 | 856 | } |
|
732 | 857 | } |
|
733 | 858 | } |
|
734 | 859 | if (result) { Py_DECREF(result); } |
|
735 | 860 | Py_DECREF(obj); |
|
736 | 861 | return returnValue; |
|
862 | } else { | |
|
863 | PyErr_Clear(); | |
|
737 | 864 | } |
|
738 | 865 | } |
|
739 | 866 | return socexplorerplugin::isConnected(); |
|
740 | 867 | } |
|
741 | 868 | void PythonQtShell_socexplorerplugin::keyPressEvent(QKeyEvent* arg__1) |
|
742 | 869 | { |
|
743 | if (_wrapper) { | |
|
744 |
PyObject* |
|
|
745 | PyErr_Clear(); | |
|
746 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
870 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
871 | static PyObject* name = PyString_FromString("keyPressEvent"); | |
|
872 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
873 | if (obj) { | |
|
874 | static const char* argumentList[] ={"" , "QKeyEvent*"}; | |
|
875 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | |
|
876 | void* args[2] = {NULL, (void*)&arg__1}; | |
|
877 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | |
|
878 | if (result) { Py_DECREF(result); } | |
|
879 | Py_DECREF(obj); | |
|
880 | return; | |
|
881 | } else { | |
|
882 | PyErr_Clear(); | |
|
883 | } | |
|
884 | } | |
|
885 | socexplorerplugin::keyPressEvent(arg__1); | |
|
886 | } | |
|
887 | void PythonQtShell_socexplorerplugin::keyReleaseEvent(QKeyEvent* arg__1) | |
|
888 | { | |
|
889 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
890 | static PyObject* name = PyString_FromString("keyReleaseEvent"); | |
|
891 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
892 | if (obj) { | |
|
747 | 893 | static const char* argumentList[] ={"" , "QKeyEvent*"}; |
|
748 | 894 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
749 | 895 | void* args[2] = {NULL, (void*)&arg__1}; |
|
750 | 896 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
751 | 897 | if (result) { Py_DECREF(result); } |
|
752 | 898 | Py_DECREF(obj); |
|
753 | 899 | return; |
|
754 | } | |
|
755 | } | |
|
756 | socexplorerplugin::keyPressEvent(arg__1); | |
|
757 | } | |
|
758 | void PythonQtShell_socexplorerplugin::keyReleaseEvent(QKeyEvent* arg__1) | |
|
759 | { | |
|
760 | if (_wrapper) { | |
|
761 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "keyReleaseEvent"); | |
|
762 | PyErr_Clear(); | |
|
763 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
764 | static const char* argumentList[] ={"" , "QKeyEvent*"}; | |
|
765 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); | |
|
766 | void* args[2] = {NULL, (void*)&arg__1}; | |
|
767 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | |
|
768 | if (result) { Py_DECREF(result); } | |
|
769 | Py_DECREF(obj); | |
|
770 | return; | |
|
900 | } else { | |
|
901 | PyErr_Clear(); | |
|
771 | 902 | } |
|
772 | 903 | } |
|
773 | 904 | socexplorerplugin::keyReleaseEvent(arg__1); |
|
774 | 905 | } |
|
775 | 906 | void PythonQtShell_socexplorerplugin::leaveEvent(QEvent* arg__1) |
|
776 | 907 | { |
|
777 | if (_wrapper) { | |
|
778 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "leaveEvent"); | |
|
779 | PyErr_Clear(); | |
|
780 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
908 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
909 | static PyObject* name = PyString_FromString("leaveEvent"); | |
|
910 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
911 | if (obj) { | |
|
781 | 912 | static const char* argumentList[] ={"" , "QEvent*"}; |
|
782 | 913 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
783 | 914 | void* args[2] = {NULL, (void*)&arg__1}; |
|
784 | 915 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
785 | 916 | if (result) { Py_DECREF(result); } |
|
786 | 917 | Py_DECREF(obj); |
|
787 | 918 | return; |
|
919 | } else { | |
|
920 | PyErr_Clear(); | |
|
788 | 921 | } |
|
789 | 922 | } |
|
790 | 923 | socexplorerplugin::leaveEvent(arg__1); |
|
791 | 924 | } |
|
925 | bool PythonQtShell_socexplorerplugin::loadbin(unsigned int address0, QString file1) | |
|
926 | { | |
|
927 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
928 | static PyObject* name = PyString_FromString("loadbin"); | |
|
929 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
930 | if (obj) { | |
|
931 | static const char* argumentList[] ={"bool" , "unsigned int" , "QString"}; | |
|
932 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(3, argumentList); | |
|
933 | bool returnValue; | |
|
934 | void* args[3] = {NULL, (void*)&address0, (void*)&file1}; | |
|
935 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | |
|
936 | if (result) { | |
|
937 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | |
|
938 | if (args[0]!=&returnValue) { | |
|
939 | if (args[0]==NULL) { | |
|
940 | PythonQt::priv()->handleVirtualOverloadReturnError("loadbin", methodInfo, result); | |
|
941 | } else { | |
|
942 | returnValue = *((bool*)args[0]); | |
|
943 | } | |
|
944 | } | |
|
945 | } | |
|
946 | if (result) { Py_DECREF(result); } | |
|
947 | Py_DECREF(obj); | |
|
948 | return returnValue; | |
|
949 | } else { | |
|
950 | PyErr_Clear(); | |
|
951 | } | |
|
952 | } | |
|
953 | return socexplorerplugin::loadbin(address0, file1); | |
|
954 | } | |
|
955 | bool PythonQtShell_socexplorerplugin::memSet(unsigned int address0, int value1, unsigned int count2) | |
|
956 | { | |
|
957 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
958 | static PyObject* name = PyString_FromString("memSet"); | |
|
959 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
960 | if (obj) { | |
|
961 | static const char* argumentList[] ={"bool" , "unsigned int" , "int" , "unsigned int"}; | |
|
962 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(4, argumentList); | |
|
963 | bool returnValue; | |
|
964 | void* args[4] = {NULL, (void*)&address0, (void*)&value1, (void*)&count2}; | |
|
965 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | |
|
966 | if (result) { | |
|
967 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | |
|
968 | if (args[0]!=&returnValue) { | |
|
969 | if (args[0]==NULL) { | |
|
970 | PythonQt::priv()->handleVirtualOverloadReturnError("memSet", methodInfo, result); | |
|
971 | } else { | |
|
972 | returnValue = *((bool*)args[0]); | |
|
973 | } | |
|
974 | } | |
|
975 | } | |
|
976 | if (result) { Py_DECREF(result); } | |
|
977 | Py_DECREF(obj); | |
|
978 | return returnValue; | |
|
979 | } else { | |
|
980 | PyErr_Clear(); | |
|
981 | } | |
|
982 | } | |
|
983 | return socexplorerplugin::memSet(address0, value1, count2); | |
|
984 | } | |
|
792 | 985 | int PythonQtShell_socexplorerplugin::metric(QPaintDevice::PaintDeviceMetric arg__1) const |
|
793 | 986 | { |
|
794 | if (_wrapper) { | |
|
795 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "metric"); | |
|
796 | PyErr_Clear(); | |
|
797 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
987 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
988 | static PyObject* name = PyString_FromString("metric"); | |
|
989 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
990 | if (obj) { | |
|
798 | 991 | static const char* argumentList[] ={"int" , "QPaintDevice::PaintDeviceMetric"}; |
|
799 | 992 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
800 | 993 | int returnValue; |
|
801 | 994 | void* args[2] = {NULL, (void*)&arg__1}; |
|
802 | 995 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
803 | 996 | if (result) { |
|
804 | 997 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
805 | 998 | if (args[0]!=&returnValue) { |
|
806 | 999 | if (args[0]==NULL) { |
|
807 | 1000 | PythonQt::priv()->handleVirtualOverloadReturnError("metric", methodInfo, result); |
|
808 | 1001 | } else { |
|
809 | 1002 | returnValue = *((int*)args[0]); |
|
810 | 1003 | } |
|
811 | 1004 | } |
|
812 | 1005 | } |
|
813 | 1006 | if (result) { Py_DECREF(result); } |
|
814 | 1007 | Py_DECREF(obj); |
|
815 | 1008 | return returnValue; |
|
1009 | } else { | |
|
1010 | PyErr_Clear(); | |
|
816 | 1011 | } |
|
817 | 1012 | } |
|
818 | 1013 | return socexplorerplugin::metric(arg__1); |
|
819 | 1014 | } |
|
820 | 1015 | QSize PythonQtShell_socexplorerplugin::minimumSizeHint() const |
|
821 | 1016 | { |
|
822 | if (_wrapper) { | |
|
823 |
PyObject* |
|
|
824 | PyErr_Clear(); | |
|
825 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1017 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1018 | static PyObject* name = PyString_FromString("getMinimumSizeHint"); | |
|
1019 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1020 | if (obj) { | |
|
826 | 1021 | static const char* argumentList[] ={"QSize"}; |
|
827 | 1022 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); |
|
828 | 1023 | QSize returnValue; |
|
829 | 1024 | void* args[1] = {NULL}; |
|
830 | 1025 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
831 | 1026 | if (result) { |
|
832 | 1027 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
833 | 1028 | if (args[0]!=&returnValue) { |
|
834 | 1029 | if (args[0]==NULL) { |
|
835 | 1030 | PythonQt::priv()->handleVirtualOverloadReturnError("getMinimumSizeHint", methodInfo, result); |
|
836 | 1031 | } else { |
|
837 | 1032 | returnValue = *((QSize*)args[0]); |
|
838 | 1033 | } |
|
839 | 1034 | } |
|
840 | 1035 | } |
|
841 | 1036 | if (result) { Py_DECREF(result); } |
|
842 | 1037 | Py_DECREF(obj); |
|
843 | 1038 | return returnValue; |
|
1039 | } else { | |
|
1040 | PyErr_Clear(); | |
|
844 | 1041 | } |
|
845 | 1042 | } |
|
846 | 1043 | return socexplorerplugin::minimumSizeHint(); |
|
847 | 1044 | } |
|
848 | 1045 | void PythonQtShell_socexplorerplugin::mouseDoubleClickEvent(QMouseEvent* arg__1) |
|
849 | 1046 | { |
|
850 | if (_wrapper) { | |
|
851 |
PyObject* |
|
|
852 | PyErr_Clear(); | |
|
853 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1047 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1048 | static PyObject* name = PyString_FromString("mouseDoubleClickEvent"); | |
|
1049 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1050 | if (obj) { | |
|
854 | 1051 | static const char* argumentList[] ={"" , "QMouseEvent*"}; |
|
855 | 1052 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
856 | 1053 | void* args[2] = {NULL, (void*)&arg__1}; |
|
857 | 1054 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
858 | 1055 | if (result) { Py_DECREF(result); } |
|
859 | 1056 | Py_DECREF(obj); |
|
860 | 1057 | return; |
|
1058 | } else { | |
|
1059 | PyErr_Clear(); | |
|
861 | 1060 | } |
|
862 | 1061 | } |
|
863 | 1062 | socexplorerplugin::mouseDoubleClickEvent(arg__1); |
|
864 | 1063 | } |
|
865 | 1064 | void PythonQtShell_socexplorerplugin::mouseMoveEvent(QMouseEvent* arg__1) |
|
866 | 1065 | { |
|
867 | if (_wrapper) { | |
|
868 |
PyObject* |
|
|
869 | PyErr_Clear(); | |
|
870 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1066 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1067 | static PyObject* name = PyString_FromString("mouseMoveEvent"); | |
|
1068 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1069 | if (obj) { | |
|
871 | 1070 | static const char* argumentList[] ={"" , "QMouseEvent*"}; |
|
872 | 1071 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
873 | 1072 | void* args[2] = {NULL, (void*)&arg__1}; |
|
874 | 1073 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
875 | 1074 | if (result) { Py_DECREF(result); } |
|
876 | 1075 | Py_DECREF(obj); |
|
877 | 1076 | return; |
|
1077 | } else { | |
|
1078 | PyErr_Clear(); | |
|
878 | 1079 | } |
|
879 | 1080 | } |
|
880 | 1081 | socexplorerplugin::mouseMoveEvent(arg__1); |
|
881 | 1082 | } |
|
882 | 1083 | void PythonQtShell_socexplorerplugin::mousePressEvent(QMouseEvent* arg__1) |
|
883 | 1084 | { |
|
884 | if (_wrapper) { | |
|
885 |
PyObject* |
|
|
886 | PyErr_Clear(); | |
|
887 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1085 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1086 | static PyObject* name = PyString_FromString("mousePressEvent"); | |
|
1087 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1088 | if (obj) { | |
|
888 | 1089 | static const char* argumentList[] ={"" , "QMouseEvent*"}; |
|
889 | 1090 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
890 | 1091 | void* args[2] = {NULL, (void*)&arg__1}; |
|
891 | 1092 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
892 | 1093 | if (result) { Py_DECREF(result); } |
|
893 | 1094 | Py_DECREF(obj); |
|
894 | 1095 | return; |
|
1096 | } else { | |
|
1097 | PyErr_Clear(); | |
|
895 | 1098 | } |
|
896 | 1099 | } |
|
897 | 1100 | socexplorerplugin::mousePressEvent(arg__1); |
|
898 | 1101 | } |
|
899 | 1102 | void PythonQtShell_socexplorerplugin::mouseReleaseEvent(QMouseEvent* arg__1) |
|
900 | 1103 | { |
|
901 | if (_wrapper) { | |
|
902 |
PyObject* |
|
|
903 | PyErr_Clear(); | |
|
904 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1104 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1105 | static PyObject* name = PyString_FromString("mouseReleaseEvent"); | |
|
1106 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1107 | if (obj) { | |
|
905 | 1108 | static const char* argumentList[] ={"" , "QMouseEvent*"}; |
|
906 | 1109 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
907 | 1110 | void* args[2] = {NULL, (void*)&arg__1}; |
|
908 | 1111 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
909 | 1112 | if (result) { Py_DECREF(result); } |
|
910 | 1113 | Py_DECREF(obj); |
|
911 | 1114 | return; |
|
1115 | } else { | |
|
1116 | PyErr_Clear(); | |
|
912 | 1117 | } |
|
913 | 1118 | } |
|
914 | 1119 | socexplorerplugin::mouseReleaseEvent(arg__1); |
|
915 | 1120 | } |
|
916 | 1121 | void PythonQtShell_socexplorerplugin::moveEvent(QMoveEvent* arg__1) |
|
917 | 1122 | { |
|
918 | if (_wrapper) { | |
|
919 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "moveEvent"); | |
|
920 | PyErr_Clear(); | |
|
921 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1123 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1124 | static PyObject* name = PyString_FromString("moveEvent"); | |
|
1125 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1126 | if (obj) { | |
|
922 | 1127 | static const char* argumentList[] ={"" , "QMoveEvent*"}; |
|
923 | 1128 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
924 | 1129 | void* args[2] = {NULL, (void*)&arg__1}; |
|
925 | 1130 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
926 | 1131 | if (result) { Py_DECREF(result); } |
|
927 | 1132 | Py_DECREF(obj); |
|
928 | 1133 | return; |
|
1134 | } else { | |
|
1135 | PyErr_Clear(); | |
|
929 | 1136 | } |
|
930 | 1137 | } |
|
931 | 1138 | socexplorerplugin::moveEvent(arg__1); |
|
932 | 1139 | } |
|
933 | bool PythonQtShell_socexplorerplugin::nativeEvent(const QByteArray& eventType, void* message, long* result) | |
|
1140 | bool PythonQtShell_socexplorerplugin::nativeEvent(const QByteArray& eventType0, void* message1, long* result2) | |
|
934 | 1141 | { |
|
935 | if (_wrapper) { | |
|
936 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "nativeEvent"); | |
|
937 | PyErr_Clear(); | |
|
938 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1142 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1143 | static PyObject* name = PyString_FromString("nativeEvent"); | |
|
1144 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1145 | if (obj) { | |
|
939 | 1146 | static const char* argumentList[] ={"bool" , "const QByteArray&" , "void*" , "long*"}; |
|
940 | 1147 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(4, argumentList); |
|
941 | 1148 | bool returnValue; |
|
942 | void* args[4] = {NULL, (void*)&eventType, (void*)&message, (void*)&result}; | |
|
1149 | void* args[4] = {NULL, (void*)&eventType0, (void*)&message1, (void*)&result2}; | |
|
943 | 1150 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
944 | 1151 | if (result) { |
|
945 | 1152 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
946 | 1153 | if (args[0]!=&returnValue) { |
|
947 | 1154 | if (args[0]==NULL) { |
|
948 | 1155 | PythonQt::priv()->handleVirtualOverloadReturnError("nativeEvent", methodInfo, result); |
|
949 | 1156 | } else { |
|
950 | 1157 | returnValue = *((bool*)args[0]); |
|
951 | 1158 | } |
|
952 | 1159 | } |
|
953 | 1160 | } |
|
954 | 1161 | if (result) { Py_DECREF(result); } |
|
955 | 1162 | Py_DECREF(obj); |
|
956 | 1163 | return returnValue; |
|
1164 | } else { | |
|
1165 | PyErr_Clear(); | |
|
957 | 1166 | } |
|
958 | 1167 | } |
|
959 | return socexplorerplugin::nativeEvent(eventType, message, result); | |
|
1168 | return socexplorerplugin::nativeEvent(eventType0, message1, result2); | |
|
960 | 1169 | } |
|
961 | 1170 | QPaintEngine* PythonQtShell_socexplorerplugin::paintEngine() const |
|
962 | 1171 | { |
|
963 | if (_wrapper) { | |
|
964 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "paintEngine"); | |
|
965 | PyErr_Clear(); | |
|
966 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1172 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1173 | static PyObject* name = PyString_FromString("paintEngine"); | |
|
1174 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1175 | if (obj) { | |
|
967 | 1176 | static const char* argumentList[] ={"QPaintEngine*"}; |
|
968 | 1177 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); |
|
969 | 1178 | QPaintEngine* returnValue; |
|
970 | 1179 | void* args[1] = {NULL}; |
|
971 | 1180 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
972 | 1181 | if (result) { |
|
973 | 1182 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
974 | 1183 | if (args[0]!=&returnValue) { |
|
975 | 1184 | if (args[0]==NULL) { |
|
976 | 1185 | PythonQt::priv()->handleVirtualOverloadReturnError("paintEngine", methodInfo, result); |
|
977 | 1186 | } else { |
|
978 | 1187 | returnValue = *((QPaintEngine**)args[0]); |
|
979 | 1188 | } |
|
980 | 1189 | } |
|
981 | 1190 | } |
|
982 | 1191 | if (result) { Py_DECREF(result); } |
|
983 | 1192 | Py_DECREF(obj); |
|
984 | 1193 | return returnValue; |
|
1194 | } else { | |
|
1195 | PyErr_Clear(); | |
|
985 | 1196 | } |
|
986 | 1197 | } |
|
987 | 1198 | return socexplorerplugin::paintEngine(); |
|
988 | 1199 | } |
|
989 | void PythonQtShell_socexplorerplugin::paintEvent(QPaintEvent* event) | |
|
1200 | void PythonQtShell_socexplorerplugin::paintEvent(QPaintEvent* event0) | |
|
990 | 1201 | { |
|
991 | if (_wrapper) { | |
|
992 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "paintEvent"); | |
|
993 | PyErr_Clear(); | |
|
994 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1202 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1203 | static PyObject* name = PyString_FromString("paintEvent"); | |
|
1204 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1205 | if (obj) { | |
|
995 | 1206 | static const char* argumentList[] ={"" , "QPaintEvent*"}; |
|
996 | 1207 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
997 | void* args[2] = {NULL, (void*)&event}; | |
|
1208 | void* args[2] = {NULL, (void*)&event0}; | |
|
998 | 1209 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
999 | 1210 | if (result) { Py_DECREF(result); } |
|
1000 | 1211 | Py_DECREF(obj); |
|
1001 | 1212 | return; |
|
1213 | } else { | |
|
1214 | PyErr_Clear(); | |
|
1002 | 1215 | } |
|
1003 | 1216 | } |
|
1004 | socexplorerplugin::paintEvent(event); | |
|
1217 | socexplorerplugin::paintEvent(event0); | |
|
1005 | 1218 | } |
|
1006 | 1219 | void PythonQtShell_socexplorerplugin::postInstantiationTrigger() |
|
1007 | 1220 | { |
|
1008 | if (_wrapper) { | |
|
1009 |
PyObject* |
|
|
1010 | PyErr_Clear(); | |
|
1011 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1221 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1222 | static PyObject* name = PyString_FromString("postInstantiationTrigger"); | |
|
1223 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1224 | if (obj) { | |
|
1012 | 1225 | static const char* argumentList[] ={""}; |
|
1013 | 1226 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); |
|
1014 | 1227 | void* args[1] = {NULL}; |
|
1015 | 1228 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
1016 | 1229 | if (result) { Py_DECREF(result); } |
|
1017 | 1230 | Py_DECREF(obj); |
|
1018 | 1231 | return; |
|
1232 | } else { | |
|
1233 | PyErr_Clear(); | |
|
1019 | 1234 | } |
|
1020 | 1235 | } |
|
1021 | 1236 | socexplorerplugin::postInstantiationTrigger(); |
|
1022 | 1237 | } |
|
1023 | QPaintDevice* PythonQtShell_socexplorerplugin::redirected(QPoint* offset) const | |
|
1238 | QPaintDevice* PythonQtShell_socexplorerplugin::redirected(QPoint* offset0) const | |
|
1024 | 1239 | { |
|
1025 | if (_wrapper) { | |
|
1026 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "redirected"); | |
|
1027 | PyErr_Clear(); | |
|
1028 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1240 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1241 | static PyObject* name = PyString_FromString("redirected"); | |
|
1242 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1243 | if (obj) { | |
|
1029 | 1244 | static const char* argumentList[] ={"QPaintDevice*" , "QPoint*"}; |
|
1030 | 1245 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
1031 | 1246 | QPaintDevice* returnValue; |
|
1032 | void* args[2] = {NULL, (void*)&offset}; | |
|
1247 | void* args[2] = {NULL, (void*)&offset0}; | |
|
1033 | 1248 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
1034 | 1249 | if (result) { |
|
1035 | 1250 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
1036 | 1251 | if (args[0]!=&returnValue) { |
|
1037 | 1252 | if (args[0]==NULL) { |
|
1038 | 1253 | PythonQt::priv()->handleVirtualOverloadReturnError("redirected", methodInfo, result); |
|
1039 | 1254 | } else { |
|
1040 | 1255 | returnValue = *((QPaintDevice**)args[0]); |
|
1041 | 1256 | } |
|
1042 | 1257 | } |
|
1043 | 1258 | } |
|
1044 | 1259 | if (result) { Py_DECREF(result); } |
|
1045 | 1260 | Py_DECREF(obj); |
|
1046 | 1261 | return returnValue; |
|
1262 | } else { | |
|
1263 | PyErr_Clear(); | |
|
1047 | 1264 | } |
|
1048 | 1265 | } |
|
1049 | return socexplorerplugin::redirected(offset); | |
|
1266 | return socexplorerplugin::redirected(offset0); | |
|
1050 | 1267 | } |
|
1051 | int PythonQtShell_socexplorerplugin::registermenu(QMenu* menu) | |
|
1268 | int PythonQtShell_socexplorerplugin::registermenu(QMenu* menu0) | |
|
1052 | 1269 | { |
|
1053 | if (_wrapper) { | |
|
1054 |
PyObject* |
|
|
1055 | PyErr_Clear(); | |
|
1056 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1270 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1271 | static PyObject* name = PyString_FromString("registermenu"); | |
|
1272 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1273 | if (obj) { | |
|
1057 | 1274 | static const char* argumentList[] ={"int" , "QMenu*"}; |
|
1058 | 1275 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
1059 | 1276 | int returnValue; |
|
1060 | void* args[2] = {NULL, (void*)&menu}; | |
|
1277 | void* args[2] = {NULL, (void*)&menu0}; | |
|
1061 | 1278 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
1062 | 1279 | if (result) { |
|
1063 | 1280 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
1064 | 1281 | if (args[0]!=&returnValue) { |
|
1065 | 1282 | if (args[0]==NULL) { |
|
1066 | 1283 | PythonQt::priv()->handleVirtualOverloadReturnError("registermenu", methodInfo, result); |
|
1067 | 1284 | } else { |
|
1068 | 1285 | returnValue = *((int*)args[0]); |
|
1069 | 1286 | } |
|
1070 | 1287 | } |
|
1071 | 1288 | } |
|
1072 | 1289 | if (result) { Py_DECREF(result); } |
|
1073 | 1290 | Py_DECREF(obj); |
|
1074 | 1291 | return returnValue; |
|
1292 | } else { | |
|
1293 | PyErr_Clear(); | |
|
1075 | 1294 | } |
|
1076 | 1295 | } |
|
1077 | return socexplorerplugin::registermenu(menu); | |
|
1296 | return socexplorerplugin::registermenu(menu0); | |
|
1078 | 1297 | } |
|
1079 | 1298 | void PythonQtShell_socexplorerplugin::resizeEvent(QResizeEvent* arg__1) |
|
1080 | 1299 | { |
|
1081 | if (_wrapper) { | |
|
1082 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "resizeEvent"); | |
|
1083 | PyErr_Clear(); | |
|
1084 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1300 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1301 | static PyObject* name = PyString_FromString("resizeEvent"); | |
|
1302 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1303 | if (obj) { | |
|
1085 | 1304 | static const char* argumentList[] ={"" , "QResizeEvent*"}; |
|
1086 | 1305 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
1087 | 1306 | void* args[2] = {NULL, (void*)&arg__1}; |
|
1088 | 1307 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
1089 | 1308 | if (result) { Py_DECREF(result); } |
|
1090 | 1309 | Py_DECREF(obj); |
|
1091 | 1310 | return; |
|
1311 | } else { | |
|
1312 | PyErr_Clear(); | |
|
1092 | 1313 | } |
|
1093 | 1314 | } |
|
1094 | 1315 | socexplorerplugin::resizeEvent(arg__1); |
|
1095 | 1316 | } |
|
1096 | void PythonQtShell_socexplorerplugin::setBaseAddress(unsigned int baseAddress) | |
|
1317 | void PythonQtShell_socexplorerplugin::setBaseAddress(unsigned int baseAddress0) | |
|
1097 | 1318 | { |
|
1098 | if (_wrapper) { | |
|
1099 |
PyObject* |
|
|
1100 | PyErr_Clear(); | |
|
1101 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1319 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1320 | static PyObject* name = PyString_FromString("setBaseAddress"); | |
|
1321 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1322 | if (obj) { | |
|
1102 | 1323 | static const char* argumentList[] ={"" , "unsigned int"}; |
|
1103 | 1324 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
1104 | void* args[2] = {NULL, (void*)&baseAddress}; | |
|
1325 | void* args[2] = {NULL, (void*)&baseAddress0}; | |
|
1105 | 1326 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
1106 | 1327 | if (result) { Py_DECREF(result); } |
|
1107 | 1328 | Py_DECREF(obj); |
|
1108 | 1329 | return; |
|
1330 | } else { | |
|
1331 | PyErr_Clear(); | |
|
1109 | 1332 | } |
|
1110 | 1333 | } |
|
1111 | socexplorerplugin::setBaseAddress(baseAddress); | |
|
1334 | socexplorerplugin::setBaseAddress(baseAddress0); | |
|
1112 | 1335 | } |
|
1113 | void PythonQtShell_socexplorerplugin::setInstanceName(const QString& newName) | |
|
1336 | void PythonQtShell_socexplorerplugin::setInstanceName(const QString& newName0) | |
|
1114 | 1337 | { |
|
1115 | if (_wrapper) { | |
|
1116 |
PyObject* |
|
|
1117 | PyErr_Clear(); | |
|
1118 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1338 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1339 | static PyObject* name = PyString_FromString("setInstanceName"); | |
|
1340 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1341 | if (obj) { | |
|
1119 | 1342 | static const char* argumentList[] ={"" , "const QString&"}; |
|
1120 | 1343 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
1121 | void* args[2] = {NULL, (void*)&newName}; | |
|
1344 | void* args[2] = {NULL, (void*)&newName0}; | |
|
1122 | 1345 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
1123 | 1346 | if (result) { Py_DECREF(result); } |
|
1124 | 1347 | Py_DECREF(obj); |
|
1125 | 1348 | return; |
|
1349 | } else { | |
|
1350 | PyErr_Clear(); | |
|
1126 | 1351 | } |
|
1127 | 1352 | } |
|
1128 | socexplorerplugin::setInstanceName(newName); | |
|
1353 | socexplorerplugin::setInstanceName(newName0); | |
|
1129 | 1354 | } |
|
1130 | 1355 | QPainter* PythonQtShell_socexplorerplugin::sharedPainter() const |
|
1131 | 1356 | { |
|
1132 | if (_wrapper) { | |
|
1133 |
PyObject* |
|
|
1134 | PyErr_Clear(); | |
|
1135 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1357 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1358 | static PyObject* name = PyString_FromString("sharedPainter"); | |
|
1359 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1360 | if (obj) { | |
|
1136 | 1361 | static const char* argumentList[] ={"QPainter*"}; |
|
1137 | 1362 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); |
|
1138 | 1363 | QPainter* returnValue; |
|
1139 | 1364 | void* args[1] = {NULL}; |
|
1140 | 1365 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
1141 | 1366 | if (result) { |
|
1142 | 1367 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
1143 | 1368 | if (args[0]!=&returnValue) { |
|
1144 | 1369 | if (args[0]==NULL) { |
|
1145 | 1370 | PythonQt::priv()->handleVirtualOverloadReturnError("sharedPainter", methodInfo, result); |
|
1146 | 1371 | } else { |
|
1147 | 1372 | returnValue = *((QPainter**)args[0]); |
|
1148 | 1373 | } |
|
1149 | 1374 | } |
|
1150 | 1375 | } |
|
1151 | 1376 | if (result) { Py_DECREF(result); } |
|
1152 | 1377 | Py_DECREF(obj); |
|
1153 | 1378 | return returnValue; |
|
1379 | } else { | |
|
1380 | PyErr_Clear(); | |
|
1154 | 1381 | } |
|
1155 | 1382 | } |
|
1156 | 1383 | return socexplorerplugin::sharedPainter(); |
|
1157 | 1384 | } |
|
1158 | 1385 | void PythonQtShell_socexplorerplugin::showEvent(QShowEvent* arg__1) |
|
1159 | 1386 | { |
|
1160 | if (_wrapper) { | |
|
1161 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "showEvent"); | |
|
1162 | PyErr_Clear(); | |
|
1163 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1387 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1388 | static PyObject* name = PyString_FromString("showEvent"); | |
|
1389 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1390 | if (obj) { | |
|
1164 | 1391 | static const char* argumentList[] ={"" , "QShowEvent*"}; |
|
1165 | 1392 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
1166 | 1393 | void* args[2] = {NULL, (void*)&arg__1}; |
|
1167 | 1394 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
1168 | 1395 | if (result) { Py_DECREF(result); } |
|
1169 | 1396 | Py_DECREF(obj); |
|
1170 | 1397 | return; |
|
1398 | } else { | |
|
1399 | PyErr_Clear(); | |
|
1171 | 1400 | } |
|
1172 | 1401 | } |
|
1173 | 1402 | socexplorerplugin::showEvent(arg__1); |
|
1174 | 1403 | } |
|
1175 | 1404 | QSize PythonQtShell_socexplorerplugin::sizeHint() const |
|
1176 | 1405 | { |
|
1177 | if (_wrapper) { | |
|
1178 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "getSizeHint"); | |
|
1179 | PyErr_Clear(); | |
|
1180 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1406 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1407 | static PyObject* name = PyString_FromString("getSizeHint"); | |
|
1408 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1409 | if (obj) { | |
|
1181 | 1410 | static const char* argumentList[] ={"QSize"}; |
|
1182 | 1411 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList); |
|
1183 | 1412 | QSize returnValue; |
|
1184 | 1413 | void* args[1] = {NULL}; |
|
1185 | 1414 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
1186 | 1415 | if (result) { |
|
1187 | 1416 | args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); |
|
1188 | 1417 | if (args[0]!=&returnValue) { |
|
1189 | 1418 | if (args[0]==NULL) { |
|
1190 | 1419 | PythonQt::priv()->handleVirtualOverloadReturnError("getSizeHint", methodInfo, result); |
|
1191 | 1420 | } else { |
|
1192 | 1421 | returnValue = *((QSize*)args[0]); |
|
1193 | 1422 | } |
|
1194 | 1423 | } |
|
1195 | 1424 | } |
|
1196 | 1425 | if (result) { Py_DECREF(result); } |
|
1197 | 1426 | Py_DECREF(obj); |
|
1198 | 1427 | return returnValue; |
|
1428 | } else { | |
|
1429 | PyErr_Clear(); | |
|
1199 | 1430 | } |
|
1200 | 1431 | } |
|
1201 | 1432 | return socexplorerplugin::sizeHint(); |
|
1202 | 1433 | } |
|
1203 | 1434 | void PythonQtShell_socexplorerplugin::tabletEvent(QTabletEvent* arg__1) |
|
1204 | 1435 | { |
|
1205 | if (_wrapper) { | |
|
1206 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "tabletEvent"); | |
|
1207 | PyErr_Clear(); | |
|
1208 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1436 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1437 | static PyObject* name = PyString_FromString("tabletEvent"); | |
|
1438 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1439 | if (obj) { | |
|
1209 | 1440 | static const char* argumentList[] ={"" , "QTabletEvent*"}; |
|
1210 | 1441 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
1211 | 1442 | void* args[2] = {NULL, (void*)&arg__1}; |
|
1212 | 1443 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
1213 | 1444 | if (result) { Py_DECREF(result); } |
|
1214 | 1445 | Py_DECREF(obj); |
|
1215 | 1446 | return; |
|
1447 | } else { | |
|
1448 | PyErr_Clear(); | |
|
1216 | 1449 | } |
|
1217 | 1450 | } |
|
1218 | 1451 | socexplorerplugin::tabletEvent(arg__1); |
|
1219 | 1452 | } |
|
1220 | 1453 | void PythonQtShell_socexplorerplugin::timerEvent(QTimerEvent* arg__1) |
|
1221 | 1454 | { |
|
1222 | if (_wrapper) { | |
|
1223 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "timerEvent"); | |
|
1224 | PyErr_Clear(); | |
|
1225 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1455 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1456 | static PyObject* name = PyString_FromString("timerEvent"); | |
|
1457 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1458 | if (obj) { | |
|
1226 | 1459 | static const char* argumentList[] ={"" , "QTimerEvent*"}; |
|
1227 | 1460 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
1228 | 1461 | void* args[2] = {NULL, (void*)&arg__1}; |
|
1229 | 1462 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
1230 | 1463 | if (result) { Py_DECREF(result); } |
|
1231 | 1464 | Py_DECREF(obj); |
|
1232 | 1465 | return; |
|
1466 | } else { | |
|
1467 | PyErr_Clear(); | |
|
1233 | 1468 | } |
|
1234 | 1469 | } |
|
1235 | 1470 | socexplorerplugin::timerEvent(arg__1); |
|
1236 | 1471 | } |
|
1237 | 1472 | void PythonQtShell_socexplorerplugin::wheelEvent(QWheelEvent* arg__1) |
|
1238 | 1473 | { |
|
1239 | if (_wrapper) { | |
|
1240 | PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "wheelEvent"); | |
|
1241 | PyErr_Clear(); | |
|
1242 | if (obj && !PythonQtSlotFunction_Check(obj)) { | |
|
1474 | if (_wrapper && (((PyObject*)_wrapper)->ob_refcnt > 0)) { | |
|
1475 | static PyObject* name = PyString_FromString("wheelEvent"); | |
|
1476 | PyObject* obj = PyBaseObject_Type.tp_getattro((PyObject*)_wrapper, name); | |
|
1477 | if (obj) { | |
|
1243 | 1478 | static const char* argumentList[] ={"" , "QWheelEvent*"}; |
|
1244 | 1479 | static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList); |
|
1245 | 1480 | void* args[2] = {NULL, (void*)&arg__1}; |
|
1246 | 1481 | PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); |
|
1247 | 1482 | if (result) { Py_DECREF(result); } |
|
1248 | 1483 | Py_DECREF(obj); |
|
1249 | 1484 | return; |
|
1485 | } else { | |
|
1486 | PyErr_Clear(); | |
|
1250 | 1487 | } |
|
1251 | 1488 | } |
|
1252 | 1489 | socexplorerplugin::wheelEvent(arg__1); |
|
1253 | 1490 | } |
|
1254 | 1491 | socexplorerplugin* PythonQtWrapper_socexplorerplugin::new_socexplorerplugin(QWidget* parent, bool createPyObject) |
|
1255 | 1492 | { |
|
1256 | 1493 | return new PythonQtShell_socexplorerplugin(parent, createPyObject); } |
|
1257 | 1494 | |
|
1258 | 1495 | int PythonQtWrapper_socexplorerplugin::PID(socexplorerplugin* theWrappedObject) |
|
1259 | 1496 | { |
|
1260 | 1497 | return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_PID()); |
|
1261 | 1498 | } |
|
1262 | 1499 | |
|
1263 | 1500 | unsigned int PythonQtWrapper_socexplorerplugin::Read(socexplorerplugin* theWrappedObject, unsigned int* Value, unsigned int count, unsigned int address) |
|
1264 | 1501 | { |
|
1265 | 1502 | return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_Read(Value, count, address)); |
|
1266 | 1503 | } |
|
1267 | 1504 | |
|
1268 | 1505 | int PythonQtWrapper_socexplorerplugin::VID(socexplorerplugin* theWrappedObject) |
|
1269 | 1506 | { |
|
1270 | 1507 | return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_VID()); |
|
1271 | 1508 | } |
|
1272 | 1509 | |
|
1273 | 1510 | unsigned int PythonQtWrapper_socexplorerplugin::Write(socexplorerplugin* theWrappedObject, unsigned int* Value, unsigned int count, unsigned int address) |
|
1274 | 1511 | { |
|
1275 | 1512 | return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_Write(Value, count, address)); |
|
1276 | 1513 | } |
|
1277 | 1514 | |
|
1278 | 1515 | void PythonQtWrapper_socexplorerplugin::activate(socexplorerplugin* theWrappedObject, bool flag) |
|
1279 | 1516 | { |
|
1280 | 1517 | ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_activate(flag)); |
|
1281 | 1518 | } |
|
1282 | 1519 | |
|
1283 | 1520 | int PythonQtWrapper_socexplorerplugin::baseAddress(socexplorerplugin* theWrappedObject) |
|
1284 | 1521 | { |
|
1285 | 1522 | return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_baseAddress()); |
|
1286 | 1523 | } |
|
1287 | 1524 | |
|
1288 | 1525 | QString PythonQtWrapper_socexplorerplugin::baseName(socexplorerplugin* theWrappedObject) |
|
1289 | 1526 | { |
|
1290 | 1527 | return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_baseName()); |
|
1291 | 1528 | } |
|
1292 | 1529 | |
|
1293 | 1530 | void PythonQtWrapper_socexplorerplugin::closeMe(socexplorerplugin* theWrappedObject) |
|
1294 | 1531 | { |
|
1295 | 1532 | ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_closeMe()); |
|
1296 | 1533 | } |
|
1297 | 1534 | |
|
1535 | bool PythonQtWrapper_socexplorerplugin::dumpMemory(socexplorerplugin* theWrappedObject, unsigned int address, unsigned int count, QString file) | |
|
1536 | { | |
|
1537 | return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_dumpMemory(address, count, file)); | |
|
1538 | } | |
|
1539 | ||
|
1540 | bool PythonQtWrapper_socexplorerplugin::dumpMemory(socexplorerplugin* theWrappedObject, unsigned int address, unsigned int count, QString file, const QString& format) | |
|
1541 | { | |
|
1542 | return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_dumpMemory(address, count, file, format)); | |
|
1543 | } | |
|
1544 | ||
|
1298 | 1545 | QString PythonQtWrapper_socexplorerplugin::instanceName(socexplorerplugin* theWrappedObject) |
|
1299 | 1546 | { |
|
1300 | 1547 | return ( theWrappedObject->instanceName()); |
|
1301 | 1548 | } |
|
1302 | 1549 | |
|
1303 | 1550 | int PythonQtWrapper_socexplorerplugin::isConnected(socexplorerplugin* theWrappedObject) |
|
1304 | 1551 | { |
|
1305 | 1552 | return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_isConnected()); |
|
1306 | 1553 | } |
|
1307 | 1554 | |
|
1555 | bool PythonQtWrapper_socexplorerplugin::loadbin(socexplorerplugin* theWrappedObject, unsigned int address, QString file) | |
|
1556 | { | |
|
1557 | return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_loadbin(address, file)); | |
|
1558 | } | |
|
1559 | ||
|
1560 | void PythonQtWrapper_socexplorerplugin::makeGenericPyWrapper(socexplorerplugin* theWrappedObject) | |
|
1561 | { | |
|
1562 | ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_makeGenericPyWrapper()); | |
|
1563 | } | |
|
1564 | ||
|
1565 | bool PythonQtWrapper_socexplorerplugin::memSet(socexplorerplugin* theWrappedObject, unsigned int address, int value, unsigned int count) | |
|
1566 | { | |
|
1567 | return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_memSet(address, value, count)); | |
|
1568 | } | |
|
1569 | ||
|
1308 | 1570 | void PythonQtWrapper_socexplorerplugin::postInstantiationTrigger(socexplorerplugin* theWrappedObject) |
|
1309 | 1571 | { |
|
1310 | 1572 | ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_postInstantiationTrigger()); |
|
1311 | 1573 | } |
|
1312 | 1574 | |
|
1313 | 1575 | int PythonQtWrapper_socexplorerplugin::registermenu(socexplorerplugin* theWrappedObject, QMenu* menu) |
|
1314 | 1576 | { |
|
1315 | 1577 | return ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_registermenu(menu)); |
|
1316 | 1578 | } |
|
1317 | 1579 | |
|
1318 | 1580 | void PythonQtWrapper_socexplorerplugin::setBaseAddress(socexplorerplugin* theWrappedObject, unsigned int baseAddress) |
|
1319 | 1581 | { |
|
1320 | 1582 | ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_setBaseAddress(baseAddress)); |
|
1321 | 1583 | } |
|
1322 | 1584 | |
|
1323 | 1585 | void PythonQtWrapper_socexplorerplugin::setInstanceName(socexplorerplugin* theWrappedObject, const QString& newName) |
|
1324 | 1586 | { |
|
1325 | 1587 | ( ((PythonQtPublicPromoter_socexplorerplugin*)theWrappedObject)->promoted_setInstanceName(newName)); |
|
1326 | 1588 | } |
|
1327 | 1589 | |
|
1328 | 1590 |
@@ -1,156 +1,173 | |||
|
1 | 1 | #include <PythonQt.h> |
|
2 | #include <QIconEngine> | |
|
3 | 2 | #include <QObject> |
|
4 | 3 | #include <QVariant> |
|
5 | 4 | #include <qaction.h> |
|
5 | #include <qbackingstore.h> | |
|
6 | 6 | #include <qbitmap.h> |
|
7 | 7 | #include <qbytearray.h> |
|
8 | 8 | #include <qcoreevent.h> |
|
9 | 9 | #include <qcursor.h> |
|
10 | 10 | #include <qdockwidget.h> |
|
11 | 11 | #include <qevent.h> |
|
12 | 12 | #include <qfont.h> |
|
13 | 13 | #include <qgraphicseffect.h> |
|
14 | 14 | #include <qgraphicsproxywidget.h> |
|
15 | #include <qicon.h> | |
|
15 | 16 | #include <qkeysequence.h> |
|
16 | 17 | #include <qlayout.h> |
|
17 | 18 | #include <qlist.h> |
|
18 | 19 | #include <qlocale.h> |
|
19 | 20 | #include <qmargins.h> |
|
20 | 21 | #include <qmenu.h> |
|
22 | #include <qmetaobject.h> | |
|
21 | 23 | #include <qobject.h> |
|
22 | 24 | #include <qpaintdevice.h> |
|
23 | 25 | #include <qpaintengine.h> |
|
24 | 26 | #include <qpainter.h> |
|
25 | 27 | #include <qpalette.h> |
|
26 | 28 | #include <qpixmap.h> |
|
27 | 29 | #include <qpoint.h> |
|
28 | 30 | #include <qrect.h> |
|
29 | 31 | #include <qregion.h> |
|
30 | 32 | #include <qsize.h> |
|
31 | 33 | #include <qsizepolicy.h> |
|
32 | 34 | #include <qstyle.h> |
|
33 | 35 | #include <qstyleoption.h> |
|
34 | 36 | #include <qwidget.h> |
|
37 | #include <qwindow.h> | |
|
35 | 38 | #include <socexplorerplugin.h> |
|
36 | 39 | |
|
37 | 40 | |
|
38 | 41 | |
|
39 | 42 | class PythonQtShell_socexplorerplugin : public socexplorerplugin |
|
40 | 43 | { |
|
41 | 44 | public: |
|
42 | PythonQtShell_socexplorerplugin(QWidget* parent = 0, bool createPyObject = true):socexplorerplugin(parent, createPyObject),_wrapper(NULL) {}; | |
|
45 | PythonQtShell_socexplorerplugin(QWidget* parent = 0, bool createPyObject = true):socexplorerplugin(parent, createPyObject),_wrapper(NULL) { }; | |
|
43 | 46 | |
|
44 | 47 | ~PythonQtShell_socexplorerplugin(); |
|
45 | 48 | |
|
46 | 49 | virtual int PID(); |
|
47 | 50 | virtual unsigned int Read(unsigned int* Value, unsigned int count, unsigned int address); |
|
48 | 51 | virtual int VID(); |
|
49 | 52 | virtual unsigned int Write(unsigned int* Value, unsigned int count, unsigned int address); |
|
50 | 53 | virtual void actionEvent(QActionEvent* arg__1); |
|
51 | 54 | virtual void activate(bool flag); |
|
52 | 55 | virtual int baseAddress(); |
|
53 | 56 | virtual QString baseName(); |
|
54 | 57 | virtual void changeEvent(QEvent* event); |
|
55 | 58 | virtual void childEvent(QChildEvent* arg__1); |
|
56 | 59 | virtual void closeEvent(QCloseEvent* event); |
|
57 | 60 | virtual void closeMe(); |
|
58 | 61 | virtual void contextMenuEvent(QContextMenuEvent* arg__1); |
|
59 | 62 | virtual void customEvent(QEvent* arg__1); |
|
60 | 63 | virtual int devType() const; |
|
61 | 64 | virtual void dragEnterEvent(QDragEnterEvent* arg__1); |
|
62 | 65 | virtual void dragLeaveEvent(QDragLeaveEvent* arg__1); |
|
63 | 66 | virtual void dragMoveEvent(QDragMoveEvent* arg__1); |
|
64 | 67 | virtual void dropEvent(QDropEvent* arg__1); |
|
68 | virtual bool dumpMemory(unsigned int address, unsigned int count, QString file); | |
|
69 | virtual bool dumpMemory(unsigned int address, unsigned int count, QString file, const QString& format); | |
|
65 | 70 | virtual void enterEvent(QEvent* arg__1); |
|
66 | 71 | virtual bool event(QEvent* event); |
|
67 | 72 | virtual bool eventFilter(QObject* arg__1, QEvent* arg__2); |
|
68 | 73 | virtual void focusInEvent(QFocusEvent* arg__1); |
|
69 | 74 | virtual bool focusNextPrevChild(bool next); |
|
70 | 75 | virtual void focusOutEvent(QFocusEvent* arg__1); |
|
71 | 76 | virtual bool hasHeightForWidth() const; |
|
72 | 77 | virtual int heightForWidth(int arg__1) const; |
|
73 | 78 | virtual void hideEvent(QHideEvent* arg__1); |
|
74 | 79 | virtual void initPainter(QPainter* painter) const; |
|
75 | 80 | virtual void inputMethodEvent(QInputMethodEvent* arg__1); |
|
76 | 81 | virtual QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; |
|
77 | 82 | virtual int isConnected(); |
|
78 | 83 | virtual void keyPressEvent(QKeyEvent* arg__1); |
|
79 | 84 | virtual void keyReleaseEvent(QKeyEvent* arg__1); |
|
80 | 85 | virtual void leaveEvent(QEvent* arg__1); |
|
86 | virtual bool loadbin(unsigned int address, QString file); | |
|
87 | virtual bool memSet(unsigned int address, int value, unsigned int count); | |
|
81 | 88 | virtual int metric(QPaintDevice::PaintDeviceMetric arg__1) const; |
|
82 | 89 | virtual QSize minimumSizeHint() const; |
|
83 | 90 | virtual void mouseDoubleClickEvent(QMouseEvent* arg__1); |
|
84 | 91 | virtual void mouseMoveEvent(QMouseEvent* arg__1); |
|
85 | 92 | virtual void mousePressEvent(QMouseEvent* arg__1); |
|
86 | 93 | virtual void mouseReleaseEvent(QMouseEvent* arg__1); |
|
87 | 94 | virtual void moveEvent(QMoveEvent* arg__1); |
|
88 | 95 | virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result); |
|
89 | 96 | virtual QPaintEngine* paintEngine() const; |
|
90 | 97 | virtual void paintEvent(QPaintEvent* event); |
|
91 | 98 | virtual void postInstantiationTrigger(); |
|
92 | 99 | virtual QPaintDevice* redirected(QPoint* offset) const; |
|
93 | 100 | virtual int registermenu(QMenu* menu); |
|
94 | 101 | virtual void resizeEvent(QResizeEvent* arg__1); |
|
95 | 102 | virtual void setBaseAddress(unsigned int baseAddress); |
|
96 | 103 | virtual void setInstanceName(const QString& newName); |
|
97 | 104 | virtual QPainter* sharedPainter() const; |
|
98 | 105 | virtual void showEvent(QShowEvent* arg__1); |
|
99 | 106 | virtual QSize sizeHint() const; |
|
100 | 107 | virtual void tabletEvent(QTabletEvent* arg__1); |
|
101 | 108 | virtual void timerEvent(QTimerEvent* arg__1); |
|
102 | 109 | virtual void wheelEvent(QWheelEvent* arg__1); |
|
103 | 110 | |
|
104 | 111 | PythonQtInstanceWrapper* _wrapper; |
|
105 | 112 | }; |
|
106 | 113 | |
|
107 | 114 | class PythonQtPublicPromoter_socexplorerplugin : public socexplorerplugin |
|
108 | 115 | { public: |
|
109 | 116 | inline int promoted_PID() { return socexplorerplugin::PID(); } |
|
110 | 117 | inline unsigned int promoted_Read(unsigned int* Value, unsigned int count, unsigned int address) { return socexplorerplugin::Read(Value, count, address); } |
|
111 | 118 | inline int promoted_VID() { return socexplorerplugin::VID(); } |
|
112 | 119 | inline unsigned int promoted_Write(unsigned int* Value, unsigned int count, unsigned int address) { return socexplorerplugin::Write(Value, count, address); } |
|
113 | 120 | inline void promoted_activate(bool flag) { socexplorerplugin::activate(flag); } |
|
114 | 121 | inline int promoted_baseAddress() { return socexplorerplugin::baseAddress(); } |
|
115 | 122 | inline QString promoted_baseName() { return socexplorerplugin::baseName(); } |
|
116 | 123 | inline void promoted_closeMe() { socexplorerplugin::closeMe(); } |
|
124 | inline bool promoted_dumpMemory(unsigned int address, unsigned int count, QString file) { return socexplorerplugin::dumpMemory(address, count, file); } | |
|
125 | inline bool promoted_dumpMemory(unsigned int address, unsigned int count, QString file, const QString& format) { return socexplorerplugin::dumpMemory(address, count, file, format); } | |
|
117 | 126 | inline int promoted_isConnected() { return socexplorerplugin::isConnected(); } |
|
127 | inline bool promoted_loadbin(unsigned int address, QString file) { return socexplorerplugin::loadbin(address, file); } | |
|
128 | inline void promoted_makeGenericPyWrapper() { socexplorerplugin::makeGenericPyWrapper(); } | |
|
129 | inline bool promoted_memSet(unsigned int address, int value, unsigned int count) { return socexplorerplugin::memSet(address, value, count); } | |
|
118 | 130 | inline void promoted_postInstantiationTrigger() { socexplorerplugin::postInstantiationTrigger(); } |
|
119 | 131 | inline int promoted_registermenu(QMenu* menu) { return socexplorerplugin::registermenu(menu); } |
|
120 | 132 | inline void promoted_setBaseAddress(unsigned int baseAddress) { socexplorerplugin::setBaseAddress(baseAddress); } |
|
121 | 133 | inline void promoted_setInstanceName(const QString& newName) { socexplorerplugin::setInstanceName(newName); } |
|
122 | 134 | }; |
|
123 | 135 | |
|
124 | 136 | class PythonQtWrapper_socexplorerplugin : public QObject |
|
125 | 137 | { Q_OBJECT |
|
126 | 138 | public: |
|
127 | 139 | public slots: |
|
128 | 140 | socexplorerplugin* new_socexplorerplugin(QWidget* parent = 0, bool createPyObject = true); |
|
129 | 141 | void delete_socexplorerplugin(socexplorerplugin* obj) { delete obj; } |
|
130 | 142 | int PID(socexplorerplugin* theWrappedObject); |
|
131 | 143 | unsigned int Read(socexplorerplugin* theWrappedObject, unsigned int* Value, unsigned int count, unsigned int address); |
|
132 | 144 | int VID(socexplorerplugin* theWrappedObject); |
|
133 | 145 | unsigned int Write(socexplorerplugin* theWrappedObject, unsigned int* Value, unsigned int count, unsigned int address); |
|
134 | 146 | void activate(socexplorerplugin* theWrappedObject, bool flag); |
|
135 | 147 | int baseAddress(socexplorerplugin* theWrappedObject); |
|
136 | 148 | QString baseName(socexplorerplugin* theWrappedObject); |
|
137 | 149 | void closeMe(socexplorerplugin* theWrappedObject); |
|
150 | bool dumpMemory(socexplorerplugin* theWrappedObject, unsigned int address, unsigned int count, QString file); | |
|
151 | bool dumpMemory(socexplorerplugin* theWrappedObject, unsigned int address, unsigned int count, QString file, const QString& format); | |
|
138 | 152 | QString instanceName(socexplorerplugin* theWrappedObject); |
|
139 | 153 | int isConnected(socexplorerplugin* theWrappedObject); |
|
154 | bool loadbin(socexplorerplugin* theWrappedObject, unsigned int address, QString file); | |
|
155 | void makeGenericPyWrapper(socexplorerplugin* theWrappedObject); | |
|
156 | bool memSet(socexplorerplugin* theWrappedObject, unsigned int address, int value, unsigned int count); | |
|
140 | 157 | void postInstantiationTrigger(socexplorerplugin* theWrappedObject); |
|
141 | 158 | int registermenu(socexplorerplugin* theWrappedObject, QMenu* menu); |
|
142 | 159 | void setBaseAddress(socexplorerplugin* theWrappedObject, unsigned int baseAddress); |
|
143 | 160 | void setInstanceName(socexplorerplugin* theWrappedObject, const QString& newName); |
|
144 |
void py_set_ |
|
|
145 |
|
|
|
161 | void py_set_ChildsMenu(socexplorerplugin* theWrappedObject, QMenu* ChildsMenu){ theWrappedObject->ChildsMenu = ChildsMenu; } | |
|
162 | QMenu* py_get_ChildsMenu(socexplorerplugin* theWrappedObject){ return theWrappedObject->ChildsMenu; } | |
|
163 | void py_set_childs(socexplorerplugin* theWrappedObject, QList<socexplorerplugin* > childs){ theWrappedObject->childs = childs; } | |
|
164 | QList<socexplorerplugin* > py_get_childs(socexplorerplugin* theWrappedObject){ return theWrappedObject->childs; } | |
|
165 | void py_set_closeAction(socexplorerplugin* theWrappedObject, QAction* closeAction){ theWrappedObject->closeAction = closeAction; } | |
|
166 | QAction* py_get_closeAction(socexplorerplugin* theWrappedObject){ return theWrappedObject->closeAction; } | |
|
146 | 167 | void py_set_menu(socexplorerplugin* theWrappedObject, QMenu* menu){ theWrappedObject->menu = menu; } |
|
147 | 168 | QMenu* py_get_menu(socexplorerplugin* theWrappedObject){ return theWrappedObject->menu; } |
|
148 |
void py_set_ |
|
|
149 |
|
|
|
150 | void py_set_closeAction(socexplorerplugin* theWrappedObject, QAction* closeAction){ theWrappedObject->closeAction = closeAction; } | |
|
151 | QAction* py_get_closeAction(socexplorerplugin* theWrappedObject){ return theWrappedObject->closeAction; } | |
|
152 | void py_set_childs(socexplorerplugin* theWrappedObject, QList<socexplorerplugin* > childs){ theWrappedObject->childs = childs; } | |
|
153 | QList<socexplorerplugin* > py_get_childs(socexplorerplugin* theWrappedObject){ return theWrappedObject->childs; } | |
|
169 | void py_set_parent(socexplorerplugin* theWrappedObject, socexplorerplugin* parent){ theWrappedObject->parent = parent; } | |
|
170 | socexplorerplugin* py_get_parent(socexplorerplugin* theWrappedObject){ return theWrappedObject->parent; } | |
|
154 | 171 | }; |
|
155 | 172 | |
|
156 | 173 |
@@ -1,8 +1,11 | |||
|
1 | 1 | #include <PythonQt.h> |
|
2 | #include <PythonQtConversion.h> | |
|
2 | 3 | #include "PySocExplorerEngine0.h" |
|
3 | 4 | |
|
4 | 5 | |
|
6 | ||
|
5 | 7 | void PythonQt_init_PySocExplorerEngine(PyObject* module) { |
|
6 | 8 | PythonQt::priv()->registerClass(&socexplorerplugin::staticMetaObject, "PySocExplorerEngine", PythonQtCreateObject<PythonQtWrapper_socexplorerplugin>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_socexplorerplugin>, module, 0); |
|
7 | 9 | |
|
10 | ||
|
8 | 11 | } |
@@ -1,75 +1,89 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the SocExplorer Software |
|
3 | 3 | -- Copyright (C) 2011, Plasma Physics Laboratory - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 2 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Alexis Jeandet |
|
20 | 20 | -- Mail : alexis.jeandet@lpp.polytechnique.fr |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | #include <QApplication> |
|
23 | 23 | #include "mainwindow.h" |
|
24 | 24 | #include <PythonQt.h> |
|
25 | 25 | #include <PythonQt_QtAll.h> |
|
26 | 26 | #include <gui/PythonQtScriptingConsole.h> |
|
27 | 27 | #include <socexplorerplugin.h> |
|
28 | 28 | #include <QStyle> |
|
29 | 29 | #include <QStyleFactory> |
|
30 | 30 | #include <QStringList> |
|
31 | 31 | #include <QFile> |
|
32 | 32 | |
|
33 | 33 | void usage(); |
|
34 | 34 | |
|
35 | 35 | int main(int argc, char *argv[]) |
|
36 | 36 | { |
|
37 | 37 | QApplication a(argc, argv); |
|
38 | 38 | QString scriptToEval; |
|
39 | 39 | QStringList args= a.arguments(); |
|
40 | for(int i=0;i<args.count()-1;i++) | |
|
40 | bool noGUI=false; | |
|
41 | for(int i=0;i<=args.count()-1;i++) | |
|
41 | 42 | { |
|
42 | if((args.at(i).compare("-e")==0) || (args.at(i).compare("--execute")==0)) | |
|
43 | if(((args.at(i).compare("-e")==0) || (args.at(i).compare("--execute")==0)) && (i<(args.count()-1))) | |
|
43 | 44 | { |
|
44 | 45 | scriptToEval = args.at(i+1); |
|
45 | 46 | if(!QFile::exists(scriptToEval)) |
|
46 | 47 | { |
|
47 | 48 | scriptToEval.clear(); |
|
48 | 49 | } |
|
49 | 50 | else |
|
50 | 51 | qDebug() << "Will execute" << scriptToEval; |
|
51 | 52 | break; |
|
52 | 53 | } |
|
53 | if((args.at(i).compare("-d")==0) || (args.at(i).compare("--debug-level")==0)) | |
|
54 | if(((args.at(i).compare("-d")==0) || (args.at(i).compare("--debug-level")==0)) && (i<(args.count()-1))) | |
|
54 | 55 | { |
|
55 | 56 | bool success; |
|
56 | 57 | int lvl; |
|
57 | 58 | lvl = args.at(i+1).toInt(&success,10); |
|
58 | 59 | if(success) |
|
59 | 60 | { |
|
60 | 61 | SocExplorerEngine::setLogLevel(lvl); |
|
61 | 62 | } |
|
62 | 63 | } |
|
64 | if((args.at(i).compare("--no-gui")==0)) | |
|
65 | { | |
|
66 | noGUI = true; | |
|
67 | qDebug() << "CLI mode"; | |
|
68 | } | |
|
63 | 69 | } |
|
64 | 70 | |
|
65 | 71 | SocExplorerMainWindow w(scriptToEval); |
|
66 | w.show(); | |
|
72 | if(!noGUI) | |
|
73 | { | |
|
74 | ||
|
75 | w.show(); | |
|
76 | } | |
|
77 | else | |
|
78 | { | |
|
79 | ||
|
80 | } | |
|
67 | 81 | return a.exec(); |
|
68 | 82 | } |
|
69 | 83 | |
|
70 | 84 | |
|
71 | 85 | void usage() |
|
72 | 86 | { |
|
73 | 87 | // TODO respect usual Linux Cli interface, socexplore [OPTION]...FILES... |
|
74 | 88 | // TODO write an usage helper. |
|
75 | 89 | } |
@@ -1,138 +1,139 | |||
|
1 | 1 | #------------------------------------------------- |
|
2 | 2 | # |
|
3 | 3 | # Project created by QtCreator 2011-09-19T22:52:10 |
|
4 | 4 | # |
|
5 | 5 | #------------------------------------------------- |
|
6 | 6 | SOCEXPLORER_ROOT = $${PWD}/.. |
|
7 | 7 | include(../build_cfg/socexplorer.pri) |
|
8 | 8 | |
|
9 | 9 | TARGET = socexplorer$${DEBUG_EXT} |
|
10 | 10 | TEMPLATE = app |
|
11 | 11 | CONFIG += pythonqt |
|
12 | 12 | |
|
13 | 13 | |
|
14 | 14 | QMAKE_LFLAGS_RELEASE += --enable-auto-import -mstackrealign |
|
15 | 15 | QMAKE_LFLAGS_DEBUG += --enable-auto-import -mstackrealign |
|
16 | 16 | |
|
17 | 17 | include ( common/pythonQtOut/generated_cpp/PySocExplorer/PySocExplorer.pri ) |
|
18 | 18 | include ( SocExplorerEngine/pythonQtOut/generated_cpp/PySocExplorerEngine/PySocExplorerEngine.pri ) |
|
19 | 19 | include ( SocExplorerEngine/plugins/socexplorerplugin.prf ) |
|
20 | 20 | |
|
21 | 21 | INCLUDEPATH+=$${PWD} \ |
|
22 | 22 | $${PWD}/common \ |
|
23 | 23 | $${PWD}/common/qhexedit \ |
|
24 | 24 | $${PWD}/common/QCustomPlot \ |
|
25 | 25 | $${PWD}/common/genericBinaryFiles \ |
|
26 | 26 | $${PWD}/common/genericBinaryFiles/elf \ |
|
27 | 27 | $${PWD}/common/genericBinaryFiles/srec \ |
|
28 | 28 | $${PWD}/common/genericBinaryFiles/BinFile \ |
|
29 | 29 | SocExplorerEngine/engine \ |
|
30 | 30 | SocExplorerEngine/pluginloader \ |
|
31 | 31 | SocExplorerEngine/pluginsInterface \ |
|
32 | 32 | SocExplorerEngine/proxy \ |
|
33 | 33 | SocExplorerEngine/pluginManagerWdgt \ |
|
34 | 34 | SocExplorerEngine/plugins \ |
|
35 | 35 | SocExplorerEngine/RegisterMVS \ |
|
36 | 36 | SocExplorerEngine/XmlEngine \ |
|
37 | 37 | SocExplorerEngine/SOC \ |
|
38 | SocExplorerEngine/PeripheralWidget/src | |
|
38 | SocExplorerEngine/PeripheralWidget/src \ | |
|
39 | SocExplorerEngine/memtester | |
|
39 | 40 | |
|
40 | 41 | win32:INCLUDEPATH+= \ |
|
41 | 42 | $${PWD}/common/genericBinaryFiles/elf/libelfWin32/include \ |
|
42 | 43 | $${PWD}/common/genericBinaryFiles/elf/libelfWin32/include/libelf \ |
|
43 | 44 | |
|
44 | 45 | |
|
45 | 46 | RC_FILE = ../win32cfg/socexplorer.rc |
|
46 | 47 | |
|
47 | 48 | |
|
48 | 49 | unix:LIBS+=-L$${SOCEXPLORER_ROOT}/bin/linux -lsocexplorercommon$${DEBUG_EXT} -L$${SOCEXPLORER_ROOT}/bin/linux -lsocexplorerengine$${DEBUG_EXT} |
|
49 | 50 | |
|
50 | 51 | win32-g++:LIBS += $${SOCEXPLORER_ROOT}/bin/win32/socexplorercommon$${DEBUG_EXT}.dll $${SOCEXPLORER_ROOT}/bin/win32/socexplorerengine$${DEBUG_EXT}.dll |
|
51 | 52 | |
|
52 | 53 | |
|
53 | 54 | unix{ |
|
54 | 55 | translation.files = $${SOCEXPLORER_ROOT}/translations/socexplorer_fr.qm \ |
|
55 | 56 | $${SOCEXPLORER_ROOT}/translations/socexplorer_en.qm |
|
56 | 57 | translation.path = $${SOCEXPLORER_TRANSLATION_INSTALL_PATH} |
|
57 | 58 | target.path = /usr/bin |
|
58 | 59 | INSTALLS += translation target |
|
59 | 60 | } |
|
60 | 61 | |
|
61 | 62 | header.path = $$[QT_INSTALL_HEADERS]/SocExplorer/common |
|
62 | 63 | header.files = \ |
|
63 | 64 | socexplorer.h |
|
64 | 65 | INSTALLS += header |
|
65 | 66 | |
|
66 | 67 | |
|
67 | 68 | SOURCES += main.cpp\ |
|
68 | 69 | mainwindow.cpp \ |
|
69 | 70 | PyWdgt/pythonconsole.cpp \ |
|
70 | 71 | PyWdgt/pythonqtscriptingconsoledandd.cpp \ |
|
71 | 72 | dockablepluginmanager.cpp \ |
|
72 | 73 | toolbar.cpp \ |
|
73 | 74 | toolbarcontainer.cpp \ |
|
74 | 75 | regsExplorer/regsexplorer.cpp \ |
|
75 | 76 | regsExplorer/regsviewer.cpp \ |
|
76 | 77 | regsExplorer/regsexplorercfg.cpp \ |
|
77 | 78 | aboutsocexplorer.cpp |
|
78 | 79 | |
|
79 | 80 | # regWidget/xmltagtextedit.cpp \ |
|
80 | 81 | # regWidget/xmltaglabeledit.cpp \ |
|
81 | 82 | # regWidget/xmlelementslistwidget.cpp \ |
|
82 | 83 | # regWidget/xmlelementslistview.cpp \ |
|
83 | 84 | # regWidget/regpropeditor.cpp \ |
|
84 | 85 | # regWidget/registerwdgt.cpp \ |
|
85 | 86 | # regWidget/registereditor.cpp \ |
|
86 | 87 | # regWidget/registercel.cpp \ |
|
87 | 88 | # regWidget/periphpropeditor.cpp \ |
|
88 | 89 | # regWidget/peripherialregs.cpp \ |
|
89 | 90 | # regWidget/bitfieldpropeditor.cpp \ |
|
90 | 91 | # regWidget/bitfield.cpp |
|
91 | 92 | |
|
92 | 93 | |
|
93 | 94 | HEADERS += mainwindow.h \ |
|
94 | 95 | PyWdgt/pythonconsole.h \ |
|
95 | 96 | PyWdgt/pythonqtscriptingconsoledandd.h \ |
|
96 | 97 | dockablepluginmanager.h \ |
|
97 | 98 | toolbar.h \ |
|
98 | 99 | toolbarcontainer.h \ |
|
99 | 100 | regsExplorer/regsexplorer.h \ |
|
100 | 101 | regsExplorer/regsviewer.h \ |
|
101 | 102 | regsExplorer/regsexplorercfg.h \ |
|
102 | 103 | socexplorer.h \ |
|
103 | 104 | SocExplorerEngine/plugins/socexplorerplugin.h \ |
|
104 | 105 | aboutsocexplorer.h |
|
105 | 106 | # regWidget/xmltagtextedit.h \ |
|
106 | 107 | # regWidget/xmltaglabeledit.h \ |
|
107 | 108 | # regWidget/xmlelementslistwidget.h \ |
|
108 | 109 | # regWidget/xmlelementslistview.h \ |
|
109 | 110 | # regWidget/regpropeditor.h \ |
|
110 | 111 | # regWidget/registerwdgt.h \ |
|
111 | 112 | # regWidget/registereditor.h \ |
|
112 | 113 | # regWidget/registercel.h \ |
|
113 | 114 | # regWidget/periphpropeditor.h \ |
|
114 | 115 | # regWidget/peripherialregs.h \ |
|
115 | 116 | # regWidget/bitfieldpropeditor.h \ |
|
116 | 117 | # regWidget/bitfield.h |
|
117 | 118 | |
|
118 | 119 | |
|
119 | 120 | include ( NicePyConsole/NicePyConsole.pri) |
|
120 | 121 | |
|
121 | 122 | win32{ |
|
122 | 123 | RESOURCES = ../ressources/SocExplorer.qrc |
|
123 | 124 | } |
|
124 | 125 | |
|
125 | 126 | unix{ |
|
126 | 127 | RESOURCES = ../ressources/SocExplorer.qrc |
|
127 | 128 | } |
|
128 | 129 | |
|
129 | 130 | TRANSLATIONS = ../translations/socexplorer_fr.ts \ |
|
130 | 131 | ../translations/socexplorer_en.ts |
|
131 | 132 | |
|
132 | 133 | |
|
133 | 134 | |
|
134 | 135 | |
|
135 | 136 | |
|
136 | 137 | |
|
137 | 138 | |
|
138 | 139 |
General Comments 0
You need to be logged in to leave comments.
Login now