@@ -15,7 +15,6 void PythonQt_init_PySocExplorerEngine(P | |||||
15 | PythonConsole::PythonConsole(socexplorerproxy *proxy, QWidget *parent) : |
|
15 | PythonConsole::PythonConsole(socexplorerproxy *proxy, QWidget *parent) : | |
16 | QWidget(parent) |
|
16 | QWidget(parent) | |
17 | { |
|
17 | { | |
18 | //PythonQt::init(); |
|
|||
19 | PythonQt::init(PythonQt::RedirectStdOut); |
|
18 | PythonQt::init(PythonQt::RedirectStdOut); | |
20 | PythonQt_QtAll::init(); |
|
19 | PythonQt_QtAll::init(); | |
21 | this->proxy = proxy; |
|
20 | this->proxy = proxy; | |
@@ -25,7 +24,6 PythonConsole::PythonConsole(socexplorer | |||||
25 | this->console = new PythonQtScriptingConsoleDandD(NULL, PythonQt::self()->getMainModule()); |
|
24 | this->console = new PythonQtScriptingConsoleDandD(NULL, PythonQt::self()->getMainModule()); | |
26 | this->mainlayout->addWidget(this->console); |
|
25 | this->mainlayout->addWidget(this->console); | |
27 | this->setWindowTitle(tr("Python Scripting Console")); |
|
26 | this->setWindowTitle(tr("Python Scripting Console")); | |
28 | this->bussdriver = 0; |
|
|||
29 | this->setAcceptDrops(true); |
|
27 | this->setAcceptDrops(true); | |
30 | this->setLayout(this->mainlayout); |
|
28 | this->setLayout(this->mainlayout); | |
31 | connect(this->console,SIGNAL(pyConsoleRunFiles(QStringList)),this,SLOT(pyConsoleRunFiles(QStringList))); |
|
29 | connect(this->console,SIGNAL(pyConsoleRunFiles(QStringList)),this,SLOT(pyConsoleRunFiles(QStringList))); | |
@@ -45,13 +43,6 void PythonConsole::removeVariable(const | |||||
45 | this->mainContext->removeVariable(name); |
|
43 | this->mainContext->removeVariable(name); | |
46 | } |
|
44 | } | |
47 |
|
45 | |||
48 |
|
||||
49 | void PythonConsole::setBussDriver(socexplorerplugin *driver) |
|
|||
50 | { |
|
|||
51 | this->bussdriver = driver; |
|
|||
52 | this->mainContext->addObject("buss", this->bussdriver); |
|
|||
53 | } |
|
|||
54 |
|
||||
55 | void PythonConsole::registerObject(QObject* object,const QString& instanceName) |
|
46 | void PythonConsole::registerObject(QObject* object,const QString& instanceName) | |
56 | { |
|
47 | { | |
57 | this->mainContext->addObject(instanceName,object); |
|
48 | this->mainContext->addObject(instanceName,object); | |
@@ -72,13 +63,6 void PythonConsole::removeDriver(const Q | |||||
72 | this->mainContext->removeVariable(instanceName); |
|
63 | this->mainContext->removeVariable(instanceName); | |
73 | } |
|
64 | } | |
74 |
|
65 | |||
75 | void PythonConsole::removeBussDriver() |
|
|||
76 | { |
|
|||
77 | this->bussdriver = 0; |
|
|||
78 | this->mainContext->removeVariable("buss"); |
|
|||
79 | emit this->rootDriverDelete(); |
|
|||
80 | } |
|
|||
81 |
|
||||
82 |
|
66 | |||
83 | void PythonConsole::pyConsoleRunFiles(const QStringList & pathList) |
|
67 | void PythonConsole::pyConsoleRunFiles(const QStringList & pathList) | |
84 | { |
|
68 | { |
@@ -49,8 +49,6 public: | |||||
49 | signals: |
|
49 | signals: | |
50 | void rootDriverDelete(); |
|
50 | void rootDriverDelete(); | |
51 | public slots: |
|
51 | public slots: | |
52 | void setBussDriver(socexplorerplugin* driver); |
|
|||
53 | void removeBussDriver(); |
|
|||
54 | void removeDriver(const QString& instanceName); |
|
52 | void removeDriver(const QString& instanceName); | |
55 | void pyConsoleRunFiles(const QStringList&); |
|
53 | void pyConsoleRunFiles(const QStringList&); | |
56 | void pyConsoleRunFile(const QString& fileName); |
|
54 | void pyConsoleRunFile(const QString& fileName); | |
@@ -63,11 +61,9 protected: | |||||
63 |
|
61 | |||
64 | private: |
|
62 | private: | |
65 | QHBoxLayout* mainlayout; |
|
63 | QHBoxLayout* mainlayout; | |
66 | socexplorerplugin* bussdriver; |
|
|||
67 | PythonQtScriptingConsoleDandD* console; |
|
64 | PythonQtScriptingConsoleDandD* console; | |
68 | PythonQtObjectPtr* mainContext; |
|
65 | PythonQtObjectPtr* mainContext; | |
69 | socexplorerproxy* proxy; |
|
66 | socexplorerproxy* proxy; | |
70 | //LPMONMainWindow* mainwin; |
|
|||
71 | }; |
|
67 | }; | |
72 |
|
68 | |||
73 | #endif // PYTHONCONSOLE_H |
|
69 | #endif // PYTHONCONSOLE_H |
@@ -97,47 +97,3 void pluginmanagerWDGT::setChildLoadable | |||||
97 |
|
97 | |||
98 |
|
98 | |||
99 |
|
99 | |||
100 | void pluginmanagerWDGT::addPlugin() |
|
|||
101 | { |
|
|||
102 | // /!\ TODO update it remove maximum operation from widget |
|
|||
103 | // QString fileName = QFileDialog::getOpenFileName(this,tr("Open Plugin"), QDir::homePath(), tr("Plugin Files Files (*.dll *.so *.so.*)")); |
|
|||
104 | // if(pluginloader::checklibrary(fileName)) |
|
|||
105 | // { |
|
|||
106 | // QFile::copy(fileName,QString(SocExplorerEngine::pluginFolder())+"/"+ fileName.section('/',-1)); |
|
|||
107 | // } |
|
|||
108 | // this->pluginTable->refreshPluginList(); |
|
|||
109 | } |
|
|||
110 |
|
||||
111 |
|
||||
112 | void pluginmanagerWDGT::removePlugin() |
|
|||
113 | { |
|
|||
114 | // for(int i=0;i<this->pluginTable->selectedItems().count();i++) |
|
|||
115 | // { |
|
|||
116 | // QListWidgetItem* item = this->pluginTable->selectedItems().at(i); |
|
|||
117 | // if(item!=NULL) |
|
|||
118 | // { |
|
|||
119 | // QFile::remove(QString(SocExplorerEngine::pluginFolder())+"/"+item->text()); |
|
|||
120 | // } |
|
|||
121 | // } |
|
|||
122 | // this->pluginTable->refreshPluginList(); |
|
|||
123 | } |
|
|||
124 |
|
||||
125 |
|
||||
126 |
|
||||
127 | void pluginmanagerWDGT::loadplugin() |
|
|||
128 | { |
|
|||
129 | // for(int i=0;i<this->pluginTable->selectedItems().count();i++) |
|
|||
130 | // { |
|
|||
131 | // QListWidgetItem* item = this->pluginTable->selectedItems().at(i); |
|
|||
132 | // if(item!=NULL) |
|
|||
133 | // { |
|
|||
134 | // QString plugin = QString(SocExplorerEngine::pluginFolder())+"/"+item->text(); |
|
|||
135 | // emit this->loadSysDrviver(plugin); |
|
|||
136 | // } |
|
|||
137 | // } |
|
|||
138 | // this->pluginTable->refreshPluginList(); |
|
|||
139 | } |
|
|||
140 |
|
||||
141 |
|
||||
142 |
|
||||
143 |
|
@@ -66,11 +66,7 signals: | |||||
66 | void pluginselected(const QString& instanceName); |
|
66 | void pluginselected(const QString& instanceName); | |
67 |
|
67 | |||
68 | public slots: |
|
68 | public slots: | |
69 | //void libselected(int row); |
|
69 | ||
70 | void addPlugin(); |
|
|||
71 | void removePlugin(); |
|
|||
72 | void loadplugin(); |
|
|||
73 | //void loadplugin(QListWidgetItem*); |
|
|||
74 |
|
70 | |||
75 | private: |
|
71 | private: | |
76 |
|
72 |
@@ -262,4 +262,3 bool socexplorerplugin::dumpMemory(unsig | |||||
262 | return false; |
|
262 | return false; | |
263 | } |
|
263 | } | |
264 |
|
264 | |||
265 |
|
@@ -157,10 +157,10 public slots: | |||||
157 | virtual void setInstanceName(const QString& newName); |
|
157 | virtual void setInstanceName(const QString& newName); | |
158 |
|
158 | |||
159 | virtual bool dumpMemory(unsigned int address,unsigned int count,QString file); |
|
159 | virtual bool dumpMemory(unsigned int address,unsigned int count,QString file); | |
|
160 | virtual bool dumpMemory(unsigned int address,unsigned int count,QString file,const QString& format); | |||
160 | virtual bool memSet(unsigned int address,int value, unsigned int count); |
|
161 | virtual bool memSet(unsigned int address,int value, unsigned int count); | |
161 | virtual bool loadbin(unsigned int address,QString file); |
|
162 | virtual bool loadbin(unsigned int address,QString file); | |
162 | virtual bool loadfile(abstractBinFile* file); |
|
163 | virtual bool loadfile(abstractBinFile* file); | |
163 | virtual bool dumpMemory(unsigned int address,unsigned int count,QString file,const QString& format); |
|
|||
164 | QVariantList Read(unsigned int address, unsigned int count); |
|
164 | QVariantList Read(unsigned int address, unsigned int count); | |
165 | void Write(unsigned int address, QList<QVariant> dataList); |
|
165 | void Write(unsigned int address, QList<QVariant> dataList); | |
166 | socexplorerplugin* parentPlugin(){return this->parent;} |
|
166 | socexplorerplugin* parentPlugin(){return this->parent;} |
@@ -40,13 +40,13 QCommandLineOption executeOption = QComm | |||||
40 |
|
40 | |||
41 | QCommandLineOption debugLevelOption = QCommandLineOption ( |
|
41 | QCommandLineOption debugLevelOption = QCommandLineOption ( | |
42 | QStringList() << "d" << "debug-level", |
|
42 | QStringList() << "d" << "debug-level", | |
43 | QCoreApplication::translate("main", "Execute given script <script>."), |
|
43 | QCoreApplication::translate("main", "Sets debug level to <level>, higher the level is more verbose the application will be."), | |
44 |
QCoreApplication::translate("main", " |
|
44 | QCoreApplication::translate("main", "level"), | |
45 | "1"); |
|
45 | "1"); | |
46 |
|
46 | |||
47 | QCommandLineOption noGUIOption = QCommandLineOption ( |
|
47 | QCommandLineOption noGUIOption = QCommandLineOption ( | |
48 | QStringList() << "n" << "no-gui", |
|
48 | QStringList() << "n" << "no-gui", | |
49 | QCoreApplication::translate("main", "Starts SocExplorer in batch mode.")); |
|
49 | QCoreApplication::translate("main", "Starts SocExplorer in batch mode[not fully implemented yet!].")); | |
50 |
|
50 | |||
51 | const char* socexplorerDesc="\ |
|
51 | const char* socexplorerDesc="\ | |
52 | SocExplorer is an open source generic System On Chip testing software/framework.\ |
|
52 | SocExplorer is an open source generic System On Chip testing software/framework.\ | |
@@ -73,6 +73,7 int main(int argc, char *argv[]) | |||||
73 | parser.addHelpOption(); |
|
73 | parser.addHelpOption(); | |
74 | parser.addVersionOption(); |
|
74 | parser.addVersionOption(); | |
75 | bool noGUI=false; |
|
75 | bool noGUI=false; | |
|
76 | parser.addPositionalArgument("file", QCoreApplication::translate("main", "The Python file to execute.")); | |||
76 | parser.addOption(executeOption); |
|
77 | parser.addOption(executeOption); | |
77 | parser.addOption(debugLevelOption); |
|
78 | parser.addOption(debugLevelOption); | |
78 | parser.addOption(noGUIOption); |
|
79 | parser.addOption(noGUIOption); | |
@@ -85,6 +86,14 int main(int argc, char *argv[]) | |||||
85 | scriptToEval.clear(); |
|
86 | scriptToEval.clear(); | |
86 | } |
|
87 | } | |
87 | } |
|
88 | } | |
|
89 | else | |||
|
90 | { | |||
|
91 | scriptToEval = parser.positionalArguments().first(); | |||
|
92 | if(!QFile::exists(scriptToEval)) | |||
|
93 | { | |||
|
94 | scriptToEval.clear(); | |||
|
95 | } | |||
|
96 | } | |||
88 | if(parser.isSet(debugLevelOption)) |
|
97 | if(parser.isSet(debugLevelOption)) | |
89 | { |
|
98 | { | |
90 | bool success; |
|
99 | bool success; |
@@ -8,10 +8,10 GenericName=Soc Explorer | |||||
8 |
|
8 | |||
9 | Comment=Software to monitor and explore Soc devices. |
|
9 | Comment=Software to monitor and explore Soc devices. | |
10 |
|
10 | |||
11 |
Exec=socexplorer |
|
11 | Exec=socexplorer %U | |
12 | Icon=/usr/share/SocExplorer/icon.png |
|
12 | Icon=/usr/share/SocExplorer/icon.png | |
13 | Terminal=false |
|
13 | Terminal=false | |
14 |
|
14 | |||
15 |
Categories= |
|
15 | Categories=Development;Engineering; | |
16 |
|
16 | |||
17 | MimeType=text/x-python; |
|
17 | MimeType=text/x-python; |
General Comments 0
You need to be logged in to leave comments.
Login now