author | zecke <zecke> | 2004-03-14 20:37:48 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-14 20:37:48 (UTC) |
commit | fb19e9dc49a8ed0f1b85fa88ed97d357000955e1 (patch) (unidiff) | |
tree | 9fb860c6fdda787351cabb5e57a4ef1661bdb60c | |
parent | c4784ed159d96c6ba69dcf53eed9fe791e732e52 (diff) | |
download | opie-fb19e9dc49a8ed0f1b85fa88ed97d357000955e1.zip opie-fb19e9dc49a8ed0f1b85fa88ed97d357000955e1.tar.gz opie-fb19e9dc49a8ed0f1b85fa88ed97d357000955e1.tar.bz2 |
no using namespace in a header
-rw-r--r-- | core/pim/osearch/adresssearch.cpp | 1 | ||||
-rw-r--r-- | core/pim/osearch/adresssearch.h | 3 | ||||
-rw-r--r-- | core/pim/osearch/contactitem.cpp | 2 | ||||
-rw-r--r-- | core/pim/osearch/contactitem.h | 5 | ||||
-rw-r--r-- | core/pim/osearch/eventitem.cpp | 1 | ||||
-rw-r--r-- | core/pim/osearch/eventitem.h | 5 | ||||
-rw-r--r-- | core/pim/osearch/todoitem.h | 5 | ||||
-rw-r--r-- | core/pim/osearch/todosearch.cpp | 2 | ||||
-rw-r--r-- | core/pim/osearch/todosearch.h | 3 | ||||
-rw-r--r-- | core/pim/today/plugins/datebook/datebookpluginwidget.h | 3 | ||||
-rw-r--r-- | core/pim/today/plugins/mail/mailpluginwidget.cpp | 1 | ||||
-rw-r--r-- | core/pim/today/plugins/mail/mailpluginwidget.h | 5 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todoplugin.h | 3 |
13 files changed, 17 insertions, 22 deletions
diff --git a/core/pim/osearch/adresssearch.cpp b/core/pim/osearch/adresssearch.cpp index 6891f03..f0495c6 100644 --- a/core/pim/osearch/adresssearch.cpp +++ b/core/pim/osearch/adresssearch.cpp | |||
@@ -1,59 +1,60 @@ | |||
1 | // | 1 | // |
2 | // | 2 | // |
3 | // C++ Implementation: $MODULE$ | 3 | // C++ Implementation: $MODULE$ |
4 | // | 4 | // |
5 | // Description: | 5 | // Description: |
6 | // | 6 | // |
7 | // | 7 | // |
8 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 | 8 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 |
9 | // | 9 | // |
10 | // Copyright: See COPYING file that comes with this distribution | 10 | // Copyright: See COPYING file that comes with this distribution |
11 | // | 11 | // |
12 | // | 12 | // |
13 | #include "adresssearch.h" | 13 | #include "adresssearch.h" |
14 | #include "contactitem.h" | 14 | #include "contactitem.h" |
15 | 15 | ||
16 | #include <qpe/resource.h> | 16 | #include <qpe/resource.h> |
17 | 17 | ||
18 | //#include <qwhatsthis.h> | 18 | //#include <qwhatsthis.h> |
19 | 19 | ||
20 | using namespace Opie; | ||
20 | AdressSearch::AdressSearch(QListView* parent, QString name): | 21 | AdressSearch::AdressSearch(QListView* parent, QString name): |
21 | SearchGroup(parent, name) | 22 | SearchGroup(parent, name) |
22 | { | 23 | { |
23 | _contacts = 0; | 24 | _contacts = 0; |
24 | QIconSet is = Resource::loadIconSet( "addressbook/AddressBookSmall" ); | 25 | QIconSet is = Resource::loadIconSet( "addressbook/AddressBookSmall" ); |
25 | setPixmap( 0, is.pixmap( QIconSet::Large, true ) ); | 26 | setPixmap( 0, is.pixmap( QIconSet::Large, true ) ); |
26 | 27 | ||
27 | 28 | ||
28 | //QWhatsThis::add( this, QObject::tr("Search the addressbook") ); | 29 | //QWhatsThis::add( this, QObject::tr("Search the addressbook") ); |
29 | /*QPixmap pix = Resource::loadPixmap( "addressbook/AddressBook" ); | 30 | /*QPixmap pix = Resource::loadPixmap( "addressbook/AddressBook" ); |
30 | QImage img = pix.convertToImage(); | 31 | QImage img = pix.convertToImage(); |
31 | img.smoothScale( 14, 14 ); | 32 | img.smoothScale( 14, 14 ); |
32 | pix.convertFromImage( img ); | 33 | pix.convertFromImage( img ); |
33 | setPixmap( 0, pix );*/ | 34 | setPixmap( 0, pix );*/ |
34 | } | 35 | } |
35 | 36 | ||
36 | 37 | ||
37 | AdressSearch::~AdressSearch() | 38 | AdressSearch::~AdressSearch() |
38 | { | 39 | { |
39 | delete _contacts; | 40 | delete _contacts; |
40 | } | 41 | } |
41 | 42 | ||
42 | void AdressSearch::load() | 43 | void AdressSearch::load() |
43 | { | 44 | { |
44 | _contacts = new OPimContactAccess("osearch"); | 45 | _contacts = new OPimContactAccess("osearch"); |
45 | } | 46 | } |
46 | 47 | ||
47 | int AdressSearch::search() | 48 | int AdressSearch::search() |
48 | { | 49 | { |
49 | OPimRecordList<OPimContact> results = _contacts->matchRegexp(_search); | 50 | OPimRecordList<OPimContact> results = _contacts->matchRegexp(_search); |
50 | for (uint i = 0; i < results.count(); i++) { | 51 | for (uint i = 0; i < results.count(); i++) { |
51 | (void)new ContactItem( this, new OPimContact( results[i] )); | 52 | (void)new ContactItem( this, new OPimContact( results[i] )); |
52 | } | 53 | } |
53 | return results.count(); | 54 | return results.count(); |
54 | } | 55 | } |
55 | 56 | ||
56 | void AdressSearch::insertItem( void* ) | 57 | void AdressSearch::insertItem( void* ) |
57 | { | 58 | { |
58 | 59 | ||
59 | } | 60 | } |
diff --git a/core/pim/osearch/adresssearch.h b/core/pim/osearch/adresssearch.h index 028521a..34c4f11 100644 --- a/core/pim/osearch/adresssearch.h +++ b/core/pim/osearch/adresssearch.h | |||
@@ -1,38 +1,37 @@ | |||
1 | // C++ Interface: $MODULE$ | 1 | // C++ Interface: $MODULE$ |
2 | // | 2 | // |
3 | // Description: | 3 | // Description: |
4 | // | 4 | // |
5 | // | 5 | // |
6 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 | 6 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 |
7 | // | 7 | // |
8 | // Copyright: See COPYING file that comes with this distribution | 8 | // Copyright: See COPYING file that comes with this distribution |
9 | // | 9 | // |
10 | // | 10 | // |
11 | #ifndef ADRESSSEARCH_H | 11 | #ifndef ADRESSSEARCH_H |
12 | #define ADRESSSEARCH_H | 12 | #define ADRESSSEARCH_H |
13 | 13 | ||
14 | #include "searchgroup.h" | 14 | #include "searchgroup.h" |
15 | #include <opie2/ocontactaccess.h> | 15 | #include <opie2/ocontactaccess.h> |
16 | 16 | ||
17 | using namespace Opie; | ||
18 | 17 | ||
19 | 18 | ||
20 | /** | 19 | /** |
21 | @author Patrick S. Vogt | 20 | @author Patrick S. Vogt |
22 | */ | 21 | */ |
23 | class AdressSearch : public SearchGroup | 22 | class AdressSearch : public SearchGroup |
24 | { | 23 | { |
25 | public: | 24 | public: |
26 | AdressSearch(QListView* parent, QString name); | 25 | AdressSearch(QListView* parent, QString name); |
27 | ~AdressSearch(); | 26 | ~AdressSearch(); |
28 | 27 | ||
29 | protected: | 28 | protected: |
30 | virtual void load(); | 29 | virtual void load(); |
31 | virtual int search(); | 30 | virtual int search(); |
32 | virtual void insertItem( void* ); | 31 | virtual void insertItem( void* ); |
33 | 32 | ||
34 | private: | 33 | private: |
35 | OPimContactAccess *_contacts; | 34 | Opie::OPimContactAccess *_contacts; |
36 | }; | 35 | }; |
37 | 36 | ||
38 | #endif | 37 | #endif |
diff --git a/core/pim/osearch/contactitem.cpp b/core/pim/osearch/contactitem.cpp index 639af46..c89c6e2 100644 --- a/core/pim/osearch/contactitem.cpp +++ b/core/pim/osearch/contactitem.cpp | |||
@@ -1,141 +1,141 @@ | |||
1 | // | 1 | // |
2 | // | 2 | // |
3 | // C++ Implementation: $MODULE$ | 3 | // C++ Implementation: $MODULE$ |
4 | // | 4 | // |
5 | // Description: | 5 | // Description: |
6 | // | 6 | // |
7 | // | 7 | // |
8 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 | 8 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 |
9 | // | 9 | // |
10 | // Copyright: See COPYING file that comes with this distribution | 10 | // Copyright: See COPYING file that comes with this distribution |
11 | // | 11 | // |
12 | // | 12 | // |
13 | #include "contactitem.h" | 13 | #include "contactitem.h" |
14 | 14 | ||
15 | #include <qpe/resource.h> | 15 | #include <qpe/resource.h> |
16 | #include <qpe/qcopenvelope_qws.h> | 16 | #include <qpe/qcopenvelope_qws.h> |
17 | 17 | ||
18 | 18 | ||
19 | 19 | using namespace Opie; | |
20 | ContactItem::ContactItem(OListViewItem* parent, OPimContact *contact) | 20 | ContactItem::ContactItem(OListViewItem* parent, OPimContact *contact) |
21 | : ResultItem(parent) | 21 | : ResultItem(parent) |
22 | { | 22 | { |
23 | _contact = contact; | 23 | _contact = contact; |
24 | setText(0, _contact->toShortText()); | 24 | setText(0, _contact->toShortText()); |
25 | setIcon(); | 25 | setIcon(); |
26 | } | 26 | } |
27 | 27 | ||
28 | void ContactItem::setIcon() | 28 | void ContactItem::setIcon() |
29 | { | 29 | { |
30 | QPixmap icon; | 30 | QPixmap icon; |
31 | switch ( _contact->lastHitField() ) { | 31 | switch ( _contact->lastHitField() ) { |
32 | case -1: | 32 | case -1: |
33 | icon = Resource::loadPixmap( "reset" ); | 33 | icon = Resource::loadPixmap( "reset" ); |
34 | break; | 34 | break; |
35 | case Qtopia::BusinessPhone: | 35 | case Qtopia::BusinessPhone: |
36 | icon = Resource::loadPixmap( "addressbook/phonework" ); | 36 | icon = Resource::loadPixmap( "addressbook/phonework" ); |
37 | break; | 37 | break; |
38 | case Qtopia::BusinessFax: | 38 | case Qtopia::BusinessFax: |
39 | icon = Resource::loadPixmap( "addressbook/faxwork" ); | 39 | icon = Resource::loadPixmap( "addressbook/faxwork" ); |
40 | break; | 40 | break; |
41 | case Qtopia::BusinessMobile: | 41 | case Qtopia::BusinessMobile: |
42 | icon = Resource::loadPixmap( "addressbook/mobilework" ); | 42 | icon = Resource::loadPixmap( "addressbook/mobilework" ); |
43 | break; | 43 | break; |
44 | case Qtopia::DefaultEmail: | 44 | case Qtopia::DefaultEmail: |
45 | case Qtopia::Emails: | 45 | case Qtopia::Emails: |
46 | icon = Resource::loadPixmap( "addressbook/email" ); | 46 | icon = Resource::loadPixmap( "addressbook/email" ); |
47 | break; | 47 | break; |
48 | case Qtopia::HomePhone: | 48 | case Qtopia::HomePhone: |
49 | icon = Resource::loadPixmap( "addressbook/phonehome" ); | 49 | icon = Resource::loadPixmap( "addressbook/phonehome" ); |
50 | break; | 50 | break; |
51 | case Qtopia::HomeFax: | 51 | case Qtopia::HomeFax: |
52 | icon = Resource::loadPixmap( "addressbook/faxhome" ); | 52 | icon = Resource::loadPixmap( "addressbook/faxhome" ); |
53 | break; | 53 | break; |
54 | case Qtopia::HomeMobile: | 54 | case Qtopia::HomeMobile: |
55 | icon = Resource::loadPixmap( "addressbook/mobilehome" ); | 55 | icon = Resource::loadPixmap( "addressbook/mobilehome" ); |
56 | break; | 56 | break; |
57 | case Qtopia::HomeWebPage: | 57 | case Qtopia::HomeWebPage: |
58 | icon = Resource::loadPixmap( "addressbook/webpagehome" ); | 58 | icon = Resource::loadPixmap( "addressbook/webpagehome" ); |
59 | break; | 59 | break; |
60 | case Qtopia::BusinessWebPage: | 60 | case Qtopia::BusinessWebPage: |
61 | icon = Resource::loadPixmap( "addressbook/webpagework" ); | 61 | icon = Resource::loadPixmap( "addressbook/webpagework" ); |
62 | break; | 62 | break; |
63 | case Qtopia::Title: | 63 | case Qtopia::Title: |
64 | case Qtopia::JobTitle: | 64 | case Qtopia::JobTitle: |
65 | case Qtopia::FirstName: | 65 | case Qtopia::FirstName: |
66 | case Qtopia::MiddleName: | 66 | case Qtopia::MiddleName: |
67 | case Qtopia::LastName: | 67 | case Qtopia::LastName: |
68 | case Qtopia::Suffix: | 68 | case Qtopia::Suffix: |
69 | case Qtopia::Nickname: | 69 | case Qtopia::Nickname: |
70 | case Qtopia::FileAs: | 70 | case Qtopia::FileAs: |
71 | icon = Resource::loadPixmap( "addressbook/identity" ); | 71 | icon = Resource::loadPixmap( "addressbook/identity" ); |
72 | break; | 72 | break; |
73 | case Qtopia::HomeStreet: | 73 | case Qtopia::HomeStreet: |
74 | case Qtopia::HomeCity: | 74 | case Qtopia::HomeCity: |
75 | case Qtopia::HomeState: | 75 | case Qtopia::HomeState: |
76 | case Qtopia::HomeZip: | 76 | case Qtopia::HomeZip: |
77 | case Qtopia::HomeCountry: | 77 | case Qtopia::HomeCountry: |
78 | icon = Resource::loadPixmap( "osearch/addresshome" ); | 78 | icon = Resource::loadPixmap( "osearch/addresshome" ); |
79 | break; | 79 | break; |
80 | case Qtopia::Company: | 80 | case Qtopia::Company: |
81 | case Qtopia::BusinessCity: | 81 | case Qtopia::BusinessCity: |
82 | case Qtopia::BusinessStreet: | 82 | case Qtopia::BusinessStreet: |
83 | case Qtopia::BusinessZip: | 83 | case Qtopia::BusinessZip: |
84 | case Qtopia::BusinessCountry: | 84 | case Qtopia::BusinessCountry: |
85 | case Qtopia::Department: | 85 | case Qtopia::Department: |
86 | case Qtopia::Office: | 86 | case Qtopia::Office: |
87 | case Qtopia::Manager: | 87 | case Qtopia::Manager: |
88 | case Qtopia::BusinessPager: | 88 | case Qtopia::BusinessPager: |
89 | case Qtopia::Profession: | 89 | case Qtopia::Profession: |
90 | icon = Resource::loadPixmap( "osearch/addresshome" ); | 90 | icon = Resource::loadPixmap( "osearch/addresshome" ); |
91 | break; | 91 | break; |
92 | case Qtopia::Assistant: | 92 | case Qtopia::Assistant: |
93 | case Qtopia::Spouse: | 93 | case Qtopia::Spouse: |
94 | case Qtopia::Children: | 94 | case Qtopia::Children: |
95 | icon = Resource::loadPixmap( "osearch/personal" ); | 95 | icon = Resource::loadPixmap( "osearch/personal" ); |
96 | break; | 96 | break; |
97 | case Qtopia::Birthday: | 97 | case Qtopia::Birthday: |
98 | case Qtopia::Anniversary: | 98 | case Qtopia::Anniversary: |
99 | icon = Resource::loadPixmap( "osearch/clock" ); | 99 | icon = Resource::loadPixmap( "osearch/clock" ); |
100 | break; | 100 | break; |
101 | case Qtopia::Notes: | 101 | case Qtopia::Notes: |
102 | icon = Resource::loadPixmap( "txt" ); | 102 | icon = Resource::loadPixmap( "txt" ); |
103 | break; | 103 | break; |
104 | default: | 104 | default: |
105 | icon = Resource::loadPixmap( "DocsIcon" ); | 105 | icon = Resource::loadPixmap( "DocsIcon" ); |
106 | break; | 106 | break; |
107 | } | 107 | } |
108 | setPixmap( 0, icon ); | 108 | setPixmap( 0, icon ); |
109 | } | 109 | } |
110 | 110 | ||
111 | ContactItem::~ContactItem() | 111 | ContactItem::~ContactItem() |
112 | { | 112 | { |
113 | delete _contact; | 113 | delete _contact; |
114 | } | 114 | } |
115 | 115 | ||
116 | 116 | ||
117 | QString ContactItem::toRichText() | 117 | QString ContactItem::toRichText() |
118 | { | 118 | { |
119 | return _contact->toRichText(); | 119 | return _contact->toRichText(); |
120 | } | 120 | } |
121 | 121 | ||
122 | void ContactItem::action( int act ) | 122 | void ContactItem::action( int act ) |
123 | { | 123 | { |
124 | if (act == 0){ | 124 | if (act == 0){ |
125 | QCopEnvelope e("QPE/Application/addressbook", "show(int)"); | 125 | QCopEnvelope e("QPE/Application/addressbook", "show(int)"); |
126 | e << _contact->uid(); | 126 | e << _contact->uid(); |
127 | }else if(act == 1){ | 127 | }else if(act == 1){ |
128 | QCopEnvelope e("QPE/Application/addressbook", "edit(int)"); | 128 | QCopEnvelope e("QPE/Application/addressbook", "edit(int)"); |
129 | e << _contact->uid(); | 129 | e << _contact->uid(); |
130 | } | 130 | } |
131 | 131 | ||
132 | } | 132 | } |
133 | 133 | ||
134 | QIntDict<QString> ContactItem::actions() | 134 | QIntDict<QString> ContactItem::actions() |
135 | { | 135 | { |
136 | QIntDict<QString> result; | 136 | QIntDict<QString> result; |
137 | result.insert( 0, new QString( QObject::tr("show") ) ); | 137 | result.insert( 0, new QString( QObject::tr("show") ) ); |
138 | result.insert( 1, new QString( QObject::tr("edit") ) ); | 138 | result.insert( 1, new QString( QObject::tr("edit") ) ); |
139 | return result; | 139 | return result; |
140 | 140 | ||
141 | } | 141 | } |
diff --git a/core/pim/osearch/contactitem.h b/core/pim/osearch/contactitem.h index 3c553fc..c038082 100644 --- a/core/pim/osearch/contactitem.h +++ b/core/pim/osearch/contactitem.h | |||
@@ -1,44 +1,43 @@ | |||
1 | // | 1 | // |
2 | // | 2 | // |
3 | // C++ Interface: $MODULE$ | 3 | // C++ Interface: $MODULE$ |
4 | // | 4 | // |
5 | // Description: | 5 | // Description: |
6 | // | 6 | // |
7 | // | 7 | // |
8 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 | 8 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 |
9 | // | 9 | // |
10 | // Copyright: See COPYING file that comes with this distribution | 10 | // Copyright: See COPYING file that comes with this distribution |
11 | // | 11 | // |
12 | // | 12 | // |
13 | #ifndef CONTACTITEM_H | 13 | #ifndef CONTACTITEM_H |
14 | #define CONTACTITEM_H | 14 | #define CONTACTITEM_H |
15 | 15 | ||
16 | #include <opie2/opimrecord.h> | 16 | #include <opie2/opimrecord.h> |
17 | #include <opie2/opimcontact.h> | 17 | #include <opie2/opimcontact.h> |
18 | 18 | ||
19 | #include "resultitem.h" | 19 | #include "resultitem.h" |
20 | 20 | ||
21 | using namespace Opie; | ||
22 | 21 | ||
23 | /** | 22 | /** |
24 | @author Patrick S. Vogt | 23 | @author Patrick S. Vogt |
25 | */ | 24 | */ |
26 | class ContactItem : public ResultItem | 25 | class ContactItem : public ResultItem |
27 | { | 26 | { |
28 | public: | 27 | public: |
29 | ContactItem(OListViewItem* parent, OPimContact *contact); | 28 | ContactItem(OListViewItem* parent, Opie::OPimContact *contact); |
30 | 29 | ||
31 | ~ContactItem(); | 30 | ~ContactItem(); |
32 | 31 | ||
33 | virtual QString toRichText(); | 32 | virtual QString toRichText(); |
34 | virtual void action( int ); | 33 | virtual void action( int ); |
35 | virtual QIntDict<QString> actions(); | 34 | virtual QIntDict<QString> actions(); |
36 | 35 | ||
37 | 36 | ||
38 | private: | 37 | private: |
39 | void setIcon(); | 38 | void setIcon(); |
40 | OPimContact *_contact; | 39 | Opie::OPimContact *_contact; |
41 | 40 | ||
42 | }; | 41 | }; |
43 | 42 | ||
44 | #endif | 43 | #endif |
diff --git a/core/pim/osearch/eventitem.cpp b/core/pim/osearch/eventitem.cpp index 8dcfc70..7bcf340 100644 --- a/core/pim/osearch/eventitem.cpp +++ b/core/pim/osearch/eventitem.cpp | |||
@@ -1,84 +1,85 @@ | |||
1 | // | 1 | // |
2 | // | 2 | // |
3 | // C++ Implementation: $MODULE$ | 3 | // C++ Implementation: $MODULE$ |
4 | // | 4 | // |
5 | // Description: | 5 | // Description: |
6 | // | 6 | // |
7 | // | 7 | // |
8 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 | 8 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 |
9 | // | 9 | // |
10 | // Copyright: See COPYING file that comes with this distribution | 10 | // Copyright: See COPYING file that comes with this distribution |
11 | // | 11 | // |
12 | // | 12 | // |
13 | #include "eventitem.h" | 13 | #include "eventitem.h" |
14 | 14 | ||
15 | 15 | ||
16 | #include <qpe/resource.h> | 16 | #include <qpe/resource.h> |
17 | #include <qpe/qcopenvelope_qws.h> | 17 | #include <qpe/qcopenvelope_qws.h> |
18 | 18 | ||
19 | 19 | ||
20 | using namespace Opie; | ||
20 | EventItem::EventItem(OListViewItem* parent, OPimEvent *event) | 21 | EventItem::EventItem(OListViewItem* parent, OPimEvent *event) |
21 | : ResultItem(parent) | 22 | : ResultItem(parent) |
22 | { | 23 | { |
23 | _event = event; | 24 | _event = event; |
24 | setText(0, _event->toShortText() ); | 25 | setText(0, _event->toShortText() ); |
25 | setIcon(); | 26 | setIcon(); |
26 | } | 27 | } |
27 | 28 | ||
28 | 29 | ||
29 | EventItem::~EventItem() | 30 | EventItem::~EventItem() |
30 | { | 31 | { |
31 | } | 32 | } |
32 | 33 | ||
33 | 34 | ||
34 | QString EventItem::toRichText() | 35 | QString EventItem::toRichText() |
35 | { | 36 | { |
36 | return _event->toRichText(); | 37 | return _event->toRichText(); |
37 | } | 38 | } |
38 | 39 | ||
39 | void EventItem::action( int act ) | 40 | void EventItem::action( int act ) |
40 | { | 41 | { |
41 | if (act == 0){ | 42 | if (act == 0){ |
42 | QCopEnvelope e("QPE/Application/datebook", "viewDefault(QDate)"); | 43 | QCopEnvelope e("QPE/Application/datebook", "viewDefault(QDate)"); |
43 | e << _event->startDateTime().date(); | 44 | e << _event->startDateTime().date(); |
44 | }else if(act == 1){ | 45 | }else if(act == 1){ |
45 | QCopEnvelope e("QPE/Application/datebook", "editEvent(int)"); | 46 | QCopEnvelope e("QPE/Application/datebook", "editEvent(int)"); |
46 | e << _event->uid(); | 47 | e << _event->uid(); |
47 | } | 48 | } |
48 | } | 49 | } |
49 | 50 | ||
50 | QIntDict<QString> EventItem::actions() | 51 | QIntDict<QString> EventItem::actions() |
51 | { | 52 | { |
52 | QIntDict<QString> result; | 53 | QIntDict<QString> result; |
53 | result.insert( 0, new QString( QObject::tr("show") ) ); | 54 | result.insert( 0, new QString( QObject::tr("show") ) ); |
54 | result.insert( 1, new QString( QObject::tr("edit") ) ); | 55 | result.insert( 1, new QString( QObject::tr("edit") ) ); |
55 | return result; | 56 | return result; |
56 | } | 57 | } |
57 | 58 | ||
58 | void EventItem::setIcon() | 59 | void EventItem::setIcon() |
59 | { | 60 | { |
60 | QPixmap icon; | 61 | QPixmap icon; |
61 | switch ( _event->lastHitField() ) { | 62 | switch ( _event->lastHitField() ) { |
62 | case -1: | 63 | case -1: |
63 | icon = Resource::loadPixmap( "reset" ); | 64 | icon = Resource::loadPixmap( "reset" ); |
64 | // QWhatsThis::add( icon, QObject::tr("Enter your search terms here") ); | 65 | // QWhatsThis::add( icon, QObject::tr("Enter your search terms here") ); |
65 | break; | 66 | break; |
66 | case Qtopia::DatebookDescription: | 67 | case Qtopia::DatebookDescription: |
67 | icon = Resource::loadPixmap( "osearch/summary" ); | 68 | icon = Resource::loadPixmap( "osearch/summary" ); |
68 | break; | 69 | break; |
69 | case Qtopia::Notes: | 70 | case Qtopia::Notes: |
70 | icon = Resource::loadPixmap( "txt" ); | 71 | icon = Resource::loadPixmap( "txt" ); |
71 | break; | 72 | break; |
72 | case Qtopia::Location: | 73 | case Qtopia::Location: |
73 | icon = Resource::loadPixmap( "home" ); | 74 | icon = Resource::loadPixmap( "home" ); |
74 | break; | 75 | break; |
75 | case Qtopia::StartDateTime: | 76 | case Qtopia::StartDateTime: |
76 | case Qtopia::EndDateTime: | 77 | case Qtopia::EndDateTime: |
77 | icon = Resource::loadPixmap( "osearch/clock" ); | 78 | icon = Resource::loadPixmap( "osearch/clock" ); |
78 | break; | 79 | break; |
79 | default: | 80 | default: |
80 | icon = Resource::loadPixmap( "DocsIcon" ); | 81 | icon = Resource::loadPixmap( "DocsIcon" ); |
81 | break; | 82 | break; |
82 | } | 83 | } |
83 | setPixmap( 0, icon ); | 84 | setPixmap( 0, icon ); |
84 | } | 85 | } |
diff --git a/core/pim/osearch/eventitem.h b/core/pim/osearch/eventitem.h index 68923f1..d121020 100644 --- a/core/pim/osearch/eventitem.h +++ b/core/pim/osearch/eventitem.h | |||
@@ -1,42 +1,41 @@ | |||
1 | // | 1 | // |
2 | // | 2 | // |
3 | // C++ Interface: $MODULE$ | 3 | // C++ Interface: $MODULE$ |
4 | // | 4 | // |
5 | // Description: | 5 | // Description: |
6 | // | 6 | // |
7 | // | 7 | // |
8 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 | 8 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 |
9 | // | 9 | // |
10 | // Copyright: See COPYING file that comes with this distribution | 10 | // Copyright: See COPYING file that comes with this distribution |
11 | // | 11 | // |
12 | // | 12 | // |
13 | #ifndef EVENTITEM_H | 13 | #ifndef EVENTITEM_H |
14 | #define EVENTITEM_H | 14 | #define EVENTITEM_H |
15 | 15 | ||
16 | #include "resultitem.h" | 16 | #include "resultitem.h" |
17 | 17 | ||
18 | #include <opie2/opimevent.h> | 18 | #include <opie2/opimevent.h> |
19 | 19 | ||
20 | using namespace Opie; | ||
21 | 20 | ||
22 | /** | 21 | /** |
23 | @author Patrick S. Vogt | 22 | @author Patrick S. Vogt |
24 | */ | 23 | */ |
25 | class EventItem : public ResultItem | 24 | class EventItem : public ResultItem |
26 | { | 25 | { |
27 | public: | 26 | public: |
28 | EventItem(OListViewItem* parent, OPimEvent *event); | 27 | EventItem(OListViewItem* parent, Opie::OPimEvent *event); |
29 | 28 | ||
30 | ~EventItem(); | 29 | ~EventItem(); |
31 | 30 | ||
32 | virtual QString toRichText(); | 31 | virtual QString toRichText(); |
33 | virtual void action( int ); | 32 | virtual void action( int ); |
34 | virtual QIntDict<QString> actions(); | 33 | virtual QIntDict<QString> actions(); |
35 | 34 | ||
36 | private: | 35 | private: |
37 | void setIcon(); | 36 | void setIcon(); |
38 | OPimEvent *_event; | 37 | Opie::OPimEvent *_event; |
39 | 38 | ||
40 | }; | 39 | }; |
41 | 40 | ||
42 | #endif | 41 | #endif |
diff --git a/core/pim/osearch/todoitem.h b/core/pim/osearch/todoitem.h index 7c8537b..031369a 100644 --- a/core/pim/osearch/todoitem.h +++ b/core/pim/osearch/todoitem.h | |||
@@ -1,41 +1,40 @@ | |||
1 | // | 1 | // |
2 | // | 2 | // |
3 | // C++ Interface: $MODULE$ | 3 | // C++ Interface: $MODULE$ |
4 | // | 4 | // |
5 | // Description: | 5 | // Description: |
6 | // | 6 | // |
7 | // | 7 | // |
8 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 | 8 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 |
9 | // | 9 | // |
10 | // Copyright: See COPYING file that comes with this distribution | 10 | // Copyright: See COPYING file that comes with this distribution |
11 | // | 11 | // |
12 | // | 12 | // |
13 | #ifndef TODOITEM_H | 13 | #ifndef TODOITEM_H |
14 | #define TODOITEM_H | 14 | #define TODOITEM_H |
15 | 15 | ||
16 | 16 | ||
17 | #include <opie2/opimtodo.h> | 17 | #include <opie2/opimtodo.h> |
18 | #include "resultitem.h" | 18 | #include "resultitem.h" |
19 | 19 | ||
20 | using namespace Opie; | ||
21 | 20 | ||
22 | /** | 21 | /** |
23 | @author Patrick S. Vogt | 22 | @author Patrick S. Vogt |
24 | */ | 23 | */ |
25 | class TodoItem : public ResultItem | 24 | class TodoItem : public ResultItem |
26 | { | 25 | { |
27 | public: | 26 | public: |
28 | TodoItem(OListViewItem* parent, OPimTodo *todo); | 27 | TodoItem(OListViewItem* parent, Opie::OPimTodo *todo); |
29 | ~TodoItem(); | 28 | ~TodoItem(); |
30 | 29 | ||
31 | virtual QString toRichText(); | 30 | virtual QString toRichText(); |
32 | virtual void action( int ); | 31 | virtual void action( int ); |
33 | virtual QIntDict<QString> actions(); | 32 | virtual QIntDict<QString> actions(); |
34 | 33 | ||
35 | private: | 34 | private: |
36 | void setIcon(); | 35 | void setIcon(); |
37 | OPimTodo *_todo; | 36 | Opie::OPimTodo *_todo; |
38 | 37 | ||
39 | }; | 38 | }; |
40 | 39 | ||
41 | #endif | 40 | #endif |
diff --git a/core/pim/osearch/todosearch.cpp b/core/pim/osearch/todosearch.cpp index cdf3a1c..1839566 100644 --- a/core/pim/osearch/todosearch.cpp +++ b/core/pim/osearch/todosearch.cpp | |||
@@ -1,79 +1,79 @@ | |||
1 | // | 1 | // |
2 | // | 2 | // |
3 | // C++ Implementation: $MODULE$ | 3 | // C++ Implementation: $MODULE$ |
4 | // | 4 | // |
5 | // Description: | 5 | // Description: |
6 | // | 6 | // |
7 | // | 7 | // |
8 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 | 8 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 |
9 | // | 9 | // |
10 | // Copyright: See COPYING file that comes with this distribution | 10 | // Copyright: See COPYING file that comes with this distribution |
11 | // | 11 | // |
12 | // | 12 | // |
13 | #include "todosearch.h" | 13 | #include "todosearch.h" |
14 | #include "todoitem.h" | 14 | #include "todoitem.h" |
15 | 15 | ||
16 | #include <qpe/resource.h> | 16 | #include <qpe/resource.h> |
17 | #include <qpe/config.h> | 17 | #include <qpe/config.h> |
18 | 18 | ||
19 | #include <qaction.h> | 19 | #include <qaction.h> |
20 | #include <qpopupmenu.h> | 20 | #include <qpopupmenu.h> |
21 | 21 | ||
22 | 22 | using namespace Opie; | |
23 | TodoSearch::TodoSearch(QListView* parent, QString name) | 23 | TodoSearch::TodoSearch(QListView* parent, QString name) |
24 | : SearchGroup(parent, name), _todos(0), _popupMenu(0) | 24 | : SearchGroup(parent, name), _todos(0), _popupMenu(0) |
25 | { | 25 | { |
26 | //AppLnkSet als(QPEApplication::qpeDir()); | 26 | //AppLnkSet als(QPEApplication::qpeDir()); |
27 | //setPixmap( 0, als.findExec("todolist")->pixmap() ); | 27 | //setPixmap( 0, als.findExec("todolist")->pixmap() ); |
28 | QIconSet is = Resource::loadIconSet( "todo/TodoListSmall" ); | 28 | QIconSet is = Resource::loadIconSet( "todo/TodoListSmall" ); |
29 | setPixmap( 0, is.pixmap( QIconSet::Large, true ) ); | 29 | setPixmap( 0, is.pixmap( QIconSet::Large, true ) ); |
30 | actionShowCompleted = new QAction( QObject::tr("show completed tasks"),QString::null, 0, 0, 0, true ); | 30 | actionShowCompleted = new QAction( QObject::tr("show completed tasks"),QString::null, 0, 0, 0, true ); |
31 | Config cfg( "osearch", Config::User ); | 31 | Config cfg( "osearch", Config::User ); |
32 | cfg.setGroup( "todo_settings" ); | 32 | cfg.setGroup( "todo_settings" ); |
33 | actionShowCompleted->setOn( cfg.readBoolEntry( "show_completed_tasks", false ) ); | 33 | actionShowCompleted->setOn( cfg.readBoolEntry( "show_completed_tasks", false ) ); |
34 | 34 | ||
35 | } | 35 | } |
36 | 36 | ||
37 | 37 | ||
38 | TodoSearch::~TodoSearch() | 38 | TodoSearch::~TodoSearch() |
39 | { | 39 | { |
40 | Config cfg( "osearch", Config::User ); | 40 | Config cfg( "osearch", Config::User ); |
41 | cfg.setGroup( "todo_settings" ); | 41 | cfg.setGroup( "todo_settings" ); |
42 | cfg.writeEntry( "show_completed_tasks", actionShowCompleted->isOn() ); | 42 | cfg.writeEntry( "show_completed_tasks", actionShowCompleted->isOn() ); |
43 | delete _popupMenu; | 43 | delete _popupMenu; |
44 | delete actionShowCompleted; | 44 | delete actionShowCompleted; |
45 | delete _todos; | 45 | delete _todos; |
46 | } | 46 | } |
47 | 47 | ||
48 | 48 | ||
49 | void TodoSearch::load() | 49 | void TodoSearch::load() |
50 | { | 50 | { |
51 | _todos = new OPimTodoAccess(); | 51 | _todos = new OPimTodoAccess(); |
52 | _todos->load(); | 52 | _todos->load(); |
53 | } | 53 | } |
54 | 54 | ||
55 | int TodoSearch::search() | 55 | int TodoSearch::search() |
56 | { | 56 | { |
57 | OPimRecordList<OPimTodo> results = _todos->matchRegexp(_search); | 57 | OPimRecordList<OPimTodo> results = _todos->matchRegexp(_search); |
58 | for (uint i = 0; i < results.count(); i++) | 58 | for (uint i = 0; i < results.count(); i++) |
59 | insertItem( new OPimTodo( results[i] )); | 59 | insertItem( new OPimTodo( results[i] )); |
60 | return _resultCount; | 60 | return _resultCount; |
61 | } | 61 | } |
62 | 62 | ||
63 | void TodoSearch::insertItem( void *rec ) | 63 | void TodoSearch::insertItem( void *rec ) |
64 | { | 64 | { |
65 | OPimTodo *todo = (OPimTodo*)rec; | 65 | OPimTodo *todo = (OPimTodo*)rec; |
66 | if (!actionShowCompleted->isOn() && | 66 | if (!actionShowCompleted->isOn() && |
67 | todo->isCompleted() ) return; | 67 | todo->isCompleted() ) return; |
68 | (void)new TodoItem( this, todo ); | 68 | (void)new TodoItem( this, todo ); |
69 | _resultCount++; | 69 | _resultCount++; |
70 | } | 70 | } |
71 | 71 | ||
72 | QPopupMenu* TodoSearch::popupMenu() | 72 | QPopupMenu* TodoSearch::popupMenu() |
73 | { | 73 | { |
74 | if (!_popupMenu){ | 74 | if (!_popupMenu){ |
75 | _popupMenu = new QPopupMenu( 0 ); | 75 | _popupMenu = new QPopupMenu( 0 ); |
76 | actionShowCompleted->addTo( _popupMenu ); | 76 | actionShowCompleted->addTo( _popupMenu ); |
77 | } | 77 | } |
78 | return _popupMenu; | 78 | return _popupMenu; |
79 | } | 79 | } |
diff --git a/core/pim/osearch/todosearch.h b/core/pim/osearch/todosearch.h index 740e483..c047348 100644 --- a/core/pim/osearch/todosearch.h +++ b/core/pim/osearch/todosearch.h | |||
@@ -1,47 +1,46 @@ | |||
1 | // | 1 | // |
2 | // | 2 | // |
3 | // C++ Interface: $MODULE$ | 3 | // C++ Interface: $MODULE$ |
4 | // | 4 | // |
5 | // Description: | 5 | // Description: |
6 | // | 6 | // |
7 | // | 7 | // |
8 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 | 8 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 |
9 | // | 9 | // |
10 | // Copyright: See COPYING file that comes with this distribution | 10 | // Copyright: See COPYING file that comes with this distribution |
11 | // | 11 | // |
12 | // | 12 | // |
13 | #ifndef TODOSEARCH_H | 13 | #ifndef TODOSEARCH_H |
14 | #define TODOSEARCH_H | 14 | #define TODOSEARCH_H |
15 | 15 | ||
16 | #include "searchgroup.h" | 16 | #include "searchgroup.h" |
17 | 17 | ||
18 | #include <opie2/otodoaccess.h> | 18 | #include <opie2/otodoaccess.h> |
19 | #include <opie2/opimtodo.h> | 19 | #include <opie2/opimtodo.h> |
20 | 20 | ||
21 | class QAction; | 21 | class QAction; |
22 | 22 | ||
23 | using namespace Opie; | ||
24 | 23 | ||
25 | /** | 24 | /** |
26 | @author Patrick S. Vogt | 25 | @author Patrick S. Vogt |
27 | */ | 26 | */ |
28 | class TodoSearch : public SearchGroup | 27 | class TodoSearch : public SearchGroup |
29 | { | 28 | { |
30 | public: | 29 | public: |
31 | TodoSearch(QListView* parent, QString name); | 30 | TodoSearch(QListView* parent, QString name); |
32 | ~TodoSearch(); | 31 | ~TodoSearch(); |
33 | 32 | ||
34 | virtual QPopupMenu* popupMenu(); | 33 | virtual QPopupMenu* popupMenu(); |
35 | 34 | ||
36 | protected: | 35 | protected: |
37 | virtual void load(); | 36 | virtual void load(); |
38 | virtual int search(); | 37 | virtual int search(); |
39 | virtual void insertItem( void* ); | 38 | virtual void insertItem( void* ); |
40 | 39 | ||
41 | private: | 40 | private: |
42 | OPimTodoAccess *_todos; | 41 | Opie::OPimTodoAccess *_todos; |
43 | QAction *actionShowCompleted; | 42 | QAction *actionShowCompleted; |
44 | QPopupMenu *_popupMenu; | 43 | QPopupMenu *_popupMenu; |
45 | }; | 44 | }; |
46 | 45 | ||
47 | #endif | 46 | #endif |
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.h b/core/pim/today/plugins/datebook/datebookpluginwidget.h index 68af323..f8ed89e 100644 --- a/core/pim/today/plugins/datebook/datebookpluginwidget.h +++ b/core/pim/today/plugins/datebook/datebookpluginwidget.h | |||
@@ -1,63 +1,62 @@ | |||
1 | /* | 1 | /* |
2 | * datebookpluginwidget.h | 2 | * datebookpluginwidget.h |
3 | * | 3 | * |
4 | * copyright : (c) 2002,2003 by Maximilian Reiß | 4 | * copyright : (c) 2002,2003 by Maximilian Reiß |
5 | * email : harlekin@handhelds.org | 5 | * email : harlekin@handhelds.org |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | /*************************************************************************** | 8 | /*************************************************************************** |
9 | * * | 9 | * * |
10 | * This program is free software; you can redistribute it and/or modify * | 10 | * This program is free software; you can redistribute it and/or modify * |
11 | * it under the terms of the GNU General Public License as published by * | 11 | * it under the terms of the GNU General Public License as published by * |
12 | * the Free Software Foundation; either version 2 of the License, or * | 12 | * the Free Software Foundation; either version 2 of the License, or * |
13 | * (at your option) any later version. * | 13 | * (at your option) any later version. * |
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | #ifndef DATEBOOK_PLUGIN_WIDGET_H | 17 | #ifndef DATEBOOK_PLUGIN_WIDGET_H |
18 | #define DATEBOOK_PLUGIN_WIDGET_H | 18 | #define DATEBOOK_PLUGIN_WIDGET_H |
19 | 19 | ||
20 | #include "datebookevent.h" | 20 | #include "datebookevent.h" |
21 | 21 | ||
22 | #include <opie2/oclickablelabel.h> | 22 | #include <opie2/oclickablelabel.h> |
23 | 23 | ||
24 | #include <qpe/datebookdb.h> | 24 | #include <qpe/datebookdb.h> |
25 | 25 | ||
26 | #include <qlayout.h> | 26 | #include <qlayout.h> |
27 | #include <qguardedptr.h> | 27 | #include <qguardedptr.h> |
28 | #include <qlist.h> | 28 | #include <qlist.h> |
29 | 29 | ||
30 | using namespace Opie; | ||
31 | 30 | ||
32 | class DatebookPluginWidget : public QWidget { | 31 | class DatebookPluginWidget : public QWidget { |
33 | 32 | ||
34 | Q_OBJECT | 33 | Q_OBJECT |
35 | 34 | ||
36 | public: | 35 | public: |
37 | DatebookPluginWidget( QWidget *parent, const char *name ); | 36 | DatebookPluginWidget( QWidget *parent, const char *name ); |
38 | ~DatebookPluginWidget(); | 37 | ~DatebookPluginWidget(); |
39 | void refresh(); | 38 | void refresh(); |
40 | void reinitialize(); | 39 | void reinitialize(); |
41 | 40 | ||
42 | private: | 41 | private: |
43 | DateBookDB* db; | 42 | DateBookDB* db; |
44 | QGuardedPtr<QVBoxLayout> m_layoutDates; | 43 | QGuardedPtr<QVBoxLayout> m_layoutDates; |
45 | QList<QWidget> m_eventsList; | 44 | QList<QWidget> m_eventsList; |
46 | void readConfig(); | 45 | void readConfig(); |
47 | void getDates(); | 46 | void getDates(); |
48 | 47 | ||
49 | 48 | ||
50 | // how many lines should be showed in the datebook section | 49 | // how many lines should be showed in the datebook section |
51 | int m_max_lines_meet; | 50 | int m_max_lines_meet; |
52 | // If location is to be showed too, 1 to activate it. | 51 | // If location is to be showed too, 1 to activate it. |
53 | bool m_show_location; | 52 | bool m_show_location; |
54 | // if notes should be shown | 53 | // if notes should be shown |
55 | bool m_show_notes; | 54 | bool m_show_notes; |
56 | // should only later appointments be shown or all for the current day. | 55 | // should only later appointments be shown or all for the current day. |
57 | bool m_onlyLater; | 56 | bool m_onlyLater; |
58 | int m_moreDays; | 57 | int m_moreDays; |
59 | // true if time of an appointment should be an extra line | 58 | // true if time of an appointment should be an extra line |
60 | bool m_timeExtraLine; | 59 | bool m_timeExtraLine; |
61 | }; | 60 | }; |
62 | 61 | ||
63 | #endif | 62 | #endif |
diff --git a/core/pim/today/plugins/mail/mailpluginwidget.cpp b/core/pim/today/plugins/mail/mailpluginwidget.cpp index a8e4c41..a71c477 100644 --- a/core/pim/today/plugins/mail/mailpluginwidget.cpp +++ b/core/pim/today/plugins/mail/mailpluginwidget.cpp | |||
@@ -1,97 +1,98 @@ | |||
1 | /* | 1 | /* |
2 | * mailpluginwidget.cpp | 2 | * mailpluginwidget.cpp |
3 | * | 3 | * |
4 | * copyright : (c) 2002,2003,2004 by Maximilian Reiß | 4 | * copyright : (c) 2002,2003,2004 by Maximilian Reiß |
5 | * email : harlekin@handhelds.org | 5 | * email : harlekin@handhelds.org |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | /*************************************************************************** | 8 | /*************************************************************************** |
9 | * * | 9 | * * |
10 | * This program is free software; you can redistribute it and/or modify * | 10 | * This program is free software; you can redistribute it and/or modify * |
11 | * it under the terms of the GNU General Public License as published by * | 11 | * it under the terms of the GNU General Public License as published by * |
12 | * the Free Software Foundation; either version 2 of the License, or * | 12 | * the Free Software Foundation; either version 2 of the License, or * |
13 | * (at your option) any later version. * | 13 | * (at your option) any later version. * |
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | #include "mailpluginwidget.h" | 16 | #include "mailpluginwidget.h" |
17 | 17 | ||
18 | #include <qpe/config.h> | 18 | #include <qpe/config.h> |
19 | #include <qpe/qcopenvelope_qws.h> | 19 | #include <qpe/qcopenvelope_qws.h> |
20 | 20 | ||
21 | using namespace Opie::Ui; | ||
21 | MailPluginWidget::MailPluginWidget( QWidget *parent, const char* name) | 22 | MailPluginWidget::MailPluginWidget( QWidget *parent, const char* name) |
22 | : QWidget(parent, name ) { | 23 | : QWidget(parent, name ) { |
23 | 24 | ||
24 | m_mailLabel = 0l; | 25 | m_mailLabel = 0l; |
25 | m_layout = 0l; | 26 | m_layout = 0l; |
26 | 27 | ||
27 | if ( m_mailLabel ) { | 28 | if ( m_mailLabel ) { |
28 | delete m_mailLabel; | 29 | delete m_mailLabel; |
29 | } | 30 | } |
30 | m_mailLabel = new OClickableLabel( this ); | 31 | m_mailLabel = new OClickableLabel( this ); |
31 | connect( m_mailLabel, SIGNAL( clicked() ), this, SLOT( startMail() ) ); | 32 | connect( m_mailLabel, SIGNAL( clicked() ), this, SLOT( startMail() ) ); |
32 | 33 | ||
33 | if ( m_layout ) { | 34 | if ( m_layout ) { |
34 | delete m_layout; | 35 | delete m_layout; |
35 | } | 36 | } |
36 | m_layout = new QHBoxLayout( this ); | 37 | m_layout = new QHBoxLayout( this ); |
37 | m_layout->setAutoAdd( true ); | 38 | m_layout->setAutoAdd( true ); |
38 | 39 | ||
39 | 40 | ||
40 | #if defined(Q_WS_QWS) | 41 | #if defined(Q_WS_QWS) |
41 | #if !defined(QT_NO_COP) | 42 | #if !defined(QT_NO_COP) |
42 | QCopChannel *qCopChannel = new QCopChannel( "QPE/Pim" , this ); | 43 | QCopChannel *qCopChannel = new QCopChannel( "QPE/Pim" , this ); |
43 | connect ( qCopChannel, SIGNAL( received(const QCString&,const QByteArray&) ), | 44 | connect ( qCopChannel, SIGNAL( received(const QCString&,const QByteArray&) ), |
44 | this, SLOT ( channelReceived(const QCString&,const QByteArray&) ) ); | 45 | this, SLOT ( channelReceived(const QCString&,const QByteArray&) ) ); |
45 | #endif | 46 | #endif |
46 | #endif | 47 | #endif |
47 | 48 | ||
48 | readConfig(); | 49 | readConfig(); |
49 | getInfo(); | 50 | getInfo(); |
50 | } | 51 | } |
51 | 52 | ||
52 | 53 | ||
53 | void MailPluginWidget::channelReceived( const QCString &msg, const QByteArray & data ) { | 54 | void MailPluginWidget::channelReceived( const QCString &msg, const QByteArray & data ) { |
54 | QDataStream stream( data, IO_ReadOnly ); | 55 | QDataStream stream( data, IO_ReadOnly ); |
55 | if ( msg == "outgoingMails(int)" ) { | 56 | if ( msg == "outgoingMails(int)" ) { |
56 | stream >> m_outgoing; | 57 | stream >> m_outgoing; |
57 | } else if ( msg == "newMails(int)" ) { | 58 | } else if ( msg == "newMails(int)" ) { |
58 | stream >> m_newMails; | 59 | stream >> m_newMails; |
59 | } | 60 | } |
60 | getInfo(); | 61 | getInfo(); |
61 | } | 62 | } |
62 | MailPluginWidget::~MailPluginWidget() { | 63 | MailPluginWidget::~MailPluginWidget() { |
63 | delete m_mailLabel; | 64 | delete m_mailLabel; |
64 | delete m_layout; | 65 | delete m_layout; |
65 | } | 66 | } |
66 | 67 | ||
67 | 68 | ||
68 | void MailPluginWidget::readConfig() { | 69 | void MailPluginWidget::readConfig() { |
69 | Config cfg( "todaymailplugin" ); | 70 | Config cfg( "todaymailplugin" ); |
70 | cfg.setGroup( "config" ); | 71 | cfg.setGroup( "config" ); |
71 | 72 | ||
72 | Config cfg2( "mail" ); | 73 | Config cfg2( "mail" ); |
73 | cfg2.setGroup( "Status" ); | 74 | cfg2.setGroup( "Status" ); |
74 | 75 | ||
75 | m_newMails = cfg2.readNumEntry( "newMails", 0 ); | 76 | m_newMails = cfg2.readNumEntry( "newMails", 0 ); |
76 | m_outgoing = cfg2.readNumEntry( "outgoing", 0 ); | 77 | m_outgoing = cfg2.readNumEntry( "outgoing", 0 ); |
77 | } | 78 | } |
78 | 79 | ||
79 | 80 | ||
80 | void MailPluginWidget::refresh() { | 81 | void MailPluginWidget::refresh() { |
81 | getInfo(); | 82 | getInfo(); |
82 | } | 83 | } |
83 | 84 | ||
84 | void MailPluginWidget::getInfo() { | 85 | void MailPluginWidget::getInfo() { |
85 | 86 | ||
86 | 87 | ||
87 | 88 | ||
88 | m_mailLabel->setText( QObject::tr( "<b>%1</b> new mail(s), <b>%2</b> outgoing" ).arg( m_newMails ).arg( m_outgoing ) ); | 89 | m_mailLabel->setText( QObject::tr( "<b>%1</b> new mail(s), <b>%2</b> outgoing" ).arg( m_newMails ).arg( m_outgoing ) ); |
89 | } | 90 | } |
90 | 91 | ||
91 | /** | 92 | /** |
92 | * launches datebook | 93 | * launches datebook |
93 | */ | 94 | */ |
94 | void MailPluginWidget::startMail() { | 95 | void MailPluginWidget::startMail() { |
95 | QCopEnvelope e("QPE/System", "execute(QString)"); | 96 | QCopEnvelope e("QPE/System", "execute(QString)"); |
96 | e << QString( "opiemail" ); | 97 | e << QString( "opiemail" ); |
97 | } | 98 | } |
diff --git a/core/pim/today/plugins/mail/mailpluginwidget.h b/core/pim/today/plugins/mail/mailpluginwidget.h index 0ad8738..2c6104f 100644 --- a/core/pim/today/plugins/mail/mailpluginwidget.h +++ b/core/pim/today/plugins/mail/mailpluginwidget.h | |||
@@ -1,52 +1,51 @@ | |||
1 | /* | 1 | /* |
2 | * mailpluginwidget.h | 2 | * mailpluginwidget.h |
3 | * | 3 | * |
4 | * copyright : (c) 2002,2003,2004 by Maximilian Reiß | 4 | * copyright : (c) 2002,2003,2004 by Maximilian Reiß |
5 | * email : harlekin@handhelds.org | 5 | * email : harlekin@handhelds.org |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | /*************************************************************************** | 8 | /*************************************************************************** |
9 | * * | 9 | * * |
10 | * This program is free software; you can redistribute it and/or modify * | 10 | * This program is free software; you can redistribute it and/or modify * |
11 | * it under the terms of the GNU General Public License as published by * | 11 | * it under the terms of the GNU General Public License as published by * |
12 | * the Free Software Foundation; either version 2 of the License, or * | 12 | * the Free Software Foundation; either version 2 of the License, or * |
13 | * (at your option) any later version. * | 13 | * (at your option) any later version. * |
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | #ifndef MAIL_PLUGIN_WIDGET_H | 17 | #ifndef MAIL_PLUGIN_WIDGET_H |
18 | #define MAIL_PLUGIN_WIDGET_H | 18 | #define MAIL_PLUGIN_WIDGET_H |
19 | 19 | ||
20 | #include <qlayout.h> | 20 | #include <qlayout.h> |
21 | 21 | ||
22 | #include <opie2/oclickablelabel.h> | 22 | #include <opie2/oclickablelabel.h> |
23 | 23 | ||
24 | using namespace Opie; | ||
25 | 24 | ||
26 | class MailPluginWidget : public QWidget { | 25 | class MailPluginWidget : public QWidget { |
27 | 26 | ||
28 | Q_OBJECT | 27 | Q_OBJECT |
29 | 28 | ||
30 | public: | 29 | public: |
31 | MailPluginWidget( QWidget *parent, const char *name ); | 30 | MailPluginWidget( QWidget *parent, const char *name ); |
32 | ~MailPluginWidget(); | 31 | ~MailPluginWidget(); |
33 | 32 | ||
34 | void refresh(); | 33 | void refresh(); |
35 | 34 | ||
36 | protected slots: | 35 | protected slots: |
37 | void startMail(); | 36 | void startMail(); |
38 | 37 | ||
39 | private: | 38 | private: |
40 | OClickableLabel* m_mailLabel; | 39 | Opie::Ui::OClickableLabel* m_mailLabel; |
41 | QHBoxLayout* m_layout; | 40 | QHBoxLayout* m_layout; |
42 | void readConfig(); | 41 | void readConfig(); |
43 | void getInfo(); | 42 | void getInfo(); |
44 | 43 | ||
45 | int m_newMails; | 44 | int m_newMails; |
46 | int m_outgoing; | 45 | int m_outgoing; |
47 | 46 | ||
48 | private slots: | 47 | private slots: |
49 | void channelReceived(const QCString &msg, const QByteArray & data); | 48 | void channelReceived(const QCString &msg, const QByteArray & data); |
50 | }; | 49 | }; |
51 | 50 | ||
52 | #endif | 51 | #endif |
diff --git a/core/pim/today/plugins/todolist/todoplugin.h b/core/pim/today/plugins/todolist/todoplugin.h index bea15d5..976dbf7 100644 --- a/core/pim/today/plugins/todolist/todoplugin.h +++ b/core/pim/today/plugins/todolist/todoplugin.h | |||
@@ -1,53 +1,52 @@ | |||
1 | /* | 1 | /* |
2 | * todoplugin.h | 2 | * todoplugin.h |
3 | * | 3 | * |
4 | * copyright : (c) 2002,2003, 2004 by Maximilian Reiß | 4 | * copyright : (c) 2002,2003, 2004 by Maximilian Reiß |
5 | * email : harlekin@handhelds.org | 5 | * email : harlekin@handhelds.org |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | /*************************************************************************** | 8 | /*************************************************************************** |
9 | * * | 9 | * * |
10 | * This program is free software; you can redistribute it and/or modify * | 10 | * This program is free software; you can redistribute it and/or modify * |
11 | * it under the terms of the GNU General Public License as published by * | 11 | * it under the terms of the GNU General Public License as published by * |
12 | * the Free Software Foundation; either version 2 of the License, or * | 12 | * the Free Software Foundation; either version 2 of the License, or * |
13 | * (at your option) any later version. * | 13 | * (at your option) any later version. * |
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | #ifndef TODOLIST_PLUGIN_H | 17 | #ifndef TODOLIST_PLUGIN_H |
18 | #define TODOLIST_PLUGIN_H | 18 | #define TODOLIST_PLUGIN_H |
19 | 19 | ||
20 | 20 | ||
21 | #include "todopluginwidget.h" | 21 | #include "todopluginwidget.h" |
22 | 22 | ||
23 | #include <opie2/oclickablelabel.h> | 23 | #include <opie2/oclickablelabel.h> |
24 | #include <opie2/todayplugininterface.h> | 24 | #include <opie2/todayplugininterface.h> |
25 | 25 | ||
26 | #include <qstring.h> | 26 | #include <qstring.h> |
27 | #include <qguardedptr.h> | 27 | #include <qguardedptr.h> |
28 | #include <qwidget.h> | 28 | #include <qwidget.h> |
29 | 29 | ||
30 | using namespace Opie; | ||
31 | 30 | ||
32 | class TodolistPlugin : public TodayPluginObject { | 31 | class TodolistPlugin : public TodayPluginObject { |
33 | 32 | ||
34 | public: | 33 | public: |
35 | TodolistPlugin(); | 34 | TodolistPlugin(); |
36 | ~TodolistPlugin(); | 35 | ~TodolistPlugin(); |
37 | 36 | ||
38 | QString pluginName() const; | 37 | QString pluginName() const; |
39 | double versionNumber() const; | 38 | double versionNumber() const; |
40 | QString pixmapNameWidget() const; | 39 | QString pixmapNameWidget() const; |
41 | QWidget* widget(QWidget *); | 40 | QWidget* widget(QWidget *); |
42 | QString pixmapNameConfig() const; | 41 | QString pixmapNameConfig() const; |
43 | TodayConfigWidget* configWidget(QWidget *); | 42 | TodayConfigWidget* configWidget(QWidget *); |
44 | QString appName() const; | 43 | QString appName() const; |
45 | bool excludeFromRefresh() const; | 44 | bool excludeFromRefresh() const; |
46 | void refresh(); | 45 | void refresh(); |
47 | void reinitialize(); | 46 | void reinitialize(); |
48 | 47 | ||
49 | private: | 48 | private: |
50 | QGuardedPtr<TodolistPluginWidget> m_widget; | 49 | QGuardedPtr<TodolistPluginWidget> m_widget; |
51 | }; | 50 | }; |
52 | 51 | ||
53 | #endif | 52 | #endif |