author | zecke <zecke> | 2004-03-14 19:20:59 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-14 19:20:59 (UTC) |
commit | cbb87c7c24dfe46462602c73b10bd76ce81a3baf (patch) (unidiff) | |
tree | ff803045e142f3a5013895be2623a4b5c76531fb | |
parent | 601330a1173afbc7736d103a584b8bde20646dee (diff) | |
download | opie-cbb87c7c24dfe46462602c73b10bd76ce81a3baf.zip opie-cbb87c7c24dfe46462602c73b10bd76ce81a3baf.tar.gz opie-cbb87c7c24dfe46462602c73b10bd76ce81a3baf.tar.bz2 |
Make use of ODP namespace
-rw-r--r-- | core/pim/todo/mainwindow.cpp | 4 | ||||
-rw-r--r-- | core/pim/todo/mainwindow.h | 4 | ||||
-rw-r--r-- | core/pim/todo/otaskeditor.cpp | 1 | ||||
-rw-r--r-- | core/pim/todo/otaskeditor.h | 2 | ||||
-rw-r--r-- | core/pim/todo/quickeditimpl.cpp | 3 | ||||
-rw-r--r-- | core/pim/todo/taskeditoralarms.cpp | 1 |
6 files changed, 10 insertions, 5 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index c2f422d..f0642c4 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp | |||
@@ -45,34 +45,36 @@ | |||
45 | #include <qmessagebox.h> | 45 | #include <qmessagebox.h> |
46 | #include <qpushbutton.h> | 46 | #include <qpushbutton.h> |
47 | #include <qaction.h> | 47 | #include <qaction.h> |
48 | #include <qtimer.h> | 48 | #include <qtimer.h> |
49 | #include <qlayout.h> | 49 | #include <qlayout.h> |
50 | #include <qwhatsthis.h> | 50 | #include <qwhatsthis.h> |
51 | 51 | ||
52 | #include "quickeditimpl.h" | 52 | #include "quickeditimpl.h" |
53 | #include "todotemplatemanager.h" | 53 | #include "todotemplatemanager.h" |
54 | #include "templateeditor.h" | 54 | #include "templateeditor.h" |
55 | #include "tableview.h" | 55 | #include "tableview.h" |
56 | 56 | ||
57 | #include "textviewshow.h" | 57 | #include "textviewshow.h" |
58 | #include "todoeditor.h" | 58 | #include "todoeditor.h" |
59 | #include "mainwindow.h" | 59 | #include "mainwindow.h" |
60 | 60 | ||
61 | using namespace Opie::Core; | ||
61 | OPIE_EXPORT_APP( OApplicationFactory<Todo::MainWindow> ) | 62 | OPIE_EXPORT_APP( OApplicationFactory<Todo::MainWindow> ) |
62 | 63 | ||
64 | using namespace Opie; | ||
63 | using namespace Todo; | 65 | using namespace Todo; |
64 | 66 | ||
65 | MainWindow::MainWindow( QWidget* parent, | 67 | MainWindow::MainWindow( QWidget* parent, |
66 | const char* name, WFlags ) | 68 | const char* name, WFlags ) |
67 | : Opie::OPimMainWindow( "Todolist", parent, name, WType_TopLevel | WStyle_ContextHelp ) | 69 | : Opie::OPimMainWindow( "Todolist", parent, name, WType_TopLevel | WStyle_ContextHelp ) |
68 | { | 70 | { |
69 | if (!name) | 71 | if (!name) |
70 | setName("todo window"); | 72 | setName("todo window"); |
71 | 73 | ||
72 | m_syncing = false; | 74 | m_syncing = false; |
73 | m_showing = false; | 75 | m_showing = false; |
74 | m_counter = 0; | 76 | m_counter = 0; |
75 | m_tempManager = new TemplateManager(); | 77 | m_tempManager = new TemplateManager(); |
76 | m_tempManager->load(); | 78 | m_tempManager->load(); |
77 | 79 | ||
78 | initUI(); | 80 | initUI(); |
@@ -207,33 +209,33 @@ void MainWindow::initActions() { | |||
207 | addToolBar( (QToolBar *)m_curQuick->widget(), QWidget::tr( "QuickEdit" ), QMainWindow::Top, TRUE ); | 209 | addToolBar( (QToolBar *)m_curQuick->widget(), QWidget::tr( "QuickEdit" ), QMainWindow::Top, TRUE ); |
208 | m_curQuick->signal()->connect( this, SLOT(slotQuickEntered() ) ); | 210 | m_curQuick->signal()->connect( this, SLOT(slotQuickEntered() ) ); |
209 | 211 | ||
210 | } | 212 | } |
211 | /* m_curCat from Config */ | 213 | /* m_curCat from Config */ |
212 | void MainWindow::initConfig() { | 214 | void MainWindow::initConfig() { |
213 | Config config( "todo" ); | 215 | Config config( "todo" ); |
214 | config.setGroup( "View" ); | 216 | config.setGroup( "View" ); |
215 | m_completed = config.readBoolEntry( "ShowComplete", TRUE ); | 217 | m_completed = config.readBoolEntry( "ShowComplete", TRUE ); |
216 | m_curCat = config.readEntry( "Category", QString::null ); | 218 | m_curCat = config.readEntry( "Category", QString::null ); |
217 | m_deadline = config.readBoolEntry( "ShowDeadLine", TRUE); | 219 | m_deadline = config.readBoolEntry( "ShowDeadLine", TRUE); |
218 | m_overdue = config.readBoolEntry("ShowOverDue", FALSE ); | 220 | m_overdue = config.readBoolEntry("ShowOverDue", FALSE ); |
219 | m_quicktask = config.readBoolEntry("ShowQuickTask", TRUE); | 221 | m_quicktask = config.readBoolEntry("ShowQuickTask", TRUE); |
220 | } | 222 | } |
221 | void MainWindow::initUI() { | 223 | void MainWindow::initUI() { |
222 | 224 | ||
223 | m_stack = new OWidgetStack(this, "main stack"); | 225 | m_stack = new Opie::Ui::OWidgetStack(this, "main stack"); |
224 | 226 | ||
225 | setCentralWidget( m_stack ); | 227 | setCentralWidget( m_stack ); |
226 | 228 | ||
227 | setToolBarsMovable( FALSE ); | 229 | setToolBarsMovable( FALSE ); |
228 | 230 | ||
229 | QToolBar *menubarholder = new QToolBar( this ); | 231 | QToolBar *menubarholder = new QToolBar( this ); |
230 | menubarholder->setHorizontalStretchable( TRUE ); | 232 | menubarholder->setHorizontalStretchable( TRUE ); |
231 | m_bar = new QMenuBar( menubarholder ); | 233 | m_bar = new QMenuBar( menubarholder ); |
232 | 234 | ||
233 | m_tool = new QToolBar( this ); | 235 | m_tool = new QToolBar( this ); |
234 | 236 | ||
235 | /** QPopupMenu */ | 237 | /** QPopupMenu */ |
236 | m_edit = new QPopupMenu( this ); | 238 | m_edit = new QPopupMenu( this ); |
237 | m_options = new QPopupMenu( this ); | 239 | m_options = new QPopupMenu( this ); |
238 | m_catMenu = new QPopupMenu( this ); | 240 | m_catMenu = new QPopupMenu( this ); |
239 | m_template = new QPopupMenu( this ); | 241 | m_template = new QPopupMenu( this ); |
diff --git a/core/pim/todo/mainwindow.h b/core/pim/todo/mainwindow.h index b35a42b..f0d6a42 100644 --- a/core/pim/todo/mainwindow.h +++ b/core/pim/todo/mainwindow.h | |||
@@ -49,33 +49,33 @@ class Ir; | |||
49 | class QVBox; | 49 | class QVBox; |
50 | class QLineEdit; | 50 | class QLineEdit; |
51 | 51 | ||
52 | namespace Todo { | 52 | namespace Todo { |
53 | typedef TodoView View; | 53 | typedef TodoView View; |
54 | class TemplateManager; | 54 | class TemplateManager; |
55 | class Editor; | 55 | class Editor; |
56 | class TodoShow; | 56 | class TodoShow; |
57 | class TemplateEditor; | 57 | class TemplateEditor; |
58 | struct QuickEditBase; | 58 | struct QuickEditBase; |
59 | 59 | ||
60 | class MainWindow : public Opie::OPimMainWindow { | 60 | class MainWindow : public Opie::OPimMainWindow { |
61 | Q_OBJECT | 61 | Q_OBJECT |
62 | friend class TodoView; // avoid QObject here.... | 62 | friend class TodoView; // avoid QObject here.... |
63 | friend class TodoShow; // avoid QObject | 63 | friend class TodoShow; // avoid QObject |
64 | public: | 64 | public: |
65 | /* OApplicationFactory application Name */ | 65 | /* Opie::Core::OApplicationFactory application Name */ |
66 | static QString appName() { return QString::fromLatin1("todolist"); } | 66 | static QString appName() { return QString::fromLatin1("todolist"); } |
67 | 67 | ||
68 | MainWindow( QWidget *parent = 0, | 68 | MainWindow( QWidget *parent = 0, |
69 | const char* name = 0, WFlags fl = 0 ); | 69 | const char* name = 0, WFlags fl = 0 ); |
70 | ~MainWindow(); | 70 | ~MainWindow(); |
71 | 71 | ||
72 | /** return a context menu for an OPimTodo */ | 72 | /** return a context menu for an OPimTodo */ |
73 | QPopupMenu* contextMenu(int uid, bool doesRecur = FALSE ); | 73 | QPopupMenu* contextMenu(int uid, bool doesRecur = FALSE ); |
74 | QPopupMenu* options(); | 74 | QPopupMenu* options(); |
75 | QPopupMenu* edit(); | 75 | QPopupMenu* edit(); |
76 | QToolBar* toolbar(); | 76 | QToolBar* toolbar(); |
77 | 77 | ||
78 | 78 | ||
79 | void updateList(); | 79 | void updateList(); |
80 | OPimTodoAccess::List list()const; | 80 | OPimTodoAccess::List list()const; |
81 | OPimTodoAccess::List sorted( bool asc, int sortOrder ); | 81 | OPimTodoAccess::List sorted( bool asc, int sortOrder ); |
@@ -129,33 +129,33 @@ private slots: | |||
129 | TemplateEditor* currentTemplateEditor(); | 129 | TemplateEditor* currentTemplateEditor(); |
130 | TemplateEditor* m_curTempEd; | 130 | TemplateEditor* m_curTempEd; |
131 | 131 | ||
132 | QMenuBar* m_bar; | 132 | QMenuBar* m_bar; |
133 | QToolBar* m_tool; | 133 | QToolBar* m_tool; |
134 | QAction* m_editAction, | 134 | QAction* m_editAction, |
135 | *m_deleteAction, | 135 | *m_deleteAction, |
136 | *m_findAction, | 136 | *m_findAction, |
137 | *m_completedAction, | 137 | *m_completedAction, |
138 | *m_showDeadLineAction, | 138 | *m_showDeadLineAction, |
139 | *m_deleteAllAction, | 139 | *m_deleteAllAction, |
140 | *m_deleteCompleteAction, | 140 | *m_deleteCompleteAction, |
141 | *m_duplicateAction, | 141 | *m_duplicateAction, |
142 | *m_showOverDueAction, | 142 | *m_showOverDueAction, |
143 | *m_showQuickTaskAction, | 143 | *m_showQuickTaskAction, |
144 | *m_effectiveAction; | 144 | *m_effectiveAction; |
145 | Opie::OWidgetStack *m_stack; | 145 | Opie::Ui::OWidgetStack *m_stack; |
146 | QPopupMenu* m_catMenu, | 146 | QPopupMenu* m_catMenu, |
147 | *m_edit, | 147 | *m_edit, |
148 | *m_options, | 148 | *m_options, |
149 | *m_template; | 149 | *m_template; |
150 | 150 | ||
151 | bool m_syncing:1; | 151 | bool m_syncing:1; |
152 | bool m_deadline:1; | 152 | bool m_deadline:1; |
153 | bool m_completed:1; | 153 | bool m_completed:1; |
154 | bool m_overdue:1; | 154 | bool m_overdue:1; |
155 | bool m_quicktask:1; | 155 | bool m_quicktask:1; |
156 | TodoManager m_todoMgr; | 156 | TodoManager m_todoMgr; |
157 | QString m_curCat; | 157 | QString m_curCat; |
158 | QList<ViewBase> m_views; | 158 | QList<ViewBase> m_views; |
159 | uint m_counter; | 159 | uint m_counter; |
160 | TemplateManager* m_tempManager; | 160 | TemplateManager* m_tempManager; |
161 | 161 | ||
diff --git a/core/pim/todo/otaskeditor.cpp b/core/pim/todo/otaskeditor.cpp index d1e50f7..f0128bc 100644 --- a/core/pim/todo/otaskeditor.cpp +++ b/core/pim/todo/otaskeditor.cpp | |||
@@ -1,24 +1,25 @@ | |||
1 | #include <qlayout.h> | 1 | #include <qlayout.h> |
2 | 2 | ||
3 | #include "taskeditoroverview.h" | 3 | #include "taskeditoroverview.h" |
4 | #include "taskeditorstatus.h" | 4 | #include "taskeditorstatus.h" |
5 | #include "taskeditoralarms.h" | 5 | #include "taskeditoralarms.h" |
6 | 6 | ||
7 | #include "otaskeditor.h" | 7 | #include "otaskeditor.h" |
8 | 8 | ||
9 | using namespace Opie::Ui; | ||
9 | OTaskEditor::OTaskEditor(int cur) | 10 | OTaskEditor::OTaskEditor(int cur) |
10 | : QDialog( 0, 0, TRUE, WStyle_ContextHelp ) { | 11 | : QDialog( 0, 0, TRUE, WStyle_ContextHelp ) { |
11 | init(); | 12 | init(); |
12 | init( cur ); | 13 | init( cur ); |
13 | } | 14 | } |
14 | OTaskEditor::OTaskEditor( const OPimTodo& to) | 15 | OTaskEditor::OTaskEditor( const OPimTodo& to) |
15 | : QDialog( 0, 0, TRUE, WStyle_ContextHelp ) { | 16 | : QDialog( 0, 0, TRUE, WStyle_ContextHelp ) { |
16 | init(); | 17 | init(); |
17 | init( to ); | 18 | init( to ); |
18 | } | 19 | } |
19 | OTaskEditor::~OTaskEditor() { | 20 | OTaskEditor::~OTaskEditor() { |
20 | 21 | ||
21 | } | 22 | } |
22 | void OTaskEditor::init( int cur ) { | 23 | void OTaskEditor::init( int cur ) { |
23 | OPimTodo to; | 24 | OPimTodo to; |
24 | to.setUid( 1 ); // generate a new uid | 25 | to.setUid( 1 ); // generate a new uid |
diff --git a/core/pim/todo/otaskeditor.h b/core/pim/todo/otaskeditor.h index 7068df8..4a00018 100644 --- a/core/pim/todo/otaskeditor.h +++ b/core/pim/todo/otaskeditor.h | |||
@@ -18,26 +18,26 @@ public: | |||
18 | OTaskEditor(int cur); | 18 | OTaskEditor(int cur); |
19 | OTaskEditor( const OPimTodo& todo ); | 19 | OTaskEditor( const OPimTodo& todo ); |
20 | ~OTaskEditor(); | 20 | ~OTaskEditor(); |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * same as the c'tor but this gives us the | 23 | * same as the c'tor but this gives us the |
24 | * power to 'preload' the dialog | 24 | * power to 'preload' the dialog |
25 | */ | 25 | */ |
26 | void init( int cur ); | 26 | void init( int cur ); |
27 | void init( const OPimTodo& todo ); | 27 | void init( const OPimTodo& todo ); |
28 | 28 | ||
29 | OPimTodo todo()const; | 29 | OPimTodo todo()const; |
30 | private: | 30 | private: |
31 | void load( const OPimTodo& ); | 31 | void load( const OPimTodo& ); |
32 | void init(); | 32 | void init(); |
33 | 33 | ||
34 | OTabWidget *m_tab; | 34 | Opie::Ui::OTabWidget *m_tab; |
35 | TaskEditorOverView *m_overView; | 35 | TaskEditorOverView *m_overView; |
36 | TaskEditorStatus *m_stat; | 36 | TaskEditorStatus *m_stat; |
37 | TaskEditorAlarms *m_alarm; | 37 | TaskEditorAlarms *m_alarm; |
38 | TaskEditorAlarms *m_remind; | 38 | TaskEditorAlarms *m_remind; |
39 | OPimRecurrenceWidget *m_rec; | 39 | OPimRecurrenceWidget *m_rec; |
40 | OPimTodo m_todo; | 40 | OPimTodo m_todo; |
41 | }; | 41 | }; |
42 | 42 | ||
43 | #endif | 43 | #endif |
diff --git a/core/pim/todo/quickeditimpl.cpp b/core/pim/todo/quickeditimpl.cpp index 94ae97e..90ad19e 100644 --- a/core/pim/todo/quickeditimpl.cpp +++ b/core/pim/todo/quickeditimpl.cpp | |||
@@ -1,40 +1,41 @@ | |||
1 | #include <qaction.h> | 1 | #include <qaction.h> |
2 | #include <qlineedit.h> | 2 | #include <qlineedit.h> |
3 | #include <qwhatsthis.h> | 3 | #include <qwhatsthis.h> |
4 | 4 | ||
5 | #include <qpe/resource.h> | 5 | #include <qpe/resource.h> |
6 | 6 | ||
7 | #include <opie2/oclickablelabel.h> | 7 | #include <opie2/oclickablelabel.h> |
8 | 8 | ||
9 | #include "mainwindow.h" | 9 | #include "mainwindow.h" |
10 | #include "quickeditimpl.h" | 10 | #include "quickeditimpl.h" |
11 | 11 | ||
12 | 12 | ||
13 | |||
13 | QuickEditImpl::QuickEditImpl( QWidget* parent, bool visible ) | 14 | QuickEditImpl::QuickEditImpl( QWidget* parent, bool visible ) |
14 | : QToolBar( (QMainWindow *)parent ), Todo::QuickEdit( (Todo::MainWindow *)parent ) { | 15 | : QToolBar( (QMainWindow *)parent ), Todo::QuickEdit( (Todo::MainWindow *)parent ) { |
15 | setHorizontalStretchable( TRUE ); | 16 | setHorizontalStretchable( TRUE ); |
16 | 17 | ||
17 | // Load priority icons | 18 | // Load priority icons |
18 | // TODO - probably should be done globally somewhere else, | 19 | // TODO - probably should be done globally somewhere else, |
19 | // see also tableview.cpp/h, taskeditoroverview.cpp/h | 20 | // see also tableview.cpp/h, taskeditoroverview.cpp/h |
20 | priority1 = Resource::loadPixmap( "todo/priority1" ); | 21 | priority1 = Resource::loadPixmap( "todo/priority1" ); |
21 | priority3 = Resource::loadPixmap( "todo/priority3" ); | 22 | priority3 = Resource::loadPixmap( "todo/priority3" ); |
22 | priority5 = Resource::loadPixmap( "todo/priority5" ); | 23 | priority5 = Resource::loadPixmap( "todo/priority5" ); |
23 | 24 | ||
24 | m_lbl = new Opie::OClickableLabel( this ); | 25 | m_lbl = new Opie::Ui::OClickableLabel( this ); |
25 | m_lbl->setMinimumWidth( 15 ); | 26 | m_lbl->setMinimumWidth( 15 ); |
26 | m_lbl->setPixmap( priority3 ); | 27 | m_lbl->setPixmap( priority3 ); |
27 | connect(m_lbl, SIGNAL(clicked() ), this, SLOT(slotPrio()) ); | 28 | connect(m_lbl, SIGNAL(clicked() ), this, SLOT(slotPrio()) ); |
28 | QWhatsThis::add( m_lbl, QWidget::tr( "Click here to set the priority of new task.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); | 29 | QWhatsThis::add( m_lbl, QWidget::tr( "Click here to set the priority of new task.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); |
29 | 30 | ||
30 | m_edit = new QLineEdit( this ); | 31 | m_edit = new QLineEdit( this ); |
31 | setStretchableWidget( m_edit ); | 32 | setStretchableWidget( m_edit ); |
32 | QWhatsThis::add( m_edit, QWidget::tr( "Enter description of new task here.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); | 33 | QWhatsThis::add( m_edit, QWidget::tr( "Enter description of new task here.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); |
33 | 34 | ||
34 | /* | 35 | /* |
35 | * it's not implemented and won't be implemented for 1.0 | 36 | * it's not implemented and won't be implemented for 1.0 |
36 | */ | 37 | */ |
37 | #if 0 | 38 | #if 0 |
38 | QAction *a = new QAction( QWidget::tr( "More" ), Resource::loadPixmap( "todo/more" ), QString::null, 0, this, 0 ); | 39 | QAction *a = new QAction( QWidget::tr( "More" ), Resource::loadPixmap( "todo/more" ), QString::null, 0, this, 0 ); |
39 | connect( a, SIGNAL( activated() ), this, SLOT( slotMore() ) ); | 40 | connect( a, SIGNAL( activated() ), this, SLOT( slotMore() ) ); |
40 | a->addTo( this ); | 41 | a->addTo( this ); |
diff --git a/core/pim/todo/taskeditoralarms.cpp b/core/pim/todo/taskeditoralarms.cpp index a512fb0..62fc600 100644 --- a/core/pim/todo/taskeditoralarms.cpp +++ b/core/pim/todo/taskeditoralarms.cpp | |||
@@ -25,32 +25,33 @@ | |||
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "taskeditoralarms.h" | 29 | #include "taskeditoralarms.h" |
30 | 30 | ||
31 | #include <opie2/opimnotifymanager.h> | 31 | #include <opie2/opimnotifymanager.h> |
32 | #include <opie2/otimepicker.h> | 32 | #include <opie2/otimepicker.h> |
33 | 33 | ||
34 | #include <qpe/datebookmonth.h> | 34 | #include <qpe/datebookmonth.h> |
35 | #include <qpe/resource.h> | 35 | #include <qpe/resource.h> |
36 | 36 | ||
37 | #include <qlistview.h> | 37 | #include <qlistview.h> |
38 | #include <qlayout.h> | 38 | #include <qlayout.h> |
39 | 39 | ||
40 | 40 | ||
41 | using namespace Opie::Ui; | ||
41 | class AlarmItem : public QListViewItem { | 42 | class AlarmItem : public QListViewItem { |
42 | public: | 43 | public: |
43 | AlarmItem( QListView*, const OPimAlarm& ); | 44 | AlarmItem( QListView*, const OPimAlarm& ); |
44 | ~AlarmItem(); | 45 | ~AlarmItem(); |
45 | 46 | ||
46 | OPimAlarm alarm()const; | 47 | OPimAlarm alarm()const; |
47 | void setAlarm( const OPimAlarm& ); | 48 | void setAlarm( const OPimAlarm& ); |
48 | private: | 49 | private: |
49 | QDateTime m_dt; | 50 | QDateTime m_dt; |
50 | int m_type; | 51 | int m_type; |
51 | }; | 52 | }; |
52 | AlarmItem::AlarmItem( QListView* view, const OPimAlarm& dt) | 53 | AlarmItem::AlarmItem( QListView* view, const OPimAlarm& dt) |
53 | : QListViewItem(view) { | 54 | : QListViewItem(view) { |
54 | setAlarm( dt ); | 55 | setAlarm( dt ); |
55 | } | 56 | } |
56 | void AlarmItem::setAlarm( const OPimAlarm& dt ) { | 57 | void AlarmItem::setAlarm( const OPimAlarm& dt ) { |