Ignore:
Timestamp:
01/19/10 18:34:18 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
395d6d3
Parents:
02c1e09
Message:

single-click is used to open event dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/mainwindow.cpp

    r02c1e09 rc53a3f4  
    1717#include "daynavigatorwidget.h"
    1818#include "mapwindow.h"
     19
     20const int confId = 1;
    1921
    2022MainWindow::MainWindow(QWidget *parent)
     
    6567    actTreeView->setItemDelegate(new Delegate(actTreeView));
    6668
    67     // event double clicked
    68     connect(dayTreeView, SIGNAL(doubleClicked(const QModelIndex &)), SLOT(itemDoubleClicked(const QModelIndex &)));
    69     connect(favTreeView, SIGNAL(doubleClicked(const QModelIndex &)), SLOT(itemDoubleClicked(const QModelIndex &)));
    70     connect(actTreeView, SIGNAL(doubleClicked(const QModelIndex &)), SLOT(itemDoubleClicked(const QModelIndex &)));
     69    // event clicked
     70    connect(dayTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &)));
     71    connect(favTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &)));
     72    connect(actTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &)));
    7173    // request for map to be displayed
    7274    connect(dayTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &)));
     
    7880    if(Conference::getAll().count()) // no conference(s) in the DB
    7981    {
    80         int confId = 1;
    8182        static_cast<EventModel*>(favTreeView->model())->loadFavEvents(Conference::getById(confId).start(),confId);
    8283        favTreeView->reset();
     
    9091    else
    9192    {
    92         int confId = 1;
    9393        QDate aStartDate = Conference::getById(confId).start();
    9494        QDate aEndDate = Conference::getById(confId).end();
     
    130130    if(Conference::getAll().count())
    131131    {
    132         int confId = 1;
    133132        // 'dayNavigator' emits signal 'dateChanged' after setting valid START:END dates
    134133        QDate aStartDate = Conference::getById(confId).start();
     
    155154void MainWindow::updateDayView(const QDate &aDate)
    156155{
    157     int confId = 1;
    158156    static_cast<EventModel*>(dayTreeView->model())->loadEvents(aDate,confId);
    159157    dayTreeView->reset();
     
    163161void MainWindow::updateTab(const int aIndex)
    164162{
    165     int confId = 1;
    166163    switch(aIndex)
    167164    {
     
    192189        }
    193190    };
    194 
    195 
    196191}
    197192
    198193void MainWindow::updateActivitiesDayView(const QDate &aDate)
    199194{
    200     int confId = 1;
    201195    static_cast<EventModel*>(actTreeView->model())->loadEventsByActivities(aDate,confId);
    202196    actTreeView->reset();
     
    206200void MainWindow::updateFavouritesDayView(const QDate &aDate)
    207201{
    208     int confId = 1;
    209202    static_cast<EventModel*>(favTreeView->model())->loadFavEvents(aDate,confId);
    210203    favTreeView->reset();
     
    212205}
    213206
    214 void MainWindow::itemDoubleClicked(const QModelIndex &aIndex)
     207void MainWindow::itemClicked(const QModelIndex &aIndex)
    215208{
    216209    // have to handle only events, not time-groups
Note: See TracChangeset for help on using the changeset viewer.