-rw-r--r-- | core/pim/todo/main.cpp | 2 | ||||
-rw-r--r-- | core/pim/todo/mainwindow.cpp | 2 | ||||
-rw-r--r-- | core/pim/todo/mainwindow.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/core/pim/todo/main.cpp b/core/pim/todo/main.cpp index aeae794..58ed45c 100644 --- a/core/pim/todo/main.cpp +++ b/core/pim/todo/main.cpp @@ -1,49 +1,49 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "mainwindow.h" #include <qdatetime.h> #include <qpe/qpeapplication.h> void myMessages( QtMsgType, const char* ) { } int main( int argc, char **argv ) { -// qInstallMsgHandler( myMessages ); + qInstallMsgHandler( myMessages ); QPEApplication a( argc, argv ); QTime time; time.start(); Todo::MainWindow mw; int t = time.elapsed(); qWarning("QTime %d", t/1000 ); mw.setCaption("Opie Todolist"); QObject::connect( &a, SIGNAL( flush() ), &mw, SLOT( slotFlush() ) ); QObject::connect( &a, SIGNAL( reload() ), &mw, SLOT( slotReload() ) ); a.showMainWidget(&mw); return a.exec(); } diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index d328558..7810285 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp @@ -735,84 +735,84 @@ void MainWindow::slotComplete( const OTodo& todo ) { }else updateTodo( to ); }else updateTodo( to ); currentView()->updateView(); raiseCurrentView(); } void MainWindow::flush() { slotFlush(); } void MainWindow::reload() { slotReload(); } int MainWindow::create() { int uid = 0; if(m_syncing) { QMessageBox::warning(this, QWidget::tr("Todo"), QWidget::tr("Can not edit data, currently syncing")); return uid; } OTodo todo = currentEditor()->newTodo( currentCatId(), this ); if ( currentEditor()->accepted() ) { //todo.assignUid(); uid = todo.uid(); m_todoMgr.add( todo ); currentView()->addEvent( todo ); // I'm afraid we must call this every time now, otherwise // spend expensive time comparing all these strings... // but only call if we changed something -zecke populateCategories(); } raiseCurrentView( ); return uid; } /* delete it silently... */ bool MainWindow::remove( int uid ) { if (m_syncing) return false; return m_todoMgr.remove( uid ); } -void MainWindow::beam( int uid, int ) { +void MainWindow::beam( int uid) { ::unlink( beamfile ); OTodo todo = event( uid ); OTodoAccessVCal* cal = new OTodoAccessVCal(QString::fromLatin1(beamfile) ); OTodoAccess acc( cal ); acc.load(); acc.add( todo ); acc.save(); Ir* ir = new Ir(this ); connect(ir, SIGNAL(done(Ir*) ), this, SLOT(beamDone(Ir*) ) ); ir->send( beamfile, todo.summary(), "text/x-vCalendar" ); } void MainWindow::show( int uid ) { slotShow( uid ); } void MainWindow::edit( int uid ) { slotEdit( uid ); } void MainWindow::add( const OPimRecord& rec) { if ( rec.rtti() != OTodo::rtti() ) return; const OTodo& todo = static_cast<const OTodo&>(rec); m_todoMgr.add(todo ); currentView()->addEvent( todo ); // I'm afraid we must call this every time now, otherwise // spend expensive time comparing all these strings... // but only call if we changed something -zecke populateCategories(); } void MainWindow::slotReturnFromView() { raiseCurrentView(); } diff --git a/core/pim/todo/mainwindow.h b/core/pim/todo/mainwindow.h index f880505..434e969 100644 --- a/core/pim/todo/mainwindow.h +++ b/core/pim/todo/mainwindow.h @@ -146,56 +146,56 @@ private slots: bool m_deadline:1; bool m_completed:1; bool m_overdue:1; bool m_quicktask:1; TodoManager m_todoMgr; QString m_curCat; QList<ViewBase> m_views; uint m_counter; TemplateManager* m_tempManager; private slots: void slotShow(int); void slotEdit(int); void slotUpdate3( QWidget* ); void slotComplete( int uid ); void slotComplete( const OTodo& ev ); void slotNewFromTemplate(int id ); void slotNew(); void slotDuplicate(); void slotDelete(); void slotDeleteAll(); void slotDeleteCompleted(); void slotEdit(); void slotFind(); void setCategory( int ); void slotShowDeadLine( bool ); void slotShowCompleted( bool ); void slotShowQuickTask( bool ); void setDocument( const QString& ); void slotBeam(); void beamDone( Ir* ); void slotShowDetails(); void slotShowDue( bool ); void slotReturnFromView(); // for TodoShow... /* reimplementation from opimmainwindow */ protected slots: void flush(); void reload(); int create(); bool remove( int uid ); - void beam(int uid, int transport = IrDa ); + void beam(int uid); void show( int uid ); void edit( int uid ); void add( const OPimRecord& ); }; }; #endif |