parent
d810b413a1
commit
5d44332c13
|
|
@ -1,23 +1,8 @@
|
|||
//#include <QApplication>
|
||||
#include <QtCore>
|
||||
//#include "./line_loss.h"
|
||||
#include <QtCore>
|
||||
#include "mainfun.cpp"
|
||||
#include <iostream>
|
||||
int callmain(char * args)
|
||||
{
|
||||
//QApplication a(argn,args);
|
||||
//line_loss w(0);
|
||||
//w.show();
|
||||
//std::cout<<argn<<" parameters."<<std::endl;
|
||||
// if(!QFile::exists(args[1]))
|
||||
// {
|
||||
// std::cout<<args[1]<<" not exist."<<std::endl;
|
||||
// return -1;
|
||||
// }
|
||||
//std::cout<<"parseing "<<args[1]<<std::endl;
|
||||
mainfun(args);
|
||||
//return a.exec();
|
||||
return 0;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,39 +7,10 @@
|
|||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <QTextStream>
|
||||
//extern vector<QString> ResContainer;
|
||||
//extern vector<QString> Notfound;
|
||||
|
||||
//extern int i1;
|
||||
//extern int i2;
|
||||
//extern int i3;
|
||||
//extern int i4;
|
||||
//extern int i5;
|
||||
//extern int i6;
|
||||
//extern int i7;
|
||||
//extern int i8;
|
||||
//extern int i9;
|
||||
//extern int i10;
|
||||
//extern int i11;
|
||||
//extern int i12;
|
||||
//extern int i13;
|
||||
//extern int i14;
|
||||
//extern int i15;
|
||||
//extern int i16;
|
||||
//extern int i17;
|
||||
//extern int i18;
|
||||
//extern int i19;
|
||||
#include "qt_readxml.h"
|
||||
int mainfun(const QString &CIMFile)
|
||||
{
|
||||
// QTextCodec::setCodecForCStrings(QTextCodec::codecForName("GBK"));
|
||||
// QTextCodec::setCodecForLocale(QTextCodec::codecForName("GBK"));
|
||||
// QTextCodec::setCodecForTr(QTextCodec::codecForName("GBK"));
|
||||
//QCoreApplication a(argc, argv);
|
||||
//QTextCodec::setCodecForTr(QTextCodec::codecForName("gb18030"));
|
||||
//QString CircuitName="朝电914";
|
||||
std::cout<<"parseing "<<CIMFile.toLocal8Bit().data()<<std::endl;
|
||||
|
||||
QFile file(CIMFile);
|
||||
Qt_readxml reader;
|
||||
if(file.open(QIODevice::ReadOnly))
|
||||
|
|
|
|||
Loading…
Reference in New Issue