Changeset 59c6cfe
- Timestamp:
- 01/18/10 22:32:44 (13 years ago)
- Branches:
- master, qt5
- Children:
- 446bce4
- Parents:
- c18cbd0
- Location:
- src
- Files:
-
- 3 added
- 6 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; -
src/mvc/eventmodel.cpp
rc18cbd0 r59c6cfe 62 62 mGroups.last().mChildCount = i - mGroups.last().mFirstEventIndex; 63 63 mGroups << EventModel::Group(QString("activity %1").arg(activityId), 0); 64 int nextActivityId = activityId;64 //int nextActivityId = activityId; 65 65 } 66 66 // add parent-child relation … … 151 151 Group group = mGroups[i]; 152 152 beginRemoveRows(idx, 0, group.mChildCount - 1); 153 bool ok =removeRows(0, group.mChildCount, idx);153 /*bool ok =*/ removeRows(0, group.mChildCount, idx); 154 154 endRemoveRows(); 155 155 //qDebug() << "removing " << group.mChildCount << " events from group:" << i << idx.data() << ":" << ok; -
src/mvc/treeview.cpp
rc18cbd0 r59c6cfe 80 80 // handle Alarm Control clicked 81 81 qDebug() << "MAP CLICKED: " << qVariantValue<QString>(aIndex.data()); 82 emit(requestForMap(aIndex)); 82 83 } 83 84 break; -
src/mvc/treeview.h
rc18cbd0 r59c6cfe 4 4 #include <QTreeView> 5 5 6 7 6 class TreeView : public QTreeView 8 7 { 8 Q_OBJECT 9 9 public: 10 10 TreeView(QWidget *aParent = NULL); … … 13 13 void mouseReleaseEvent(QMouseEvent *aEvent); 14 14 void testForControlClicked(const QModelIndex &aIndex, const QPoint &aPoint); 15 signals: 16 void requestForMap(const QModelIndex &aIndex); 15 17 }; 16 18
Note: See TracChangeset
for help on using the changeset viewer.