X-Git-Url: https://git.toastfreeware.priv.at/toast/confclerk.git/blobdiff_plain/9d8946b6d0c7c6ff1abee00dba12046f593e26f8..e493054ef20193682b0c27d412df67ab3e067e3c:/src/gui/mainwindow.cpp diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index dd21ee9..7f2da94 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -4,7 +4,6 @@ #include #include -#include #include #include @@ -16,6 +15,7 @@ #include "ui_about.h" #include "eventdialog.h" #include "daynavigatorwidget.h" +#include "importscheduledialog.h" #include "mapwindow.h" const int confId = 1; @@ -35,10 +35,6 @@ MainWindow::MainWindow(int aEventId, QWidget *aParent) mSqlEngine = new SqlEngine(this); mSqlEngine->initialize(); - mXmlParser = new ScheduleXmlParser(this); - connect(mXmlParser, SIGNAL(progressStatus(int)), this, SLOT(showParsingProgress(int))); - statusBar()->showMessage(tr("Ready")); - //update track map Track::updateTrackMap(); @@ -140,25 +136,13 @@ MainWindow::~MainWindow() delete mSqlEngine; mSqlEngine = NULL; } - if(mXmlParser) - { - delete mXmlParser; - mXmlParser = NULL; - } } void MainWindow::importSchedule() { - QFile file(":/schedule.en.xml"); - if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) - { - qDebug() << "can't open " << file.fileName(); - return; - } - - QByteArray data = file.readAll(); - mXmlParser->parseData(data,mSqlEngine); - + ImportScheduleDialog dialog(mSqlEngine,this); + dialog.exec(); + if(Conference::getAll().count()) { // 'dayNavigator' emits signal 'dateChanged' after setting valid START:END dates @@ -171,12 +155,6 @@ void MainWindow::importSchedule() } } -void MainWindow::showParsingProgress(int aStatus) -{ - QString msg = QString("Parsing completed: %1\%").arg(aStatus); - statusBar()->showMessage(msg,1000); -} - void MainWindow::aboutApp() { QDialog dialog(this);