Abstract Binary files tools WIP.
jeandet -
r51:c839740ef520 default
Not Reviewed
Show More
Add another comment
TODOs: 0 unresolved 0 Resolved
COMMENTS: 0 General 0 Inline
@@ -20,6 +20,7
20 -- Mail : alexis.jeandet@member.fsf.org
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
21 ----------------------------------------------------------------------------*/
22 #include "binaryfile.h"
22 #include "binaryfile.h"
23 #include "srecfile.h"
23
24
24 binaryFile::binaryFile()
25 binaryFile::binaryFile()
25 {
26 {
@@ -47,13 +48,6
47
48
48 bool binaryFile::openFiles(const QStringList &Files)
49 bool binaryFile::openFiles(const QStringList &Files)
49 {
50 {
50 this->p_fileNames.clear();
51 this->p_fileNames.append(Files);
52 for(int i=0;i<p_files.count();i++)
53 {
54 delete p_files.at(i);
55 }
56 this->p_files.clear();
57 for(int i=0;i<Files.count();i++)
51 for(int i=0;i<Files.count();i++)
58 {
52 {
59 this->p_files.append(new QFile(Files.at(i)));
53 this->p_files.append(new QFile(Files.at(i)));
@@ -125,6 +119,13
125 return "";
119 return "";
126 }
120 }
127
121
122 codeFragment *binaryFile::getFragment(int index)
123 {
124 if((index>=0)&&(index<p_fragments.count()))
125 return p_fragments.at(index);
126 return NULL;
127 }
128
128 bool binaryFile::getFragmentData(int index, char **buffer)
129 bool binaryFile::getFragmentData(int index, char **buffer)
129 {
130 {
130 if((index>=0)&&(index<p_fragments.count()))
131 if((index>=0)&&(index<p_fragments.count()))
@@ -135,6 +136,31
135 return false;
136 return false;
136 }
137 }
137
138
139 bool binaryFile::toSrec(const QString &fileName)
140 {
141 srecFile::toSrec(p_fragments,fileName);
142 }
143
144 bool binaryFile::toBinary(const QString &fileName)
145 {
146 toBinary(p_fragments,fileName);
147 }
148
149 bool binaryFile::toBinary(QList<codeFragment *> fragments, const QString &File)
150 {
151 QFile file(File);
152 file.open(QIODevice::WriteOnly);
153 if(file.isOpen())
154 {
155 for(int i=0;i<fragments.count();i++)
156 {
157 file.write(fragments.at(i)->data,fragments.at(i)->size);
158 }
159 return true;
160 }
161 return false;
162 }
163
138 void binaryFile::loadFile(QFile *file)
164 void binaryFile::loadFile(QFile *file)
139 {
165 {
140 if (file->isOpen())
166 if (file->isOpen())
@@ -45,7 +45,11
45 int getFragmentAddress(int index);
45 int getFragmentAddress(int index);
46 int getFragmentSize(int index);
46 int getFragmentSize(int index);
47 QString getFragmentHeader(int index);
47 QString getFragmentHeader(int index);
48 bool getFragmentData(int index, char **buffer);
48 codeFragment* getFragment(int index);
49 bool getFragmentData(int index, char **buffer);
50 bool toSrec(const QString& fileName);
51 bool toBinary(const QString& fileName);
52 static bool toBinary(QList<codeFragment*> fragments,const QString& File);
49 signals:
53 signals:
50
54
51 public slots:
55 public slots:
@@ -2,14 +2,22
2 #include "ui_binaryfilewidget.h"
2 #include "ui_binaryfilewidget.h"
3 #include "qtablewidgetintitem.h"
3 #include "qtablewidgetintitem.h"
4 #include <QtWidgets/QTableWidget>
4 #include <QtWidgets/QTableWidget>
5 #include <QtWidgets/QFileDialog>
6 #include "srecfile.h"
5
7
6 binaryFileWidget::binaryFileWidget(QWidget *parent) :
8 binaryFileWidget::binaryFileWidget(QWidget *parent) :
7 QWidget(parent),
9 abstractBinFileWidget(parent),
8 ui(new Ui::binaryFileWidget)
10 ui(new Ui::binaryFileWidget)
9 {
11 {
10 ui->setupUi(this);
12 ui->setupUi(this);
11 connect(this->ui->fragmentList,SIGNAL(cellActivated(int,int)),this,SLOT(fragmentCellActivated(int,int)));
13 connect(this->ui->fragmentList,SIGNAL(cellActivated(int,int)),this,SLOT(fragmentCellActivated(int,int)));
12 connect(this->ui->fragmentList,SIGNAL(cellChanged(int,int)),this,SLOT(fragmentCellChanged(int,int)));
14 connect(this->ui->fragmentList,SIGNAL(cellChanged(int,int)),this,SLOT(fragmentCellChanged(int,int)));
15 exportToSREC_action = new QAction(tr("Export to SREC"),this);
16 exportToBIN_action = new QAction(tr("Export to Binary"),this);
17 this->ui->fragmentList->addAction(exportToBIN_action);
18 this->ui->fragmentList->addAction(exportToSREC_action);
19 connect(this->exportToBIN_action,SIGNAL(triggered()),this,SLOT(exportToBIN()));
20 connect(this->exportToSREC_action,SIGNAL(triggered()),this,SLOT(exportToSREC()));
13 }
21 }
14
22
15 binaryFileWidget::~binaryFileWidget()
23 binaryFileWidget::~binaryFileWidget()
@@ -17,16 +25,16
17 delete ui;
25 delete ui;
18 }
26 }
19
27
20 void binaryFileWidget::updateBinaryFile(binaryFile *file)
28 void binaryFileWidget::setFile(abstractBinFile *file)
21 {
29 {
22 this->p_binfile = file;
30 this->p_binfile = (binaryFile*)file;
23 if(p_binfile->isopened())
31 if(p_binfile->isopened())
24 {
32 {
25 updateFragments();
33 reloadFile();
26 }
34 }
27 }
35 }
28
36
29 void binaryFileWidget::updateFragments()
37 void binaryFileWidget::reloadFile()
30 {
38 {
31 this->ui->fragmentList->clear();
39 this->ui->fragmentList->clear();
32 this->ui->fragmentList->setRowCount(p_binfile->getFragmentsCount());
40 this->ui->fragmentList->setRowCount(p_binfile->getFragmentsCount());
@@ -80,3 +88,63
80 this->p_binfile->getFragments().at(row)->address = newAddress;
88 this->p_binfile->getFragments().at(row)->address = newAddress;
81 }
89 }
82 }
90 }
91
92 void binaryFileWidget::exportToSREC()
93 {
94 QList<codeFragment *> SelectedFragmentsList=getSelectedFragments();
95 if(SelectedFragmentsList.count()>0)
96 {
97 QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"),
98 NULL,
99 tr("SREC Files (*.srec)"));
100 if(!fileName.isEmpty())
101 {
102 srecFile::toSrec(SelectedFragmentsList,fileName);
103 }
104 }
105 }
106
107 void binaryFileWidget::exportToBIN()
108 {
109 QList<codeFragment *> SelectedFragmentsList=getSelectedFragments();
110 if(SelectedFragmentsList.count()>0)
111 {
112 QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"),
113 NULL,
114 tr("Binary Files (*.bin)"));
115 if(!fileName.isEmpty())
116 {
117 binaryFile::toBinary(SelectedFragmentsList,fileName);
118 }
119 }
120 }
121
122 QStringList binaryFileWidget::getSelectedFilesNames()
123 {
124 QStringList SelectedFilesList;
125 QList<QTableWidgetItem*> items = this->ui->fragmentList->selectedItems();
126 for(int i=0;i<items.count();i++)
127 {
128 QString file = p_binfile->getFragmentHeader(items.at(i)->row());
129 if(!SelectedFilesList.contains(file))
130 {
131 SelectedFilesList.append(file);
132 }
133 }
134 return SelectedFilesList;
135 }
136
137 QList<codeFragment *> binaryFileWidget::getSelectedFragments()
138 {
139 QList<codeFragment *> SelectedFragmentsList;
140 QList<QTableWidgetItem*> items = this->ui->fragmentList->selectedItems();
141 for(int i=0;i<items.count();i++)
142 {
143 codeFragment * fragment = p_binfile->getFragment(items.at(i)->row());
144 if(!SelectedFragmentsList.contains(fragment))
145 {
146 SelectedFragmentsList.append(fragment);
147 }
148 }
149 return SelectedFragmentsList;
150 }
@@ -1,14 +1,36
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the SocExplorer Software
3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
1 #ifndef BINARYFILEWIDGET_H
22 #ifndef BINARYFILEWIDGET_H
2 #define BINARYFILEWIDGET_H
23 #define BINARYFILEWIDGET_H
3
24
4 #include <QWidget>
25 #include <QWidget>
5 #include "binaryfile.h"
26 #include "binaryfile.h"
27 #include <QAction>
6
28
7 namespace Ui {
29 namespace Ui {
8 class binaryFileWidget;
30 class binaryFileWidget;
9 }
31 }
10
32
11 class binaryFileWidget : public QWidget
33 class binaryFileWidget : public abstractBinFileWidget
12 {
34 {
13 Q_OBJECT
35 Q_OBJECT
14
36
@@ -17,16 +39,22
17 ~binaryFileWidget();
39 ~binaryFileWidget();
18
40
19 public slots:
41 public slots:
20 void updateBinaryFile(binaryFile* file);
42 void setFile(abstractBinFile* file);
21 void updateFragments();
43 void reloadFile();
22
44
23 private slots:
45 private slots:
24 void fragmentCellActivated(int row, int column);
46 void fragmentCellActivated(int row, int column);
25 void fragmentCellChanged(int row, int column);
47 void fragmentCellChanged(int row, int column);
48 void exportToSREC();
49 void exportToBIN();
26
50
27 private:
51 private:
52 QStringList getSelectedFilesNames();
53 QList<codeFragment *> getSelectedFragments();
28 Ui::binaryFileWidget *ui;
54 Ui::binaryFileWidget *ui;
29 binaryFile* p_binfile;
55 binaryFile* p_binfile;
56 QAction* exportToSREC_action;
57 QAction* exportToBIN_action;
30 };
58 };
31
59
32 #endif // BINARYFILEWIDGET_H
60 #endif // BINARYFILEWIDGET_H
@@ -28,6 +28,9
28 </property>
28 </property>
29 </widget>
29 </widget>
30 <widget class="QTableWidget" name="fragmentList">
30 <widget class="QTableWidget" name="fragmentList">
31 <property name="contextMenuPolicy">
32 <enum>Qt::ActionsContextMenu</enum>
33 </property>
31 <column>
34 <column>
32 <property name="text">
35 <property name="text">
33 <string>File</string>
36 <string>File</string>
@@ -23,6 +23,7
23 #define ABSTRACTBINFILE_H
23 #define ABSTRACTBINFILE_H
24
24
25 #include <QtCore/QObject>
25 #include <QtCore/QObject>
26 #include <QtWidgets/QWidget>
26
27
27 class codeFragment
28 class codeFragment
28 {
29 {
@@ -44,9 +45,23
44 virtual bool isopened()=0;
45 virtual bool isopened()=0;
45 virtual int closeFile()=0;
46 virtual int closeFile()=0;
46 virtual QList<codeFragment*> getFragments()=0;
47 virtual QList<codeFragment*> getFragments()=0;
47
48 virtual bool toSrec(const QString& File)=0;
49 virtual bool toBinary(const QString& File)=0;
48 protected:
50 protected:
49 QString p_fileName;
51 QString p_fileName;
50 };
52 };
51
53
54
55 class abstractBinFileWidget : public QWidget
56 {
57 Q_OBJECT
58
59 public:
60 abstractBinFileWidget(QWidget* parent = 0):QWidget(parent){};
61
62 public slots:
63 virtual void setFile(abstractBinFile* file)=0;
64 virtual void reloadFile()=0;
65 };
66
52 #endif // ABSTRACTBINFILE_H
67 #endif // ABSTRACTBINFILE_H
@@ -72,7 +72,7
72
72
73 INSTALLS += target header
73 INSTALLS += target header
74
74
75 INCLUDEPATH += QCustomPlot qhexedit srec
75 INCLUDEPATH += QCustomPlot qhexedit srec BinFile
76
76
77 HEADERS += \
77 HEADERS += \
78 memsizewdgt.h \
78 memsizewdgt.h \
@@ -22,7 +22,8
22 alexis.jeandet@member.fsf.org
22 alexis.jeandet@member.fsf.org
23 ----------------------------------------------------------------------------*/
23 ----------------------------------------------------------------------------*/
24 #include "elffile.h"
24 #include "elffile.h"
25 #include "srec/srecfile.h"
25 #include "srecfile.h"
26 #include "binaryfile.h"
26 #include <stdint.h>
27 #include <stdint.h>
27
28
28 ElfFile::ElfFile()
29 ElfFile::ElfFile()
@@ -1066,3 +1067,8
1066 {
1067 {
1067 return srecFile::toSrec(this->getFragments(),File);
1068 return srecFile::toSrec(this->getFragments(),File);
1068 }
1069 }
1070
1071 bool ElfFile::toBinary(const QString &File)
1072 {
1073 return binaryFile::toBinary(getFragments(),File);
1074 }
@@ -111,6 +111,7
111 static bool isElf(const QString& File);
111 static bool isElf(const QString& File);
112
112
113 bool toSrec(const QString& File);
113 bool toSrec(const QString& File);
114 bool toBinary(const QString& File);
114
115
115 private:
116 private:
116 codeFragment* getFragment(const QString& name);
117 codeFragment* getFragment(const QString& name);
@@ -25,10 +25,11
25 #include <QtWidgets/QFileDialog>
25 #include <QtWidgets/QFileDialog>
26 #include "qhexedit.h"
26 #include "qhexedit.h"
27 #include "qtablewidgetintitem.h"
27 #include "qtablewidgetintitem.h"
28 #include "srec/srecfile.h"
28 #include "srecfile.h"
29 #include "binaryfile.h"
29
30
30 elfFileWidget::elfFileWidget(QWidget *parent) :
31 elfFileWidget::elfFileWidget(QWidget *parent) :
31 QWidget(parent),
32 abstractBinFileWidget(parent),
32 ui(new Ui::elfFileWidget)
33 ui(new Ui::elfFileWidget)
33 {
34 {
34 ui->setupUi(this);
35 ui->setupUi(this);
@@ -59,7 +60,7
59
60
60
61
61
62
62 void elfFileWidget::updateElfFile(ElfFile *file)
63 void elfFileWidget::setFile(ElfFile *file)
63 {
64 {
64 this->p_elf = file;
65 this->p_elf = file;
65 if(p_elf->isopened() && p_elf->iself())
66 if(p_elf->isopened() && p_elf->iself())
@@ -74,6 +75,11
74 this->ui->sectionCountLabel->setText(QString::number(p_elf->getSectionCount()));
75 this->ui->sectionCountLabel->setText(QString::number(p_elf->getSectionCount()));
75 this->ui->symbolCountLabel->setText(QString::number(p_elf->getSymbolCount()));
76 this->ui->symbolCountLabel->setText(QString::number(p_elf->getSymbolCount()));
76 }
77 }
78 reloadFile();
79 }
80
81 void elfFileWidget::reloadFile()
82 {
77 updateSymbols();
83 updateSymbols();
78 updateSections();
84 updateSections();
79 }
85 }
@@ -189,6 +195,17
189
195
190 void elfFileWidget::exportToBIN()
196 void elfFileWidget::exportToBIN()
191 {
197 {
198 QStringList sectionList=getSelectedSectionsNames();
199 if(sectionList.count()>0)
200 {
201 QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"),
202 NULL,
203 tr("Binary Files (*.bin)"));
204 if(!fileName.isEmpty())
205 {
206 binaryFile::toBinary(p_elf->getFragments(sectionList),fileName);
207 }
208 }
192
209
193 }
210 }
194
211
@@ -31,7 +31,7
31 class elfFileWidget;
31 class elfFileWidget;
32 }
32 }
33
33
34 class elfFileWidget : public QWidget
34 class elfFileWidget : public abstractBinFileWidget
35 {
35 {
36 Q_OBJECT
36 Q_OBJECT
37
37
@@ -40,7 +40,8
40 ~elfFileWidget();
40 ~elfFileWidget();
41
41
42 public slots:
42 public slots:
43 void updateElfFile(ElfFile* file);
43 void setFile(ElfFile* file);
44 void reloadFile();
44 void updateSymbols();
45 void updateSymbols();
45 void updateSections();
46 void updateSections();
46
47
This diff has been collapsed as it changes many lines, (4025 lines changed) Show them Hide them
@@ -8,7 +8,6
8 #include <QVariant>
8 #include <QVariant>
9 #include <QWidget>
9 #include <QWidget>
10 #include <abstractbinfile.h>
10 #include <abstractbinfile.h>
11 #include <binaryfile.h>
12 #include <elffile.h>
11 #include <elffile.h>
13 #include <elfparser.h>
12 #include <elfparser.h>
14 #include <qaction.h>
13 #include <qaction.h>
@@ -47,7 +46,6
47 #include <qstyle.h>
46 #include <qstyle.h>
48 #include <qstyleoption.h>
47 #include <qstyleoption.h>
49 #include <qwidget.h>
48 #include <qwidget.h>
50 #include <srecfile.h>
51
49
52 PythonQtShell_ElfFile::~PythonQtShell_ElfFile() {
50 PythonQtShell_ElfFile::~PythonQtShell_ElfFile() {
53 PythonQtPrivate* priv = PythonQt::priv();
51 PythonQtPrivate* priv = PythonQt::priv();
@@ -165,6 +163,62
165 }
163 }
166 return ElfFile::openFile(File);
164 return ElfFile::openFile(File);
167 }
165 }
166 bool PythonQtShell_ElfFile::toBinary(const QString& File)
167 {
168 if (_wrapper) {
169 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "toBinary");
170 PyErr_Clear();
171 if (obj && !PythonQtSlotFunction_Check(obj)) {
172 static const char* argumentList[] ={"bool" , "const QString&"};
173 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
174 bool returnValue;
175 void* args[2] = {NULL, (void*)&File};
176 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
177 if (result) {
178 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
179 if (args[0]!=&returnValue) {
180 if (args[0]==NULL) {
181 PythonQt::priv()->handleVirtualOverloadReturnError("toBinary", methodInfo, result);
182 } else {
183 returnValue = *((bool*)args[0]);
184 }
185 }
186 }
187 if (result) { Py_DECREF(result); }
188 Py_DECREF(obj);
189 return returnValue;
190 }
191 }
192 return ElfFile::toBinary(File);
193 }
194 bool PythonQtShell_ElfFile::toSrec(const QString& File)
195 {
196 if (_wrapper) {
197 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "toSrec");
198 PyErr_Clear();
199 if (obj && !PythonQtSlotFunction_Check(obj)) {
200 static const char* argumentList[] ={"bool" , "const QString&"};
201 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
202 bool returnValue;
203 void* args[2] = {NULL, (void*)&File};
204 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
205 if (result) {
206 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
207 if (args[0]!=&returnValue) {
208 if (args[0]==NULL) {
209 PythonQt::priv()->handleVirtualOverloadReturnError("toSrec", methodInfo, result);
210 } else {
211 returnValue = *((bool*)args[0]);
212 }
213 }
214 }
215 if (result) { Py_DECREF(result); }
216 Py_DECREF(obj);
217 return returnValue;
218 }
219 }
220 return ElfFile::toSrec(File);
221 }
168 ElfFile* PythonQtWrapper_ElfFile::new_ElfFile()
222 ElfFile* PythonQtWrapper_ElfFile::new_ElfFile()
169 {
223 {
170 return new PythonQtShell_ElfFile(); }
224 return new PythonQtShell_ElfFile(); }
@@ -368,9 +422,14
368 return ( theWrappedObject->sectionIsNobits(index));
422 return ( theWrappedObject->sectionIsNobits(index));
369 }
423 }
370
424
425 bool PythonQtWrapper_ElfFile::toBinary(ElfFile* theWrappedObject, const QString& File)
426 {
427 return ( ((PythonQtPublicPromoter_ElfFile*)theWrappedObject)->promoted_toBinary(File));
428 }
429
371 bool PythonQtWrapper_ElfFile::toSrec(ElfFile* theWrappedObject, const QString& File)
430 bool PythonQtWrapper_ElfFile::toSrec(ElfFile* theWrappedObject, const QString& File)
372 {
431 {
373 return ( theWrappedObject->toSrec(File));
432 return ( ((PythonQtPublicPromoter_ElfFile*)theWrappedObject)->promoted_toSrec(File));
374 }
433 }
375
434
376
435
@@ -4964,12 +5023,1014
4964 }
5023 }
4965 abstractBinFile::timerEvent(arg__1);
5024 abstractBinFile::timerEvent(arg__1);
4966 }
5025 }
5026 bool PythonQtShell_abstractBinFile::toBinary(const QString& File)
5027 {
5028 if (_wrapper) {
5029 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "toBinary");
5030 PyErr_Clear();
5031 if (obj && !PythonQtSlotFunction_Check(obj)) {
5032 static const char* argumentList[] ={"bool" , "const QString&"};
5033 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5034 bool returnValue;
5035 void* args[2] = {NULL, (void*)&File};
5036 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5037 if (result) {
5038 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
5039 if (args[0]!=&returnValue) {
5040 if (args[0]==NULL) {
5041 PythonQt::priv()->handleVirtualOverloadReturnError("toBinary", methodInfo, result);
5042 } else {
5043 returnValue = *((bool*)args[0]);
5044 }
5045 }
5046 }
5047 if (result) { Py_DECREF(result); }
5048 Py_DECREF(obj);
5049 return returnValue;
5050 }
5051 }
5052 return bool();
5053 }
5054 bool PythonQtShell_abstractBinFile::toSrec(const QString& File)
5055 {
5056 if (_wrapper) {
5057 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "toSrec");
5058 PyErr_Clear();
5059 if (obj && !PythonQtSlotFunction_Check(obj)) {
5060 static const char* argumentList[] ={"bool" , "const QString&"};
5061 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5062 bool returnValue;
5063 void* args[2] = {NULL, (void*)&File};
5064 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5065 if (result) {
5066 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
5067 if (args[0]!=&returnValue) {
5068 if (args[0]==NULL) {
5069 PythonQt::priv()->handleVirtualOverloadReturnError("toSrec", methodInfo, result);
5070 } else {
5071 returnValue = *((bool*)args[0]);
5072 }
5073 }
5074 }
5075 if (result) { Py_DECREF(result); }
5076 Py_DECREF(obj);
5077 return returnValue;
5078 }
5079 }
5080 return bool();
5081 }
4967 abstractBinFile* PythonQtWrapper_abstractBinFile::new_abstractBinFile()
5082 abstractBinFile* PythonQtWrapper_abstractBinFile::new_abstractBinFile()
4968 {
5083 {
4969 return new PythonQtShell_abstractBinFile(); }
5084 return new PythonQtShell_abstractBinFile(); }
4970
5085
4971
5086
4972
5087
5088 PythonQtShell_abstractBinFileWidget::~PythonQtShell_abstractBinFileWidget() {
5089 PythonQtPrivate* priv = PythonQt::priv();
5090 if (priv) { priv->shellClassDeleted(this); }
5091 }
5092 void PythonQtShell_abstractBinFileWidget::actionEvent(QActionEvent* arg__1)
5093 {
5094 if (_wrapper) {
5095 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "actionEvent");
5096 PyErr_Clear();
5097 if (obj && !PythonQtSlotFunction_Check(obj)) {
5098 static const char* argumentList[] ={"" , "QActionEvent*"};
5099 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5100 void* args[2] = {NULL, (void*)&arg__1};
5101 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5102 if (result) { Py_DECREF(result); }
5103 Py_DECREF(obj);
5104 return;
5105 }
5106 }
5107 abstractBinFileWidget::actionEvent(arg__1);
5108 }
5109 void PythonQtShell_abstractBinFileWidget::changeEvent(QEvent* arg__1)
5110 {
5111 if (_wrapper) {
5112 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "changeEvent");
5113 PyErr_Clear();
5114 if (obj && !PythonQtSlotFunction_Check(obj)) {
5115 static const char* argumentList[] ={"" , "QEvent*"};
5116 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5117 void* args[2] = {NULL, (void*)&arg__1};
5118 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5119 if (result) { Py_DECREF(result); }
5120 Py_DECREF(obj);
5121 return;
5122 }
5123 }
5124 abstractBinFileWidget::changeEvent(arg__1);
5125 }
5126 void PythonQtShell_abstractBinFileWidget::childEvent(QChildEvent* arg__1)
5127 {
5128 if (_wrapper) {
5129 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "childEvent");
5130 PyErr_Clear();
5131 if (obj && !PythonQtSlotFunction_Check(obj)) {
5132 static const char* argumentList[] ={"" , "QChildEvent*"};
5133 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5134 void* args[2] = {NULL, (void*)&arg__1};
5135 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5136 if (result) { Py_DECREF(result); }
5137 Py_DECREF(obj);
5138 return;
5139 }
5140 }
5141 abstractBinFileWidget::childEvent(arg__1);
5142 }
5143 void PythonQtShell_abstractBinFileWidget::closeEvent(QCloseEvent* arg__1)
5144 {
5145 if (_wrapper) {
5146 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "closeEvent");
5147 PyErr_Clear();
5148 if (obj && !PythonQtSlotFunction_Check(obj)) {