-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 @@ // // // C++ Implementation: $MODULE$ // // Description: // // // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 // // Copyright: See COPYING file that comes with this distribution // // #include "adresssearch.h" #include "contactitem.h" #include <qpe/resource.h> //#include <qwhatsthis.h> +using namespace Opie; AdressSearch::AdressSearch(QListView* parent, QString name): SearchGroup(parent, name) { _contacts = 0; QIconSet is = Resource::loadIconSet( "addressbook/AddressBookSmall" ); setPixmap( 0, is.pixmap( QIconSet::Large, true ) ); // QWhatsThis::add( this, QObject::tr("Search the addressbook") ); /* QPixmap pix = Resource::loadPixmap( "addressbook/AddressBook" ); QImage img = pix.convertToImage(); img.smoothScale( 14, 14 ); pix.convertFromImage( img ); setPixmap( 0, pix );*/ } AdressSearch::~AdressSearch() { delete _contacts; } void AdressSearch::load() { _contacts = new OPimContactAccess("osearch"); } int AdressSearch::search() { OPimRecordList<OPimContact> results = _contacts->matchRegexp(_search); for (uint i = 0; i < results.count(); i++) { (void)new ContactItem( this, new OPimContact( results[i] )); } return results.count(); } void AdressSearch::insertItem( void* ) { } 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 @@ // C++ Interface: $MODULE$ // // Description: // // // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 // // Copyright: See COPYING file that comes with this distribution // // #ifndef ADRESSSEARCH_H #define ADRESSSEARCH_H #include "searchgroup.h" #include <opie2/ocontactaccess.h> -using namespace Opie; /** @author Patrick S. Vogt */ class AdressSearch : public SearchGroup { public: AdressSearch(QListView* parent, QString name); ~AdressSearch(); protected: virtual void load(); virtual int search(); virtual void insertItem( void* ); private: - OPimContactAccess *_contacts; + Opie::OPimContactAccess *_contacts; }; #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 @@ // // // C++ Implementation: $MODULE$ // // Description: // // // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 // // Copyright: See COPYING file that comes with this distribution // // #include "contactitem.h" #include <qpe/resource.h> #include <qpe/qcopenvelope_qws.h> - +using namespace Opie; ContactItem::ContactItem(OListViewItem* parent, OPimContact *contact) : ResultItem(parent) { _contact = contact; setText(0, _contact->toShortText()); setIcon(); } void ContactItem::setIcon() { QPixmap icon; switch ( _contact->lastHitField() ) { case -1: icon = Resource::loadPixmap( "reset" ); break; case Qtopia::BusinessPhone: icon = Resource::loadPixmap( "addressbook/phonework" ); break; case Qtopia::BusinessFax: icon = Resource::loadPixmap( "addressbook/faxwork" ); break; case Qtopia::BusinessMobile: icon = Resource::loadPixmap( "addressbook/mobilework" ); break; case Qtopia::DefaultEmail: case Qtopia::Emails: icon = Resource::loadPixmap( "addressbook/email" ); break; case Qtopia::HomePhone: icon = Resource::loadPixmap( "addressbook/phonehome" ); break; case Qtopia::HomeFax: icon = Resource::loadPixmap( "addressbook/faxhome" ); break; case Qtopia::HomeMobile: icon = Resource::loadPixmap( "addressbook/mobilehome" ); break; case Qtopia::HomeWebPage: icon = Resource::loadPixmap( "addressbook/webpagehome" ); break; case Qtopia::BusinessWebPage: icon = Resource::loadPixmap( "addressbook/webpagework" ); break; case Qtopia::Title: case Qtopia::JobTitle: case Qtopia::FirstName: case Qtopia::MiddleName: case Qtopia::LastName: case Qtopia::Suffix: case Qtopia::Nickname: case Qtopia::FileAs: icon = Resource::loadPixmap( "addressbook/identity" ); break; case Qtopia::HomeStreet: case Qtopia::HomeCity: case Qtopia::HomeState: case Qtopia::HomeZip: case Qtopia::HomeCountry: icon = Resource::loadPixmap( "osearch/addresshome" ); break; case Qtopia::Company: case Qtopia::BusinessCity: case Qtopia::BusinessStreet: case Qtopia::BusinessZip: case Qtopia::BusinessCountry: case Qtopia::Department: case Qtopia::Office: case Qtopia::Manager: case Qtopia::BusinessPager: case Qtopia::Profession: icon = Resource::loadPixmap( "osearch/addresshome" ); break; case Qtopia::Assistant: case Qtopia::Spouse: case Qtopia::Children: icon = Resource::loadPixmap( "osearch/personal" ); break; case Qtopia::Birthday: case Qtopia::Anniversary: icon = Resource::loadPixmap( "osearch/clock" ); break; case Qtopia::Notes: icon = Resource::loadPixmap( "txt" ); break; default: icon = Resource::loadPixmap( "DocsIcon" ); break; } setPixmap( 0, icon ); } ContactItem::~ContactItem() { delete _contact; } QString ContactItem::toRichText() { return _contact->toRichText(); } void ContactItem::action( int act ) { if (act == 0){ QCopEnvelope e("QPE/Application/addressbook", "show(int)"); e << _contact->uid(); }else if(act == 1){ QCopEnvelope e("QPE/Application/addressbook", "edit(int)"); e << _contact->uid(); } } QIntDict<QString> ContactItem::actions() { QIntDict<QString> result; result.insert( 0, new QString( QObject::tr("show") ) ); result.insert( 1, new QString( QObject::tr("edit") ) ); return result; } 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 @@ // // // C++ Interface: $MODULE$ // // Description: // // // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 // // Copyright: See COPYING file that comes with this distribution // // #ifndef CONTACTITEM_H #define CONTACTITEM_H #include <opie2/opimrecord.h> #include <opie2/opimcontact.h> #include "resultitem.h" -using namespace Opie; /** @author Patrick S. Vogt */ class ContactItem : public ResultItem { public: - ContactItem(OListViewItem* parent, OPimContact *contact); + ContactItem(OListViewItem* parent, Opie::OPimContact *contact); ~ContactItem(); virtual QString toRichText(); virtual void action( int ); virtual QIntDict<QString> actions(); private: void setIcon(); - OPimContact *_contact; + Opie::OPimContact *_contact; }; #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 @@ // // // C++ Implementation: $MODULE$ // // Description: // // // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 // // Copyright: See COPYING file that comes with this distribution // // #include "eventitem.h" #include <qpe/resource.h> #include <qpe/qcopenvelope_qws.h> +using namespace Opie; EventItem::EventItem(OListViewItem* parent, OPimEvent *event) : ResultItem(parent) { _event = event; setText(0, _event->toShortText() ); setIcon(); } EventItem::~EventItem() { } QString EventItem::toRichText() { return _event->toRichText(); } void EventItem::action( int act ) { if (act == 0){ QCopEnvelope e("QPE/Application/datebook", "viewDefault(QDate)"); e << _event->startDateTime().date(); }else if(act == 1){ QCopEnvelope e("QPE/Application/datebook", "editEvent(int)"); e << _event->uid(); } } QIntDict<QString> EventItem::actions() { QIntDict<QString> result; result.insert( 0, new QString( QObject::tr("show") ) ); result.insert( 1, new QString( QObject::tr("edit") ) ); return result; } void EventItem::setIcon() { QPixmap icon; switch ( _event->lastHitField() ) { case -1: icon = Resource::loadPixmap( "reset" ); // QWhatsThis::add( icon, QObject::tr("Enter your search terms here") ); break; case Qtopia::DatebookDescription: icon = Resource::loadPixmap( "osearch/summary" ); break; case Qtopia::Notes: icon = Resource::loadPixmap( "txt" ); break; case Qtopia::Location: icon = Resource::loadPixmap( "home" ); break; case Qtopia::StartDateTime: case Qtopia::EndDateTime: icon = Resource::loadPixmap( "osearch/clock" ); break; default: icon = Resource::loadPixmap( "DocsIcon" ); break; } setPixmap( 0, icon ); } 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 @@ // // // C++ Interface: $MODULE$ // // Description: // // // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 // // Copyright: See COPYING file that comes with this distribution // // #ifndef EVENTITEM_H #define EVENTITEM_H #include "resultitem.h" #include <opie2/opimevent.h> -using namespace Opie; /** @author Patrick S. Vogt */ class EventItem : public ResultItem { public: - EventItem(OListViewItem* parent, OPimEvent *event); + EventItem(OListViewItem* parent, Opie::OPimEvent *event); ~EventItem(); virtual QString toRichText(); virtual void action( int ); virtual QIntDict<QString> actions(); private: void setIcon(); - OPimEvent *_event; + Opie::OPimEvent *_event; }; #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 @@ // // // C++ Interface: $MODULE$ // // Description: // // // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 // // Copyright: See COPYING file that comes with this distribution // // #ifndef TODOITEM_H #define TODOITEM_H #include <opie2/opimtodo.h> #include "resultitem.h" -using namespace Opie; /** @author Patrick S. Vogt */ class TodoItem : public ResultItem { public: - TodoItem(OListViewItem* parent, OPimTodo *todo); + TodoItem(OListViewItem* parent, Opie::OPimTodo *todo); ~TodoItem(); virtual QString toRichText(); virtual void action( int ); virtual QIntDict<QString> actions(); private: void setIcon(); - OPimTodo *_todo; + Opie::OPimTodo *_todo; }; #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 @@ // // // C++ Implementation: $MODULE$ // // Description: // // // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 // // Copyright: See COPYING file that comes with this distribution // // #include "todosearch.h" #include "todoitem.h" #include <qpe/resource.h> #include <qpe/config.h> #include <qaction.h> #include <qpopupmenu.h> - +using namespace Opie; TodoSearch::TodoSearch(QListView* parent, QString name) : SearchGroup(parent, name), _todos(0), _popupMenu(0) { // AppLnkSet als(QPEApplication::qpeDir()); // setPixmap( 0, als.findExec("todolist")->pixmap() ); QIconSet is = Resource::loadIconSet( "todo/TodoListSmall" ); setPixmap( 0, is.pixmap( QIconSet::Large, true ) ); actionShowCompleted = new QAction( QObject::tr("show completed tasks"),QString::null, 0, 0, 0, true ); Config cfg( "osearch", Config::User ); cfg.setGroup( "todo_settings" ); actionShowCompleted->setOn( cfg.readBoolEntry( "show_completed_tasks", false ) ); } TodoSearch::~TodoSearch() { Config cfg( "osearch", Config::User ); cfg.setGroup( "todo_settings" ); cfg.writeEntry( "show_completed_tasks", actionShowCompleted->isOn() ); delete _popupMenu; delete actionShowCompleted; delete _todos; } void TodoSearch::load() { _todos = new OPimTodoAccess(); _todos->load(); } int TodoSearch::search() { OPimRecordList<OPimTodo> results = _todos->matchRegexp(_search); for (uint i = 0; i < results.count(); i++) insertItem( new OPimTodo( results[i] )); return _resultCount; } void TodoSearch::insertItem( void *rec ) { OPimTodo *todo = (OPimTodo*)rec; if (!actionShowCompleted->isOn() && todo->isCompleted() ) return; (void)new TodoItem( this, todo ); _resultCount++; } QPopupMenu* TodoSearch::popupMenu() { if (!_popupMenu){ _popupMenu = new QPopupMenu( 0 ); actionShowCompleted->addTo( _popupMenu ); } return _popupMenu; } 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 @@ // // // C++ Interface: $MODULE$ // // Description: // // // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 // // Copyright: See COPYING file that comes with this distribution // // #ifndef TODOSEARCH_H #define TODOSEARCH_H #include "searchgroup.h" #include <opie2/otodoaccess.h> #include <opie2/opimtodo.h> class QAction; -using namespace Opie; /** @author Patrick S. Vogt */ class TodoSearch : public SearchGroup { public: TodoSearch(QListView* parent, QString name); ~TodoSearch(); virtual QPopupMenu* popupMenu(); protected: virtual void load(); virtual int search(); virtual void insertItem( void* ); private: - OPimTodoAccess *_todos; + Opie::OPimTodoAccess *_todos; QAction *actionShowCompleted; QPopupMenu *_popupMenu; }; #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 @@ /* * datebookpluginwidget.h * * copyright : (c) 2002,2003 by Maximilian Reiß * email : harlekin@handhelds.org * */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef DATEBOOK_PLUGIN_WIDGET_H #define DATEBOOK_PLUGIN_WIDGET_H #include "datebookevent.h" #include <opie2/oclickablelabel.h> #include <qpe/datebookdb.h> #include <qlayout.h> #include <qguardedptr.h> #include <qlist.h> -using namespace Opie; class DatebookPluginWidget : public QWidget { Q_OBJECT public: DatebookPluginWidget( QWidget *parent, const char *name ); ~DatebookPluginWidget(); void refresh(); void reinitialize(); private: DateBookDB* db; QGuardedPtr<QVBoxLayout> m_layoutDates; QList<QWidget> m_eventsList; void readConfig(); void getDates(); - + // how many lines should be showed in the datebook section int m_max_lines_meet; // If location is to be showed too, 1 to activate it. bool m_show_location; // if notes should be shown bool m_show_notes; // should only later appointments be shown or all for the current day. bool m_onlyLater; int m_moreDays; // true if time of an appointment should be an extra line bool m_timeExtraLine; }; #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 @@ /* * mailpluginwidget.cpp * * copyright : (c) 2002,2003,2004 by Maximilian Reiß * email : harlekin@handhelds.org * */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "mailpluginwidget.h" #include <qpe/config.h> #include <qpe/qcopenvelope_qws.h> +using namespace Opie::Ui; MailPluginWidget::MailPluginWidget( QWidget *parent, const char* name) : QWidget(parent, name ) { m_mailLabel = 0l; m_layout = 0l; if ( m_mailLabel ) { delete m_mailLabel; } m_mailLabel = new OClickableLabel( this ); connect( m_mailLabel, SIGNAL( clicked() ), this, SLOT( startMail() ) ); if ( m_layout ) { delete m_layout; } m_layout = new QHBoxLayout( this ); m_layout->setAutoAdd( true ); #if defined(Q_WS_QWS) #if !defined(QT_NO_COP) QCopChannel *qCopChannel = new QCopChannel( "QPE/Pim" , this ); connect ( qCopChannel, SIGNAL( received(const QCString&,const QByteArray&) ), this, SLOT ( channelReceived(const QCString&,const QByteArray&) ) ); #endif #endif readConfig(); getInfo(); } void MailPluginWidget::channelReceived( const QCString &msg, const QByteArray & data ) { QDataStream stream( data, IO_ReadOnly ); if ( msg == "outgoingMails(int)" ) { stream >> m_outgoing; } else if ( msg == "newMails(int)" ) { stream >> m_newMails; } getInfo(); } MailPluginWidget::~MailPluginWidget() { delete m_mailLabel; delete m_layout; } void MailPluginWidget::readConfig() { Config cfg( "todaymailplugin" ); cfg.setGroup( "config" ); Config cfg2( "mail" ); cfg2.setGroup( "Status" ); m_newMails = cfg2.readNumEntry( "newMails", 0 ); m_outgoing = cfg2.readNumEntry( "outgoing", 0 ); } void MailPluginWidget::refresh() { getInfo(); } void MailPluginWidget::getInfo() { m_mailLabel->setText( QObject::tr( "<b>%1</b> new mail(s), <b>%2</b> outgoing" ).arg( m_newMails ).arg( m_outgoing ) ); } /** * launches datebook */ void MailPluginWidget::startMail() { QCopEnvelope e("QPE/System", "execute(QString)"); e << QString( "opiemail" ); } 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 @@ /* * mailpluginwidget.h * * copyright : (c) 2002,2003,2004 by Maximilian Reiß * email : harlekin@handhelds.org * */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef MAIL_PLUGIN_WIDGET_H #define MAIL_PLUGIN_WIDGET_H #include <qlayout.h> #include <opie2/oclickablelabel.h> -using namespace Opie; class MailPluginWidget : public QWidget { Q_OBJECT public: MailPluginWidget( QWidget *parent, const char *name ); ~MailPluginWidget(); - + void refresh(); protected slots: void startMail(); private: - OClickableLabel* m_mailLabel; + Opie::Ui::OClickableLabel* m_mailLabel; QHBoxLayout* m_layout; void readConfig(); void getInfo(); int m_newMails; int m_outgoing; private slots: void channelReceived(const QCString &msg, const QByteArray & data); }; #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 @@ /* * todoplugin.h * * copyright : (c) 2002,2003, 2004 by Maximilian Reiß * email : harlekin@handhelds.org * */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef TODOLIST_PLUGIN_H #define TODOLIST_PLUGIN_H #include "todopluginwidget.h" #include <opie2/oclickablelabel.h> #include <opie2/todayplugininterface.h> #include <qstring.h> #include <qguardedptr.h> #include <qwidget.h> -using namespace Opie; class TodolistPlugin : public TodayPluginObject { public: TodolistPlugin(); ~TodolistPlugin(); - + QString pluginName() const; double versionNumber() const; QString pixmapNameWidget() const; QWidget* widget(QWidget *); QString pixmapNameConfig() const; TodayConfigWidget* configWidget(QWidget *); QString appName() const; bool excludeFromRefresh() const; void refresh(); void reinitialize(); private: QGuardedPtr<TodolistPluginWidget> m_widget; }; #endif |