Ignore:
Timestamp:
01/21/10 16:39:43 (12 years ago)
Author:
fortefr <fortefr@…>
Branches:
master, qt5
Children:
76cde75
Parents:
a957cfa
Message:

Warning handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/mainwindow.cpp

    ra957cfa r3f3e22d  
    1313
    1414#include <QDialog>
     15#include <QMessageBox>
    1516#include "ui_about.h"
    1617#include "eventdialog.h"
     
    1819#include "importscheduledialog.h"
    1920#include "mapwindow.h"
     21
    2022
    2123const int confId = 1;
     
    8688    connect(trackTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &)));
    8789    connect(searchTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &)));
     90    // request for warning to be displayed
     91    connect(dayTreeView, SIGNAL(requestForWarning(const QModelIndex &)), SLOT(displayWarning(const QModelIndex &)));
     92    connect(favTreeView, SIGNAL(requestForWarning(const QModelIndex &)), SLOT(displayWarning(const QModelIndex &)));
     93    connect(trackTreeView, SIGNAL(requestForWarning(const QModelIndex &)), SLOT(displayWarning(const QModelIndex &)));
     94    connect(searchTreeView, SIGNAL(requestForWarning(const QModelIndex &)), SLOT(displayWarning(const QModelIndex &)));
    8895    // event search button clicked
    8996    connect(searchButton, SIGNAL(clicked()), SLOT(searchClicked()));
     
    274281}
    275282
     283void MainWindow::displayWarning(const QModelIndex &aIndex)
     284{
     285    QMessageBox::warning(
     286    this,
     287    tr("Time Conflict Warning"),
     288    tr("This event happens at the same time than another one of your favourites.") );
     289}
Note: See TracChangeset for help on using the changeset viewer.