##// END OF EJS Templates
added binary file loader, improved elf and srec loaders
jeandet -
r47:f8c5117dac7c default
parent child
Show More
@@ -0,0 +1,150
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 ----------------------------------------------------------------------------*/
22 #include "binaryfile.h"
23
24 binaryFile::binaryFile()
25 {
26 }
27
28 binaryFile::binaryFile(const QString &File)
29 {
30 openFile(File);
31 }
32
33 binaryFile::binaryFile(const QStringList &Files)
34 {
35 openFiles(Files);
36 }
37
38 binaryFile::~binaryFile()
39 {
40
41 }
42
43 bool binaryFile::openFile(const QString &File)
44 {
45 return openFiles(QStringList()<<File);
46 }
47
48 bool binaryFile::openFiles(const QStringList &Files)
49 {
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++)
58 {
59 this->p_files.append(new QFile(Files.at(i)));
60 this->p_files.at(i)->open(QIODevice::ReadOnly);
61 loadFile(this->p_files.at(i));
62 }
63 return true;
64 }
65
66 bool binaryFile::isopened()
67 {
68 bool opened = true;
69 for(int i=0;i<this->p_files.count();i++)
70 {
71 opened &= p_files.at(i)->isOpen();
72 }
73 return opened;
74 }
75
76 int binaryFile::closeFile()
77 {
78 for(int i=0;i<p_files.count();i++)
79 {
80 delete p_files.at(i);
81 for(int j=0;j<p_fragments.count();j++)
82 {
83 if(p_fragments.at(j)->header == p_files.at(i)->fileName())
84 {
85 codeFragment* fragment = p_fragments.at(j);
86 p_fragments.removeAt(j);
87 free(fragment->data);
88 delete fragment;
89 }
90 }
91 }
92 p_files.clear();
93 p_fileName.clear();
94 return 0;
95 }
96
97 QList<codeFragment *> binaryFile::getFragments()
98 {
99 return p_fragments;
100 }
101
102 int binaryFile::getFragmentsCount()
103 {
104 return p_fragments.count();
105 }
106
107 int binaryFile::getFragmentAddress(int index)
108 {
109 if((index>=0)&&(index<p_fragments.count()))
110 return p_fragments.at(index)->address;
111 return 0;
112 }
113
114 int binaryFile::getFragmentSize(int index)
115 {
116 if((index>=0)&&(index<p_fragments.count()))
117 return p_fragments.at(index)->size;
118 return 0;
119 }
120
121 QString binaryFile::getFragmentHeader(int index)
122 {
123 if((index>=0)&&(index<p_fragments.count()))
124 return p_fragments.at(index)->header;
125 return "";
126 }
127
128 bool binaryFile::getFragmentData(int index, char **buffer)
129 {
130 if((index>=0)&&(index<p_fragments.count()))
131 {
132 *buffer = p_fragments.at(index)->data;
133 return true;
134 }
135 return false;
136 }
137
138 void binaryFile::loadFile(QFile *file)
139 {
140 if (file->isOpen())
141 {
142 codeFragment* fragment = new codeFragment();
143 fragment->header = file->fileName();
144 fragment->address = 0;
145 fragment->size = file->size();
146 fragment->data = (char*)malloc(file->size());
147 file->read(fragment->data,file->size());
148 p_fragments.append(fragment);
149 }
150 }
@@ -0,0 +1,60
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 ----------------------------------------------------------------------------*/
22 #ifndef BINARYFILE_H
23 #define BINARYFILE_H
24 #include "abstractbinfile.h"
25 #include <QObject>
26 #include <QString>
27 #include <QList>
28 #include <QStringList>
29 #include <QFile>
30
31 class binaryFile : public abstractBinFile
32 {
33 Q_OBJECT
34 public:
35 explicit binaryFile();
36 binaryFile(const QString& File);
37 binaryFile(const QStringList& Files);
38 ~binaryFile();
39 bool openFile(const QString& File);
40 bool openFiles(const QStringList& Files);
41 bool isopened();
42 int closeFile();
43 QList<codeFragment*> getFragments();
44 int getFragmentsCount();
45 int getFragmentAddress(int index);
46 int getFragmentSize(int index);
47 QString getFragmentHeader(int index);
48 bool getFragmentData(int index, char **buffer);
49 signals:
50
51 public slots:
52
53 private:
54 void loadFile(QFile *file);
55 QStringList p_fileNames;
56 QList<QFile*>p_files;
57 QList<codeFragment*> p_fragments;
58 };
59
60 #endif // BINARYFILE_H
@@ -0,0 +1,82
1 #include "binaryfilewidget.h"
2 #include "ui_binaryfilewidget.h"
3 #include "qtablewidgetintitem.h"
4 #include <QtWidgets/QTableWidget>
5
6 binaryFileWidget::binaryFileWidget(QWidget *parent) :
7 QWidget(parent),
8 ui(new Ui::binaryFileWidget)
9 {
10 ui->setupUi(this);
11 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)));
13 }
14
15 binaryFileWidget::~binaryFileWidget()
16 {
17 delete ui;
18 }
19
20 void binaryFileWidget::updateBinaryFile(binaryFile *file)
21 {
22 this->p_binfile = file;
23 if(p_binfile->isopened())
24 {
25 updateFragments();
26 }
27 }
28
29 void binaryFileWidget::updateFragments()
30 {
31 this->ui->fragmentList->clear();
32 this->ui->fragmentList->setRowCount(p_binfile->getFragmentsCount());
33 this->ui->fragmentList->setHorizontalHeaderLabels(QStringList()<<"File"<<"Size"<<"Address");
34 for(int i=0;i<p_binfile->getFragmentsCount();i++)
35 {
36 QTableWidgetItem *newItem = new QTableWidgetItem(p_binfile->getFragmentHeader(i));
37 newItem->setFlags(newItem->flags() ^ Qt::ItemIsEditable);
38 this->ui->fragmentList->setItem(i, 0, newItem);
39
40 newItem = (QTableWidgetItem*)new QTableWidgetIntItem(QString("%1").arg(p_binfile->getFragmentSize(i)),DecimalItem);
41 newItem->setFlags(newItem->flags() ^ Qt::ItemIsEditable);
42 this->ui->fragmentList->setItem(i, 1, newItem);
43
44 newItem = (QTableWidgetItem*)new QTableWidgetIntItem(QString("0x%1").arg(p_binfile->getFragmentAddress(i),8,16).replace(" ","0"),HexaDecimalItem);
45 // newItem->setFlags(newItem->flags() ^ Qt::ItemIsEditable);
46 this->ui->fragmentList->setItem(i, 2, newItem);
47
48 }
49 this->ui->fragmentList->resizeColumnsToContents();
50 }
51
52 void binaryFileWidget::fragmentCellActivated(int row, int column)
53 {
54 Q_UNUSED(column)
55 char* buff=NULL;
56 int index = this->ui->fragmentList->item(row,0)->text().toInt();
57 if(index!=-1)
58 {
59 this->p_binfile->getFragmentData(index,&buff);
60 this->ui->hexViewer->setData(QByteArray(buff,this->p_binfile->getFragmentSize(index)));
61 this->ui->hexViewer->setAddressOffset(this->p_binfile->getFragmentAddress(index));
62 }
63 }
64
65 void binaryFileWidget::fragmentCellChanged(int row, int column)
66 {
67 if(column==2)
68 {
69 QString newAddressStr = this->ui->fragmentList->item(row,column)->text();
70 int newAddress = 0;
71 newAddressStr.remove(" ");
72 if(newAddressStr.at(0)=='0' && newAddressStr.at(1)=='x')
73 {
74 newAddress = newAddressStr.remove("0x").toUInt(0,16);
75 }
76 else
77 {
78 newAddress = newAddressStr.toUInt();
79 }
80 this->p_binfile->getFragments().at(row)->address = newAddress;
81 }
82 }
@@ -0,0 +1,32
1 #ifndef BINARYFILEWIDGET_H
2 #define BINARYFILEWIDGET_H
3
4 #include <QWidget>
5 #include "binaryfile.h"
6
7 namespace Ui {
8 class binaryFileWidget;
9 }
10
11 class binaryFileWidget : public QWidget
12 {
13 Q_OBJECT
14
15 public:
16 explicit binaryFileWidget(QWidget *parent = 0);
17 ~binaryFileWidget();
18
19 public slots:
20 void updateBinaryFile(binaryFile* file);
21 void updateFragments();
22
23 private slots:
24 void fragmentCellActivated(int row, int column);
25 void fragmentCellChanged(int row, int column);
26
27 private:
28 Ui::binaryFileWidget *ui;
29 binaryFile* p_binfile;
30 };
31
32 #endif // BINARYFILEWIDGET_H
@@ -0,0 +1,61
1 <?xml version="1.0" encoding="UTF-8"?>
2 <ui version="4.0">
3 <class>binaryFileWidget</class>
4 <widget class="QWidget" name="binaryFileWidget">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>637</width>
10 <height>342</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="0">
18 <widget class="QSplitter" name="splitter">
19 <property name="orientation">
20 <enum>Qt::Horizontal</enum>
21 </property>
22 <widget class="QHexEdit" name="hexViewer" native="true">
23 <property name="minimumSize">
24 <size>
25 <width>200</width>
26 <height>0</height>
27 </size>
28 </property>
29 </widget>
30 <widget class="QTableWidget" name="fragmentList">
31 <column>
32 <property name="text">
33 <string>File</string>
34 </property>
35 </column>
36 <column>
37 <property name="text">
38 <string>Size</string>
39 </property>
40 </column>
41 <column>
42 <property name="text">
43 <string>Address</string>
44 </property>
45 </column>
46 </widget>
47 </widget>
48 </item>
49 </layout>
50 </widget>
51 <customwidgets>
52 <customwidget>
53 <class>QHexEdit</class>
54 <extends>QWidget</extends>
55 <header location="global">qhexedit.h</header>
56 <container>1</container>
57 </customwidget>
58 </customwidgets>
59 <resources/>
60 <connections/>
61 </ui>
@@ -122,7 +122,7 public:
122 122 virtual int baseAddress();
123 123 //! Sets the base address of the current instance, for example if your plugin is supposed to drive
124 124 //! an UART it will correspond to the address of it's first register. This address have at least to
125 //! be set by lppSocExplorer and it can be user accessible if you want.
125 //! be set by SocExplorer and it can be user accessible if you want.
126 126 virtual void setBaseAddress(unsigned int baseAddress);
127 127
128 128 genericPySysdriver* getPyObjectWrapper(){return this->pyObject;}
@@ -13,3 +13,5
13 13 #include "QCustomPlot/qcustomplot.h"
14 14 #include "srec/srecfile.h"
15 15 #include "srec/srecfilewidget.h"
16 #include "BinFile/binaryfile.h"
17 #include "BinFile/binaryfilewidget.h"
@@ -44,7 +44,10 header.files = \
44 44 qtablewidgetintitem.h \
45 45 srec/srecfile.h \
46 46 srec/srecfilewidget.h \
47 abstractbinfile.cpp
47 abstractbinfile.h \
48 BinFile/binaryfile.h \
49 BinFile/binaryfilewidget.h
50
48 51
49 52 win32{
50 53 elfheader.path = $$[QT_INSTALL_HEADERS]/SocExplorer/common/libelf
@@ -92,7 +95,9 HEADERS += \
92 95 qtablewidgetintitem.h \
93 96 srec/srecfile.h \
94 97 srec/srecfilewidget.h \
95 abstractbinfile.h
98 abstractbinfile.h \
99 BinFile/binaryfile.h \
100 BinFile/binaryfilewidget.h
96 101
97 102
98 103 SOURCES += \
@@ -114,11 +119,14 SOURCES += \
114 119 qtablewidgetintitem.cpp \
115 120 srec/srecfile.cpp \
116 121 srec/srecfilewidget.cpp \
117 abstractbinfile.cpp
122 abstractbinfile.cpp \
123 BinFile/binaryfile.cpp \
124 BinFile/binaryfilewidget.cpp
118 125
119 126 FORMS += \
120 127 elf/elffilewidget.ui \
121 srec/srecfilewidget.ui
128 srec/srecfilewidget.ui \
129 BinFile/binaryfilewidget.ui
122 130
123 131 OTHER_FILES += \
124 132 ./pythongenerator.sh \
@@ -29,7 +29,7 ElfFile::ElfFile()
29 29 {
30 30 this->opened = false;
31 31 this->type_elf = false;
32 this->elfFile = NULL;
32 this->elfFile = (int)NULL;
33 33 this->e = NULL;
34 34 }
35 35
@@ -38,7 +38,7 ElfFile::ElfFile(const QString &File)
38 38 {
39 39 this->opened = false;
40 40 this->type_elf = false;
41 this->elfFile = NULL;
41 this->elfFile = (int)NULL;
42 42 this->e = NULL;
43 43 this->p_fileName = File;
44 44 openFile(File);
@@ -76,7 +76,7 bool ElfFile::openFile(const QString &Fi
76 76 #else
77 77 this->elfFile = open(File.toStdString().c_str(),O_RDONLY ,0);
78 78 #endif
79 if(this->elfFile==NULL)return 0;
79 if(this->elfFile==(int)NULL)return 0;
80 80 this->e = elf_begin(this->elfFile,ELF_C_READ,NULL);
81 81 if(this->e==NULL)return 0;
82 82 this->ek = elf_kind(this->e);
@@ -96,7 +96,7 bool ElfFile::isopened()
96 96
97 97 int ElfFile::closeFile()
98 98 {
99 if(this->elfFile!=NULL)
99 if(this->elfFile!=(int)NULL)
100 100 {
101 101 if(this->e!=NULL)
102 102 {
@@ -104,7 +104,7 int ElfFile::closeFile()
104 104 this->e = NULL;
105 105 }
106 106 close(this->elfFile);
107 this->elfFile = NULL;
107 this->elfFile = (int)NULL;
108 108 }
109 109 this->opened = false;
110 110 return 0;
@@ -502,6 +502,7 qint64 ElfFile::getVersion()
502 502 {
503 503 return this->ehdr.e_version;
504 504 }
505 return -1;
505 506 }
506 507
507 508 qint64 ElfFile::getEntryPointAddress()
@@ -510,6 +511,7 qint64 ElfFile::getEntryPointAddress()
510 511 {
511 512 return this->ehdr.e_entry;
512 513 }
514 return -1;
513 515 }
514 516
515 517
@@ -591,12 +593,12 QString ElfFile::getSegmentType(int inde
591 593
592 594 qint64 ElfFile::getSegmentOffset(int index)
593 595 {
594 int64_t Offset;
596 qint64 Offset = -1;
595 597 if(this->e!=NULL)
596 598 {
597 599 if(index < this->Segments.count())
598 600 {
599 Offset = (int64_t)this->Segments.at(index)->p_offset;
601 Offset = (qint64)this->Segments.at(index)->p_offset;
600 602 }
601 603 }
602 604 return Offset;
@@ -664,7 +666,14 qint64 ElfFile::getSectionDatasz(int ind
664 666 {
665 667 if(index < this->sections.count())
666 668 {
667 DataSz = (int64_t)this->sections.at(index)->data->d_size;
669 if(this->sections.at(index)->section_header->sh_type==SHT_NOBITS)
670 {
671 DataSz=0;
672 }
673 else
674 {
675 DataSz = (int64_t)this->sections.at(index)->data->d_size;
676 }
668 677 }
669 678 }
670 679 return DataSz;
@@ -769,7 +778,7 void ElfFile::updateSegments()
769 778 free(this->Segments.at(i));
770 779 }
771 780 this->Segments.clear();
772 for(int i=0;i<this->SegmentCount;i++)
781 for(int i=0;i<(int)this->SegmentCount;i++)
773 782 {
774 783 GElf_Phdr* header=(GElf_Phdr*)malloc(sizeof(GElf_Phdr));
775 784 gelf_getphdr (this->e , i , header );
@@ -785,7 +794,7 void ElfFile::updateSymbols()
785 794 }
786 795 this->symbols.clear();
787 796 updateSections(); //Useless in most case but safer to do it
788 for(int i=0;i<SectionCount;i++)
797 for(int i=0;i<(int)SectionCount;i++)
789 798 {
790 799 //First find Symbol table
791 800 if(this->getSectionName(i)==".symtab")
@@ -793,7 +802,7 void ElfFile::updateSymbols()
793 802 Elf_Section* sec = sections.at(i);
794 803 this->SymbolCount = sec->section_header->sh_size / sec->section_header->sh_entsize;
795 804 //Then list all symbols
796 for(int j=0;j<this->SymbolCount;j++)
805 for(int j=0;j<(int)this->SymbolCount;j++)
797 806 {
798 807 GElf_Sym* esym = (GElf_Sym*)malloc(sizeof(GElf_Sym));
799 808 gelf_getsym(sec->data, j, esym);
@@ -813,9 +822,9 QString ElfFile::getSectionType(int inde
813 822 QString type("");
814 823 if(this->e!=NULL)
815 824 {
816 if(index < this->Segments.count())
825 if(index < this->sections.count())
817 826 {
818 switch(this->Segments.at(index)->p_type)
827 switch(this->sections.at(index)->section_header->sh_type)
819 828 {
820 829 case SHT_NULL : type = "Section header table entry unused"; break;
821 830 case SHT_PROGBITS : type = "Program data"; break;
@@ -857,13 +866,25 int ElfFile::getSectionIndex(QString nam
857 866 {
858 867 for(int i=0;i<sections.count();i++)
859 868 {
860 if(getSectionName(i)==name)
861 return i;
869 if(getSectionName(i)==name)
870 return i;
862 871 }
863 872 }
864 873 return -1;
865 874 }
866 875
876 bool ElfFile::sectionIsNobits(int index)
877 {
878 if(this->e!=NULL)
879 {
880 if(index < this->sections.count())
881 {
882 return this->sections.at(index)->section_header->sh_type== SHT_NOBITS;
883 }
884 }
885 return false;
886 }
887
867 888 QString ElfFile::getSymbolName(int index)
868 889 {
869 890 if(this->e!=NULL)
@@ -948,7 +969,7 QString ElfFile::getSymbolSectionName(in
948 969 {
949 970 if((index < this->symbols.count()) && (index>=0))
950 971 {
951 return getSectionName(symbols.at(index)->sym->st_shndx-1);
972 return getSectionName(symbols.at(index)->sym->st_shndx-1);
952 973 }
953 974 }
954 975 return "none";
@@ -960,7 +981,7 int ElfFile::getSymbolSectionIndex(int i
960 981 {
961 982 if((index < this->symbols.count()) && (index>=0))
962 983 {
963 return symbols.at(index)->sym->st_shndx;
984 return symbols.at(index)->sym->st_shndx;
964 985 }
965 986 }
966 987 return 0;
@@ -1031,9 +1052,9 bool ElfFile::isElf(const QString &File)
1031 1052 char Magic[4];
1032 1053 if(file!=-1)
1033 1054 {
1034 read(file,Magic,4);
1055 size_t res = read(file,Magic,4);
1035 1056 close(file);
1036 if(Magic[0]==0x7f && Magic[1]==0x45 && Magic[2]==0x4c && Magic[3]==0x46)
1057 if((res==4) && (Magic[0]==0x7f) && (Magic[1]==0x45) && (Magic[2]==0x4c) && (Magic[3]==0x46))
1037 1058 {
1038 1059 return true;
1039 1060 }
@@ -88,16 +88,17 public:
88 88 qint64 getSegmentVaddr(int index);
89 89 qint64 getSegmentPaddr(int index);
90 90 qint64 getSegmentFilesz(int index);
91 qint64 getSectionDatasz(int index);
92 91 qint64 getSegmentMemsz(int index);
93 92 QString getSegmentFlags(int index);
94 93
95 94 bool getSectionData(int index, char **buffer);
96 95 qint64 getSectionPaddr(int index);
97 96 qint64 getSectionMemsz(int index);
97 qint64 getSectionDatasz(int index);
98 98 QString getSectionName(int index);
99 99 QString getSectionType(int index);
100 100 int getSectionIndex(QString name);
101 bool sectionIsNobits(int index);
101 102
102 103 QString getSymbolName(int index);
103 104 QString getSymbolType(int index);
@@ -1,15 +1,52
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 22 #include "elffilewidget.h"
2 23 #include "ui_elffilewidget.h"
3 24 #include <QtWidgets/QTableWidgetItem>
25 #include <QtWidgets/QFileDialog>
4 26 #include "qhexedit.h"
5 27 #include "qtablewidgetintitem.h"
28 #include "srec/srecfile.h"
6 29
7 30 elfFileWidget::elfFileWidget(QWidget *parent) :
8 31 QWidget(parent),
9 32 ui(new Ui::elfFileWidget)
10 33 {
11 34 ui->setupUi(this);
35 exportToSREC_action = new QAction(tr("Export to SREC"),this);
36 exportToBIN_action = new QAction(tr("Export to Binary"),this);
37 pointInSections_action = new QAction(tr("View in Hexviewer"),this);
12 38 connect(this->ui->sectionsList,SIGNAL(cellActivated(int,int)),this,SLOT(sectionCellActivated(int,int)));
39 this->ui->sectionsList->addAction(exportToSREC_action);
40 this->ui->sectionsList->addAction(exportToBIN_action);
41 this->ui->symbolsList->addAction(pointInSections_action);
42 connect(this->exportToBIN_action,SIGNAL(triggered()),this,SLOT(exportToBIN()));
43 connect(this->exportToSREC_action,SIGNAL(triggered()),this,SLOT(exportToSREC()));
44 connect(this->ui->symbolsFilter,SIGNAL(textChanged(QString)),this,SLOT(filterSymbols(QString)));
45 connect(this->ui->caseSensitive,SIGNAL(toggled(bool)),this,SLOT(filterSymbolsCaseUpdate(bool)));
46 connect(this->pointInSections_action,SIGNAL(triggered()),this,SLOT(pointSymbol()));
47 this->p_hexviewer = new QHexEdit();
48 this->p_hexviewer->setWindowTitle("SocExplorer Hexadecimal viewer");
49 this->setWindowTitle("SocExplorer Elf viewer");
13 50 }
14 51
15 52
@@ -17,6 +54,7 elfFileWidget::elfFileWidget(QWidget *pa
17 54 elfFileWidget::~elfFileWidget()
18 55 {
19 56 delete ui;
57 delete p_hexviewer;
20 58 }
21 59
22 60
@@ -86,7 +124,7 void elfFileWidget::updateSections()
86 124 {
87 125 this->ui->sectionsList->clear();
88 126 this->ui->sectionsList->setRowCount(p_elf->getSectionCount());
89 this->ui->sectionsList->setHorizontalHeaderLabels(QStringList()<<"Index"<<"Name"<<"Address"<<"Size");
127 this->ui->sectionsList->setHorizontalHeaderLabels(QStringList()<<"Index"<<"Name"<<"Address"<<"Size"<<"File Size"<<"Type");
90 128 for(int i=0;i<p_elf->getSectionCount();i++)
91 129 {
92 130 QTableWidgetItem *newItem = (QTableWidgetItem*) new QTableWidgetIntItem(QString("%1").arg(i),DecimalItem);
@@ -101,9 +139,17 void elfFileWidget::updateSections()
101 139 newItem->setFlags(newItem->flags() ^ Qt::ItemIsEditable);
102 140 this->ui->sectionsList->setItem(i, 2, newItem);
103 141
142 newItem = (QTableWidgetItem*) new QTableWidgetIntItem(QString("%1").arg(p_elf->getSectionMemsz(i)),DecimalItem);
143 newItem->setFlags(newItem->flags() ^ Qt::ItemIsEditable);
144 this->ui->sectionsList->setItem(i, 3, newItem);
145
104 146 newItem = (QTableWidgetItem*) new QTableWidgetIntItem(QString("%1").arg(p_elf->getSectionDatasz(i)),DecimalItem);
105 147 newItem->setFlags(newItem->flags() ^ Qt::ItemIsEditable);
106 this->ui->sectionsList->setItem(i, 3, newItem);
148 this->ui->sectionsList->setItem(i, 4, newItem);
149
150 newItem = new QTableWidgetItem(p_elf->getSectionType(i));
151 newItem->setFlags(newItem->flags() ^ Qt::ItemIsEditable);
152 this->ui->sectionsList->setItem(i, 5, newItem);
107 153 }
108 154 this->ui->sectionsList->resizeColumnsToContents();
109 155 }
@@ -115,9 +161,101 void elfFileWidget::sectionCellActivated
115 161 int sectionIndex = p_elf->getSectionIndex(this->ui->sectionsList->item(row,1)->text());
116 162 if(sectionIndex!=-1)
117 163 {
118 this->p_elf->getSectionData(sectionIndex,&buff);
119 this->ui->sectionsHexView->setData(QByteArray(buff,this->p_elf->getSectionDatasz(sectionIndex)));
164 QString type = p_elf->getSectionType(sectionIndex);
165 if(!p_elf->sectionIsNobits(sectionIndex))
166 {
167 this->p_elf->getSectionData(sectionIndex,&buff);
168 this->ui->sectionsHexView->setData(QByteArray(buff,this->p_elf->getSectionDatasz(sectionIndex)));
169 this->ui->sectionsHexView->setAddressOffset(this->p_elf->getSectionPaddr(sectionIndex));
170 }
171 }
172 }
173
174 void elfFileWidget::exportToSREC()
175 {
176 QStringList sectionList=getSelectedSectionsNames();
177 if(sectionList.count()>0)
178 {
179 QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"),
180 NULL,
181 tr("SREC Files (*.srec)"));
182 if(!fileName.isEmpty())
183 {
184 srecFile::toSrec(p_elf->getFragments(sectionList),fileName);
185 }
120 186 }
187
188 }
189
190 void elfFileWidget::exportToBIN()
191 {
192
193 }
194
195 void elfFileWidget::pointSymbol()
196 {
197 int row=this->ui->symbolsList->item(this->ui->symbolsList->currentRow(),0)->text().toInt();
198 int section = p_elf->getSectionIndex(p_elf->getSymbolSectionName(row));
199 qint64 address = p_elf->getSymbolAddress(row);
200 qint64 secAddress = p_elf->getSectionPaddr(section);
201 qint64 size = p_elf->getSymbolSize(row);
202 char* buff=NULL;
203 char* symBuff=NULL;
204 if(size && !p_elf->sectionIsNobits(section))
205 {
206 if(section!=-1)
207 {
208 symBuff = (char*)malloc(size);
209 this->p_elf->getSectionData(section,&buff);
210 memcpy(symBuff,buff+(address-secAddress),size);
211 this->p_hexviewer->setData(QByteArray(symBuff,size));
212 this->p_hexviewer->setAddressOffset(address);
213 this->p_hexviewer->show();
214 }
215 }
216 }
217
218 void elfFileWidget::filterSymbols(const QString &pattern)
219 {
220 Qt::MatchFlags flag = Qt::MatchContains | Qt::MatchStartsWith | Qt::MatchEndsWith | Qt::MatchRegExp | Qt::MatchWildcard | Qt::MatchWrap |Qt::MatchRecursive;
221 if(this->ui->caseSensitive->isChecked())
222 flag |= Qt::MatchCaseSensitive;
223 if(pattern.isEmpty())
224 {
225 for(int i=0;i<this->ui->symbolsList->rowCount();i++)
226 this->ui->symbolsList->setRowHidden(i,false);
227 }
228 else
229 {
230 for(int i=0;i<this->ui->symbolsList->rowCount();i++)
231 this->ui->symbolsList->setRowHidden(i,true);
232 QList<QTableWidgetItem*> items = this->ui->symbolsList->findItems(pattern,flag);
233 for(int i=0;i<items.count();i++)
234 this->ui->symbolsList->setRowHidden(items.at(i)->row(),false);
235 }
236 }
237
238 void elfFileWidget::filterSymbolsCaseUpdate(bool toggled)
239 {
240 Q_UNUSED(toggled)
241 this->filterSymbols(this->ui->symbolsFilter->text());
242 }
243
244
245
246 QStringList elfFileWidget::getSelectedSectionsNames()
247 {
248 QStringList sectionList;
249 QList<QTableWidgetItem*> items = this->ui->sectionsList->selectedItems();
250 for(int i=0;i<items.count();i++)
251 {
252 QString section = p_elf->getSectionName(items.at(i)->row());
253 if(!sectionList.contains(section))
254 {
255 sectionList.append(section);
256 }
257 }
258 return sectionList;
121 259 }
122 260
123 261
@@ -1,8 +1,31
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 22 #ifndef ELFFILEWIDGET_H
2 23 #define ELFFILEWIDGET_H
3 24
4 25 #include <QtWidgets/QWidget>
5 26 #include "elffile.h"
27 #include <QtWidgets/QAction>
28 #include <qhexedit.h>
6 29
7 30 namespace Ui {
8 31 class elfFileWidget;
@@ -23,10 +46,19 public slots:
23 46
24 47 private slots:
25 48 void sectionCellActivated(int row, int column);
26
49 void exportToSREC();
50 void exportToBIN();
51 void pointSymbol();
52 void filterSymbols(const QString& pattern);
53 void filterSymbolsCaseUpdate(bool toggled);
27 54 private:
28 55 Ui::elfFileWidget *ui;
56 QStringList getSelectedSectionsNames();
29 57 ElfFile* p_elf;
58 QAction* exportToSREC_action;
59 QAction* exportToBIN_action;
60 QAction* pointInSections_action;
61 QHexEdit* p_hexviewer;
30 62 };
31 63
32 64 #endif // ELFFILEWIDGET_H
@@ -26,7 +26,7
26 26 <item row="0" column="0">
27 27 <widget class="QTabWidget" name="tabWidget">
28 28 <property name="currentIndex">
29 <number>2</number>
29 <number>0</number>
30 30 </property>
31 31 <widget class="QWidget" name="generalInfoTab">
32 32 <attribute name="title">
@@ -184,8 +184,28
184 184 <string>Symbols</string>
185 185 </attribute>
186 186 <layout class="QGridLayout" name="gridLayout_2">
187 <item row="0" column="1">
188 <widget class="QLineEdit" name="symbolsFilter"/>
189 </item>
187 190 <item row="0" column="0">
191 <widget class="QLabel" name="label_2">
192 <property name="text">
193 <string>Filter:</string>
194 </property>
195 </widget>
196 </item>
197 <item row="0" column="2">
198 <widget class="QCheckBox" name="caseSensitive">
199 <property name="text">
200 <string>Case Sensitive</string>
201 </property>
202 </widget>
203 </item>
204 <item row="2" column="0" colspan="3">
188 205 <widget class="QTableWidget" name="symbolsList">
206 <property name="contextMenuPolicy">
207 <enum>Qt::ActionsContextMenu</enum>
208 </property>
189 209 <property name="sortingEnabled">
190 210 <bool>true</bool>
191 211 </property>
@@ -240,46 +260,62
240 260 </attribute>
241 261 <layout class="QGridLayout" name="gridLayout_3">
242 262 <item row="0" column="0">
243 <widget class="QHexEdit" name="sectionsHexView" native="true">
244 <property name="minimumSize">
245 <size>
246 <width>100</width>
247 <height>0</height>
248 </size>
249 </property>
250 </widget>
251 </item>
252 <item row="0" column="1">
253 <widget class="QTableWidget" name="sectionsList">
254 <property name="sortingEnabled">
255 <bool>true</bool>
263 <widget class="QSplitter" name="splitter">
264 <property name="orientation">
265 <enum>Qt::Horizontal</enum>
256 266 </property>
257 <attribute name="verticalHeaderVisible">
258 <bool>false</bool>
259 </attribute>
260 <attribute name="verticalHeaderShowSortIndicator" stdset="0">
261 <bool>false</bool>
262 </attribute>
263 <column>
264 <property name="text">
265 <string>Index</string>
267 <widget class="QHexEdit" name="sectionsHexView" native="true">
268 <property name="minimumSize">
269 <size>
270 <width>100</width>
271 <height>0</height>
272 </size>
273 </property>
274 </widget>
275 <widget class="QTableWidget" name="sectionsList">
276 <property name="contextMenuPolicy">
277 <enum>Qt::ActionsContextMenu</enum>
278 </property>
279 <property name="sortingEnabled">
280 <bool>true</bool>
266 281 </property>
267 </column>
268 <column>
269 <property name="text">
270 <string>Name</string>
271 </property>
272 </column>
273 <column>
274 <property name="text">
275 <string>Address</string>
276 </property>
277 </column>
278 <column>
279 <property name="text">
280 <string>Size</string>
281 </property>
282 </column>
282 <attribute name="verticalHeaderVisible">
283 <bool>false</bool>
284 </attribute>
285 <attribute name="verticalHeaderShowSortIndicator" stdset="0">
286 <bool>false</bool>
287 </attribute>
288 <column>
289 <property name="text">
290 <string>Index</string>
291 </property>
292 </column>
293 <column>
294 <property name="text">
295 <string>Name</string>
296 </property>
297 </column>
298 <column>
299 <property name="text">
300 <string>Address</string>
301 </property>
302 </column>
303 <column>
304 <property name="text">
305 <string>Size</string>
306 </property>
307 </column>
308 <column>
309 <property name="text">
310 <string>File Size</string>
311 </property>
312 </column>
313 <column>
314 <property name="text">
315 <string>Type</string>
316 </property>
317 </column>
318 </widget>
283 319 </widget>
284 320 </item>
285 321 </layout>
@@ -32,7 +32,7 elfparser::elfparser()
32 32 {
33 33 this->opened = false;
34 34 this->type_elf = false;
35 this->elfFile = NULL;
35 this->elfFile = (int)NULL;
36 36 this->e = NULL;
37 37 }
38 38
@@ -46,7 +46,7 int elfparser::setFilename(const QString
46 46 #else
47 47 this->elfFile = open(name.toStdString().c_str(),O_RDONLY ,0);
48 48 #endif
49 if(this->elfFile==NULL)return 0;
49 if(this->elfFile==(int)NULL)return 0;
50 50 this->e = elf_begin(this->elfFile,ELF_C_READ,NULL);
51 51 if(this->e==NULL)return 0;
52 52 this->ek = elf_kind(this->e);
@@ -60,7 +60,7 int elfparser::setFilename(const QString
60 60
61 61 int elfparser::closeFile()
62 62 {
63 if(this->elfFile!=NULL)
63 if(this->elfFile!=(int)NULL)
64 64 {
65 65 if(this->e!=NULL)
66 66 {
@@ -68,7 +68,7 int elfparser::closeFile()
68 68 this->e = NULL;
69 69 }
70 70 close(this->elfFile);
71 this->elfFile = NULL;
71 this->elfFile = (int)NULL;
72 72 }
73 73 return 0;
74 74 }
@@ -178,6 +178,7 qint64 elfparser::getVersion()
178 178 {
179 179 return this->ehdr.e_version;
180 180 }
181 return -1;
181 182 }
182 183
183 184 qint64 elfparser::getEntryPointAddress()
@@ -186,6 +187,7 qint64 elfparser::getEntryPointAddress()
186 187 {
187 188 return this->ehdr.e_entry;
188 189 }
190 return -1;
189 191 }
190 192
191 193
@@ -262,12 +264,12 QString elfparser::getSegmentType(int in
262 264
263 265 qint64 elfparser::getSegmentOffset(int index)
264 266 {
265 int64_t Offset;
267 qint64 Offset=-1;
266 268 if(this->e!=NULL)
267 269 {
268 270 if(index < this->Segments.count())
269 271 {
270 Offset = (int64_t)this->Segments.at(index)->p_offset;
272 Offset = (qint64)this->Segments.at(index)->p_offset;
271 273 }
272 274 }
273 275 return Offset;
@@ -436,7 +438,7 void elfparser::updateSegments()
436 438 free(this->Segments.at(i));
437 439 }
438 440 this->Segments.clear();
439 for(int i=0;i<this->SegmentCount;i++)
441 for(int i=0;i<(int)this->SegmentCount;i++)
440 442 {
441 443 GElf_Phdr* header=(GElf_Phdr*)malloc(sizeof(GElf_Phdr));
442 444 gelf_getphdr (this->e , i , header );
@@ -502,9 +504,9 bool elfparser::isElf(const QString &Fil
502 504 char Magic[4];
503 505 if(file!=-1)
504 506 {
505 read(file,Magic,4);
507 size_t res = read(file,Magic,4);
506 508 close(file);
507 if(Magic[0]==0x7f && Magic[1]==0x45 && Magic[2]==0x4c && Magic[3]==0x46)
509 if((res == 4) && (Magic[0]==0x7f) && (Magic[1]==0x45) && (Magic[2]==0x4c) && (Magic[3]==0x46))
508 510 {
509 511 return true;
510 512 }
This diff has been collapsed as it changes many lines, (1123 lines changed) Show them Hide them
@@ -8,6 +8,7
8 8 #include <QVariant>
9 9 #include <QWidget>
10 10 #include <abstractbinfile.h>
11 #include <binaryfile.h>
11 12 #include <elffile.h>
12 13 #include <elfparser.h>
13 14 #include <qaction.h>
@@ -362,6 +363,11 bool PythonQtWrapper_ElfFile::openFile(
362 363 return ( ((PythonQtPublicPromoter_ElfFile*)theWrappedObject)->promoted_openFile(File));
363 364 }
364 365
366 bool PythonQtWrapper_ElfFile::sectionIsNobits(ElfFile* theWrappedObject, int index)
367 {
368 return ( theWrappedObject->sectionIsNobits(index));
369 }
370
365 371 bool PythonQtWrapper_ElfFile::toSrec(ElfFile* theWrappedObject, const QString& File)
366 372 {
367 373 return ( theWrappedObject->toSrec(File));
@@ -2274,6 +2280,16 const QFont* PythonQtWrapper_QHexEdit::
2274 2280 return &( theWrappedObject->font());
2275 2281 }
2276 2282
2283 int PythonQtWrapper_QHexEdit::getSelectionBegin(QHexEdit* theWrappedObject)
2284 {
2285 return ( theWrappedObject->getSelectionBegin());
2286 }
2287
2288 int PythonQtWrapper_QHexEdit::getSelectionEnd(QHexEdit* theWrappedObject)
2289 {
2290 return ( theWrappedObject->getSelectionEnd());
2291 }
2292
2277 2293 QColor PythonQtWrapper_QHexEdit::highlightingColor(QHexEdit* theWrappedObject)
2278 2294 {
2279 2295 return ( theWrappedObject->highlightingColor());
@@ -2319,6 +2335,16 void PythonQtWrapper_QHexEdit::replace(Q
2319 2335 ( theWrappedObject->replace(pos, len, after));
2320 2336 }
2321 2337
2338 void PythonQtWrapper_QHexEdit::resetSelection(QHexEdit* theWrappedObject)
2339 {
2340 ( theWrappedObject->resetSelection());
2341 }
2342
2343 void PythonQtWrapper_QHexEdit::resetSelection(QHexEdit* theWrappedObject, int pos)
2344 {
2345 ( theWrappedObject->resetSelection(pos));
2346 }
2347
2322 2348 QColor PythonQtWrapper_QHexEdit::selectionColor(QHexEdit* theWrappedObject)
2323 2349 {
2324 2350 return ( theWrappedObject->selectionColor());
@@ -2369,6 +2395,11 void PythonQtWrapper_QHexEdit::setReadOn
2369 2395 ( theWrappedObject->setReadOnly(arg__1));
2370 2396 }
2371 2397
2398 void PythonQtWrapper_QHexEdit::setSelection(QHexEdit* theWrappedObject, int pos)
2399 {
2400 ( theWrappedObject->setSelection(pos));
2401 }
2402
2372 2403 void PythonQtWrapper_QHexEdit::setSelectionColor(QHexEdit* theWrappedObject, const QColor& color)
2373 2404 {
2374 2405 ( theWrappedObject->setSelectionColor(color));
@@ -4939,6 +4970,1098 return new PythonQtShell_abstractBinFile
4939 4970
4940 4971
4941 4972
4973 PythonQtShell_binaryFile::~PythonQtShell_binaryFile() {
4974 PythonQtPrivate* priv = PythonQt::priv();
4975 if (priv) { priv->shellClassDeleted(this); }
4976 }
4977 int PythonQtShell_binaryFile::closeFile()
4978 {
4979 if (_wrapper) {
4980 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "closeFile");
4981 PyErr_Clear();
4982 if (obj && !PythonQtSlotFunction_Check(obj)) {
4983 static const char* argumentList[] ={"int"};
4984 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList);
4985 int returnValue;
4986 void* args[1] = {NULL};
4987 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
4988 if (result) {
4989 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
4990 if (args[0]!=&returnValue) {
4991 if (args[0]==NULL) {
4992 PythonQt::priv()->handleVirtualOverloadReturnError("closeFile", methodInfo, result);
4993 } else {
4994 returnValue = *((int*)args[0]);
4995 }
4996 }
4997 }
4998 if (result) { Py_DECREF(result); }
4999 Py_DECREF(obj);
5000 return returnValue;
5001 }
5002 }
5003 return binaryFile::closeFile();
5004 }
5005 QList<codeFragment* > PythonQtShell_binaryFile::getFragments()
5006 {
5007 if (_wrapper) {
5008 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "getFragments");
5009 PyErr_Clear();
5010 if (obj && !PythonQtSlotFunction_Check(obj)) {
5011 static const char* argumentList[] ={"QList<codeFragment* >"};
5012 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList);
5013 QList<codeFragment* > returnValue;
5014 void* args[1] = {NULL};
5015 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5016 if (result) {
5017 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
5018 if (args[0]!=&returnValue) {
5019 if (args[0]==NULL) {
5020 PythonQt::priv()->handleVirtualOverloadReturnError("getFragments", methodInfo, result);
5021 } else {
5022 returnValue = *((QList<codeFragment* >*)args[0]);
5023 }
5024 }
5025 }
5026 if (result) { Py_DECREF(result); }
5027 Py_DECREF(obj);
5028 return returnValue;
5029 }
5030 }
5031 return binaryFile::getFragments();
5032 }
5033 bool PythonQtShell_binaryFile::isopened()
5034 {
5035 if (_wrapper) {
5036 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "isopened");
5037 PyErr_Clear();
5038 if (obj && !PythonQtSlotFunction_Check(obj)) {
5039 static const char* argumentList[] ={"bool"};
5040 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList);
5041 bool returnValue;
5042 void* args[1] = {NULL};
5043 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5044 if (result) {
5045 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
5046 if (args[0]!=&returnValue) {
5047 if (args[0]==NULL) {
5048 PythonQt::priv()->handleVirtualOverloadReturnError("isopened", methodInfo, result);
5049 } else {
5050 returnValue = *((bool*)args[0]);
5051 }
5052 }
5053 }
5054 if (result) { Py_DECREF(result); }
5055 Py_DECREF(obj);
5056 return returnValue;
5057 }
5058 }
5059 return binaryFile::isopened();
5060 }
5061 bool PythonQtShell_binaryFile::openFile(const QString& File)
5062 {
5063 if (_wrapper) {
5064 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "openFile");
5065 PyErr_Clear();
5066 if (obj && !PythonQtSlotFunction_Check(obj)) {
5067 static const char* argumentList[] ={"bool" , "const QString&"};
5068 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5069 bool returnValue;
5070 void* args[2] = {NULL, (void*)&File};
5071 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5072 if (result) {
5073 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
5074 if (args[0]!=&returnValue) {
5075 if (args[0]==NULL) {
5076 PythonQt::priv()->handleVirtualOverloadReturnError("openFile", methodInfo, result);
5077 } else {
5078 returnValue = *((bool*)args[0]);
5079 }
5080 }
5081 }
5082 if (result) { Py_DECREF(result); }
5083 Py_DECREF(obj);
5084 return returnValue;
5085 }
5086 }
5087 return binaryFile::openFile(File);
5088 }
5089 binaryFile* PythonQtWrapper_binaryFile::new_binaryFile()
5090 {
5091 return new PythonQtShell_binaryFile(); }
5092
5093 binaryFile* PythonQtWrapper_binaryFile::new_binaryFile(const QString& File)
5094 {
5095 return new PythonQtShell_binaryFile(File); }
5096
5097 binaryFile* PythonQtWrapper_binaryFile::new_binaryFile(const QStringList& Files)
5098 {
5099 return new PythonQtShell_binaryFile(Files); }
5100
5101 int PythonQtWrapper_binaryFile::closeFile(binaryFile* theWrappedObject)
5102 {
5103 return ( ((PythonQtPublicPromoter_binaryFile*)theWrappedObject)->promoted_closeFile());
5104 }
5105
5106 int PythonQtWrapper_binaryFile::getFragmentAddress(binaryFile* theWrappedObject, int index)
5107 {
5108 return ( theWrappedObject->getFragmentAddress(index));
5109 }
5110
5111 bool PythonQtWrapper_binaryFile::getFragmentData(binaryFile* theWrappedObject, int index, char** buffer)
5112 {
5113 return ( theWrappedObject->getFragmentData(index, buffer));
5114 }
5115
5116 QString PythonQtWrapper_binaryFile::getFragmentHeader(binaryFile* theWrappedObject, int index)
5117 {
5118 return ( theWrappedObject->getFragmentHeader(index));
5119 }
5120
5121 int PythonQtWrapper_binaryFile::getFragmentSize(binaryFile* theWrappedObject, int index)
5122 {
5123 return ( theWrappedObject->getFragmentSize(index));
5124 }
5125
5126 QList<codeFragment* > PythonQtWrapper_binaryFile::getFragments(binaryFile* theWrappedObject)
5127 {
5128 return ( ((PythonQtPublicPromoter_binaryFile*)theWrappedObject)->promoted_getFragments());
5129 }
5130
5131 int PythonQtWrapper_binaryFile::getFragmentsCount(binaryFile* theWrappedObject)
5132 {
5133 return ( theWrappedObject->getFragmentsCount());
5134 }
5135
5136 bool PythonQtWrapper_binaryFile::isopened(binaryFile* theWrappedObject)
5137 {
5138 return ( ((PythonQtPublicPromoter_binaryFile*)theWrappedObject)->promoted_isopened());
5139 }
5140
5141 bool PythonQtWrapper_binaryFile::openFile(binaryFile* theWrappedObject, const QString& File)
5142 {
5143 return ( ((PythonQtPublicPromoter_binaryFile*)theWrappedObject)->promoted_openFile(File));
5144 }
5145
5146 bool PythonQtWrapper_binaryFile::openFiles(binaryFile* theWrappedObject, const QStringList& Files)
5147 {
5148 return ( theWrappedObject->openFiles(Files));
5149 }
5150
5151
5152
5153 PythonQtShell_binaryFileWidget::~PythonQtShell_binaryFileWidget() {
5154 PythonQtPrivate* priv = PythonQt::priv();
5155 if (priv) { priv->shellClassDeleted(this); }
5156 }
5157 void PythonQtShell_binaryFileWidget::actionEvent(QActionEvent* arg__1)
5158 {
5159 if (_wrapper) {
5160 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "actionEvent");
5161 PyErr_Clear();
5162 if (obj && !PythonQtSlotFunction_Check(obj)) {
5163 static const char* argumentList[] ={"" , "QActionEvent*"};
5164 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5165 void* args[2] = {NULL, (void*)&arg__1};
5166 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5167 if (result) { Py_DECREF(result); }
5168 Py_DECREF(obj);
5169 return;
5170 }
5171 }
5172 binaryFileWidget::actionEvent(arg__1);
5173 }
5174 void PythonQtShell_binaryFileWidget::changeEvent(QEvent* arg__1)
5175 {
5176 if (_wrapper) {
5177 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "changeEvent");
5178 PyErr_Clear();
5179 if (obj && !PythonQtSlotFunction_Check(obj)) {
5180 static const char* argumentList[] ={"" , "QEvent*"};
5181 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5182 void* args[2] = {NULL, (void*)&arg__1};
5183 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5184 if (result) { Py_DECREF(result); }
5185 Py_DECREF(obj);
5186 return;
5187 }
5188 }
5189 binaryFileWidget::changeEvent(arg__1);
5190 }
5191 void PythonQtShell_binaryFileWidget::childEvent(QChildEvent* arg__1)
5192 {
5193 if (_wrapper) {
5194 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "childEvent");
5195 PyErr_Clear();
5196 if (obj && !PythonQtSlotFunction_Check(obj)) {
5197 static const char* argumentList[] ={"" , "QChildEvent*"};
5198 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5199 void* args[2] = {NULL, (void*)&arg__1};
5200 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5201 if (result) { Py_DECREF(result); }
5202 Py_DECREF(obj);
5203 return;
5204 }
5205 }
5206 binaryFileWidget::childEvent(arg__1);
5207 }
5208 void PythonQtShell_binaryFileWidget::closeEvent(QCloseEvent* arg__1)
5209 {
5210 if (_wrapper) {
5211 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "closeEvent");
5212 PyErr_Clear();
5213 if (obj && !PythonQtSlotFunction_Check(obj)) {
5214 static const char* argumentList[] ={"" , "QCloseEvent*"};
5215 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5216 void* args[2] = {NULL, (void*)&arg__1};
5217 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5218 if (result) { Py_DECREF(result); }
5219 Py_DECREF(obj);
5220 return;
5221 }
5222 }
5223 binaryFileWidget::closeEvent(arg__1);
5224 }
5225 void PythonQtShell_binaryFileWidget::contextMenuEvent(QContextMenuEvent* arg__1)
5226 {
5227 if (_wrapper) {
5228 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "contextMenuEvent");
5229 PyErr_Clear();
5230 if (obj && !PythonQtSlotFunction_Check(obj)) {
5231 static const char* argumentList[] ={"" , "QContextMenuEvent*"};
5232 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5233 void* args[2] = {NULL, (void*)&arg__1};
5234 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5235 if (result) { Py_DECREF(result); }
5236 Py_DECREF(obj);
5237 return;
5238 }
5239 }
5240 binaryFileWidget::contextMenuEvent(arg__1);
5241 }
5242 void PythonQtShell_binaryFileWidget::customEvent(QEvent* arg__1)
5243 {
5244 if (_wrapper) {
5245 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "customEvent");
5246 PyErr_Clear();
5247 if (obj && !PythonQtSlotFunction_Check(obj)) {
5248 static const char* argumentList[] ={"" , "QEvent*"};
5249 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5250 void* args[2] = {NULL, (void*)&arg__1};
5251 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5252 if (result) { Py_DECREF(result); }
5253 Py_DECREF(obj);
5254 return;
5255 }
5256 }
5257 binaryFileWidget::customEvent(arg__1);
5258 }
5259 int PythonQtShell_binaryFileWidget::devType() const
5260 {
5261 if (_wrapper) {
5262 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "devType");
5263 PyErr_Clear();
5264 if (obj && !PythonQtSlotFunction_Check(obj)) {
5265 static const char* argumentList[] ={"int"};
5266 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList);
5267 int returnValue;
5268 void* args[1] = {NULL};
5269 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5270 if (result) {
5271 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
5272 if (args[0]!=&returnValue) {
5273 if (args[0]==NULL) {
5274 PythonQt::priv()->handleVirtualOverloadReturnError("devType", methodInfo, result);
5275 } else {
5276 returnValue = *((int*)args[0]);
5277 }
5278 }
5279 }
5280 if (result) { Py_DECREF(result); }
5281 Py_DECREF(obj);
5282 return returnValue;
5283 }
5284 }
5285 return binaryFileWidget::devType();
5286 }
5287 void PythonQtShell_binaryFileWidget::dragEnterEvent(QDragEnterEvent* arg__1)
5288 {
5289 if (_wrapper) {
5290 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "dragEnterEvent");
5291 PyErr_Clear();
5292 if (obj && !PythonQtSlotFunction_Check(obj)) {
5293 static const char* argumentList[] ={"" , "QDragEnterEvent*"};
5294 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5295 void* args[2] = {NULL, (void*)&arg__1};
5296 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5297 if (result) { Py_DECREF(result); }
5298 Py_DECREF(obj);
5299 return;
5300 }
5301 }
5302 binaryFileWidget::dragEnterEvent(arg__1);
5303 }
5304 void PythonQtShell_binaryFileWidget::dragLeaveEvent(QDragLeaveEvent* arg__1)
5305 {
5306 if (_wrapper) {
5307 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "dragLeaveEvent");
5308 PyErr_Clear();
5309 if (obj && !PythonQtSlotFunction_Check(obj)) {
5310 static const char* argumentList[] ={"" , "QDragLeaveEvent*"};
5311 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5312 void* args[2] = {NULL, (void*)&arg__1};
5313 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5314 if (result) { Py_DECREF(result); }
5315 Py_DECREF(obj);
5316 return;
5317 }
5318 }
5319 binaryFileWidget::dragLeaveEvent(arg__1);
5320 }
5321 void PythonQtShell_binaryFileWidget::dragMoveEvent(QDragMoveEvent* arg__1)
5322 {
5323 if (_wrapper) {
5324 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "dragMoveEvent");
5325 PyErr_Clear();
5326 if (obj && !PythonQtSlotFunction_Check(obj)) {
5327 static const char* argumentList[] ={"" , "QDragMoveEvent*"};
5328 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5329 void* args[2] = {NULL, (void*)&arg__1};
5330 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5331 if (result) { Py_DECREF(result); }
5332 Py_DECREF(obj);
5333 return;
5334 }
5335 }
5336 binaryFileWidget::dragMoveEvent(arg__1);
5337 }
5338 void PythonQtShell_binaryFileWidget::dropEvent(QDropEvent* arg__1)
5339 {
5340 if (_wrapper) {
5341 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "dropEvent");
5342 PyErr_Clear();
5343 if (obj && !PythonQtSlotFunction_Check(obj)) {
5344 static const char* argumentList[] ={"" , "QDropEvent*"};
5345 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5346 void* args[2] = {NULL, (void*)&arg__1};
5347 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5348 if (result) { Py_DECREF(result); }
5349 Py_DECREF(obj);
5350 return;
5351 }
5352 }
5353 binaryFileWidget::dropEvent(arg__1);
5354 }
5355 void PythonQtShell_binaryFileWidget::enterEvent(QEvent* arg__1)
5356 {
5357 if (_wrapper) {
5358 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "enterEvent");
5359 PyErr_Clear();
5360 if (obj && !PythonQtSlotFunction_Check(obj)) {
5361 static const char* argumentList[] ={"" , "QEvent*"};
5362 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5363 void* args[2] = {NULL, (void*)&arg__1};
5364 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5365 if (result) { Py_DECREF(result); }
5366 Py_DECREF(obj);
5367 return;
5368 }
5369 }
5370 binaryFileWidget::enterEvent(arg__1);
5371 }
5372 bool PythonQtShell_binaryFileWidget::event(QEvent* arg__1)
5373 {
5374 if (_wrapper) {
5375 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "event");
5376 PyErr_Clear();
5377 if (obj && !PythonQtSlotFunction_Check(obj)) {
5378 static const char* argumentList[] ={"bool" , "QEvent*"};
5379 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5380 bool returnValue;
5381 void* args[2] = {NULL, (void*)&arg__1};
5382 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5383 if (result) {
5384 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
5385 if (args[0]!=&returnValue) {
5386 if (args[0]==NULL) {
5387 PythonQt::priv()->handleVirtualOverloadReturnError("event", methodInfo, result);
5388 } else {
5389 returnValue = *((bool*)args[0]);
5390 }
5391 }
5392 }
5393 if (result) { Py_DECREF(result); }
5394 Py_DECREF(obj);
5395 return returnValue;
5396 }
5397 }
5398 return binaryFileWidget::event(arg__1);
5399 }
5400 bool PythonQtShell_binaryFileWidget::eventFilter(QObject* arg__1, QEvent* arg__2)
5401 {
5402 if (_wrapper) {
5403 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "eventFilter");
5404 PyErr_Clear();
5405 if (obj && !PythonQtSlotFunction_Check(obj)) {
5406 static const char* argumentList[] ={"bool" , "QObject*" , "QEvent*"};
5407 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(3, argumentList);
5408 bool returnValue;
5409 void* args[3] = {NULL, (void*)&arg__1, (void*)&arg__2};
5410 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5411 if (result) {
5412 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
5413 if (args[0]!=&returnValue) {
5414 if (args[0]==NULL) {
5415 PythonQt::priv()->handleVirtualOverloadReturnError("eventFilter", methodInfo, result);
5416 } else {
5417 returnValue = *((bool*)args[0]);
5418 }
5419 }
5420 }
5421 if (result) { Py_DECREF(result); }
5422 Py_DECREF(obj);
5423 return returnValue;
5424 }
5425 }
5426 return binaryFileWidget::eventFilter(arg__1, arg__2);
5427 }
5428 void PythonQtShell_binaryFileWidget::focusInEvent(QFocusEvent* arg__1)
5429 {
5430 if (_wrapper) {
5431 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "focusInEvent");
5432 PyErr_Clear();
5433 if (obj && !PythonQtSlotFunction_Check(obj)) {
5434 static const char* argumentList[] ={"" , "QFocusEvent*"};
5435 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5436 void* args[2] = {NULL, (void*)&arg__1};
5437 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5438 if (result) { Py_DECREF(result); }
5439 Py_DECREF(obj);
5440 return;
5441 }
5442 }
5443 binaryFileWidget::focusInEvent(arg__1);
5444 }
5445 bool PythonQtShell_binaryFileWidget::focusNextPrevChild(bool next)
5446 {
5447 if (_wrapper) {
5448 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "focusNextPrevChild");
5449 PyErr_Clear();
5450 if (obj && !PythonQtSlotFunction_Check(obj)) {
5451 static const char* argumentList[] ={"bool" , "bool"};
5452 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5453 bool returnValue;
5454 void* args[2] = {NULL, (void*)&next};
5455 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5456 if (result) {
5457 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
5458 if (args[0]!=&returnValue) {
5459 if (args[0]==NULL) {
5460 PythonQt::priv()->handleVirtualOverloadReturnError("focusNextPrevChild", methodInfo, result);
5461 } else {
5462 returnValue = *((bool*)args[0]);
5463 }
5464 }
5465 }
5466 if (result) { Py_DECREF(result); }
5467 Py_DECREF(obj);
5468 return returnValue;
5469 }
5470 }
5471 return binaryFileWidget::focusNextPrevChild(next);
5472 }
5473 void PythonQtShell_binaryFileWidget::focusOutEvent(QFocusEvent* arg__1)
5474 {
5475 if (_wrapper) {
5476 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "focusOutEvent");
5477 PyErr_Clear();
5478 if (obj && !PythonQtSlotFunction_Check(obj)) {
5479 static const char* argumentList[] ={"" , "QFocusEvent*"};
5480 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5481 void* args[2] = {NULL, (void*)&arg__1};
5482 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5483 if (result) { Py_DECREF(result); }
5484 Py_DECREF(obj);
5485 return;
5486 }
5487 }
5488 binaryFileWidget::focusOutEvent(arg__1);
5489 }
5490 bool PythonQtShell_binaryFileWidget::hasHeightForWidth() const
5491 {
5492 if (_wrapper) {
5493 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "hasHeightForWidth");
5494 PyErr_Clear();
5495 if (obj && !PythonQtSlotFunction_Check(obj)) {
5496 static const char* argumentList[] ={"bool"};
5497 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList);
5498 bool returnValue;
5499 void* args[1] = {NULL};
5500 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5501 if (result) {
5502 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
5503 if (args[0]!=&returnValue) {
5504 if (args[0]==NULL) {
5505 PythonQt::priv()->handleVirtualOverloadReturnError("hasHeightForWidth", methodInfo, result);
5506 } else {
5507 returnValue = *((bool*)args[0]);
5508 }
5509 }
5510 }
5511 if (result) { Py_DECREF(result); }
5512 Py_DECREF(obj);
5513 return returnValue;
5514 }
5515 }
5516 return binaryFileWidget::hasHeightForWidth();
5517 }
5518 int PythonQtShell_binaryFileWidget::heightForWidth(int arg__1) const
5519 {
5520 if (_wrapper) {
5521 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "heightForWidth");
5522 PyErr_Clear();
5523 if (obj && !PythonQtSlotFunction_Check(obj)) {
5524 static const char* argumentList[] ={"int" , "int"};
5525 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5526 int returnValue;
5527 void* args[2] = {NULL, (void*)&arg__1};
5528 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5529 if (result) {
5530 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
5531 if (args[0]!=&returnValue) {
5532 if (args[0]==NULL) {
5533 PythonQt::priv()->handleVirtualOverloadReturnError("heightForWidth", methodInfo, result);
5534 } else {
5535 returnValue = *((int*)args[0]);
5536 }
5537 }
5538 }
5539 if (result) { Py_DECREF(result); }
5540 Py_DECREF(obj);
5541 return returnValue;
5542 }
5543 }
5544 return binaryFileWidget::heightForWidth(arg__1);
5545 }
5546 void PythonQtShell_binaryFileWidget::hideEvent(QHideEvent* arg__1)
5547 {
5548 if (_wrapper) {
5549 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "hideEvent");
5550 PyErr_Clear();
5551 if (obj && !PythonQtSlotFunction_Check(obj)) {
5552 static const char* argumentList[] ={"" , "QHideEvent*"};
5553 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5554 void* args[2] = {NULL, (void*)&arg__1};
5555 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5556 if (result) { Py_DECREF(result); }
5557 Py_DECREF(obj);
5558 return;
5559 }
5560 }
5561 binaryFileWidget::hideEvent(arg__1);
5562 }
5563 void PythonQtShell_binaryFileWidget::initPainter(QPainter* painter) const
5564 {
5565 if (_wrapper) {
5566 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "initPainter");
5567 PyErr_Clear();
5568 if (obj && !PythonQtSlotFunction_Check(obj)) {
5569 static const char* argumentList[] ={"" , "QPainter*"};
5570 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5571 void* args[2] = {NULL, (void*)&painter};
5572 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5573 if (result) { Py_DECREF(result); }
5574 Py_DECREF(obj);
5575 return;
5576 }
5577 }
5578 binaryFileWidget::initPainter(painter);
5579 }
5580 void PythonQtShell_binaryFileWidget::inputMethodEvent(QInputMethodEvent* arg__1)
5581 {
5582 if (_wrapper) {
5583 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "inputMethodEvent");
5584 PyErr_Clear();
5585 if (obj && !PythonQtSlotFunction_Check(obj)) {
5586 static const char* argumentList[] ={"" , "QInputMethodEvent*"};
5587 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5588 void* args[2] = {NULL, (void*)&arg__1};
5589 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5590 if (result) { Py_DECREF(result); }
5591 Py_DECREF(obj);
5592 return;
5593 }
5594 }
5595 binaryFileWidget::inputMethodEvent(arg__1);
5596 }
5597 QVariant PythonQtShell_binaryFileWidget::inputMethodQuery(Qt::InputMethodQuery arg__1) const
5598 {
5599 if (_wrapper) {
5600 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "inputMethodQuery");
5601 PyErr_Clear();
5602 if (obj && !PythonQtSlotFunction_Check(obj)) {
5603 static const char* argumentList[] ={"QVariant" , "Qt::InputMethodQuery"};
5604 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5605 QVariant returnValue;
5606 void* args[2] = {NULL, (void*)&arg__1};
5607 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5608 if (result) {
5609 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
5610 if (args[0]!=&returnValue) {
5611 if (args[0]==NULL) {
5612 PythonQt::priv()->handleVirtualOverloadReturnError("inputMethodQuery", methodInfo, result);
5613 } else {
5614 returnValue = *((QVariant*)args[0]);
5615 }
5616 }
5617 }
5618 if (result) { Py_DECREF(result); }
5619 Py_DECREF(obj);
5620 return returnValue;
5621 }
5622 }
5623 return binaryFileWidget::inputMethodQuery(arg__1);
5624 }
5625 void PythonQtShell_binaryFileWidget::keyPressEvent(QKeyEvent* arg__1)
5626 {
5627 if (_wrapper) {
5628 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "keyPressEvent");
5629 PyErr_Clear();
5630 if (obj && !PythonQtSlotFunction_Check(obj)) {
5631 static const char* argumentList[] ={"" , "QKeyEvent*"};
5632 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5633 void* args[2] = {NULL, (void*)&arg__1};
5634 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5635 if (result) { Py_DECREF(result); }
5636 Py_DECREF(obj);
5637 return;
5638 }
5639 }
5640 binaryFileWidget::keyPressEvent(arg__1);
5641 }
5642 void PythonQtShell_binaryFileWidget::keyReleaseEvent(QKeyEvent* arg__1)
5643 {
5644 if (_wrapper) {
5645 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "keyReleaseEvent");
5646 PyErr_Clear();
5647 if (obj && !PythonQtSlotFunction_Check(obj)) {
5648 static const char* argumentList[] ={"" , "QKeyEvent*"};
5649 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5650 void* args[2] = {NULL, (void*)&arg__1};
5651 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5652 if (result) { Py_DECREF(result); }
5653 Py_DECREF(obj);
5654 return;
5655 }
5656 }
5657 binaryFileWidget::keyReleaseEvent(arg__1);
5658 }
5659 void PythonQtShell_binaryFileWidget::leaveEvent(QEvent* arg__1)
5660 {
5661 if (_wrapper) {
5662 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "leaveEvent");
5663 PyErr_Clear();
5664 if (obj && !PythonQtSlotFunction_Check(obj)) {
5665 static const char* argumentList[] ={"" , "QEvent*"};
5666 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5667 void* args[2] = {NULL, (void*)&arg__1};
5668 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5669 if (result) { Py_DECREF(result); }
5670 Py_DECREF(obj);
5671 return;
5672 }
5673 }
5674 binaryFileWidget::leaveEvent(arg__1);
5675 }
5676 int PythonQtShell_binaryFileWidget::metric(QPaintDevice::PaintDeviceMetric arg__1) const
5677 {
5678 if (_wrapper) {
5679 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "metric");
5680 PyErr_Clear();
5681 if (obj && !PythonQtSlotFunction_Check(obj)) {
5682 static const char* argumentList[] ={"int" , "QPaintDevice::PaintDeviceMetric"};
5683 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5684 int returnValue;
5685 void* args[2] = {NULL, (void*)&arg__1};
5686 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5687 if (result) {
5688 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
5689 if (args[0]!=&returnValue) {
5690 if (args[0]==NULL) {
5691 PythonQt::priv()->handleVirtualOverloadReturnError("metric", methodInfo, result);
5692 } else {
5693 returnValue = *((int*)args[0]);
5694 }
5695 }
5696 }
5697 if (result) { Py_DECREF(result); }
5698 Py_DECREF(obj);
5699 return returnValue;
5700 }
5701 }
5702 return binaryFileWidget::metric(arg__1);
5703 }
5704 QSize PythonQtShell_binaryFileWidget::minimumSizeHint() const
5705 {
5706 if (_wrapper) {
5707 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "getMinimumSizeHint");
5708 PyErr_Clear();
5709 if (obj && !PythonQtSlotFunction_Check(obj)) {
5710 static const char* argumentList[] ={"QSize"};
5711 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList);
5712 QSize returnValue;
5713 void* args[1] = {NULL};
5714 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5715 if (result) {
5716 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
5717 if (args[0]!=&returnValue) {
5718 if (args[0]==NULL) {
5719 PythonQt::priv()->handleVirtualOverloadReturnError("getMinimumSizeHint", methodInfo, result);
5720 } else {
5721 returnValue = *((QSize*)args[0]);
5722 }
5723 }
5724 }
5725 if (result) { Py_DECREF(result); }
5726 Py_DECREF(obj);
5727 return returnValue;
5728 }
5729 }
5730 return binaryFileWidget::minimumSizeHint();
5731 }
5732 void PythonQtShell_binaryFileWidget::mouseDoubleClickEvent(QMouseEvent* arg__1)
5733 {
5734 if (_wrapper) {
5735 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "mouseDoubleClickEvent");
5736 PyErr_Clear();
5737 if (obj && !PythonQtSlotFunction_Check(obj)) {
5738 static const char* argumentList[] ={"" , "QMouseEvent*"};
5739 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5740 void* args[2] = {NULL, (void*)&arg__1};
5741 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5742 if (result) { Py_DECREF(result); }
5743 Py_DECREF(obj);
5744 return;
5745 }
5746 }
5747 binaryFileWidget::mouseDoubleClickEvent(arg__1);
5748 }
5749 void PythonQtShell_binaryFileWidget::mouseMoveEvent(QMouseEvent* arg__1)
5750 {
5751 if (_wrapper) {
5752 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "mouseMoveEvent");
5753 PyErr_Clear();
5754 if (obj && !PythonQtSlotFunction_Check(obj)) {
5755 static const char* argumentList[] ={"" , "QMouseEvent*"};
5756 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5757 void* args[2] = {NULL, (void*)&arg__1};
5758 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5759 if (result) { Py_DECREF(result); }
5760 Py_DECREF(obj);
5761 return;
5762 }
5763 }
5764 binaryFileWidget::mouseMoveEvent(arg__1);
5765 }
5766 void PythonQtShell_binaryFileWidget::mousePressEvent(QMouseEvent* arg__1)
5767 {
5768 if (_wrapper) {
5769 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "mousePressEvent");
5770 PyErr_Clear();
5771 if (obj && !PythonQtSlotFunction_Check(obj)) {
5772 static const char* argumentList[] ={"" , "QMouseEvent*"};
5773 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5774 void* args[2] = {NULL, (void*)&arg__1};
5775 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5776 if (result) { Py_DECREF(result); }
5777 Py_DECREF(obj);
5778 return;
5779 }
5780 }
5781 binaryFileWidget::mousePressEvent(arg__1);
5782 }
5783 void PythonQtShell_binaryFileWidget::mouseReleaseEvent(QMouseEvent* arg__1)
5784 {
5785 if (_wrapper) {
5786 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "mouseReleaseEvent");
5787 PyErr_Clear();
5788 if (obj && !PythonQtSlotFunction_Check(obj)) {
5789 static const char* argumentList[] ={"" , "QMouseEvent*"};
5790 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5791 void* args[2] = {NULL, (void*)&arg__1};
5792 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5793 if (result) { Py_DECREF(result); }
5794 Py_DECREF(obj);
5795 return;
5796 }
5797 }
5798 binaryFileWidget::mouseReleaseEvent(arg__1);
5799 }
5800 void PythonQtShell_binaryFileWidget::moveEvent(QMoveEvent* arg__1)
5801 {
5802 if (_wrapper) {
5803 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "moveEvent");
5804 PyErr_Clear();
5805 if (obj && !PythonQtSlotFunction_Check(obj)) {
5806 static const char* argumentList[] ={"" , "QMoveEvent*"};
5807 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5808 void* args[2] = {NULL, (void*)&arg__1};
5809 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5810 if (result) { Py_DECREF(result); }
5811 Py_DECREF(obj);
5812 return;
5813 }
5814 }
5815 binaryFileWidget::moveEvent(arg__1);
5816 }
5817 bool PythonQtShell_binaryFileWidget::nativeEvent(const QByteArray& eventType, void* message, long* result)
5818 {
5819 if (_wrapper) {
5820 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "nativeEvent");
5821 PyErr_Clear();
5822 if (obj && !PythonQtSlotFunction_Check(obj)) {
5823 static const char* argumentList[] ={"bool" , "const QByteArray&" , "void*" , "long*"};
5824 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(4, argumentList);
5825 bool returnValue;
5826 void* args[4] = {NULL, (void*)&eventType, (void*)&message, (void*)&result};
5827 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5828 if (result) {
5829 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
5830 if (args[0]!=&returnValue) {
5831 if (args[0]==NULL) {
5832 PythonQt::priv()->handleVirtualOverloadReturnError("nativeEvent", methodInfo, result);
5833 } else {
5834 returnValue = *((bool*)args[0]);
5835 }
5836 }
5837 }
5838 if (result) { Py_DECREF(result); }
5839 Py_DECREF(obj);
5840 return returnValue;
5841 }
5842 }
5843 return binaryFileWidget::nativeEvent(eventType, message, result);
5844 }
5845 QPaintEngine* PythonQtShell_binaryFileWidget::paintEngine() const
5846 {
5847 if (_wrapper) {
5848 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "paintEngine");
5849 PyErr_Clear();
5850 if (obj && !PythonQtSlotFunction_Check(obj)) {
5851 static const char* argumentList[] ={"QPaintEngine*"};
5852 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList);
5853 QPaintEngine* returnValue;
5854 void* args[1] = {NULL};
5855 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5856 if (result) {
5857 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
5858 if (args[0]!=&returnValue) {
5859 if (args[0]==NULL) {
5860 PythonQt::priv()->handleVirtualOverloadReturnError("paintEngine", methodInfo, result);
5861 } else {
5862 returnValue = *((QPaintEngine**)args[0]);
5863 }
5864 }
5865 }
5866 if (result) { Py_DECREF(result); }
5867 Py_DECREF(obj);
5868 return returnValue;
5869 }
5870 }
5871 return binaryFileWidget::paintEngine();
5872 }
5873 void PythonQtShell_binaryFileWidget::paintEvent(QPaintEvent* arg__1)
5874 {
5875 if (_wrapper) {
5876 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "paintEvent");
5877 PyErr_Clear();
5878 if (obj && !PythonQtSlotFunction_Check(obj)) {
5879 static const char* argumentList[] ={"" , "QPaintEvent*"};
5880 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5881 void* args[2] = {NULL, (void*)&arg__1};
5882 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5883 if (result) { Py_DECREF(result); }
5884 Py_DECREF(obj);
5885 return;
5886 }
5887 }
5888 binaryFileWidget::paintEvent(arg__1);
5889 }
5890 QPaintDevice* PythonQtShell_binaryFileWidget::redirected(QPoint* offset) const
5891 {
5892 if (_wrapper) {
5893 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "redirected");
5894 PyErr_Clear();
5895 if (obj && !PythonQtSlotFunction_Check(obj)) {
5896 static const char* argumentList[] ={"QPaintDevice*" , "QPoint*"};
5897 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5898 QPaintDevice* returnValue;
5899 void* args[2] = {NULL, (void*)&offset};
5900 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5901 if (result) {
5902 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
5903 if (args[0]!=&returnValue) {
5904 if (args[0]==NULL) {
5905 PythonQt::priv()->handleVirtualOverloadReturnError("redirected", methodInfo, result);
5906 } else {
5907 returnValue = *((QPaintDevice**)args[0]);
5908 }
5909 }
5910 }
5911 if (result) { Py_DECREF(result); }
5912 Py_DECREF(obj);
5913 return returnValue;
5914 }
5915 }
5916 return binaryFileWidget::redirected(offset);
5917 }
5918 void PythonQtShell_binaryFileWidget::resizeEvent(QResizeEvent* arg__1)
5919 {
5920 if (_wrapper) {
5921 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "resizeEvent");
5922 PyErr_Clear();
5923 if (obj && !PythonQtSlotFunction_Check(obj)) {
5924 static const char* argumentList[] ={"" , "QResizeEvent*"};
5925 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5926 void* args[2] = {NULL, (void*)&arg__1};
5927 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5928 if (result) { Py_DECREF(result); }
5929 Py_DECREF(obj);
5930 return;
5931 }
5932 }
5933 binaryFileWidget::resizeEvent(arg__1);
5934 }
5935 QPainter* PythonQtShell_binaryFileWidget::sharedPainter() const
5936 {
5937 if (_wrapper) {
5938 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "sharedPainter");
5939 PyErr_Clear();
5940 if (obj && !PythonQtSlotFunction_Check(obj)) {
5941 static const char* argumentList[] ={"QPainter*"};
5942 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList);
5943 QPainter* returnValue;
5944 void* args[1] = {NULL};
5945 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5946 if (result) {
5947 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
5948 if (args[0]!=&returnValue) {
5949 if (args[0]==NULL) {
5950 PythonQt::priv()->handleVirtualOverloadReturnError("sharedPainter", methodInfo, result);
5951 } else {
5952 returnValue = *((QPainter**)args[0]);
5953 }
5954 }
5955 }
5956 if (result) { Py_DECREF(result); }
5957 Py_DECREF(obj);
5958 return returnValue;
5959 }
5960 }
5961 return binaryFileWidget::sharedPainter();
5962 }
5963 void PythonQtShell_binaryFileWidget::showEvent(QShowEvent* arg__1)
5964 {
5965 if (_wrapper) {
5966 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "showEvent");
5967 PyErr_Clear();
5968 if (obj && !PythonQtSlotFunction_Check(obj)) {
5969 static const char* argumentList[] ={"" , "QShowEvent*"};
5970 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
5971 void* args[2] = {NULL, (void*)&arg__1};
5972 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5973 if (result) { Py_DECREF(result); }
5974 Py_DECREF(obj);
5975 return;
5976 }
5977 }
5978 binaryFileWidget::showEvent(arg__1);
5979 }
5980 QSize PythonQtShell_binaryFileWidget::sizeHint() const
5981 {
5982 if (_wrapper) {
5983 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "getSizeHint");
5984 PyErr_Clear();
5985 if (obj && !PythonQtSlotFunction_Check(obj)) {
5986 static const char* argumentList[] ={"QSize"};
5987 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(1, argumentList);
5988 QSize returnValue;
5989 void* args[1] = {NULL};
5990 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
5991 if (result) {
5992 args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
5993 if (args[0]!=&returnValue) {
5994 if (args[0]==NULL) {
5995 PythonQt::priv()->handleVirtualOverloadReturnError("getSizeHint", methodInfo, result);
5996 } else {
5997 returnValue = *((QSize*)args[0]);
5998 }
5999 }
6000 }
6001 if (result) { Py_DECREF(result); }
6002 Py_DECREF(obj);
6003 return returnValue;
6004 }
6005 }
6006 return binaryFileWidget::sizeHint();
6007 }
6008 void PythonQtShell_binaryFileWidget::tabletEvent(QTabletEvent* arg__1)
6009 {
6010 if (_wrapper) {
6011 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "tabletEvent");
6012 PyErr_Clear();
6013 if (obj && !PythonQtSlotFunction_Check(obj)) {
6014 static const char* argumentList[] ={"" , "QTabletEvent*"};
6015 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
6016 void* args[2] = {NULL, (void*)&arg__1};
6017 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
6018 if (result) { Py_DECREF(result); }
6019 Py_DECREF(obj);
6020 return;
6021 }
6022 }
6023 binaryFileWidget::tabletEvent(arg__1);
6024 }
6025 void PythonQtShell_binaryFileWidget::timerEvent(QTimerEvent* arg__1)
6026 {
6027 if (_wrapper) {
6028 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "timerEvent");
6029 PyErr_Clear();
6030 if (obj && !PythonQtSlotFunction_Check(obj)) {
6031 static const char* argumentList[] ={"" , "QTimerEvent*"};
6032 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
6033 void* args[2] = {NULL, (void*)&arg__1};
6034 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
6035 if (result) { Py_DECREF(result); }
6036 Py_DECREF(obj);
6037 return;
6038 }
6039 }
6040 binaryFileWidget::timerEvent(arg__1);
6041 }
6042 void PythonQtShell_binaryFileWidget::wheelEvent(QWheelEvent* arg__1)
6043 {
6044 if (_wrapper) {
6045 PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "wheelEvent");
6046 PyErr_Clear();
6047 if (obj && !PythonQtSlotFunction_Check(obj)) {
6048 static const char* argumentList[] ={"" , "QWheelEvent*"};
6049 static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromArgumentList(2, argumentList);
6050 void* args[2] = {NULL, (void*)&arg__1};
6051 PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
6052 if (result) { Py_DECREF(result); }
6053 Py_DECREF(obj);
6054 return;
6055 }
6056 }
6057 binaryFileWidget::wheelEvent(arg__1);
6058 }
6059 binaryFileWidget* PythonQtWrapper_binaryFileWidget::new_binaryFileWidget(QWidget* parent)
6060 {
6061 return new PythonQtShell_binaryFileWidget(parent); }
6062
6063
6064
4942 6065 PythonQtShell_codeFragment::~PythonQtShell_codeFragment() {
4943 6066 PythonQtPrivate* priv = PythonQt::priv();
4944 6067 if (priv) { priv->shellClassDeleted(this); }
@@ -6,6 +6,8
6 6 #include <QWidget>
7 7 #include <SocExplorerPlot.h>
8 8 #include <abstractbinfile.h>
9 #include <binaryfile.h>
10 #include <binaryfilewidget.h>
9 11 #include <elffile.h>
10 12 #include <elffilewidget.h>
11 13 #include <elfinfowdgt.h>
@@ -125,6 +127,7 void delete_ElfFile(ElfFile* obj) { dele
125 127 bool iself(ElfFile* theWrappedObject);
126 128 bool isopened(ElfFile* theWrappedObject);
127 129 bool openFile(ElfFile* theWrappedObject, const QString& File);
130 bool sectionIsNobits(ElfFile* theWrappedObject, int index);
128 131 bool toSrec(ElfFile* theWrappedObject, const QString& File);
129 132 };
130 133
@@ -273,6 +276,8 void delete_QHexEdit(QHexEdit* obj) { de
273 276 int cursorPosition(QHexEdit* theWrappedObject);
274 277 QByteArray data(QHexEdit* theWrappedObject);
275 278 const QFont* font(QHexEdit* theWrappedObject) const;
279 int getSelectionBegin(QHexEdit* theWrappedObject);
280 int getSelectionEnd(QHexEdit* theWrappedObject);
276 281 QColor highlightingColor(QHexEdit* theWrappedObject);
277 282 int indexOf(QHexEdit* theWrappedObject, const QByteArray& ba, int from = 0) const;
278 283 void insert(QHexEdit* theWrappedObject, int i, char ch);
@@ -282,6 +287,8 void delete_QHexEdit(QHexEdit* obj) { de
282 287 bool overwriteMode(QHexEdit* theWrappedObject);
283 288 void remove(QHexEdit* theWrappedObject, int pos, int len = 1);
284 289 void replace(QHexEdit* theWrappedObject, int pos, int len, const QByteArray& after);
290 void resetSelection(QHexEdit* theWrappedObject);
291 void resetSelection(QHexEdit* theWrappedObject, int pos);
285 292 QColor selectionColor(QHexEdit* theWrappedObject);
286 293 QString selectionToReadableString(QHexEdit* theWrappedObject);
287 294 void setAddressAreaColor(QHexEdit* theWrappedObject, const QColor& color);
@@ -292,6 +299,7 void delete_QHexEdit(QHexEdit* obj) { de
292 299 void setHighlightingColor(QHexEdit* theWrappedObject, const QColor& color);
293 300 void setOverwriteMode(QHexEdit* theWrappedObject, bool arg__1);
294 301 void setReadOnly(QHexEdit* theWrappedObject, bool arg__1);
302 void setSelection(QHexEdit* theWrappedObject, int pos);
295 303 void setSelectionColor(QHexEdit* theWrappedObject, const QColor& color);
296 304 QString toReadableString(QHexEdit* theWrappedObject);
297 305 };
@@ -583,6 +591,122 void delete_abstractBinFile(abstractBinF
583 591
584 592
585 593
594 class PythonQtShell_binaryFile : public binaryFile
595 {
596 public:
597 PythonQtShell_binaryFile():binaryFile(),_wrapper(NULL) {};
598 PythonQtShell_binaryFile(const QString& File):binaryFile(File),_wrapper(NULL) {};
599 PythonQtShell_binaryFile(const QStringList& Files):binaryFile(Files),_wrapper(NULL) {};
600
601 ~PythonQtShell_binaryFile();
602
603 virtual int closeFile();
604 virtual QList<codeFragment* > getFragments();
605 virtual bool isopened();
606 virtual bool openFile(const QString& File);
607
608 PythonQtInstanceWrapper* _wrapper;
609 };
610
611 class PythonQtPublicPromoter_binaryFile : public binaryFile
612 { public:
613 inline int promoted_closeFile() { return binaryFile::closeFile(); }
614 inline QList<codeFragment* > promoted_getFragments() { return binaryFile::getFragments(); }
615 inline bool promoted_isopened() { return binaryFile::isopened(); }
616 inline bool promoted_openFile(const QString& File) { return binaryFile::openFile(File); }
617 };
618
619 class PythonQtWrapper_binaryFile : public QObject
620 { Q_OBJECT
621 public:
622 public slots:
623 binaryFile* new_binaryFile();
624 binaryFile* new_binaryFile(const QString& File);
625 binaryFile* new_binaryFile(const QStringList& Files);
626 void delete_binaryFile(binaryFile* obj) { delete obj; }
627 int closeFile(binaryFile* theWrappedObject);
628 int getFragmentAddress(binaryFile* theWrappedObject, int index);
629 bool getFragmentData(binaryFile* theWrappedObject, int index, char** buffer);
630 QString getFragmentHeader(binaryFile* theWrappedObject, int index);
631 int getFragmentSize(binaryFile* theWrappedObject, int index);
632 QList<codeFragment* > getFragments(binaryFile* theWrappedObject);
633 int getFragmentsCount(binaryFile* theWrappedObject);
634 bool isopened(binaryFile* theWrappedObject);
635 bool openFile(binaryFile* theWrappedObject, const QString& File);
636 bool openFiles(binaryFile* theWrappedObject, const QStringList& Files);
637 };
638
639
640
641
642
643 class PythonQtShell_binaryFileWidget : public binaryFileWidget
644 {
645 public:
646 PythonQtShell_binaryFileWidget(QWidget* parent = 0):binaryFileWidget(parent),_wrapper(NULL) {};
647
648 ~PythonQtShell_binaryFileWidget();
649
650 virtual void actionEvent(QActionEvent* arg__1);
651 virtual void changeEvent(QEvent* arg__1);
652 virtual void childEvent(QChildEvent* arg__1);
653 virtual void closeEvent(QCloseEvent* arg__1);
654 virtual void contextMenuEvent(QContextMenuEvent* arg__1);
655 virtual void customEvent(QEvent* arg__1);
656 virtual int devType() const;
657 virtual void dragEnterEvent(QDragEnterEvent* arg__1);
658 virtual void dragLeaveEvent(QDragLeaveEvent* arg__1);
659 virtual void dragMoveEvent(QDragMoveEvent* arg__1);
660 virtual void dropEvent(QDropEvent* arg__1);
661 virtual void enterEvent(QEvent* arg__1);
662 virtual bool event(QEvent* arg__1);
663 virtual bool eventFilter(QObject* arg__1, QEvent* arg__2);
664 virtual void focusInEvent(QFocusEvent* arg__1);
665 virtual bool focusNextPrevChild(bool next);
666 virtual void focusOutEvent(QFocusEvent* arg__1);
667 virtual bool hasHeightForWidth() const;
668 virtual int heightForWidth(int arg__1) const;
669 virtual void hideEvent(QHideEvent* arg__1);
670 virtual void initPainter(QPainter* painter) const;
671 virtual void inputMethodEvent(QInputMethodEvent* arg__1);
672 virtual QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const;
673 virtual void keyPressEvent(QKeyEvent* arg__1);
674 virtual void keyReleaseEvent(QKeyEvent* arg__1);
675 virtual void leaveEvent(QEvent* arg__1);
676 virtual int metric(QPaintDevice::PaintDeviceMetric arg__1) const;
677 virtual QSize minimumSizeHint() const;
678 virtual void mouseDoubleClickEvent(QMouseEvent* arg__1);
679 virtual void mouseMoveEvent(QMouseEvent* arg__1);
680 virtual void mousePressEvent(QMouseEvent* arg__1);
681 virtual void mouseReleaseEvent(QMouseEvent* arg__1);
682 virtual void moveEvent(QMoveEvent* arg__1);
683 virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result);
684 virtual QPaintEngine* paintEngine() const;
685 virtual void paintEvent(QPaintEvent* arg__1);
686 virtual QPaintDevice* redirected(QPoint* offset) const;
687 virtual void resizeEvent(QResizeEvent* arg__1);
688 virtual QPainter* sharedPainter() const;
689 virtual void showEvent(QShowEvent* arg__1);
690 virtual QSize sizeHint() const;
691 virtual void tabletEvent(QTabletEvent* arg__1);
692 virtual void timerEvent(QTimerEvent* arg__1);
693 virtual void wheelEvent(QWheelEvent* arg__1);
694
695 PythonQtInstanceWrapper* _wrapper;
696 };
697
698 class PythonQtWrapper_binaryFileWidget : public QObject
699 { Q_OBJECT
700 public:
701 public slots:
702 binaryFileWidget* new_binaryFileWidget(QWidget* parent = 0);
703 void delete_binaryFileWidget(binaryFileWidget* obj) { delete obj; }
704 };
705
706
707
708
709
586 710 class PythonQtShell_codeFragment : public codeFragment
587 711 {
588 712 public:
@@ -606,10 +730,10 void py_set_size(codeFragment* theWrappe
606 730 quint64 py_get_size(codeFragment* theWrappedObject){ return theWrappedObject->size; }
607 731 void py_set_header(codeFragment* theWrappedObject, QString header){ theWrappedObject->header = header; }
608 732 QString py_get_header(codeFragment* theWrappedObject){ return theWrappedObject->header; }
733 void py_set_data(codeFragment* theWrappedObject, char* data){ theWrappedObject->data = data; }
734 char* py_get_data(codeFragment* theWrappedObject){ return theWrappedObject->data; }
609 735 void py_set_address(codeFragment* theWrappedObject, quint64 address){ theWrappedObject->address = address; }
610 736 quint64 py_get_address(codeFragment* theWrappedObject){ return theWrappedObject->address; }
611 void py_set_data(codeFragment* theWrappedObject, char* data){ theWrappedObject->data = data; }
612 char* py_get_data(codeFragment* theWrappedObject){ return theWrappedObject->data; }
613 737 };
614 738
615 739
@@ -12,6 +12,9 PythonQt::priv()->registerClass(&SocExpl
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 14 PythonQt::priv()->registerClass(&abstractBinFile::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_abstractBinFile>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_abstractBinFile>, module, 0);
15 PythonQt::priv()->registerClass(&binaryFile::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_binaryFile>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_binaryFile>, module, 0);
16 PythonQt::self()->addParentClass("binaryFile", "abstractBinFile",PythonQtUpcastingOffset<binaryFile,abstractBinFile>());
17 PythonQt::priv()->registerClass(&binaryFileWidget::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_binaryFileWidget>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_binaryFileWidget>, module, 0);
15 18 PythonQt::priv()->registerCPPClass("codeFragment", "", "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_codeFragment>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_codeFragment>, module, 0);
16 19 PythonQt::priv()->registerClass(&elfFileWidget::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_elfFileWidget>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_elfFileWidget>, module, 0);
17 20 PythonQt::priv()->registerClass(&elfInfoWdgt::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_elfInfoWdgt>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_elfInfoWdgt>, module, 0);
@@ -18,6 +18,7
18 18 <object-type name="TCP_Terminal_Client" />
19 19 <object-type name="codeFragment" />
20 20 <object-type name="srecFile" />
21 <object-type name="binaryFile" />
21 22 <rejection class="Elf_Section"/>
22 23 <object-type name="elfparser" />
23 24 <interface-type name="abstractBinFile">
@@ -44,6 +45,12
44 45 <include file-name="QObject" location="global"/>
45 46 </extra-includes>
46 47 </object-type>
48 <object-type name="binaryFileWidget">
49 <extra-includes>
50 <include file-name="QWidget" location="global"/>
51 <include file-name="QObject" location="global"/>
52 </extra-includes>
53 </object-type>
47 54 <object-type name="elfInfoWdgt">
48 55 <extra-includes>
49 56 <include file-name="QWidget" location="global"/>
@@ -3,4 +3,4
3 3 #export QTDIR=/usr/include
4 4 #export QTDIR=/usr/include/qt5
5 5
6 pythonqt_generator --include-paths=./elf:./srec:/usr/include/qt5:/usr/include/qt5/QtCore:/usr/include/qt5/QtWidgets --output-directory=pythonQtOut PySocExplorer.h pythonQtgeneratorCfg.txt
6 pythonqt_generator --include-paths=./elf:./srec:./BinFile:/usr/include/qt5:/usr/include/qt5/QtCore:/usr/include/qt5/QtWidgets --output-directory=pythonQtOut PySocExplorer.h pythonQtgeneratorCfg.txt
@@ -174,6 +174,31 void QHexEdit::setFont(const QFont &font
174 174 qHexEdit_p->setFont(font);
175 175 }
176 176
177 void QHexEdit::resetSelection(int pos)
178 {
179 qHexEdit_p->resetSelection(pos);
180 }
181
182 void QHexEdit::resetSelection()
183 {
184 qHexEdit_p->resetSelection();
185 }
186
187 void QHexEdit::setSelection(int pos)
188 {
189 qHexEdit_p->setSelection(pos);
190 }
191
192 int QHexEdit::getSelectionBegin()
193 {
194 return qHexEdit_p->getSelectionBegin();
195 }
196
197 int QHexEdit::getSelectionEnd()
198 {
199 return qHexEdit_p->getSelectionEnd();
200 }
201
177 202 const QFont & QHexEdit::font() const
178 203 {
179 204 return qHexEdit_p->font();
@@ -179,6 +179,12 public:
179 179 const QFont &font() const;
180 180 void setFont(const QFont &);
181 181 /*! \endcond docNever */
182 //Added by Alexis Jeandet to manage selection outside of qhexedit
183 void resetSelection(int pos); // set selectionStart and selectionEnd to pos
184 void resetSelection(); // set selectionEnd to selectionStart
185 void setSelection(int pos); // set min (if below init) or max (if greater init)
186 int getSelectionBegin();
187 int getSelectionEnd();
182 188
183 189 public slots:
184 190 /*! Redoes the last operation. If there is no operation to redo, i.e.
@@ -66,6 +66,13 public:
66 66 QString toRedableString();
67 67 QString selectionToReadableString();
68 68
69 void resetSelection(int pos); // set selectionStart and selectionEnd to pos
70 void resetSelection(); // set selectionEnd to selectionStart
71 void setSelection(int pos); // set min (if below init) or max (if greater init)
72 int getSelectionBegin();
73 int getSelectionEnd();
74
75
69 76 signals:
70 77 void currentAddressChanged(int address);
71 78 void currentSizeChanged(int size);
@@ -81,11 +88,6 protected:
81 88
82 89 int cursorPos(QPoint pos); // calc cursorpos from graphics position. DOES NOT STORE POSITION
83 90
84 void resetSelection(int pos); // set selectionStart and selectionEnd to pos
85 void resetSelection(); // set selectionEnd to selectionStart
86 void setSelection(int pos); // set min (if below init) or max (if greater init)
87 int getSelectionBegin();
88 int getSelectionEnd();
89 91
90 92
91 93 private slots:
@@ -1,3 +1,24
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 22 #include "srecfile.h"
2 23 #include <QTextStream>
3 24
@@ -63,6 +84,7 int srecFile::closeFile()
63 84 }
64 85 p_files.clear();
65 86 p_fileName.clear();
87 return 0;
66 88 }
67 89
68 90 QList<codeFragment *> srecFile::getFragments()
@@ -1,3 +1,24
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 22 #ifndef SRECFILE_H
2 23 #define SRECFILE_H
3 24
@@ -1,3 +1,24
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 22 #include "srecfilewidget.h"
2 23 #include "ui_srecfilewidget.h"
3 24 #include <QTableWidgetItem>
@@ -9,6 +30,7 srecFileWidget::srecFileWidget(QWidget *
9 30 {
10 31 ui->setupUi(this);
11 32 connect(this->ui->fragmentsList,SIGNAL(cellActivated(int,int)),this,SLOT(recordCellActivated(int,int)));
33 this->setWindowTitle("SocExplorer SREC viewer");
12 34 }
13 35
14 36 srecFileWidget::~srecFileWidget()
@@ -61,6 +83,7 void srecFileWidget::recordCellActivated
61 83 {
62 84 this->p_srec->getFragmentData(index,&buff);
63 85 this->ui->fragmentHexView->setData(QByteArray(buff,this->p_srec->getFragmentSize(index)));
86 this->ui->fragmentHexView->setAddressOffset(this->p_srec->getFragmentAddress(index));
64 87 }
65 88
66 89 }
@@ -1,3 +1,24
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 22 #ifndef SRECFILEWIDGET_H
2 23 #define SRECFILEWIDGET_H
3 24
@@ -14,56 +14,59
14 14 <string>Form</string>
15 15 </property>
16 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>
17 <item row="0" column="0">
18 <widget class="QSplitter" name="splitter">
19 <property name="orientation">
20 <enum>Qt::Horizontal</enum>
21 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>
22 <widget class="QGroupBox" name="groupBox">
23 <property name="title">
24 <string>Hexadecimal Viewer</string>
25 </property>
26 <layout class="QVBoxLayout" name="verticalLayout">
27 <item>
28 <widget class="QHexEdit" name="fragmentHexView" native="true">
29 <property name="minimumSize">
30 <size>
31 <width>256</width>
32 <height>0</height>
33 </size>
38 34 </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>
35 </widget>
36 </item>
37 </layout>
38 </widget>
39 <widget class="QGroupBox" name="groupBox_2">
40 <property name="title">
41 <string>SREC records list</string>
42 </property>
43 <layout class="QVBoxLayout" name="verticalLayout_2">
44 <item>
45 <widget class="QTableWidget" name="fragmentsList">
46 <column>
47 <property name="text">
48 <string>Index</string>
49 </property>
50 </column>
51 <column>
52 <property name="text">
53 <string>Address</string>
54 </property>
55 </column>
56 <column>
57 <property name="text">
58 <string>Size</string>
59 </property>
60 </column>
61 <column>
62 <property name="text">
63 <string>Header</string>
64 </property>
65 </column>
66 </widget>
67 </item>
68 </layout>
69 </widget>
67 70 </widget>
68 71 </item>
69 72 </layout>
@@ -23,6 +23,7 INCLUDEPATH+=$${PWD} \
23 23 $${PWD}/common/QCustomPlot \
24 24 $${PWD}/common/elf \
25 25 $${PWD}/common/srec \
26 $${PWD}/common/BinFile \
26 27 SocExplorerEngine/engine \
27 28 SocExplorerEngine/pluginloader \
28 29 SocExplorerEngine/pluginsInterface \
General Comments 0
You need to be logged in to leave comments. Login now