Ignore:
Timestamp:
01/21/10 15:41:03 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
e89b296
Parents:
9d8946b
Message:

import/search schedule dialog implemented

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/mainwindow.cpp

    r9d8946b re493054  
    55
    66#include <sqlengine.h>
    7 #include <schedulexmlparser.h>
    87
    98#include <track.h>
     
    1716#include "eventdialog.h"
    1817#include "daynavigatorwidget.h"
     18#include "importscheduledialog.h"
    1919#include "mapwindow.h"
    2020
     
    3535    mSqlEngine = new SqlEngine(this);
    3636    mSqlEngine->initialize();
    37 
    38     mXmlParser = new ScheduleXmlParser(this);
    39     connect(mXmlParser, SIGNAL(progressStatus(int)), this, SLOT(showParsingProgress(int)));
    40     statusBar()->showMessage(tr("Ready"));
    4137
    4238    //update track map
     
    141137        mSqlEngine = NULL;
    142138    }
    143     if(mXmlParser)
    144     {
    145         delete mXmlParser;
    146         mXmlParser = NULL;
    147     }
    148139}
    149140
    150141void MainWindow::importSchedule()
    151142{
    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   
    162146    if(Conference::getAll().count())
    163147    {
     
    172156}
    173157
    174 void MainWindow::showParsingProgress(int aStatus)
    175 {
    176     QString msg = QString("Parsing completed: %1\%").arg(aStatus);
    177     statusBar()->showMessage(msg,1000);
    178 }
    179 
    180158void MainWindow::aboutApp()
    181159{
Note: See TracChangeset for help on using the changeset viewer.