- Timestamp:
- 01/18/10 22:32:44 (13 years ago)
- Branches:
- master, qt5
- Children:
- 446bce4
- Parents:
- c18cbd0
- Location:
- src/gui
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/gui.pro
rc18cbd0 r59c6cfe 27 27 daynavigatorwidget.ui \ 28 28 about.ui \ 29 eventdialog.ui 29 eventdialog.ui \ 30 mapwindow.ui 30 31 31 32 HEADERS += mainwindow.h \ 32 33 daynavigatorwidget.h \ 33 eventdialog.h 34 eventdialog.h \ 35 mapwindow.h 34 36 35 37 SOURCES += mainwindow.cpp \ 36 38 daynavigatorwidget.cpp \ 37 eventdialog.cpp 39 eventdialog.cpp \ 40 mapwindow.cpp 38 41 39 42 maemo { -
src/gui/mainwindow.cpp
rc18cbd0 r59c6cfe 16 16 #include "eventdialog.h" 17 17 #include "daynavigatorwidget.h" 18 #include "mapwindow.h" 18 19 19 20 MainWindow::MainWindow(QWidget *parent) … … 64 65 actTreeView->setItemDelegate(new Delegate(actTreeView)); 65 66 67 // event double clicked 66 68 connect(dayTreeView, SIGNAL(doubleClicked(const QModelIndex &)), SLOT(itemDoubleClicked(const QModelIndex &))); 67 69 connect(favTreeView, SIGNAL(doubleClicked(const QModelIndex &)), SLOT(itemDoubleClicked(const QModelIndex &))); 68 70 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 69 76 70 77 // TESTING: load some 'fav' data … … 113 120 if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) 114 121 { 115 QString currPath = QDir::currentPath();116 qDebug() << "current path: " << currPath;117 122 qDebug() << "can't open " << file.fileName(); 118 123 return; … … 192 197 } 193 198 199 void MainWindow::displayMap(const QModelIndex &aIndex) 200 { 201 QPixmap map(":/maps/rooms/janson.png"); 202 MapWindow window(map,this); 203 window.exec(); 204 } 205 -
src/gui/mainwindow.h
rc18cbd0 r59c6cfe 24 24 void updateActivitiesDayView(const QDate &aDate); 25 25 void itemDoubleClicked(const QModelIndex &aIndex); 26 void displayMap(const QModelIndex &aIndex); 26 27 private: 27 28 SqlEngine *mSqlEngine;
Note: See TracChangeset
for help on using the changeset viewer.