1 #ifndef __VHDLCONVERTER_H__
\r
2 #define __VHDLCONVERTER_H__
\r
11 #include <QTextStream>
\r
13 #include "Parameters.h"
\r
14 #include "Exception.h"
\r
15 #include "ReferenceBlock.h"
\r
16 #include "IfacePurposeDelegate.h"
\r
18 class VHDLConverter : public QWidget {
\r
21 explicit VHDLConverter(QWidget *parent = 0);
\r
25 QPushButton* loadBut;
\r
26 QPushButton* genBut;
\r
31 QLineEdit* editEntityName;
\r
32 QLineEdit* editLongName;
\r
34 // data ports related
\r
35 QScrollArea *scrollPorts;
\r
36 QTableWidget* twPorts;
\r
37 IfacePurposeDelegate* purposeDelegate;
\r
40 QScrollArea* scrollGenerics;
\r
41 QTableWidget* twGenerics;
\r
45 QList<QString> archLines;
\r
47 // libraries related
\r
48 QHash<QString,QList<QString>* > packages;
\r
50 QTextEdit *teBrief, *teDesc;
\r
52 ReferenceBlock* block;
\r
54 QList<AbstractInterface*> lstIface;
\r
56 QString readLibraries(QTextStream& in) throw(Exception);
\r
57 QString readEntity(QTextStream& in) throw(Exception);
\r
58 void readGenerics(QTextStream& in) throw(Exception);
\r
59 void readPorts(QTextStream& in) throw(Exception);
\r
60 void readArchitecture(QTextStream& in) throw(Exception);
\r
62 QString skipBlankAndComments(QTextStream& in);
\r
64 void generateRefXml(QDomDocument& doc);
\r
65 void generateImplXml(QDomDocument& doc);
\r
66 void replaceSignalNames(QString& line);
\r
68 void updateArchitecture();
\r
73 void loadVHDLFile();
\r
77 void searchAssociatedPort(QTableWidgetItem* item);
\r
80 #endif // __VHDLCONVERTER_H__
\r