Subversion Repositories svn1

Rev

Rev 259 | Rev 302 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 259 Rev 293
Line 18... Line 18...
18
#include "QTabWidget"
18
#include "QTabWidget"
19
#include "QLayout"
19
#include "QLayout"
20
#include "qmeventstatus.h"
20
#include "qmeventstatus.h"
21
#include "qmdownloadlegtimes.h"
21
#include "qmdownloadlegtimes.h"
22
#include "qmdialogabout.h"
22
#include "qmdialogabout.h"
-
 
23
#include "qmhttppath.h"
23
 
24
 
24
#include    "consts.h"
25
#include    "consts.h"
25
#include    "structs.h"
26
#include    "structs.h"
26
#include    "proto.h"
27
#include    "proto.h"
27
 
28
 
Line 67... Line 68...
67
    m1->addAction("Recalculate elapsed times", this, SLOT(recalcLegTimes()));
68
    m1->addAction("Recalculate elapsed times", this, SLOT(recalcLegTimes()));
68
 
69
 
69
    QMenu *m2 = new QMenu ("Upload");
70
    QMenu *m2 = new QMenu ("Upload");
70
    ui->menuBar->addMenu(m2);
71
    ui->menuBar->addMenu(m2);
71
    m2->addAction("Load team information from external file", this, SLOT(loadExternalTeams()));
72
    m2->addAction("Load team information from external file", this, SLOT(loadExternalTeams()));
-
 
73
    m2->addAction("Load team information from Web Page", this, SLOT(loadExternalHtmlTeams()));
72
    m2->addAction("Upload time information", this, SLOT(uploadLegData()));
74
    m2->addAction("Upload time information", this, SLOT(uploadLegData()));
73
 
75
 
74
    QMenu *m3 = new QMenu ("Export");
76
    QMenu *m3 = new QMenu ("Export");
75
    ui->menuBar->addMenu(m3);
77
    ui->menuBar->addMenu(m3);
76
    m3->addAction("Store team information to external file", this, SLOT(storeExternalTeams()));
78
    m3->addAction("Store team information to external file", this, SLOT(storeExternalTeams()));
Line 279... Line 281...
279
 
281
 
280
    QmDialogLoadExternalTeams dialog(fileName,this);
282
    QmDialogLoadExternalTeams dialog(fileName,this);
281
    dialog.exec();
283
    dialog.exec();
282
}
284
}
283
 
285
 
-
 
286
void MainWindow::loadExternalHtmlTeams(void)
-
 
287
{
-
 
288
    Qmhttppath msgBox;
-
 
289
    int rv = msgBox.exec();
-
 
290
    if (rv == QDialog::Accepted	)
-
 
291
    {
-
 
292
        QmDialogLoadExternalTeams dialog( msgBox.urlLineEdit->text(), &msgBox.allData ,this);
-
 
293
        dialog.exec();
-
 
294
    }
-
 
295
    else
-
 
296
    {
-
 
297
         MainWindow::showMessage("No Web Address selected. No teams uploaded");
-
 
298
    }
-
 
299
}
-
 
300
 
284
void MainWindow::storeExternalTeams(void)
301
void MainWindow::storeExternalTeams(void)
285
{
302
{
286
    QString fileName = QFileDialog::getSaveFileName(this, tr("Store File"),
303
    QString fileName = QFileDialog::getSaveFileName(this, tr("Store File"),
287
                                                     filepath,
304
                                                     filepath,
288
                                                     tr("Data (*.csv);;All (*.*)"),
305
                                                     tr("Data (*.csv);;All (*.*)"),