Diffstat (limited to 'core/pim/today/plugins/addressbook/addresspluginwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/today/plugins/addressbook/addresspluginwidget.cpp | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp index b0d456d..ea387d6 100644 --- a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp +++ b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp | |||
@@ -21,5 +21,5 @@ | |||
21 | 21 | ||
22 | #include <qpe/config.h> | 22 | #include <opie2/opimcontact.h> |
23 | 23 | ||
24 | #include <opie/ocontact.h> | 24 | #include <qpe/config.h> |
25 | 25 | ||
@@ -37,6 +37,6 @@ AddressBookPluginWidget::AddressBookPluginWidget( QWidget *parent, const char* | |||
37 | 37 | ||
38 | m_contactdb = new OContactAccess("addressplugin"); | 38 | m_contactdb = new Opie::OPimContactAccess("addressplugin"); |
39 | 39 | ||
40 | connect( m_contactdb, SIGNAL( signalChanged(const OContactAccess*) ), | 40 | connect( m_contactdb, SIGNAL( signalChanged(const Opie::OPimContactAccess*) ), |
41 | this, SLOT( refresh(const OContactAccess*) ) ); | 41 | this, SLOT( refresh(const Opie::OPimContactAccess*) ) ); |
42 | 42 | ||
@@ -51,3 +51,3 @@ AddressBookPluginWidget::~AddressBookPluginWidget() { | |||
51 | 51 | ||
52 | void AddressBookPluginWidget::refresh( const OContactAccess* ) | 52 | void AddressBookPluginWidget::refresh( const Opie::OPimContactAccess* ) |
53 | { | 53 | { |
@@ -88,3 +88,3 @@ void AddressBookPluginWidget::getAddress() { | |||
88 | if ( ! addressLabel ) { | 88 | if ( ! addressLabel ) { |
89 | addressLabel = new OClickableLabel( this ); | 89 | addressLabel = new Opie::Ui::OClickableLabel( this ); |
90 | connect( addressLabel, SIGNAL( clicked() ), this, SLOT( startAddressBook() ) ); | 90 | connect( addressLabel, SIGNAL( clicked() ), this, SLOT( startAddressBook() ) ); |
@@ -92,3 +92,3 @@ void AddressBookPluginWidget::getAddress() { | |||
92 | } | 92 | } |
93 | 93 | ||
94 | QString output; | 94 | QString output; |
@@ -96,3 +96,3 @@ void AddressBookPluginWidget::getAddress() { | |||
96 | // Check whether the database provide the search option.. | 96 | // Check whether the database provide the search option.. |
97 | if ( !m_contactdb->hasQuerySettings( OContactAccess::DateDiff ) ){ | 97 | if ( !m_contactdb->hasQuerySettings( Opie::OPimContactAccess::DateDiff ) ){ |
98 | // Libopie seems to be old.. | 98 | // Libopie seems to be old.. |
@@ -112,10 +112,10 @@ void AddressBookPluginWidget::getAddress() { | |||
112 | 112 | ||
113 | if ( m_contactdb->hasQuerySettings( OContactAccess::DateDiff ) ){ | 113 | if ( m_contactdb->hasQuerySettings( Opie::OPimContactAccess::DateDiff ) ){ |
114 | 114 | ||
115 | 115 | ||
116 | OContact querybirthdays; | 116 | Opie::OPimContact querybirthdays; |
117 | querybirthdays.setBirthday( lookAheadDate ); | 117 | querybirthdays.setBirthday( lookAheadDate ); |
118 | 118 | ||
119 | m_list = m_contactdb->queryByExample( querybirthdays, | 119 | m_list = m_contactdb->queryByExample( querybirthdays, |
120 | OContactAccess::DateDiff ); | 120 | Opie::OPimContactAccess::DateDiff ); |
121 | if ( m_list.count() > 0 ){ | 121 | if ( m_list.count() > 0 ){ |
@@ -127,27 +127,27 @@ void AddressBookPluginWidget::getAddress() { | |||
127 | if ( ammount++ < m_maxLinesTask ){ | 127 | if ( ammount++ < m_maxLinesTask ){ |
128 | // Now we want to calculate how many days | 128 | // Now we want to calculate how many days |
129 | //until birthday. We have to set | 129 | //until birthday. We have to set |
130 | // the correct year to calculate the day diff... | 130 | // the correct year to calculate the day diff... |
131 | QDate destdate = (*m_it).birthday(); | 131 | QDate destdate = (*m_it).birthday(); |
132 | destdate.setYMD( QDate::currentDate().year(), | 132 | destdate.setYMD( QDate::currentDate().year(), |
133 | destdate.month(), destdate.day() ); | 133 | destdate.month(), destdate.day() ); |
134 | if ( QDate::currentDate().daysTo(destdate) < 0 ) | 134 | if ( QDate::currentDate().daysTo(destdate) < 0 ) |
135 | destdate.setYMD( QDate::currentDate().year()+1, | 135 | destdate.setYMD( QDate::currentDate().year()+1, |
136 | destdate.month(), destdate.day() ); | 136 | destdate.month(), destdate.day() ); |
137 | 137 | ||
138 | 138 | ||
139 | if ( QDate::currentDate().daysTo(destdate) < m_urgentDays ) | 139 | if ( QDate::currentDate().daysTo(destdate) < m_urgentDays ) |
140 | output += "<font color=" + m_urgentColor + "><b>-" | 140 | output += "<font color=" + m_urgentColor + "><b>-" |
141 | + (*m_it).fullName() | 141 | + (*m_it).fullName() |
142 | + " (" | 142 | + " (" |
143 | + QString::number(QDate::currentDate() | 143 | + QString::number(QDate::currentDate() |
144 | .daysTo(destdate)) | 144 | .daysTo(destdate)) |
145 | + " Days) </b></font><br>"; | 145 | + " Days) </b></font><br>"; |
146 | 146 | ||
147 | else | 147 | else |
148 | output += "<font color=" + m_entryColor + "><b>-" | 148 | output += "<font color=" + m_entryColor + "><b>-" |
149 | + (*m_it).fullName() | 149 | + (*m_it).fullName() |
150 | + " (" | 150 | + " (" |
151 | + QString::number(QDate::currentDate() | 151 | + QString::number(QDate::currentDate() |
152 | .daysTo(destdate)) | 152 | .daysTo(destdate)) |
153 | + " Days) </b></font><br>"; | 153 | + " Days) </b></font><br>"; |
@@ -162,10 +162,10 @@ void AddressBookPluginWidget::getAddress() { | |||
162 | } | 162 | } |
163 | 163 | ||
164 | if ( m_showAnniversaries ){ | 164 | if ( m_showAnniversaries ){ |
165 | // Define the query for anniversaries and start search.. | 165 | // Define the query for anniversaries and start search.. |
166 | OContact queryanniversaries; | 166 | Opie::OPimContact queryanniversaries; |
167 | queryanniversaries.setAnniversary( lookAheadDate ); | 167 | queryanniversaries.setAnniversary( lookAheadDate ); |
168 | 168 | ||
169 | m_list = m_contactdb->queryByExample( queryanniversaries, OContactAccess::DateDiff ); | 169 | m_list = m_contactdb->queryByExample( queryanniversaries, Opie::OPimContactAccess::DateDiff ); |
170 | 170 | ||
171 | ammount = 0; | 171 | ammount = 0; |
@@ -178,9 +178,9 @@ void AddressBookPluginWidget::getAddress() { | |||
178 | if ( ammount++ < m_maxLinesTask ){ | 178 | if ( ammount++ < m_maxLinesTask ){ |
179 | // Now we want to calculate how many days until anniversary. | 179 | // Now we want to calculate how many days until anniversary. |
180 | // We have to set the correct year to calculate the day diff... | 180 | // We have to set the correct year to calculate the day diff... |
181 | QDate destdate = (*m_it).anniversary(); | 181 | QDate destdate = (*m_it).anniversary(); |
182 | destdate.setYMD( QDate::currentDate().year(), destdate.month(), | 182 | destdate.setYMD( QDate::currentDate().year(), destdate.month(), |
183 | destdate.day() ); | 183 | destdate.day() ); |
184 | if ( QDate::currentDate().daysTo(destdate) < 0 ) | 184 | if ( QDate::currentDate().daysTo(destdate) < 0 ) |
185 | destdate.setYMD( QDate::currentDate().year()+1, | 185 | destdate.setYMD( QDate::currentDate().year()+1, |
186 | destdate.month(), destdate.day() ); | 186 | destdate.month(), destdate.day() ); |
@@ -188,14 +188,14 @@ void AddressBookPluginWidget::getAddress() { | |||
188 | if ( QDate::currentDate().daysTo(destdate) < m_urgentDays ) | 188 | if ( QDate::currentDate().daysTo(destdate) < m_urgentDays ) |
189 | output += "<font color=" + m_urgentColor + "><b>-" | 189 | output += "<font color=" + m_urgentColor + "><b>-" |
190 | + (*m_it).fullName() | 190 | + (*m_it).fullName() |
191 | + " (" | 191 | + " (" |
192 | + QString::number(QDate::currentDate() | 192 | + QString::number(QDate::currentDate() |
193 | .daysTo( destdate ) ) | 193 | .daysTo( destdate ) ) |
194 | + " Days) </b></font><br>"; | 194 | + " Days) </b></font><br>"; |
195 | else | 195 | else |
196 | output += "<font color=" + m_entryColor + "><b>-" | 196 | output += "<font color=" + m_entryColor + "><b>-" |
197 | + (*m_it).fullName() | 197 | + (*m_it).fullName() |
198 | + " (" | 198 | + " (" |
199 | + QString::number(QDate::currentDate() | 199 | + QString::number(QDate::currentDate() |
200 | .daysTo( destdate ) ) | 200 | .daysTo( destdate ) ) |
201 | + " Days) </b></font><br>"; | 201 | + " Days) </b></font><br>"; |
@@ -204,3 +204,3 @@ void AddressBookPluginWidget::getAddress() { | |||
204 | } else { | 204 | } else { |
205 | output += "<font color=" + m_headlineColor + ">" | 205 | output += "<font color=" + m_headlineColor + ">" |
206 | + QObject::tr( "No anniversaries in <b> %1 </b> days!" ) | 206 | + QObject::tr( "No anniversaries in <b> %1 </b> days!" ) |