author | zecke <zecke> | 2003-02-22 19:02:06 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-02-22 19:02:06 (UTC) |
commit | 00c146960fa7fd05dc56fac2a24b3d7968a4a772 (patch) (unidiff) | |
tree | 11d7fd4630cce7422448c31bd26034718d90656e | |
parent | 7b04887e382227c80c8985495f01dad2b1890719 (diff) | |
download | opie-00c146960fa7fd05dc56fac2a24b3d7968a4a772.zip opie-00c146960fa7fd05dc56fac2a24b3d7968a4a772.tar.gz opie-00c146960fa7fd05dc56fac2a24b3d7968a4a772.tar.bz2 |
shutup todolist while running
remove the transport thingie..
-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 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "mainwindow.h" | 21 | #include "mainwindow.h" |
22 | 22 | ||
23 | 23 | ||
24 | #include <qdatetime.h> | 24 | #include <qdatetime.h> |
25 | 25 | ||
26 | #include <qpe/qpeapplication.h> | 26 | #include <qpe/qpeapplication.h> |
27 | 27 | ||
28 | void myMessages( QtMsgType, const char* ) { | 28 | void myMessages( QtMsgType, const char* ) { |
29 | 29 | ||
30 | } | 30 | } |
31 | 31 | ||
32 | int main( int argc, char **argv ) | 32 | int main( int argc, char **argv ) |
33 | { | 33 | { |
34 | // qInstallMsgHandler( myMessages ); | 34 | qInstallMsgHandler( myMessages ); |
35 | QPEApplication a( argc, argv ); | 35 | QPEApplication a( argc, argv ); |
36 | 36 | ||
37 | QTime time; | 37 | QTime time; |
38 | time.start(); | 38 | time.start(); |
39 | Todo::MainWindow mw; | 39 | Todo::MainWindow mw; |
40 | int t = time.elapsed(); | 40 | int t = time.elapsed(); |
41 | qWarning("QTime %d", t/1000 ); | 41 | qWarning("QTime %d", t/1000 ); |
42 | mw.setCaption("Opie Todolist"); | 42 | mw.setCaption("Opie Todolist"); |
43 | QObject::connect( &a, SIGNAL( flush() ), &mw, SLOT( slotFlush() ) ); | 43 | QObject::connect( &a, SIGNAL( flush() ), &mw, SLOT( slotFlush() ) ); |
44 | QObject::connect( &a, SIGNAL( reload() ), &mw, SLOT( slotReload() ) ); | 44 | QObject::connect( &a, SIGNAL( reload() ), &mw, SLOT( slotReload() ) ); |
45 | 45 | ||
46 | a.showMainWidget(&mw); | 46 | a.showMainWidget(&mw); |
47 | 47 | ||
48 | return a.exec(); | 48 | return a.exec(); |
49 | } | 49 | } |
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 ) { | |||
735 | }else | 735 | }else |
736 | updateTodo( to ); | 736 | updateTodo( to ); |
737 | }else | 737 | }else |
738 | updateTodo( to ); | 738 | updateTodo( to ); |
739 | 739 | ||
740 | currentView()->updateView(); | 740 | currentView()->updateView(); |
741 | raiseCurrentView(); | 741 | raiseCurrentView(); |
742 | } | 742 | } |
743 | void MainWindow::flush() { | 743 | void MainWindow::flush() { |
744 | slotFlush(); | 744 | slotFlush(); |
745 | } | 745 | } |
746 | void MainWindow::reload() { | 746 | void MainWindow::reload() { |
747 | slotReload(); | 747 | slotReload(); |
748 | } | 748 | } |
749 | int MainWindow::create() { | 749 | int MainWindow::create() { |
750 | int uid = 0; | 750 | int uid = 0; |
751 | if(m_syncing) { | 751 | if(m_syncing) { |
752 | QMessageBox::warning(this, QWidget::tr("Todo"), | 752 | QMessageBox::warning(this, QWidget::tr("Todo"), |
753 | QWidget::tr("Can not edit data, currently syncing")); | 753 | QWidget::tr("Can not edit data, currently syncing")); |
754 | return uid; | 754 | return uid; |
755 | } | 755 | } |
756 | 756 | ||
757 | 757 | ||
758 | OTodo todo = currentEditor()->newTodo( currentCatId(), | 758 | OTodo todo = currentEditor()->newTodo( currentCatId(), |
759 | this ); | 759 | this ); |
760 | 760 | ||
761 | if ( currentEditor()->accepted() ) { | 761 | if ( currentEditor()->accepted() ) { |
762 | //todo.assignUid(); | 762 | //todo.assignUid(); |
763 | uid = todo.uid(); | 763 | uid = todo.uid(); |
764 | m_todoMgr.add( todo ); | 764 | m_todoMgr.add( todo ); |
765 | currentView()->addEvent( todo ); | 765 | currentView()->addEvent( todo ); |
766 | 766 | ||
767 | 767 | ||
768 | // I'm afraid we must call this every time now, otherwise | 768 | // I'm afraid we must call this every time now, otherwise |
769 | // spend expensive time comparing all these strings... | 769 | // spend expensive time comparing all these strings... |
770 | // but only call if we changed something -zecke | 770 | // but only call if we changed something -zecke |
771 | populateCategories(); | 771 | populateCategories(); |
772 | } | 772 | } |
773 | raiseCurrentView( ); | 773 | raiseCurrentView( ); |
774 | 774 | ||
775 | return uid; | 775 | return uid; |
776 | } | 776 | } |
777 | /* delete it silently... */ | 777 | /* delete it silently... */ |
778 | bool MainWindow::remove( int uid ) { | 778 | bool MainWindow::remove( int uid ) { |
779 | if (m_syncing) return false; | 779 | if (m_syncing) return false; |
780 | 780 | ||
781 | return m_todoMgr.remove( uid ); | 781 | return m_todoMgr.remove( uid ); |
782 | } | 782 | } |
783 | void MainWindow::beam( int uid, int ) { | 783 | void MainWindow::beam( int uid) { |
784 | ::unlink( beamfile ); | 784 | ::unlink( beamfile ); |
785 | OTodo todo = event( uid ); | 785 | OTodo todo = event( uid ); |
786 | OTodoAccessVCal* cal = new OTodoAccessVCal(QString::fromLatin1(beamfile) ); | 786 | OTodoAccessVCal* cal = new OTodoAccessVCal(QString::fromLatin1(beamfile) ); |
787 | OTodoAccess acc( cal ); | 787 | OTodoAccess acc( cal ); |
788 | acc.load(); | 788 | acc.load(); |
789 | acc.add( todo ); | 789 | acc.add( todo ); |
790 | acc.save(); | 790 | acc.save(); |
791 | Ir* ir = new Ir(this ); | 791 | Ir* ir = new Ir(this ); |
792 | connect(ir, SIGNAL(done(Ir*) ), | 792 | connect(ir, SIGNAL(done(Ir*) ), |
793 | this, SLOT(beamDone(Ir*) ) ); | 793 | this, SLOT(beamDone(Ir*) ) ); |
794 | ir->send( beamfile, todo.summary(), "text/x-vCalendar" ); | 794 | ir->send( beamfile, todo.summary(), "text/x-vCalendar" ); |
795 | } | 795 | } |
796 | void MainWindow::show( int uid ) { | 796 | void MainWindow::show( int uid ) { |
797 | slotShow( uid ); | 797 | slotShow( uid ); |
798 | } | 798 | } |
799 | void MainWindow::edit( int uid ) { | 799 | void MainWindow::edit( int uid ) { |
800 | slotEdit( uid ); | 800 | slotEdit( uid ); |
801 | } | 801 | } |
802 | void MainWindow::add( const OPimRecord& rec) { | 802 | void MainWindow::add( const OPimRecord& rec) { |
803 | if ( rec.rtti() != OTodo::rtti() ) return; | 803 | if ( rec.rtti() != OTodo::rtti() ) return; |
804 | 804 | ||
805 | const OTodo& todo = static_cast<const OTodo&>(rec); | 805 | const OTodo& todo = static_cast<const OTodo&>(rec); |
806 | 806 | ||
807 | m_todoMgr.add(todo ); | 807 | m_todoMgr.add(todo ); |
808 | currentView()->addEvent( todo ); | 808 | currentView()->addEvent( todo ); |
809 | 809 | ||
810 | 810 | ||
811 | // I'm afraid we must call this every time now, otherwise | 811 | // I'm afraid we must call this every time now, otherwise |
812 | // spend expensive time comparing all these strings... | 812 | // spend expensive time comparing all these strings... |
813 | // but only call if we changed something -zecke | 813 | // but only call if we changed something -zecke |
814 | populateCategories(); | 814 | populateCategories(); |
815 | } | 815 | } |
816 | void MainWindow::slotReturnFromView() { | 816 | void MainWindow::slotReturnFromView() { |
817 | raiseCurrentView(); | 817 | raiseCurrentView(); |
818 | } | 818 | } |
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: | |||
146 | bool m_deadline:1; | 146 | bool m_deadline:1; |
147 | bool m_completed:1; | 147 | bool m_completed:1; |
148 | bool m_overdue:1; | 148 | bool m_overdue:1; |
149 | bool m_quicktask:1; | 149 | bool m_quicktask:1; |
150 | TodoManager m_todoMgr; | 150 | TodoManager m_todoMgr; |
151 | QString m_curCat; | 151 | QString m_curCat; |
152 | QList<ViewBase> m_views; | 152 | QList<ViewBase> m_views; |
153 | uint m_counter; | 153 | uint m_counter; |
154 | TemplateManager* m_tempManager; | 154 | TemplateManager* m_tempManager; |
155 | 155 | ||
156 | 156 | ||
157 | private slots: | 157 | private slots: |
158 | void slotShow(int); | 158 | void slotShow(int); |
159 | void slotEdit(int); | 159 | void slotEdit(int); |
160 | void slotUpdate3( QWidget* ); | 160 | void slotUpdate3( QWidget* ); |
161 | void slotComplete( int uid ); | 161 | void slotComplete( int uid ); |
162 | void slotComplete( const OTodo& ev ); | 162 | void slotComplete( const OTodo& ev ); |
163 | void slotNewFromTemplate(int id ); | 163 | void slotNewFromTemplate(int id ); |
164 | void slotNew(); | 164 | void slotNew(); |
165 | void slotDuplicate(); | 165 | void slotDuplicate(); |
166 | 166 | ||
167 | void slotDelete(); | 167 | void slotDelete(); |
168 | void slotDeleteAll(); | 168 | void slotDeleteAll(); |
169 | void slotDeleteCompleted(); | 169 | void slotDeleteCompleted(); |
170 | 170 | ||
171 | void slotEdit(); | 171 | void slotEdit(); |
172 | void slotFind(); | 172 | void slotFind(); |
173 | 173 | ||
174 | void setCategory( int ); | 174 | void setCategory( int ); |
175 | 175 | ||
176 | void slotShowDeadLine( bool ); | 176 | void slotShowDeadLine( bool ); |
177 | void slotShowCompleted( bool ); | 177 | void slotShowCompleted( bool ); |
178 | void slotShowQuickTask( bool ); | 178 | void slotShowQuickTask( bool ); |
179 | 179 | ||
180 | void setDocument( const QString& ); | 180 | void setDocument( const QString& ); |
181 | 181 | ||
182 | 182 | ||
183 | void slotBeam(); | 183 | void slotBeam(); |
184 | void beamDone( Ir* ); | 184 | void beamDone( Ir* ); |
185 | void slotShowDetails(); | 185 | void slotShowDetails(); |
186 | void slotShowDue( bool ); | 186 | void slotShowDue( bool ); |
187 | void slotReturnFromView(); // for TodoShow... | 187 | void slotReturnFromView(); // for TodoShow... |
188 | /* reimplementation from opimmainwindow */ | 188 | /* reimplementation from opimmainwindow */ |
189 | protected slots: | 189 | protected slots: |
190 | void flush(); | 190 | void flush(); |
191 | void reload(); | 191 | void reload(); |
192 | int create(); | 192 | int create(); |
193 | bool remove( int uid ); | 193 | bool remove( int uid ); |
194 | void beam(int uid, int transport = IrDa ); | 194 | void beam(int uid); |
195 | void show( int uid ); | 195 | void show( int uid ); |
196 | void edit( int uid ); | 196 | void edit( int uid ); |
197 | void add( const OPimRecord& ); | 197 | void add( const OPimRecord& ); |
198 | }; | 198 | }; |
199 | }; | 199 | }; |
200 | 200 | ||
201 | #endif | 201 | #endif |