Ignore:
Timestamp:
01/18/10 22:32:44 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
446bce4
Parents:
c18cbd0
Message:

started work on displaying map

  • implemented mapwindow
  • map is hard-coded for now

TODO: finish getting map path from the event

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/mainwindow.cpp

    rc18cbd0 r59c6cfe  
    1616#include "eventdialog.h"
    1717#include "daynavigatorwidget.h"
     18#include "mapwindow.h"
    1819
    1920MainWindow::MainWindow(QWidget *parent)
     
    6465    actTreeView->setItemDelegate(new Delegate(actTreeView));
    6566
     67    // event double clicked
    6668    connect(dayTreeView, SIGNAL(doubleClicked(const QModelIndex &)), SLOT(itemDoubleClicked(const QModelIndex &)));
    6769    connect(favTreeView, SIGNAL(doubleClicked(const QModelIndex &)), SLOT(itemDoubleClicked(const QModelIndex &)));
    6870    connect(actTreeView, SIGNAL(doubleClicked(const QModelIndex &)), SLOT(itemDoubleClicked(const QModelIndex &)));
     71    // request for map to be displayed
     72    connect(dayTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &)));
     73    connect(favTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &)));
     74    connect(actTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &)));
     75
    6976
    7077    // TESTING: load some 'fav' data
     
    113120    if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
    114121    {
    115         QString currPath = QDir::currentPath();
    116         qDebug() << "current path: " << currPath;
    117122        qDebug() << "can't open " << file.fileName();
    118123        return;
     
    192197}
    193198
     199void MainWindow::displayMap(const QModelIndex &aIndex)
     200{
     201    QPixmap map(":/maps/rooms/janson.png");
     202    MapWindow window(map,this);
     203    window.exec();
     204}
     205
Note: See TracChangeset for help on using the changeset viewer.