##// END OF EJS Templates
SREC File parser working....
Jeandet Alexis -
r45:c6b44a3b51fa default
parent child
Show More
@@ -0,0 +1,68
1 #include "srecfilewidget.h"
2 #include "ui_srecfilewidget.h"
3 #include <QTableWidgetItem>
4 #include <qtablewidgetintitem.h>
5
6 srecFileWidget::srecFileWidget(QWidget *parent) :
7 QWidget(parent),
8 ui(new Ui::srecFileWidget)
9 {
10 ui->setupUi(this);
11 connect(this->ui->fragmentsList,SIGNAL(cellActivated(int,int)),this,SLOT(recordCellActivated(int,int)));
12 }
13
14 srecFileWidget::~srecFileWidget()
15 {
16 delete ui;
17 }
18
19 void srecFileWidget::updatSrecFile(srecFile *file)
20 {
21 this->p_srec = file;
22 if(p_srec->isopened() && p_srec->isSREC())
23 {
24 updateRecords();
25 }
26 }
27
28 void srecFileWidget::updateRecords()
29 {
30 this->ui->fragmentsList->clear();
31 this->ui->fragmentsList->setRowCount(p_srec->getFragmentsCount());
32 this->ui->fragmentsList->setHorizontalHeaderLabels(QStringList()<<"Index"<<"Address"<<"Size"<<"Header");
33 for(int i=0;i<p_srec->getFragmentsCount();i++)
34 {
35 QTableWidgetItem *newItem = (QTableWidgetItem*)new QTableWidgetIntItem(QString("%1").arg(i),DecimalItem);
36 newItem->setFlags(newItem->flags() ^ Qt::ItemIsEditable);
37 this->ui->fragmentsList->setItem(i, 0, newItem);
38
39 newItem = (QTableWidgetItem*)new QTableWidgetIntItem(QString("0x%1").arg(p_srec->getFragmentAddress(i),8,16).replace(" ","0"),HexaDecimalItem);
40 newItem->setFlags(newItem->flags() ^ Qt::ItemIsEditable);
41 this->ui->fragmentsList->setItem(i, 1, newItem);
42
43 newItem = (QTableWidgetItem*)new QTableWidgetIntItem(QString("%1").arg(p_srec->getFragmentSize(i)),DecimalItem);
44 newItem->setFlags(newItem->flags() ^ Qt::ItemIsEditable);
45 this->ui->fragmentsList->setItem(i, 2, newItem);
46
47 newItem = new QTableWidgetItem(p_srec->getFragmentHeader(i));
48 newItem->setFlags(newItem->flags() ^ Qt::ItemIsEditable);
49 this->ui->fragmentsList->setItem(i, 3, newItem);
50
51 }
52 this->ui->fragmentsList->resizeColumnsToContents();
53 }
54
55 void srecFileWidget::recordCellActivated(int row, int column)
56 {
57 Q_UNUSED(column)
58 char* buff=NULL;
59 int index = this->ui->fragmentsList->item(row,0)->text().toInt();
60 if(index!=-1)
61 {
62 this->p_srec->getFragmentData(index,&buff);
63 this->ui->fragmentHexView->setData(QByteArray(buff,this->p_srec->getFragmentSize(index)));
64 }
65
66 }
67
68
@@ -0,0 +1,31
1 #ifndef SRECFILEWIDGET_H
2 #define SRECFILEWIDGET_H
3
4 #include <QWidget>
5 #include "srecfile.h"
6
7 namespace Ui {
8 class srecFileWidget;
9 }
10
11 class srecFileWidget : public QWidget
12 {
13 Q_OBJECT
14
15 public:
16 explicit srecFileWidget(QWidget *parent = 0);
17 ~srecFileWidget();
18
19 public slots:
20 void updatSrecFile(srecFile* file);
21 void updateRecords();
22
23 private slots:
24 void recordCellActivated(int row, int column);
25
26 private:
27 Ui::srecFileWidget *ui;
28 srecFile* p_srec;
29 };
30
31 #endif // SRECFILEWIDGET_H
@@ -0,0 +1,81
1 <?xml version="1.0" encoding="UTF-8"?>
2 <ui version="4.0">
3 <class>srecFileWidget</class>
4 <widget class="QWidget" name="srecFileWidget">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>740</width>
10 <height>516</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>Form</string>
15 </property>
16 <layout class="QGridLayout" name="gridLayout">
17 <item row="0" column="1">
18 <widget class="QGroupBox" name="groupBox_2">
19 <property name="title">
20 <string>SREC records list</string>
21 </property>
22 <layout class="QVBoxLayout" name="verticalLayout_2">
23 <item>
24 <widget class="QTableWidget" name="fragmentsList">
25 <column>
26 <property name="text">
27 <string>Index</string>
28 </property>
29 </column>
30 <column>
31 <property name="text">
32 <string>Address</string>
33 </property>
34 </column>
35 <column>
36 <property name="text">
37 <string>Size</string>
38 </property>
39 </column>
40 <column>
41 <property name="text">
42 <string>Header</string>
43 </property>
44 </column>
45 </widget>
46 </item>
47 </layout>
48 </widget>
49 </item>
50 <item row="0" column="0">
51 <widget class="QGroupBox" name="groupBox">
52 <property name="title">
53 <string>Hexadecimal Viewer</string>
54 </property>
55 <layout class="QVBoxLayout" name="verticalLayout">
56 <item>
57 <widget class="QHexEdit" name="fragmentHexView" native="true">
58 <property name="minimumSize">
59 <size>
60 <width>256</width>
61 <height>0</height>
62 </size>
63 </property>
64 </widget>
65 </item>
66 </layout>
67 </widget>
68 </item>
69 </layout>
70 </widget>
71 <customwidgets>
72 <customwidget>
73 <class>QHexEdit</class>
74 <extends>QWidget</extends>
75 <header location="global">qhexedit.h</header>
76 <container>1</container>
77 </customwidget>
78 </customwidgets>
79 <resources/>
80 <connections/>
81 </ui>
@@ -6,9 +6,10
6 6 #include "SocExplorerPlot.h"
7 7 #include "tcp_terminal_client.h"
8 8 #include "elf/elfparser.h"
9 #include "abstractexecfile.h"
9 #include "abstractbinfile.h"
10 10 #include "elf/elffile.h"
11 11 #include "elf/elffilewidget.h"
12 12 #include "elf/elfinfowdgt.h"
13 13 #include "QCustomPlot/qcustomplot.h"
14 14 #include "srec/srecfile.h"
15 #include "srec/srecfilewidget.h"
@@ -19,7 +19,7
19 19 /*-- Author : Alexis Jeandet
20 20 -- Mail : alexis.jeandet@member.fsf.org
21 21 ----------------------------------------------------------------------------*/
22 #include "abstractexecfile.h"
22 #include "abstractbinfile.h"
23 23
24 24
25 25 codeFragment::codeFragment()
@@ -19,8 +19,8
19 19 /*-- Author : Alexis Jeandet
20 20 -- Mail : alexis.jeandet@member.fsf.org
21 21 ----------------------------------------------------------------------------*/
22 #ifndef ABSTRACTEXECFILE_H
23 #define ABSTRACTEXECFILE_H
22 #ifndef ABSTRACTBINFILE_H
23 #define ABSTRACTBINFILE_H
24 24
25 25 #include <QtCore/QObject>
26 26
@@ -28,13 +28,14 class codeFragment
28 28 {
29 29 public:
30 30 codeFragment();
31 codeFragment(char* data, quint32 size, quint32 address):data(data),size(size),address(address){}
31 codeFragment(char* data, quint64 size, quint64 address):data(data),size(size),address(address){}
32 QString header;
32 33 char* data;
33 quint32 size;
34 quint32 address;
34 quint64 size;
35 quint64 address;
35 36 };
36 37
37 class abstractExecFile : public QObject
38 class abstractBinFile : public QObject
38 39 {
39 40 Q_OBJECT
40 41 public:
@@ -48,4 +49,4 protected:
48 49 QString p_fileName;
49 50 };
50 51
51 #endif // ABSTRACTEXECFILE_H
52 #endif // ABSTRACTBINFILE_H
@@ -42,7 +42,9 header.files = \
42 42 qipdialogbox.h \
43 43 lppserial/src/RS232.h \
44 44 qtablewidgetintitem.h \
45 srec/srecfile.h
45 srec/srecfile.h \
46 srec/srecfilewidget.h \
47 abstractbinfile.cpp
46 48
47 49 win32{
48 50 elfheader.path = $$[QT_INSTALL_HEADERS]/SocExplorer/common/libelf
@@ -68,7 +70,7 isEmpty(header.path) {
68 70
69 71 INSTALLS += target header
70 72
71 INCLUDEPATH += QCustomPlot qhexedit
73 INCLUDEPATH += QCustomPlot qhexedit srec
72 74
73 75 HEADERS += \
74 76 memsizewdgt.h \
@@ -82,14 +84,15 HEADERS += \
82 84 tcp_terminal_client.h \
83 85 elf/elfinfowdgt.h \
84 86 elf/elfparser.h \
85 abstractexecfile.h \
86 87 elf/elffile.h \
87 88 qipdialogbox.h \
88 89 PySocExplorer.h \
89 90 SocExplorerPlot.h \
90 91 elf/elffilewidget.h \
91 92 qtablewidgetintitem.h \
92 srec/srecfile.h
93 srec/srecfile.h \
94 srec/srecfilewidget.h \
95 abstractbinfile.h
93 96
94 97
95 98 SOURCES += \
@@ -104,16 +107,18 SOURCES += \
104 107 tcp_terminal_client.cpp \
105 108 elf/elfinfowdgt.cpp \
106 109 elf/elfparser.cpp \
107 abstractexecfile.cpp \
108 110 elf/elffile.cpp \
109 111 qipdialogbox.cpp \
110 112 SocExplorerPlot.cpp \
111 113 elf/elffilewidget.cpp \
112 114 qtablewidgetintitem.cpp \
113 srec/srecfile.cpp
115 srec/srecfile.cpp \
116 srec/srecfilewidget.cpp \
117 abstractbinfile.cpp
114 118
115 119 FORMS += \
116 elf/elffilewidget.ui
120 elf/elffilewidget.ui \
121 srec/srecfilewidget.ui
117 122
118 123 OTHER_FILES += \
119 124 ./pythongenerator.sh \
@@ -22,9 +22,10
22 22 alexis.jeandet@member.fsf.org
23 23 ----------------------------------------------------------------------------*/
24 24 #include "elffile.h"
25 #include "srec/srecfile.h"
25 26
26 27 ElfFile::ElfFile()
27 :abstractExecFile()
28 :abstractBinFile()
28 29 {
29 30 this->opened = false;
30 31 this->type_elf = false;
@@ -33,7 +34,7 ElfFile::ElfFile()
33 34 }
34 35
35 36 ElfFile::ElfFile(const QString &File)
36 :abstractExecFile()
37 :abstractBinFile()
37 38 {
38 39 this->opened = false;
39 40 this->type_elf = false;
@@ -141,7 +142,7 codeFragment *ElfFile::getFragment(const
141 142 getSectionData(i,&fragment->data);
142 143 }
143 144 }
144
145 return fragment;
145 146 }
146 147
147 148
@@ -1039,3 +1040,8 bool ElfFile::isElf(const QString &File)
1039 1040 }
1040 1041 return false;
1041 1042 }
1043
1044 bool ElfFile::toSrec(const QString &File)
1045 {
1046 return srecFile::toSrec(this->getFragments(),File);
1047 }
@@ -19,7 +19,7
19 19 /*-- Author : Alexis Jeandet
20 20 -- Mail : alexis.jeandet@member.fsf.org
21 21 ----------------------------------------------------------------------------*/
22 #include <abstractexecfile.h>
22 #include <abstractbinfile.h>
23 23 #include <QtCore/QObject>
24 24 #include <QtCore/QStringList>
25 25 #include <libelf.h>
@@ -58,7 +58,7 public:
58 58 GElf_Sym* sym;
59 59 };
60 60
61 class ElfFile : public abstractExecFile
61 class ElfFile : public abstractBinFile
62 62 {
63 63 Q_OBJECT
64 64 public:
@@ -109,6 +109,8 public:
109 109 bool iself();
110 110 static bool isElf(const QString& File);
111 111
112 bool toSrec(const QString& File);
113
112 114 private:
113 115 codeFragment* getFragment(const QString& name);
114 116 void updateSections();
This diff has been collapsed as it changes many lines, (1013 lines changed) Show them Hide them
@@ -7,7 +7,7
7 7 #include <QSpinBox>
8 8 #include <QVariant>
9 9 #include <QWidget>
10 #include <abstractexecfile.h>
10 #include <abstractbinfile.h>
11 11 #include <elffile.h>
12 12 #include <elfparser.h>
13 13 #include <qaction.h>
@@ -46,6 +46,7
46 46 #include <qstyle.h>
47 47 #include <qstyleoption.h>
48 48 #include <qwidget.h>
49 #include <srecfile.h>
49 50
50 51 PythonQtShell_ElfFile::~PythonQtShell_ElfFile() {
51 52 PythonQtPrivate* priv = PythonQt::priv();
@@ -361,6 +362,11 bool PythonQtWrapper_ElfFile::openFile(
361 362 return ( ((PythonQtPublicPromoter_ElfFile*)theWrappedObject)->promoted_openFile(File));
362 363 }
363 364
365 bool PythonQtWrapper_ElfFile::toSrec(ElfFile* theWrappedObject, const QString& File)
366 {
367 return ( theWrappedObject->toSrec(File));
368 }
369
364 370
365 371
366 372 PythonQtShell_MemSizeWdgt::~PythonQtShell_MemSizeWdgt() {
@@ -4704,11 +4710,11 QString PythonQtWrapper_XByteArray::toR
4704 4710
4705 4711
4706 4712
4707 PythonQtShell_abstractExecFile::~PythonQtShell_abstractExecFile() {
4713 PythonQtShell_abstractBinFile::~PythonQtShell_abstractBinFile() {
4708 4714 PythonQtPrivate* priv = PythonQt::priv();
4709 4715 if (priv) { priv->shellClassDeleted(this); }
4710 4716 }
4711 void PythonQtShell_abstractExecFile::childEvent(QChildEvent* arg__1)
4717 void PythonQtShell_abstractBinFile::childEvent(QChildEvent* arg__1)
4712 4718 {
4713 4719 if (_wrapper) {
4714 4720 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "childEvent");
@@ -4723,9 +4729,9 if (_wrapper) {
4723 4729 return;
4724 4730 }
4725 4731 }
4726 abstractExecFile::childEvent(arg__1);
4727 }
4728 int PythonQtShell_abstractExecFile::closeFile()
4732 abstractBinFile::childEvent(arg__1);
4733 }
4734 int PythonQtShell_abstractBinFile::closeFile()
4729 4735 {
4730 4736 if (_wrapper) {
4731 4737 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "closeFile");
@@ -4753,7 +4759,7 if (_wrapper) {
4753 4759 }
4754 4760 return int();
4755 4761 }
4756 void PythonQtShell_abstractExecFile::customEvent(QEvent* arg__1)
4762 void PythonQtShell_abstractBinFile::customEvent(QEvent* arg__1)
4757 4763 {
4758 4764 if (_wrapper) {
4759 4765 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "customEvent");
@@ -4768,9 +4774,9 if (_wrapper) {
4768 4774 return;
4769 4775 }
4770 4776 }
4771 abstractExecFile::customEvent(arg__1);
4772 }
4773 bool PythonQtShell_abstractExecFile::event(QEvent* arg__1)
4777 abstractBinFile::customEvent(arg__1);
4778 }
4779 bool PythonQtShell_abstractBinFile::event(QEvent* arg__1)
4774 4780 {
4775 4781 if (_wrapper) {
4776 4782 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "event");
@@ -4796,9 +4802,9 if (_wrapper) {
4796 4802 return returnValue;
4797 4803 }
4798 4804 }
4799 return abstractExecFile::event(arg__1);
4800 }
4801 bool PythonQtShell_abstractExecFile::eventFilter(QObject* arg__1, QEvent* arg__2)
4805 return abstractBinFile::event(arg__1);
4806 }
4807 bool PythonQtShell_abstractBinFile::eventFilter(QObject* arg__1, QEvent* arg__2)
4802 4808 {
4803 4809 if (_wrapper) {
4804 4810 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "eventFilter");
@@ -4824,9 +4830,9 if (_wrapper) {
4824 4830 return returnValue;
4825 4831 }
4826 4832 }
4827 return abstractExecFile::eventFilter(arg__1, arg__2);
4828 }
4829 QList<codeFragment* > PythonQtShell_abstractExecFile::getFragments()
4833 return abstractBinFile::eventFilter(arg__1, arg__2);
4834 }
4835 QList<codeFragment* > PythonQtShell_abstractBinFile::getFragments()
4830 4836 {
4831 4837 if (_wrapper) {
4832 4838 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "getFragments");
@@ -4854,7 +4860,7 if (_wrapper) {
4854 4860 }
4855 4861 return QList<codeFragment* >();
4856 4862 }
4857 bool PythonQtShell_abstractExecFile::isopened()
4863 bool PythonQtShell_abstractBinFile::isopened()
4858 4864 {
4859 4865 if (_wrapper) {
4860 4866 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "isopened");
@@ -4882,7 +4888,7 if (_wrapper) {
4882 4888 }
4883 4889 return bool();
4884 4890 }
4885 bool PythonQtShell_abstractExecFile::openFile(const QString& File)
4891 bool PythonQtShell_abstractBinFile::openFile(const QString& File)
4886 4892 {
4887 4893 if (_wrapper) {
4888 4894 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "openFile");
@@ -4910,7 +4916,7 if (_wrapper) {
4910 4916 }
4911 4917 return bool();
4912 4918 }
4913 void PythonQtShell_abstractExecFile::timerEvent(QTimerEvent* arg__1)
4919 void PythonQtShell_abstractBinFile::timerEvent(QTimerEvent* arg__1)
4914 4920 {
4915 4921 if (_wrapper) {
4916 4922 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "timerEvent");
@@ -4925,11 +4931,11 if (_wrapper) {
4925 4931 return;
4926 4932 }
4927 4933 }
4928 abstractExecFile::timerEvent(arg__1);
4929 }
4930 abstractExecFile* PythonQtWrapper_abstractExecFile::new_abstractExecFile()
4934 abstractBinFile::timerEvent(arg__1);
4935 }
4936 abstractBinFile* PythonQtWrapper_abstractBinFile::new_abstractBinFile()
4931 4937 {
4932 return new PythonQtShell_abstractExecFile(); }
4938 return new PythonQtShell_abstractBinFile(); }
4933 4939
4934 4940
4935 4941
@@ -4941,7 +4947,7 codeFragment* PythonQtWrapper_codeFragme
4941 4947 {
4942 4948 return new PythonQtShell_codeFragment(); }
4943 4949
4944 codeFragment* PythonQtWrapper_codeFragment::new_codeFragment(char* data, unsigned int size, unsigned int address)
4950 codeFragment* PythonQtWrapper_codeFragment::new_codeFragment(char* data, quint64 size, quint64 address)
4945 4951 {
4946 4952 return new PythonQtShell_codeFragment(data, size, address); }
4947 4953
@@ -7045,16 +7051,56 int PythonQtWrapper_srecFile::closeFile
7045 7051 return ( ((PythonQtPublicPromoter_srecFile*)theWrappedObject)->promoted_closeFile());
7046 7052 }
7047 7053
7054 int PythonQtWrapper_srecFile::getFragmentAddress(srecFile* theWrappedObject, int index)
7055 {
7056 return ( theWrappedObject->getFragmentAddress(index));
7057 }
7058
7059 bool PythonQtWrapper_srecFile::getFragmentData(srecFile* theWrappedObject, int index, char** buffer)
7060 {
7061 return ( theWrappedObject->getFragmentData(index, buffer));
7062 }
7063
7064 QString PythonQtWrapper_srecFile::getFragmentHeader(srecFile* theWrappedObject, int index)
7065 {
7066 return ( theWrappedObject->getFragmentHeader(index));
7067 }
7068
7069 int PythonQtWrapper_srecFile::getFragmentSize(srecFile* theWrappedObject, int index)
7070 {
7071 return ( theWrappedObject->getFragmentSize(index));
7072 }
7073
7048 7074 QList<codeFragment* > PythonQtWrapper_srecFile::getFragments(srecFile* theWrappedObject)
7049 7075 {
7050 7076 return ( ((PythonQtPublicPromoter_srecFile*)theWrappedObject)->promoted_getFragments());
7051 7077 }
7052 7078
7079 int PythonQtWrapper_srecFile::getFragmentsCount(srecFile* theWrappedObject)
7080 {
7081 return ( theWrappedObject->getFragmentsCount());
7082 }
7083
7084 bool PythonQtWrapper_srecFile::isSREC(srecFile* theWrappedObject)
7085 {
7086 return ( theWrappedObject->isSREC());
7087 }
7088
7089 bool PythonQtWrapper_srecFile::static_srecFile_isSREC(const QString& File)
7090 {
7091 return (srecFile::isSREC(File));
7092 }
7093
7053 7094 bool PythonQtWrapper_srecFile::isopened(srecFile* theWrappedObject)
7054 7095 {
7055 7096 return ( ((PythonQtPublicPromoter_srecFile*)theWrappedObject)->promoted_isopened());
7056 7097 }
7057 7098
7099 int PythonQtWrapper_srecFile::lineCount(srecFile* theWrappedObject)
7100 {
7101 return ( theWrappedObject->lineCount());
7102 }
7103
7058 7104 bool PythonQtWrapper_srecFile::openFile(srecFile* theWrappedObject, const QString& File)
7059 7105 {
7060 7106 return ( ((PythonQtPublicPromoter_srecFile*)theWrappedObject)->promoted_openFile(File));
@@ -7065,4 +7111,921 bool PythonQtWrapper_srecFile::openFile
7065 7111 return ( theWrappedObject->openFiles(Files));
7066 7112 }
7067 7113
7068
7114 bool PythonQtWrapper_srecFile::static_srecFile_toSrec(QList<codeFragment* > fragments, const QString& File)
7115 {
7116 return (srecFile::toSrec(fragments, File));
7117 }
7118
7119
7120
7121 PythonQtShell_srecFileWidget::~PythonQtShell_srecFileWidget() {
7122 PythonQtPrivate* priv = PythonQt::priv();
7123 if (priv) { priv->shellClassDeleted(this); }
7124 }
7125 void PythonQtShell_srecFileWidget::actionEvent(QActionEvent* arg__1)
7126 {
7127 if (_wrapper) {
7128 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "actionEvent");
7129 PyErr_Clear();
7130 if (obj && !PythonQtSlotFunction_Check(obj)) {
7131 static const char* argumentList[] ={"" , "QActionEvent*"};
7132 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7133 void* args[2] = {NULL, (void*)&arg__1};
7134 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7135 if (result) { Py_DECREF(result); }
7136 Py_DECREF(obj);
7137 return;
7138 }
7139 }
7140 srecFileWidget::actionEvent(arg__1);
7141 }
7142 void PythonQtShell_srecFileWidget::changeEvent(QEvent* arg__1)
7143 {
7144 if (_wrapper) {
7145 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "changeEvent");
7146 PyErr_Clear();
7147 if (obj && !PythonQtSlotFunction_Check(obj)) {
7148 static const char* argumentList[] ={"" , "QEvent*"};
7149 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7150 void* args[2] = {NULL, (void*)&arg__1};
7151 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7152 if (result) { Py_DECREF(result); }
7153 Py_DECREF(obj);
7154 return;
7155 }
7156 }
7157 srecFileWidget::changeEvent(arg__1);
7158 }
7159 void PythonQtShell_srecFileWidget::childEvent(QChildEvent* arg__1)
7160 {
7161 if (_wrapper) {
7162 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "childEvent");
7163 PyErr_Clear();
7164 if (obj && !PythonQtSlotFunction_Check(obj)) {
7165 static const char* argumentList[] ={"" , "QChildEvent*"};
7166 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7167 void* args[2] = {NULL, (void*)&arg__1};
7168 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7169 if (result) { Py_DECREF(result); }
7170 Py_DECREF(obj);
7171 return;
7172 }
7173 }
7174 srecFileWidget::childEvent(arg__1);
7175 }
7176 void PythonQtShell_srecFileWidget::closeEvent(QCloseEvent* arg__1)
7177 {
7178 if (_wrapper) {
7179 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "closeEvent");
7180 PyErr_Clear();
7181 if (obj && !PythonQtSlotFunction_Check(obj)) {
7182 static const char* argumentList[] ={"" , "QCloseEvent*"};
7183 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7184 void* args[2] = {NULL, (void*)&arg__1};
7185 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7186 if (result) { Py_DECREF(result); }
7187 Py_DECREF(obj);
7188 return;
7189 }
7190 }
7191 srecFileWidget::closeEvent(arg__1);
7192 }
7193 void PythonQtShell_srecFileWidget::contextMenuEvent(QContextMenuEvent* arg__1)
7194 {
7195 if (_wrapper) {
7196 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "contextMenuEvent");
7197 PyErr_Clear();
7198 if (obj && !PythonQtSlotFunction_Check(obj)) {
7199 static const char* argumentList[] ={"" , "QContextMenuEvent*"};
7200 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7201 void* args[2] = {NULL, (void*)&arg__1};
7202 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7203 if (result) { Py_DECREF(result); }
7204 Py_DECREF(obj);
7205 return;
7206 }
7207 }
7208 srecFileWidget::contextMenuEvent(arg__1);
7209 }
7210 void PythonQtShell_srecFileWidget::customEvent(QEvent* arg__1)
7211 {
7212 if (_wrapper) {
7213 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "customEvent");
7214 PyErr_Clear();
7215 if (obj && !PythonQtSlotFunction_Check(obj)) {
7216 static const char* argumentList[] ={"" , "QEvent*"};
7217 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7218 void* args[2] = {NULL, (void*)&arg__1};
7219 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7220 if (result) { Py_DECREF(result); }
7221 Py_DECREF(obj);
7222 return;
7223 }
7224 }
7225 srecFileWidget::customEvent(arg__1);
7226 }
7227 int PythonQtShell_srecFileWidget::devType() const
7228 {
7229 if (_wrapper) {
7230 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "devType");
7231 PyErr_Clear();
7232 if (obj && !PythonQtSlotFunction_Check(obj)) {
7233 static const char* argumentList[] ={"int"};
7234 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList);
7235 int returnValue;
7236 void* args[1] = {NULL};
7237 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7238 if (result) {
7239 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
7240 if (args[0]!=&returnValue) {
7241 if (args[0]==NULL) {
7242 PythonQt::priv()->handleVirtualOverloadReturnError("devType", methodInfo, result);
7243 } else {
7244 returnValue = *((int*)args[0]);
7245 }
7246 }
7247 }
7248 if (result) { Py_DECREF(result); }
7249 Py_DECREF(obj);
7250 return returnValue;
7251 }
7252 }
7253 return srecFileWidget::devType();
7254 }
7255 void PythonQtShell_srecFileWidget::dragEnterEvent(QDragEnterEvent* arg__1)
7256 {
7257 if (_wrapper) {
7258 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "dragEnterEvent");
7259 PyErr_Clear();
7260 if (obj && !PythonQtSlotFunction_Check(obj)) {
7261 static const char* argumentList[] ={"" , "QDragEnterEvent*"};
7262 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7263 void* args[2] = {NULL, (void*)&arg__1};
7264 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7265 if (result) { Py_DECREF(result); }
7266 Py_DECREF(obj);
7267 return;
7268 }
7269 }
7270 srecFileWidget::dragEnterEvent(arg__1);
7271 }
7272 void PythonQtShell_srecFileWidget::dragLeaveEvent(QDragLeaveEvent* arg__1)
7273 {
7274 if (_wrapper) {
7275 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "dragLeaveEvent");
7276 PyErr_Clear();
7277 if (obj && !PythonQtSlotFunction_Check(obj)) {
7278 static const char* argumentList[] ={"" , "QDragLeaveEvent*"};
7279 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7280 void* args[2] = {NULL, (void*)&arg__1};
7281 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7282 if (result) { Py_DECREF(result); }
7283 Py_DECREF(obj);
7284 return;
7285 }
7286 }
7287 srecFileWidget::dragLeaveEvent(arg__1);
7288 }
7289 void PythonQtShell_srecFileWidget::dragMoveEvent(QDragMoveEvent* arg__1)
7290 {
7291 if (_wrapper) {
7292 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "dragMoveEvent");
7293 PyErr_Clear();
7294 if (obj && !PythonQtSlotFunction_Check(obj)) {
7295 static const char* argumentList[] ={"" , "QDragMoveEvent*"};
7296 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7297 void* args[2] = {NULL, (void*)&arg__1};
7298 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7299 if (result) { Py_DECREF(result); }
7300 Py_DECREF(obj);
7301 return;
7302 }
7303 }
7304 srecFileWidget::dragMoveEvent(arg__1);
7305 }
7306 void PythonQtShell_srecFileWidget::dropEvent(QDropEvent* arg__1)
7307 {
7308 if (_wrapper) {
7309 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "dropEvent");
7310 PyErr_Clear();
7311 if (obj && !PythonQtSlotFunction_Check(obj)) {
7312 static const char* argumentList[] ={"" , "QDropEvent*"};
7313 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7314 void* args[2] = {NULL, (void*)&arg__1};
7315 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7316 if (result) { Py_DECREF(result); }
7317 Py_DECREF(obj);
7318 return;
7319 }
7320 }
7321 srecFileWidget::dropEvent(arg__1);
7322 }
7323 void PythonQtShell_srecFileWidget::enterEvent(QEvent* arg__1)
7324 {
7325 if (_wrapper) {
7326 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "enterEvent");
7327 PyErr_Clear();
7328 if (obj && !PythonQtSlotFunction_Check(obj)) {
7329 static const char* argumentList[] ={"" , "QEvent*"};
7330 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7331 void* args[2] = {NULL, (void*)&arg__1};
7332 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7333 if (result) { Py_DECREF(result); }
7334 Py_DECREF(obj);
7335 return;
7336 }
7337 }
7338 srecFileWidget::enterEvent(arg__1);
7339 }
7340 bool PythonQtShell_srecFileWidget::event(QEvent* arg__1)
7341 {
7342 if (_wrapper) {
7343 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "event");
7344 PyErr_Clear();
7345 if (obj && !PythonQtSlotFunction_Check(obj)) {
7346 static const char* argumentList[] ={"bool" , "QEvent*"};
7347 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7348 bool returnValue;
7349 void* args[2] = {NULL, (void*)&arg__1};
7350 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7351 if (result) {
7352 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
7353 if (args[0]!=&returnValue) {
7354 if (args[0]==NULL) {
7355 PythonQt::priv()->handleVirtualOverloadReturnError("event", methodInfo, result);
7356 } else {
7357 returnValue = *((bool*)args[0]);
7358 }
7359 }
7360 }
7361 if (result) { Py_DECREF(result); }
7362 Py_DECREF(obj);
7363 return returnValue;
7364 }
7365 }
7366 return srecFileWidget::event(arg__1);
7367 }
7368 bool PythonQtShell_srecFileWidget::eventFilter(QObject* arg__1, QEvent* arg__2)
7369 {
7370 if (_wrapper) {
7371 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "eventFilter");
7372 PyErr_Clear();
7373 if (obj && !PythonQtSlotFunction_Check(obj)) {
7374 static const char* argumentList[] ={"bool" , "QObject*" , "QEvent*"};
7375 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(3, argumentList);
7376 bool returnValue;
7377 void* args[3] = {NULL, (void*)&arg__1, (void*)&arg__2};
7378 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7379 if (result) {
7380 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
7381 if (args[0]!=&returnValue) {
7382 if (args[0]==NULL) {
7383 PythonQt::priv()->handleVirtualOverloadReturnError("eventFilter", methodInfo, result);
7384 } else {
7385 returnValue = *((bool*)args[0]);
7386 }
7387 }
7388 }
7389 if (result) { Py_DECREF(result); }
7390 Py_DECREF(obj);
7391 return returnValue;
7392 }
7393 }
7394 return srecFileWidget::eventFilter(arg__1, arg__2);
7395 }
7396 void PythonQtShell_srecFileWidget::focusInEvent(QFocusEvent* arg__1)
7397 {
7398 if (_wrapper) {
7399 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "focusInEvent");
7400 PyErr_Clear();
7401 if (obj && !PythonQtSlotFunction_Check(obj)) {
7402 static const char* argumentList[] ={"" , "QFocusEvent*"};
7403 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7404 void* args[2] = {NULL, (void*)&arg__1};
7405 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7406 if (result) { Py_DECREF(result); }
7407 Py_DECREF(obj);
7408 return;
7409 }
7410 }
7411 srecFileWidget::focusInEvent(arg__1);
7412 }
7413 bool PythonQtShell_srecFileWidget::focusNextPrevChild(bool next)
7414 {
7415 if (_wrapper) {
7416 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "focusNextPrevChild");
7417 PyErr_Clear();
7418 if (obj && !PythonQtSlotFunction_Check(obj)) {
7419 static const char* argumentList[] ={"bool" , "bool"};
7420 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7421 bool returnValue;
7422 void* args[2] = {NULL, (void*)&next};
7423 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7424 if (result) {
7425 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
7426 if (args[0]!=&returnValue) {
7427 if (args[0]==NULL) {
7428 PythonQt::priv()->handleVirtualOverloadReturnError("focusNextPrevChild", methodInfo, result);
7429 } else {
7430 returnValue = *((bool*)args[0]);
7431 }
7432 }
7433 }
7434 if (result) { Py_DECREF(result); }
7435 Py_DECREF(obj);
7436 return returnValue;
7437 }
7438 }
7439 return srecFileWidget::focusNextPrevChild(next);
7440 }
7441 void PythonQtShell_srecFileWidget::focusOutEvent(QFocusEvent* arg__1)
7442 {
7443 if (_wrapper) {
7444 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "focusOutEvent");
7445 PyErr_Clear();
7446 if (obj && !PythonQtSlotFunction_Check(obj)) {
7447 static const char* argumentList[] ={"" , "QFocusEvent*"};
7448 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7449 void* args[2] = {NULL, (void*)&arg__1};
7450 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7451 if (result) { Py_DECREF(result); }
7452 Py_DECREF(obj);
7453 return;
7454 }
7455 }
7456 srecFileWidget::focusOutEvent(arg__1);
7457 }
7458 bool PythonQtShell_srecFileWidget::hasHeightForWidth() const
7459 {
7460 if (_wrapper) {
7461 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "hasHeightForWidth");
7462 PyErr_Clear();
7463 if (obj && !PythonQtSlotFunction_Check(obj)) {
7464 static const char* argumentList[] ={"bool"};
7465 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList);
7466 bool returnValue;
7467 void* args[1] = {NULL};
7468 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7469 if (result) {
7470 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
7471 if (args[0]!=&returnValue) {
7472 if (args[0]==NULL) {
7473 PythonQt::priv()->handleVirtualOverloadReturnError("hasHeightForWidth", methodInfo, result);
7474 } else {
7475 returnValue = *((bool*)args[0]);
7476 }
7477 }
7478 }
7479 if (result) { Py_DECREF(result); }
7480 Py_DECREF(obj);
7481 return returnValue;
7482 }
7483 }
7484 return srecFileWidget::hasHeightForWidth();
7485 }
7486 int PythonQtShell_srecFileWidget::heightForWidth(int arg__1) const
7487 {
7488 if (_wrapper) {
7489 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "heightForWidth");
7490 PyErr_Clear();
7491 if (obj && !PythonQtSlotFunction_Check(obj)) {
7492 static const char* argumentList[] ={"int" , "int"};
7493 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7494 int returnValue;
7495 void* args[2] = {NULL, (void*)&arg__1};
7496 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7497 if (result) {
7498 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
7499 if (args[0]!=&returnValue) {
7500 if (args[0]==NULL) {
7501 PythonQt::priv()->handleVirtualOverloadReturnError("heightForWidth", methodInfo, result);
7502 } else {
7503 returnValue = *((int*)args[0]);
7504 }
7505 }
7506 }
7507 if (result) { Py_DECREF(result); }
7508 Py_DECREF(obj);
7509 return returnValue;
7510 }
7511 }
7512 return srecFileWidget::heightForWidth(arg__1);
7513 }
7514 void PythonQtShell_srecFileWidget::hideEvent(QHideEvent* arg__1)
7515 {
7516 if (_wrapper) {
7517 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "hideEvent");
7518 PyErr_Clear();
7519 if (obj && !PythonQtSlotFunction_Check(obj)) {
7520 static const char* argumentList[] ={"" , "QHideEvent*"};
7521 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7522 void* args[2] = {NULL, (void*)&arg__1};
7523 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7524 if (result) { Py_DECREF(result); }
7525 Py_DECREF(obj);
7526 return;
7527 }
7528 }
7529 srecFileWidget::hideEvent(arg__1);
7530 }
7531 void PythonQtShell_srecFileWidget::initPainter(QPainter* painter) const
7532 {
7533 if (_wrapper) {
7534 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "initPainter");
7535 PyErr_Clear();
7536 if (obj && !PythonQtSlotFunction_Check(obj)) {
7537 static const char* argumentList[] ={"" , "QPainter*"};
7538 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7539 void* args[2] = {NULL, (void*)&painter};
7540 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7541 if (result) { Py_DECREF(result); }
7542 Py_DECREF(obj);
7543 return;
7544 }
7545 }
7546 srecFileWidget::initPainter(painter);
7547 }
7548 void PythonQtShell_srecFileWidget::inputMethodEvent(QInputMethodEvent* arg__1)
7549 {
7550 if (_wrapper) {
7551 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "inputMethodEvent");
7552 PyErr_Clear();
7553 if (obj && !PythonQtSlotFunction_Check(obj)) {
7554 static const char* argumentList[] ={"" , "QInputMethodEvent*"};
7555 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7556 void* args[2] = {NULL, (void*)&arg__1};
7557 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7558 if (result) { Py_DECREF(result); }
7559 Py_DECREF(obj);
7560 return;
7561 }
7562 }
7563 srecFileWidget::inputMethodEvent(arg__1);
7564 }
7565 QVariant PythonQtShell_srecFileWidget::inputMethodQuery(Qt::InputMethodQuery arg__1) const
7566 {
7567 if (_wrapper) {
7568 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "inputMethodQuery");
7569 PyErr_Clear();
7570 if (obj && !PythonQtSlotFunction_Check(obj)) {
7571 static const char* argumentList[] ={"QVariant" , "Qt::InputMethodQuery"};
7572 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7573 QVariant returnValue;
7574 void* args[2] = {NULL, (void*)&arg__1};
7575 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7576 if (result) {
7577 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
7578 if (args[0]!=&returnValue) {
7579 if (args[0]==NULL) {
7580 PythonQt::priv()->handleVirtualOverloadReturnError("inputMethodQuery", methodInfo, result);
7581 } else {
7582 returnValue = *((QVariant*)args[0]);
7583 }
7584 }
7585 }
7586 if (result) { Py_DECREF(result); }
7587 Py_DECREF(obj);
7588 return returnValue;
7589 }
7590 }
7591 return srecFileWidget::inputMethodQuery(arg__1);
7592 }
7593 void PythonQtShell_srecFileWidget::keyPressEvent(QKeyEvent* arg__1)
7594 {
7595 if (_wrapper) {
7596 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "keyPressEvent");
7597 PyErr_Clear();
7598 if (obj && !PythonQtSlotFunction_Check(obj)) {
7599 static const char* argumentList[] ={"" , "QKeyEvent*"};
7600 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7601 void* args[2] = {NULL, (void*)&arg__1};
7602 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7603 if (result) { Py_DECREF(result); }
7604 Py_DECREF(obj);
7605 return;
7606 }
7607 }
7608 srecFileWidget::keyPressEvent(arg__1);
7609 }
7610 void PythonQtShell_srecFileWidget::keyReleaseEvent(QKeyEvent* arg__1)
7611 {
7612 if (_wrapper) {
7613 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "keyReleaseEvent");
7614 PyErr_Clear();
7615 if (obj && !PythonQtSlotFunction_Check(obj)) {
7616 static const char* argumentList[] ={"" , "QKeyEvent*"};
7617 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7618 void* args[2] = {NULL, (void*)&arg__1};
7619 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7620 if (result) { Py_DECREF(result); }
7621 Py_DECREF(obj);
7622 return;
7623 }
7624 }
7625 srecFileWidget::keyReleaseEvent(arg__1);
7626 }
7627 void PythonQtShell_srecFileWidget::leaveEvent(QEvent* arg__1)
7628 {
7629 if (_wrapper) {
7630 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "leaveEvent");
7631 PyErr_Clear();
7632 if (obj && !PythonQtSlotFunction_Check(obj)) {
7633 static const char* argumentList[] ={"" , "QEvent*"};
7634 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7635 void* args[2] = {NULL, (void*)&arg__1};
7636 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7637 if (result) { Py_DECREF(result); }
7638 Py_DECREF(obj);
7639 return;
7640 }
7641 }
7642 srecFileWidget::leaveEvent(arg__1);
7643 }
7644 int PythonQtShell_srecFileWidget::metric(QPaintDevice::PaintDeviceMetric arg__1) const
7645 {
7646 if (_wrapper) {
7647 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "metric");
7648 PyErr_Clear();
7649 if (obj && !PythonQtSlotFunction_Check(obj)) {
7650 static const char* argumentList[] ={"int" , "QPaintDevice::PaintDeviceMetric"};
7651 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7652 int returnValue;
7653 void* args[2] = {NULL, (void*)&arg__1};
7654 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7655 if (result) {
7656 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
7657 if (args[0]!=&returnValue) {
7658 if (args[0]==NULL) {
7659 PythonQt::priv()->handleVirtualOverloadReturnError("metric", methodInfo, result);
7660 } else {
7661 returnValue = *((int*)args[0]);
7662 }
7663 }
7664 }
7665 if (result) { Py_DECREF(result); }
7666 Py_DECREF(obj);
7667 return returnValue;
7668 }
7669 }
7670 return srecFileWidget::metric(arg__1);
7671 }
7672 QSize PythonQtShell_srecFileWidget::minimumSizeHint() const
7673 {
7674 if (_wrapper) {
7675 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "getMinimumSizeHint");
7676 PyErr_Clear();
7677 if (obj && !PythonQtSlotFunction_Check(obj)) {
7678 static const char* argumentList[] ={"QSize"};
7679 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList);
7680 QSize returnValue;
7681 void* args[1] = {NULL};
7682 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7683 if (result) {
7684 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
7685 if (args[0]!=&returnValue) {
7686 if (args[0]==NULL) {
7687 PythonQt::priv()->handleVirtualOverloadReturnError("getMinimumSizeHint", methodInfo, result);
7688 } else {
7689 returnValue = *((QSize*)args[0]);
7690 }
7691 }
7692 }
7693 if (result) { Py_DECREF(result); }
7694 Py_DECREF(obj);
7695 return returnValue;
7696 }
7697 }
7698 return srecFileWidget::minimumSizeHint();
7699 }
7700 void PythonQtShell_srecFileWidget::mouseDoubleClickEvent(QMouseEvent* arg__1)
7701 {
7702 if (_wrapper) {
7703 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "mouseDoubleClickEvent");
7704 PyErr_Clear();
7705 if (obj && !PythonQtSlotFunction_Check(obj)) {
7706 static const char* argumentList[] ={"" , "QMouseEvent*"};
7707 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7708 void* args[2] = {NULL, (void*)&arg__1};
7709 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7710 if (result) { Py_DECREF(result); }
7711 Py_DECREF(obj);
7712 return;
7713 }
7714 }
7715 srecFileWidget::mouseDoubleClickEvent(arg__1);
7716 }
7717 void PythonQtShell_srecFileWidget::mouseMoveEvent(QMouseEvent* arg__1)
7718 {
7719 if (_wrapper) {
7720 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "mouseMoveEvent");
7721 PyErr_Clear();
7722 if (obj && !PythonQtSlotFunction_Check(obj)) {
7723 static const char* argumentList[] ={"" , "QMouseEvent*"};
7724 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7725 void* args[2] = {NULL, (void*)&arg__1};
7726 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7727 if (result) { Py_DECREF(result); }
7728 Py_DECREF(obj);
7729 return;
7730 }
7731 }
7732 srecFileWidget::mouseMoveEvent(arg__1);
7733 }
7734 void PythonQtShell_srecFileWidget::mousePressEvent(QMouseEvent* arg__1)
7735 {
7736 if (_wrapper) {
7737 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "mousePressEvent");
7738 PyErr_Clear();
7739 if (obj && !PythonQtSlotFunction_Check(obj)) {
7740 static const char* argumentList[] ={"" , "QMouseEvent*"};
7741 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7742 void* args[2] = {NULL, (void*)&arg__1};
7743 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7744 if (result) { Py_DECREF(result); }
7745 Py_DECREF(obj);
7746 return;
7747 }
7748 }
7749 srecFileWidget::mousePressEvent(arg__1);
7750 }
7751 void PythonQtShell_srecFileWidget::mouseReleaseEvent(QMouseEvent* arg__1)
7752 {
7753 if (_wrapper) {
7754 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "mouseReleaseEvent");
7755 PyErr_Clear();
7756 if (obj && !PythonQtSlotFunction_Check(obj)) {
7757 static const char* argumentList[] ={"" , "QMouseEvent*"};
7758 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7759 void* args[2] = {NULL, (void*)&arg__1};
7760 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7761 if (result) { Py_DECREF(result); }
7762 Py_DECREF(obj);
7763 return;
7764 }
7765 }
7766 srecFileWidget::mouseReleaseEvent(arg__1);
7767 }
7768 void PythonQtShell_srecFileWidget::moveEvent(QMoveEvent* arg__1)
7769 {
7770 if (_wrapper) {
7771 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "moveEvent");
7772 PyErr_Clear();
7773 if (obj && !PythonQtSlotFunction_Check(obj)) {
7774 static const char* argumentList[] ={"" , "QMoveEvent*"};
7775 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7776 void* args[2] = {NULL, (void*)&arg__1};
7777 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7778 if (result) { Py_DECREF(result); }
7779 Py_DECREF(obj);
7780 return;
7781 }
7782 }
7783 srecFileWidget::moveEvent(arg__1);
7784 }
7785 bool PythonQtShell_srecFileWidget::nativeEvent(const QByteArray& eventType, void* message, long* result)
7786 {
7787 if (_wrapper) {
7788 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "nativeEvent");
7789 PyErr_Clear();
7790 if (obj && !PythonQtSlotFunction_Check(obj)) {
7791 static const char* argumentList[] ={"bool" , "const QByteArray&" , "void*" , "long*"};
7792 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(4, argumentList);
7793 bool returnValue;
7794 void* args[4] = {NULL, (void*)&eventType, (void*)&message, (void*)&result};
7795 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7796 if (result) {
7797 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
7798 if (args[0]!=&returnValue) {
7799 if (args[0]==NULL) {
7800 PythonQt::priv()->handleVirtualOverloadReturnError("nativeEvent", methodInfo, result);
7801 } else {
7802 returnValue = *((bool*)args[0]);
7803 }
7804 }
7805 }
7806 if (result) { Py_DECREF(result); }
7807 Py_DECREF(obj);
7808 return returnValue;
7809 }
7810 }
7811 return srecFileWidget::nativeEvent(eventType, message, result);
7812 }
7813 QPaintEngine* PythonQtShell_srecFileWidget::paintEngine() const
7814 {
7815 if (_wrapper) {
7816 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "paintEngine");
7817 PyErr_Clear();
7818 if (obj && !PythonQtSlotFunction_Check(obj)) {
7819 static const char* argumentList[] ={"QPaintEngine*"};
7820 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList);
7821 QPaintEngine* returnValue;
7822 void* args[1] = {NULL};
7823 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7824 if (result) {
7825 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
7826 if (args[0]!=&returnValue) {
7827 if (args[0]==NULL) {
7828 PythonQt::priv()->handleVirtualOverloadReturnError("paintEngine", methodInfo, result);
7829 } else {
7830 returnValue = *((QPaintEngine**)args[0]);
7831 }
7832 }
7833 }
7834 if (result) { Py_DECREF(result); }
7835 Py_DECREF(obj);
7836 return returnValue;
7837 }
7838 }
7839 return srecFileWidget::paintEngine();
7840 }
7841 void PythonQtShell_srecFileWidget::paintEvent(QPaintEvent* arg__1)
7842 {
7843 if (_wrapper) {
7844 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "paintEvent");
7845 PyErr_Clear();
7846 if (obj && !PythonQtSlotFunction_Check(obj)) {
7847 static const char* argumentList[] ={"" , "QPaintEvent*"};
7848 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7849 void* args[2] = {NULL, (void*)&arg__1};
7850 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7851 if (result) { Py_DECREF(result); }
7852 Py_DECREF(obj);
7853 return;
7854 }
7855 }
7856 srecFileWidget::paintEvent(arg__1);
7857 }
7858 QPaintDevice* PythonQtShell_srecFileWidget::redirected(QPoint* offset) const
7859 {
7860 if (_wrapper) {
7861 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "redirected");
7862 PyErr_Clear();
7863 if (obj && !PythonQtSlotFunction_Check(obj)) {
7864 static const char* argumentList[] ={"QPaintDevice*" , "QPoint*"};
7865 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7866 QPaintDevice* returnValue;
7867 void* args[2] = {NULL, (void*)&offset};
7868 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7869 if (result) {
7870 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
7871 if (args[0]!=&returnValue) {
7872 if (args[0]==NULL) {
7873 PythonQt::priv()->handleVirtualOverloadReturnError("redirected", methodInfo, result);
7874 } else {
7875 returnValue = *((QPaintDevice**)args[0]);
7876 }
7877 }
7878 }
7879 if (result) { Py_DECREF(result); }
7880 Py_DECREF(obj);
7881 return returnValue;
7882 }
7883 }
7884 return srecFileWidget::redirected(offset);
7885 }
7886 void PythonQtShell_srecFileWidget::resizeEvent(QResizeEvent* arg__1)
7887 {
7888 if (_wrapper) {
7889 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "resizeEvent");
7890 PyErr_Clear();
7891 if (obj && !PythonQtSlotFunction_Check(obj)) {
7892 static const char* argumentList[] ={"" , "QResizeEvent*"};
7893 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7894 void* args[2] = {NULL, (void*)&arg__1};
7895 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7896 if (result) { Py_DECREF(result); }
7897 Py_DECREF(obj);
7898 return;
7899 }
7900 }
7901 srecFileWidget::resizeEvent(arg__1);
7902 }
7903 QPainter* PythonQtShell_srecFileWidget::sharedPainter() const
7904 {
7905 if (_wrapper) {
7906 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "sharedPainter");
7907 PyErr_Clear();
7908 if (obj && !PythonQtSlotFunction_Check(obj)) {
7909 static const char* argumentList[] ={"QPainter*"};
7910 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList);
7911 QPainter* returnValue;
7912 void* args[1] = {NULL};
7913 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7914 if (result) {
7915 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
7916 if (args[0]!=&returnValue) {
7917 if (args[0]==NULL) {
7918 PythonQt::priv()->handleVirtualOverloadReturnError("sharedPainter", methodInfo, result);
7919 } else {
7920 returnValue = *((QPainter**)args[0]);
7921 }
7922 }
7923 }
7924 if (result) { Py_DECREF(result); }
7925 Py_DECREF(obj);
7926 return returnValue;
7927 }
7928 }
7929 return srecFileWidget::sharedPainter();
7930 }
7931 void PythonQtShell_srecFileWidget::showEvent(QShowEvent* arg__1)
7932 {
7933 if (_wrapper) {
7934 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "showEvent");
7935 PyErr_Clear();
7936 if (obj && !PythonQtSlotFunction_Check(obj)) {
7937 static const char* argumentList[] ={"" , "QShowEvent*"};
7938 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7939 void* args[2] = {NULL, (void*)&arg__1};
7940 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7941 if (result) { Py_DECREF(result); }
7942 Py_DECREF(obj);
7943 return;
7944 }
7945 }
7946 srecFileWidget::showEvent(arg__1);
7947 }
7948 QSize PythonQtShell_srecFileWidget::sizeHint() const
7949 {
7950 if (_wrapper) {
7951 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "getSizeHint");
7952 PyErr_Clear();
7953 if (obj && !PythonQtSlotFunction_Check(obj)) {
7954 static const char* argumentList[] ={"QSize"};
7955 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList);
7956 QSize returnValue;
7957 void* args[1] = {NULL};
7958 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7959 if (result) {
7960 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
7961 if (args[0]!=&returnValue) {
7962 if (args[0]==NULL) {
7963 PythonQt::priv()->handleVirtualOverloadReturnError("getSizeHint", methodInfo, result);
7964 } else {
7965 returnValue = *((QSize*)args[0]);
7966 }
7967 }
7968 }
7969 if (result) { Py_DECREF(result); }
7970 Py_DECREF(obj);
7971 return returnValue;
7972 }
7973 }
7974 return srecFileWidget::sizeHint();
7975 }
7976 void PythonQtShell_srecFileWidget::tabletEvent(QTabletEvent* arg__1)
7977 {
7978 if (_wrapper) {
7979 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "tabletEvent");
7980 PyErr_Clear();
7981 if (obj && !PythonQtSlotFunction_Check(obj)) {
7982 static const char* argumentList[] ={"" , "QTabletEvent*"};
7983 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
7984 void* args[2] = {NULL, (void*)&arg__1};
7985 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
7986 if (result) { Py_DECREF(result); }
7987 Py_DECREF(obj);
7988 return;
7989 }
7990 }
7991 srecFileWidget::tabletEvent(arg__1);
7992 }
7993 void PythonQtShell_srecFileWidget::timerEvent(QTimerEvent* arg__1)
7994 {
7995 if (_wrapper) {
7996 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "timerEvent");
7997 PyErr_Clear();
7998 if (obj && !PythonQtSlotFunction_Check(obj)) {
7999 static const char* argumentList[] ={"" , "QTimerEvent*"};
8000 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
8001 void* args[2] = {NULL, (void*)&arg__1};
8002 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
8003 if (result) { Py_DECREF(result); }
8004 Py_DECREF(obj);
8005 return;
8006 }
8007 }
8008 srecFileWidget::timerEvent(arg__1);
8009 }
8010 void PythonQtShell_srecFileWidget::wheelEvent(QWheelEvent* arg__1)
8011 {
8012 if (_wrapper) {
8013 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "wheelEvent");
8014 PyErr_Clear();
8015 if (obj && !PythonQtSlotFunction_Check(obj)) {
8016 static const char* argumentList[] ={"" , "QWheelEvent*"};
8017 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
8018 void* args[2] = {NULL, (void*)&arg__1};
8019 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
8020 if (result) { Py_DECREF(result); }
8021 Py_DECREF(obj);
8022 return;
8023 }
8024 }
8025 srecFileWidget::wheelEvent(arg__1);
8026 }
8027 srecFileWidget* PythonQtWrapper_srecFileWidget::new_srecFileWidget(QWidget* parent)
8028 {
8029 return new PythonQtShell_srecFileWidget(parent); }
8030
8031
@@ -5,7 +5,7
5 5 #include <QVariant>
6 6 #include <QWidget>
7 7 #include <SocExplorerPlot.h>
8 #include <abstractexecfile.h>
8 #include <abstractbinfile.h>
9 9 #include <elffile.h>
10 10 #include <elffilewidget.h>
11 11 #include <elfinfowdgt.h>
@@ -50,6 +50,7
50 50 #include <qstyleoption.h>
51 51 #include <qwidget.h>
52 52 #include <srecfile.h>
53 #include <srecfilewidget.h>
53 54 #include <tcp_terminal_client.h>
54 55 #include <xbytearray.h>
55 56
@@ -124,6 +125,7 void delete_ElfFile(ElfFile* obj) { dele
124 125 bool iself(ElfFile* theWrappedObject);
125 126 bool isopened(ElfFile* theWrappedObject);
126 127 bool openFile(ElfFile* theWrappedObject, const QString& File);
128 bool toSrec(ElfFile* theWrappedObject, const QString& File);
127 129 };
128 130
129 131
@@ -549,12 +551,12 void delete_XByteArray(XByteArray* obj)
549 551
550 552
551 553
552 class PythonQtShell_abstractExecFile : public abstractExecFile
554 class PythonQtShell_abstractBinFile : public abstractBinFile
553 555 {
554 556 public:
555 PythonQtShell_abstractExecFile():abstractExecFile(),_wrapper(NULL) {};
557 PythonQtShell_abstractBinFile():abstractBinFile(),_wrapper(NULL) {};
556 558
557 ~PythonQtShell_abstractExecFile();
559 ~PythonQtShell_abstractBinFile();
558 560
559 561 virtual void childEvent(QChildEvent* arg__1);
560 562 virtual int closeFile();
@@ -569,12 +571,12 virtual void timerEvent(QTimerEvent* ar
569 571 PythonQtInstanceWrapper* _wrapper;
570 572 };
571 573
572 class PythonQtWrapper_abstractExecFile : public QObject
574 class PythonQtWrapper_abstractBinFile : public QObject
573 575 { Q_OBJECT
574 576 public:
575 577 public slots:
576 abstractExecFile* new_abstractExecFile();
577 void delete_abstractExecFile(abstractExecFile* obj) { delete obj; }
578 abstractBinFile* new_abstractBinFile();
579 void delete_abstractBinFile(abstractBinFile* obj) { delete obj; }
578 580 };
579 581
580 582
@@ -585,7 +587,7 class PythonQtShell_codeFragment : publi
585 587 {
586 588 public:
587 589 PythonQtShell_codeFragment():codeFragment(),_wrapper(NULL) {};
588 PythonQtShell_codeFragment(char* data, unsigned int size, unsigned int address):codeFragment(data, size, address),_wrapper(NULL) {};
590 PythonQtShell_codeFragment(char* data, quint64 size, quint64 address):codeFragment(data, size, address),_wrapper(NULL) {};
589 591
590 592 ~PythonQtShell_codeFragment();
591 593
@@ -598,14 +600,16 class PythonQtWrapper_codeFragment : pub
598 600 public:
599 601 public slots:
600 602 codeFragment* new_codeFragment();
601 codeFragment* new_codeFragment(char* data, unsigned int size, unsigned int address);
603 codeFragment* new_codeFragment(char* data, quint64 size, quint64 address);
602 604 void delete_codeFragment(codeFragment* obj) { delete obj; }
603 void py_set_address(codeFragment* theWrappedObject, unsigned int address){ theWrappedObject->address = address; }
604 unsigned int py_get_address(codeFragment* theWrappedObject){ return theWrappedObject->address; }
605 void py_set_size(codeFragment* theWrappedObject, quint64 size){ theWrappedObject->size = size; }
606 quint64 py_get_size(codeFragment* theWrappedObject){ return theWrappedObject->size; }
607 void py_set_header(codeFragment* theWrappedObject, QString header){ theWrappedObject->header = header; }
608 QString py_get_header(codeFragment* theWrappedObject){ return theWrappedObject->header; }
609 void py_set_address(codeFragment* theWrappedObject, quint64 address){ theWrappedObject->address = address; }
610 quint64 py_get_address(codeFragment* theWrappedObject){ return theWrappedObject->address; }
605 611 void py_set_data(codeFragment* theWrappedObject, char* data){ theWrappedObject->data = data; }
606 612 char* py_get_data(codeFragment* theWrappedObject){ return theWrappedObject->data; }
607 void py_set_size(codeFragment* theWrappedObject, unsigned int size){ theWrappedObject->size = size; }
608 unsigned int py_get_size(codeFragment* theWrappedObject){ return theWrappedObject->size; }
609 613 };
610 614
611 615
@@ -819,10 +823,86 srecFile* new_srecFile(const QString& F
819 823 srecFile* new_srecFile(const QStringList& Files);
820 824 void delete_srecFile(srecFile* obj) { delete obj; }
821 825 int closeFile(srecFile* theWrappedObject);
826 int getFragmentAddress(srecFile* theWrappedObject, int index);
827 bool getFragmentData(srecFile* theWrappedObject, int index, char** buffer);
828 QString getFragmentHeader(srecFile* theWrappedObject, int index);
829 int getFragmentSize(srecFile* theWrappedObject, int index);
822 830 QList<codeFragment* > getFragments(srecFile* theWrappedObject);
831 int getFragmentsCount(srecFile* theWrappedObject);
832 bool isSREC(srecFile* theWrappedObject);
833 bool static_srecFile_isSREC(const QString& File);
823 834 bool isopened(srecFile* theWrappedObject);
835 int lineCount(srecFile* theWrappedObject);
824 836 bool openFile(srecFile* theWrappedObject, const QString& File);
825 837 bool openFiles(srecFile* theWrappedObject, const QStringList& Files);
838 bool static_srecFile_toSrec(QList<codeFragment* > fragments, const QString& File);
826 839 };
827 840
828 841
842
843
844
845 class PythonQtShell_srecFileWidget : public srecFileWidget
846 {
847 public:
848 PythonQtShell_srecFileWidget(QWidget* parent = 0):srecFileWidget(parent),_wrapper(NULL) {};
849
850 ~PythonQtShell_srecFileWidget();
851
852 virtual void actionEvent(QActionEvent* arg__1);
853 virtual void changeEvent(QEvent* arg__1);
854 virtual void childEvent(QChildEvent* arg__1);
855 virtual void closeEvent(QCloseEvent* arg__1);
856 virtual void contextMenuEvent(QContextMenuEvent* arg__1);
857 virtual void customEvent(QEvent* arg__1);
858 virtual int devType() const;
859 virtual void dragEnterEvent(QDragEnterEvent* arg__1);
860 virtual void dragLeaveEvent(QDragLeaveEvent* arg__1);
861 virtual void dragMoveEvent(QDragMoveEvent* arg__1);
862 virtual void dropEvent(QDropEvent* arg__1);
863 virtual void enterEvent(QEvent* arg__1);
864 virtual bool event(QEvent* arg__1);
865 virtual bool eventFilter(QObject* arg__1, QEvent* arg__2);
866 virtual void focusInEvent(QFocusEvent* arg__1);
867 virtual bool focusNextPrevChild(bool next);
868 virtual void focusOutEvent(QFocusEvent* arg__1);
869 virtual bool hasHeightForWidth() const;
870 virtual int heightForWidth(int arg__1) const;
871 virtual void hideEvent(QHideEvent* arg__1);
872 virtual void initPainter(QPainter* painter) const;
873 virtual void inputMethodEvent(QInputMethodEvent* arg__1);
874 virtual QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const;
875 virtual void keyPressEvent(QKeyEvent* arg__1);
876 virtual void keyReleaseEvent(QKeyEvent* arg__1);
877 virtual void leaveEvent(QEvent* arg__1);
878 virtual int metric(QPaintDevice::PaintDeviceMetric arg__1) const;
879 virtual QSize minimumSizeHint() const;
880 virtual void mouseDoubleClickEvent(QMouseEvent* arg__1);
881 virtual void mouseMoveEvent(QMouseEvent* arg__1);
882 virtual void mousePressEvent(QMouseEvent* arg__1);
883 virtual void mouseReleaseEvent(QMouseEvent* arg__1);
884 virtual void moveEvent(QMoveEvent* arg__1);
885 virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result);
886 virtual QPaintEngine* paintEngine() const;
887 virtual void paintEvent(QPaintEvent* arg__1);
888 virtual QPaintDevice* redirected(QPoint* offset) const;
889 virtual void resizeEvent(QResizeEvent* arg__1);
890 virtual QPainter* sharedPainter() const;
891 virtual void showEvent(QShowEvent* arg__1);
892 virtual QSize sizeHint() const;
893 virtual void tabletEvent(QTabletEvent* arg__1);
894 virtual void timerEvent(QTimerEvent* arg__1);
895 virtual void wheelEvent(QWheelEvent* arg__1);
896
897 PythonQtInstanceWrapper* _wrapper;
898 };
899
900 class PythonQtWrapper_srecFileWidget : public QObject
901 { Q_OBJECT
902 public:
903 public slots:
904 srecFileWidget* new_srecFileWidget(QWidget* parent = 0);
905 void delete_srecFileWidget(srecFileWidget* obj) { delete obj; }
906 };
907
908
@@ -4,19 +4,20
4 4
5 5 void PythonQt_init_PySocExplorer(PyObject* module) {
6 6 PythonQt::priv()->registerClass(&ElfFile::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_ElfFile>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_ElfFile>, module, 0);
7 PythonQt::self()->addParentClass("ElfFile", "abstractExecFile",PythonQtUpcastingOffset<ElfFile,abstractExecFile>());
7 PythonQt::self()->addParentClass("ElfFile", "abstractBinFile",PythonQtUpcastingOffset<ElfFile,abstractBinFile>());
8 8 PythonQt::priv()->registerClass(&MemSizeWdgt::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_MemSizeWdgt>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_MemSizeWdgt>, module, 0);
9 9 PythonQt::priv()->registerClass(&QHexEdit::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_QHexEdit>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QHexEdit>, module, 0);
10 10 PythonQt::priv()->registerClass(&QHexSpinBox::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_QHexSpinBox>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QHexSpinBox>, module, 0);
11 11 PythonQt::priv()->registerClass(&SocExplorerPlot::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_SocExplorerPlot>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_SocExplorerPlot>, module, 0);
12 12 PythonQt::priv()->registerClass(&TCP_Terminal_Client::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_TCP_Terminal_Client>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_TCP_Terminal_Client>, module, 0);
13 13 PythonQt::priv()->registerCPPClass("XByteArray", "", "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_XByteArray>, NULL, module, 0);
14 PythonQt::priv()->registerClass(&abstractExecFile::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_abstractExecFile>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_abstractExecFile>, module, 0);
14 PythonQt::priv()->registerClass(&abstractBinFile::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_abstractBinFile>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_abstractBinFile>, module, 0);
15 15 PythonQt::priv()->registerCPPClass("codeFragment", "", "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_codeFragment>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_codeFragment>, module, 0);
16 16 PythonQt::priv()->registerClass(&elfFileWidget::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_elfFileWidget>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_elfFileWidget>, module, 0);
17 17 PythonQt::priv()->registerClass(&elfInfoWdgt::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_elfInfoWdgt>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_elfInfoWdgt>, module, 0);
18 18 PythonQt::priv()->registerCPPClass("elfparser", "", "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_elfparser>, NULL, module, 0);
19 19 PythonQt::priv()->registerClass(&srecFile::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_srecFile>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_srecFile>, module, 0);
20 PythonQt::self()->addParentClass("srecFile", "abstractExecFile",PythonQtUpcastingOffset<srecFile,abstractExecFile>());
20 PythonQt::self()->addParentClass("srecFile", "abstractBinFile",PythonQtUpcastingOffset<srecFile,abstractBinFile>());
21 PythonQt::priv()->registerClass(&srecFileWidget::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_srecFileWidget>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_srecFileWidget>, module, 0);
21 22
22 23 }
@@ -20,7 +20,7
20 20 <object-type name="srecFile" />
21 21 <rejection class="Elf_Section"/>
22 22 <object-type name="elfparser" />
23 <interface-type name="abstractExecFile">
23 <interface-type name="abstractBinFile">
24 24 <extra-includes>
25 25 <include file-name="QWidget" location="global"/>
26 26 <include file-name="QObject" location="global"/>
@@ -38,6 +38,12
38 38 <include file-name="QObject" location="global"/>
39 39 </extra-includes>
40 40 </object-type>
41 <object-type name="srecFileWidget">
42 <extra-includes>
43 <include file-name="QWidget" location="global"/>
44 <include file-name="QObject" location="global"/>
45 </extra-includes>
46 </object-type>
41 47 <object-type name="elfInfoWdgt">
42 48 <extra-includes>
43 49 <include file-name="QWidget" location="global"/>
@@ -1,4 +1,5
1 1 #include "srecfile.h"
2 #include <QTextStream>
2 3
3 4 srecFile::srecFile()
4 5 {
@@ -21,7 +22,7 srecFile::~srecFile()
21 22
22 23 bool srecFile::openFile(const QString &File)
23 24 {
24 openFiles(QStringList()<<File);
25 return openFiles(QStringList()<<File);
25 26 }
26 27
27 28 bool srecFile::openFiles(const QStringList &Files)
@@ -35,10 +36,13 bool srecFile::openFiles(const QStringLi
35 36 this->p_files.clear();
36 37 for(int i=0;i<Files.count();i++)
37 38 {
39 this->p_isSrec=true;
40 this->p_isSrec &= isSREC(Files.at(i));
38 41 this->p_files.append(new QFile(Files.at(i)));
39 42 this->p_files.at(i)->open(QIODevice::ReadOnly);
40 43 parseFile(this->p_files.at(i));
41 44 }
45 return true;
42 46 }
43 47
44 48 bool srecFile::isopened()
@@ -53,7 +57,12 bool srecFile::isopened()
53 57
54 58 int srecFile::closeFile()
55 59 {
56
60 for(int i=0;i<p_files.count();i++)
61 {
62 delete p_files.at(i);
63 }
64 p_files.clear();
65 p_fileName.clear();
57 66 }
58 67
59 68 QList<codeFragment *> srecFile::getFragments()
@@ -61,18 +70,152 QList<codeFragment *> srecFile::getFragm
61 70 return p_fragments;
62 71 }
63 72
73 bool srecFile::toSrec(QList<codeFragment *> fragments, const QString &File)
74 {
75 QString line;
76 QFile file(File);
77 file.open(QIODevice::WriteOnly);
78 if(file.isOpen())
79 {
80 QTextStream stream( &file );
81 //First build header
82 line.append("S0");
83 line.append(QString("%1").arg(File.count()+3,2,16).replace(' ','0'));
84 line.append("0000");
85 for(int i=0;i<File.count();i++)
86 {
87 line.append(QString("%1").arg((uchar)File.at(i).toLatin1(),2,16).replace(' ','0'));
88 }
89 line.append(QString("%1").arg((uchar)srecFile::lineCheckSum(line),2,16).replace(' ','0'));
90 line.append('\n');
91 stream << line.toUpper();
92 for(int i=0;i<fragments.count();i++)
93 {
94 codeFragment *fragment = fragments.at(i);
95 for(int j=0;j<(int)(fragment->size);j+=16)
96 {
97 line.clear();
98 line.append("S315");
99 line.append(QString("%1").arg(fragment->address+j,8,16).replace(' ','0'));
100 for(int k=0;k<16;k++)
101 {
102 line.append(QString("%1").arg((uchar)fragment->data[j+k],2,16).replace(' ','0'));
103 }
104 line.append(QString("%1").arg((uchar)srecFile::lineCheckSum(line),2,16).replace(' ','0'));
105 line.append('\n');
106 stream << line.toUpper();
107 }
108 int rem = fragment->size%16;
109 if(rem)
110 {
111 line.clear();
112 line.append("S3");
113 line.append(QString("%1").arg(rem,2,16).replace(' ','0'));
114 line.append(QString("%1").arg(fragment->address+fragment->size-rem,8,16).replace(' ','0'));
115 for(int k=0;k<rem;k++)
116 {
117 line.append(QString("%1").arg((uchar)fragment->data[fragment->size-rem+k],2,16).replace(' ','0'));
118 }
119 line.append(QString("%1").arg((uchar)srecFile::lineCheckSum(line),2,16).replace(' ','0'));
120 line.append('\n');
121 stream << line.toUpper();
122 }
123 line.clear();
124 line.append("S705");
125 line.append(QString("%1").arg(fragment->address,8,16).replace(' ','0'));
126 line.append(QString("%1").arg((uchar)srecFile::lineCheckSum(line),2,16).replace(' ','0'));
127 line.append('\n');
128 stream << line.toUpper();
129 }
130 file.close();
131 return true;
132 }
133
134 return false;
135 }
136
137 int srecFile::lineCount()
138 {
139 return p_lineCount;
140 }
141
142 int srecFile::getFragmentsCount()
143 {
144 return p_fragments.count();
145 }
146
147 int srecFile::getFragmentAddress(int index)
148 {
149 if((index < p_fragments.count()) && (index>=0))
150 {
151 return p_fragments.at(index)->address;
152 }
153 return 0;
154 }
155
156 int srecFile::getFragmentSize(int index)
157 {
158 if((index < p_fragments.count()) && (index>=0))
159 {
160 return p_fragments.at(index)->size;
161 }
162 return 0;
163 }
164
165 QString srecFile::getFragmentHeader(int index)
166 {
167 if((index < p_fragments.count()) && (index>=0))
168 {
169 return p_fragments.at(index)->header;
170 }
171 return "";
172 }
173
174 bool srecFile::getFragmentData(int index, char **buffer)
175 {
176
177 if((index < p_fragments.count()) && (index>=0))
178 {
179 *buffer = (char *)this->p_fragments.at(index)->data;
180 return true;
181 }
182 return false;
183 }
184
185 bool srecFile::isSREC()
186 {
187 return p_isSrec & isopened();
188 }
189
190 bool srecFile::isSREC(const QString &File)
191 {
192 QFile file(File);
193 file.open(QIODevice::ReadOnly);
194 if(file.isOpen())
195 {
196 file.seek(0);
197 QString line=file.readLine();
198 file.close();
199 return ((line.at(0)=='S')&&(line.at(1)=='0'));
200 }
201 return false;
202 }
203
64 204 void srecFile::parseFile(QFile *file)
65 205 {
66 206 if(file->isOpen())
67 207 {
208 this->p_lineCount = 0;
68 209 file->seek(0);
69 210 codeFragment* fragment=NULL;
70 211 QByteArray data;
71 quint32 size=0;
72 quint32 address=0;
212 quint64 size=0;
213 quint64 address=-1;
214 QString header;
73 215 while (!file->atEnd())
74 216 {
75 217 QString line = file->readLine();
218 p_lineCount++;
76 219 if(line.count()>4)
77 220 {
78 221 if(line.at(0)=='S')
@@ -81,6 +224,11 void srecFile::parseFile(QFile *file)
81 224 int count = line.mid(2,2).toInt(&ok,16);
82 225 if(line.at(1)=='0')
83 226 {
227 header.clear();
228 for(int i=0;i<(count-3);i++)
229 {
230 header.append((char)line.mid((2*i)+8,2).toInt(&ok,16));
231 }
84 232 }
85 233 if(line.at(1)=='1')
86 234 {
@@ -107,11 +255,12 void srecFile::parseFile(QFile *file)
107 255 }
108 256 fragment = new codeFragment();
109 257 fragment->address = naddress;
258 fragment->header = header;
110 259 }
111 260 address = naddress+count-5;
112 261 for(int i=0;i<(count-5);i++)
113 262 {
114 data.append((char)line.mid((2*i)+8,2).toInt(&ok,16));
263 data.append((char)line.mid((2*i)+12,2).toInt(&ok,16));
115 264 }
116 265 }
117 266 if(line.at(1)=='5')
@@ -152,3 +301,19 void srecFile::parseFile(QFile *file)
152 301 }
153 302 }
154 303
304 char srecFile::lineCheckSum(const QString &line)
305 {
306 char sum=0;
307 QString localLine = line;
308 bool ok;
309 if(localLine.at(0)=='S') // then should skip the first two digits
310 {
311 localLine.remove(0,2);
312 }
313 for(int i=0;i<localLine.count();i+=2)
314 {
315 sum+=(char)(localLine.mid(i,2).toInt(&ok,16));
316 }
317 return ~sum;
318 }
319
@@ -2,11 +2,11
2 2 #define SRECFILE_H
3 3
4 4 #include <QObject>
5 #include <abstractexecfile.h>
5 #include <abstractbinfile.h>
6 6 #include <QFile>
7 7 #include <QStringList>
8 8
9 class srecFile : public abstractExecFile
9 class srecFile : public abstractBinFile
10 10 {
11 11 Q_OBJECT
12 12 public:
@@ -19,15 +19,27 public:
19 19 bool isopened();
20 20 int closeFile();
21 21 QList<codeFragment*> getFragments();
22 static bool toSrec(QList<codeFragment*> fragments,const QString& File);
23 int lineCount();
24 int getFragmentsCount();
25 int getFragmentAddress(int index);
26 int getFragmentSize(int index);
27 QString getFragmentHeader(int index);
28 bool getFragmentData(int index, char **buffer);
22 29
30 bool isSREC();
31 static bool isSREC(const QString& File);
23 32 signals:
24 33
25 34 public slots:
26 35 private:
27 36 void parseFile(QFile* file);
37 static char lineCheckSum(const QString& line);
28 38 QStringList p_fileNames;
29 39 QList<QFile*>p_files;
30 40 QList<codeFragment*> p_fragments;
41 int p_lineCount;
42 bool p_isSrec;
31 43
32 44 };
33 45
General Comments 0
You need to be logged in to leave comments. Login now