| 1234567891011121314151617181920212223242526272829303132333435363738 |
- #include "mainwindow.h"
- #include <QApplication>
- #include <iostream>
- #include "xmlparam.h"
- #include "ivlog.h"
- #include "ivfault.h"
- iv::Ivlog * givlog;
- iv::Ivfault * givfault;
- std::string gstrmemname;
- static std::string gstrmodulename;
- int main(int argc, char *argv[])
- {
- QApplication a(argc, argv);
- QString strpath = QCoreApplication::applicationDirPath();
- if(argc < 2)
- strpath = strpath + "/sample1.xml";
- else
- strpath = argv[1];
- std::cout<<strpath.toStdString()<<std::endl;
- iv::xmlparam::Xmlparam xp(strpath.toStdString());
- gstrmodulename = xp.GetParam("modulename","sample1");
- gstrmemname = xp.GetParam("msgname","sample1");
- givlog = new iv::Ivlog(gstrmodulename.data());
- givfault = new iv::Ivfault(gstrmodulename.data());
- // strmodulename =
- MainWindow w;
- w.show();
- return a.exec();
- }
|