Changeset e493054 for src/gui/mainwindow.cpp
- Timestamp:
- 01/21/10 15:41:03 (13 years ago)
- Branches:
- master, qt5
- Children:
- e89b296
- Parents:
- 9d8946b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/mainwindow.cpp
r9d8946b re493054 5 5 6 6 #include <sqlengine.h> 7 #include <schedulexmlparser.h>8 7 9 8 #include <track.h> … … 17 16 #include "eventdialog.h" 18 17 #include "daynavigatorwidget.h" 18 #include "importscheduledialog.h" 19 19 #include "mapwindow.h" 20 20 … … 35 35 mSqlEngine = new SqlEngine(this); 36 36 mSqlEngine->initialize(); 37 38 mXmlParser = new ScheduleXmlParser(this);39 connect(mXmlParser, SIGNAL(progressStatus(int)), this, SLOT(showParsingProgress(int)));40 statusBar()->showMessage(tr("Ready"));41 37 42 38 //update track map … … 141 137 mSqlEngine = NULL; 142 138 } 143 if(mXmlParser)144 {145 delete mXmlParser;146 mXmlParser = NULL;147 }148 139 } 149 140 150 141 void MainWindow::importSchedule() 151 142 { 152 QFile file(":/schedule.en.xml"); 153 if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) 154 { 155 qDebug() << "can't open " << file.fileName(); 156 return; 157 } 158 159 QByteArray data = file.readAll(); 160 mXmlParser->parseData(data,mSqlEngine); 161 143 ImportScheduleDialog dialog(mSqlEngine,this); 144 dialog.exec(); 145 162 146 if(Conference::getAll().count()) 163 147 { … … 172 156 } 173 157 174 void MainWindow::showParsingProgress(int aStatus)175 {176 QString msg = QString("Parsing completed: %1\%").arg(aStatus);177 statusBar()->showMessage(msg,1000);178 }179 180 158 void MainWindow::aboutApp() 181 159 {
Note: See TracChangeset
for help on using the changeset viewer.