Commit 34f3f6659023b85d99a5302afd1d4e7d445d7673
- Diff rendering mode:
- inline
- side by side
core/pim/todo/mainwindow.cpp
(29 / 0)
|   | |||
| 94 | 94 | initEditor(); | |
| 95 | 95 | initShow(); | |
| 96 | 96 | ||
| 97 | connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ), | ||
| 98 | this, SLOT( slotAppMessage(const QCString&,const QByteArray&) ) ); | ||
| 99 | |||
| 97 | 100 | raiseCurrentView(); | |
| 98 | 101 | QTimer::singleShot( 0, this, SLOT(initStuff()) ); | |
| 99 | 102 | } | |
| … | … | ||
| 1003 | 1003 | } | |
| 1004 | 1004 | } | |
| 1005 | 1005 | ||
| 1006 | void MainWindow::handleAllAlarms() | ||
| 1007 | { | ||
| 1008 | if( !m_todoMgr.isLoaded() ) | ||
| 1009 | m_todoMgr.load(); | ||
| 1010 | |||
| 1011 | // Delete all todo alarms | ||
| 1012 | AlarmServer::deleteAlarm( QDateTime(), "QPE/Application/todolist", QCString(), -1 ); | ||
| 1013 | |||
| 1014 | // Register all todo alarms | ||
| 1015 | m_todoMgr.updateList(); | ||
| 1016 | OPimTodoAccess::List list = m_todoMgr.list(); | ||
| 1017 | OPimTodoAccess::List::Iterator it; | ||
| 1018 | for ( it = list.begin(); it != list.end(); ++it ) { | ||
| 1019 | const OPimTodo& todo = (*it); | ||
| 1020 | if ( todo.hasNotifiers() ) | ||
| 1021 | addAlarms( todo.notifiers().alarms(), todo.uid() ); | ||
| 1022 | } | ||
| 1023 | } | ||
| 1024 | |||
| 1006 | 1025 | /* we might have not loaded the db */ | |
| 1007 | 1026 | bool MainWindow::doAlarm( const QDateTime& dt, int uid ) | |
| 1008 | 1027 | { | |
| … | … | ||
| 1080 | 1080 | owarn << "Started for alarm at " << dt << " (uid=" << uid << ") that does not exist!" << oendl; | |
| 1081 | 1081 | ||
| 1082 | 1082 | return needshow; | |
| 1083 | } | ||
| 1084 | |||
| 1085 | void MainWindow::slotAppMessage( const QCString& msg, const QByteArray& data ) | ||
| 1086 | { | ||
| 1087 | if( msg == "registerAllAlarms()" ) { | ||
| 1088 | handleAllAlarms(); | ||
| 1089 | } | ||
| 1083 | 1090 | } |
core/pim/todo/mainwindow.h
(2 / 0)
|   | |||
| 106 | 106 | private: | |
| 107 | 107 | /* handle setting and removing alarms */ | |
| 108 | 108 | void handleAlarms( const OPimTodo& oldTodo, const OPimTodo& newTodo ); | |
| 109 | void handleAllAlarms(); | ||
| 109 | 110 | void receiveFile( const QString& filename ); | |
| 110 | 111 | void connectBase( ViewBase* ); | |
| 111 | 112 | void initUI(); | |
| … | … | ||
| 181 | 181 | ||
| 182 | 182 | void setDocument( const QString& ); | |
| 183 | 183 | ||
| 184 | void slotAppMessage( const QCString& msg, const QByteArray& data ); | ||
| 184 | 185 | ||
| 185 | 186 | void beamDone( Ir* ); | |
| 186 | 187 | void slotShowDetails(); |
|   | |||
| 166 | 166 | ||
| 167 | 167 | bool TodoManager::isLoaded()const | |
| 168 | 168 | { | |
| 169 | return ( m_db == 0 ); | ||
| 169 | return ( m_db != 0 ); | ||
| 170 | 170 | } | |
| 171 | 171 | ||
| 172 | 172 | bool TodoManager::load() |
etc/opie_sysevents.conf
(3 / 0)
|   | |||
| 1 | 1 | datebook_postsync postsync datebook QPE/Application/datebook registerAllAlarms() | |
| 2 | 2 | datebook_pretime presystemtimechange datebook QPE/Application/datebook | |
| 3 | 3 | datebook_posttime postsystemtimechange datebook QPE/Application/datebook registerAllAlarms() | |
| 4 | todolist_postsync postsync todolist QPE/Application/todolist registerAllAlarms() | ||
| 5 | todolist_pretime presystemtimechange todolist QPE/Application/todolist | ||
| 6 | todolist_posttime postsystemtimechange todolist QPE/Application/todolist registerAllAlarms() |

