summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-07-03 21:03:44 (UTC)
committer mickeyl <mickeyl>2005-07-03 21:03:44 (UTC)
commit62842736cf871376f947f7b27ebc6f58fbc84fdc (patch) (side-by-side diff)
treec37cb61624a0d6654eeeb218f93c5766bb9ff6f6
parentdf3947675e6e2fd46704810414005aa56aa391a1 (diff)
downloadopie-62842736cf871376f947f7b27ebc6f58fbc84fdc.zip
opie-62842736cf871376f947f7b27ebc6f58fbc84fdc.tar.gz
opie-62842736cf871376f947f7b27ebc6f58fbc84fdc.tar.bz2
Resource -> OResource
Dan, please check if I did everything correctly
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/accountitem.cpp6
-rw-r--r--noncore/net/mail/addresspicker.cpp6
-rw-r--r--noncore/net/mail/composemail.cpp9
-rw-r--r--noncore/net/mail/config.in6
-rw-r--r--noncore/net/mail/defines.h33
-rw-r--r--noncore/net/mail/mailistviewitem.cpp14
-rw-r--r--noncore/net/mail/mainwindow.cpp29
-rw-r--r--noncore/net/mail/opiemail.cpp7
-rw-r--r--noncore/net/mail/viewmailbase.cpp24
9 files changed, 71 insertions, 63 deletions
diff --git a/noncore/net/mail/accountitem.cpp b/noncore/net/mail/accountitem.cpp
index f7fdccd..f3f2182 100644
--- a/noncore/net/mail/accountitem.cpp
+++ b/noncore/net/mail/accountitem.cpp
@@ -5,21 +5,23 @@
#include "nntpgroupsdlg.h"
#include "defines.h"
#include <libmailwrapper/mailtypes.h>
#include <libmailwrapper/abstractmail.h>
#include <libmailwrapper/mailwrapper.h>
+
/* OPIE */
#include <opie2/odebug.h>
+#include <opie2/oresource.h>
#include <qpe/qpeapplication.h>
+using namespace Opie::Core;
/* QT */
#include <qpopupmenu.h>
#include <qmessagebox.h>
-using namespace Opie::Core;
#define SETPIX(x) if (!account->getOffline()) {setPixmap( 0,x);} else {setPixmap( 0, PIXMAP_OFFLINE );}
/**
* POP3 Account stuff
*/
POP3viewItem::POP3viewItem( POP3account *a, AccountView *parent )
: AccountViewItem( parent )
@@ -895,13 +897,13 @@ void MHfolderItem::initName()
setPixmap( 0, PIXMAP_OUTBOXFOLDER );
}
else if (bName.lower() == "inbox")
{
setPixmap( 0, PIXMAP_INBOXFOLDER);
} else if (bName.lower() == "drafts") {
- setPixmap(0, Resource::loadPixmap("edit"));
+ setPixmap(0, Opie::Core::OResource::loadPixmap("edit", Opie::Core::OResource::SmallIcon));
} else {
setPixmap( 0, PIXMAP_MBOXFOLDER );
}
setText( 0, bName );
}
diff --git a/noncore/net/mail/addresspicker.cpp b/noncore/net/mail/addresspicker.cpp
index 50c82e5..4e328d4 100644
--- a/noncore/net/mail/addresspicker.cpp
+++ b/noncore/net/mail/addresspicker.cpp
@@ -1,13 +1,13 @@
#include "composemail.h"
/* OPIE */
#include <opie2/ocontactaccess.h>
#include <opie2/opimcontact.h>
-#include <qpe/resource.h>
+#include <opie2/oresource.h>
#include <qpe/qpeapplication.h>
/* QT */
#include <qpushbutton.h>
#include <qmessagebox.h>
#include <qlistbox.h>
@@ -15,14 +15,14 @@
/* STD */
#include <stdlib.h>
AddressPicker::AddressPicker( QWidget *parent, const char *name, bool modal, WFlags flags )
: AddressPickerUI( parent, name, modal, flags )
{
- okButton->setIconSet( Resource::loadPixmap( "enter" ) );
- cancelButton->setIconSet( Resource::loadPixmap( "editdelete" ) );
+ okButton->setIconSet( Opie::Core::OResource::loadPixmap( "enter", Opie::Core::OResource::SmallIcon ) );
+ cancelButton->setIconSet( Opie::Core::OResource::loadPixmap( "editdelete", Opie::Core::OResource::SmallIcon ) );
connect(okButton, SIGNAL(clicked()), SLOT(accept()));
connect(cancelButton, SIGNAL(clicked()), SLOT(close()));
Opie::OPimContactAccess::List::Iterator it;
QString lineEmail, lineName, contactLine;
diff --git a/noncore/net/mail/composemail.cpp b/noncore/net/mail/composemail.cpp
index 154c1d5..9d04de3 100644
--- a/noncore/net/mail/composemail.cpp
+++ b/noncore/net/mail/composemail.cpp
@@ -6,23 +6,22 @@
#include <libmailwrapper/abstractmail.h>
#include <libmailwrapper/mailtypes.h>
/* OPIE */
#include <opie2/ofiledialog.h>
#include <opie2/odebug.h>
-#include <qpe/resource.h>
+#include <opie2/oresource.h>
#include <qpe/config.h>
#include <qpe/global.h>
#include <qpe/contact.h>
+using namespace Opie::Core;
+using namespace Opie::Ui;
/* QT */
#include <qt.h>
-
-using namespace Opie::Core;
-using namespace Opie::Ui;
ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags )
: ComposeMailUI( parent, name, modal, flags )
{
settings = s;
m_replyid = "";
@@ -296,12 +295,12 @@ void ComposeMail::reEditMail(const RecMailP&current)
AttachViewItem::AttachViewItem( QListView *parent, Attachment *att )
: QListViewItem( parent )
{
attachment = att;
odebug << att->getMimeType() << oendl;
setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ?
- Resource::loadPixmap( "UnknownDocument-14" ) :
+ OResource::loadPixmap( "UnknownDocument", OResource::SmallIcon ) :
attachment->getDocLnk().pixmap() );
setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() );
setText( 1, QString::number( att->getSize() ) );
}
diff --git a/noncore/net/mail/config.in b/noncore/net/mail/config.in
index f7fce91..b18feb7 100644
--- a/noncore/net/mail/config.in
+++ b/noncore/net/mail/config.in
@@ -1,10 +1,10 @@
source noncore/net/mail/libmailwrapper/config.in
config MAIL3
boolean "opie-mail3 (a mail client)"
default "y"
- depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2PIM && LIBOPIE2MM && LIBMAILWRAPPER
- comment "opie-mail3 needs a libqpe, libopie2core, libopie2pim and the libmailwrapper"
- depends ! ( ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2PIM && LIBOPIE2MM && LIBMAILWRAPPER )
+ depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBOPIE2PIM && LIBOPIE2MM && LIBMAILWRAPPER
+ comment "opie-mail3 needs a libqpe, libopie2core, libopie2ui, libopie2pim and the libmailwrapper"
+ depends ! ( ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBOPIE2PIM && LIBOPIE2MM && LIBMAILWRAPPER )
source noncore/net/mail/taskbarapplet/config.in
diff --git a/noncore/net/mail/defines.h b/noncore/net/mail/defines.h
index 50d63dd..36ac5a1 100644
--- a/noncore/net/mail/defines.h
+++ b/noncore/net/mail/defines.h
@@ -1,10 +1,11 @@
#ifndef DEFINE_CONSTANTS_H
#define DEFINE_CONSTANTS_H
-#include <qpe/resource.h>
+#include <opie2/oresource.h>
+using namespace Opie::Core;
#define USER_AGENT "OpieMail v0.3"
#define PIC_COMPOSEMAIL "mail/composemail"
#define PIC_SENDQUEUED "mail/sendqueued"
#define PIC_SHOWFOLDERS "mail/showfolders"
@@ -16,28 +17,28 @@
#define PIC_OUTBOXFOLDER "mail/outbox"
#define PIC_LOCALFOLDER "mail/localfolder"
#define PIC_OFFLINE "mail/notconnected"
#define PIC_DOCUMENT "DocsIcon"
-#define ICON_COMPOSEMAIL QIconSet( Resource::loadPixmap( PIC_COMPOSEMAIL ) )
-#define ICON_SENDQUEUED QIconSet( Resource::loadPixmap( PIC_SENDQUEUED ) )
-#define ICON_SHOWFOLDERS QIconSet( Resource::loadPixmap( PIC_SHOWFOLDERS ) )
-#define ICON_SEARCHMAILS QIconSet( Resource::loadPixmap( PIC_SEARCHMAILS ) )
-#define ICON_EDITSETTINGS QIconSet( Resource::loadPixmap( PIC_EDITSETTINGS ) )
-#define ICON_EDITACCOUNTS QIconSet( Resource::loadPixmap( PIC_EDITACCOUNTS ) )
-#define ICON_SYNC QIconSet( Resource::loadPixmap( PIC_SYNC ) )
-#define ICON_READMAIL QIconSet( Resource::loadPixmap( PIC_DOCUMENT))
+#define ICON_COMPOSEMAIL QIconSet( OResource::loadPixmap( PIC_COMPOSEMAIL, OResource::SmallIcon ) )
+#define ICON_SENDQUEUED QIconSet( OResource::loadPixmap( PIC_SENDQUEUED, OResource::SmallIcon ) )
+#define ICON_SHOWFOLDERS QIconSet( OResource::loadPixmap( PIC_SHOWFOLDERS, OResource::SmallIcon ) )
+#define ICON_SEARCHMAILS QIconSet( OResource::loadPixmap( PIC_SEARCHMAILS, OResource::SmallIcon ) )
+#define ICON_EDITSETTINGS QIconSet( OResource::loadPixmap( PIC_EDITSETTINGS, OResource::SmallIcon ) )
+#define ICON_EDITACCOUNTS QIconSet( OResource::loadPixmap( PIC_EDITACCOUNTS, OResource::SmallIcon ) )
+#define ICON_SYNC QIconSet( OResource::loadPixmap( PIC_SYNC, OResource::SmallIcon ) )
+#define ICON_READMAIL QIconSet( OResource::loadPixmap( PIC_DOCUMENT, OResource::SmallIcon) )
-#define PIXMAP_IMAPFOLDER QPixmap( Resource::loadPixmap( PIC_IMAPFOLDER ) )
-#define PIXMAP_POP3FOLDER QPixmap( Resource::loadPixmap( PIC_POP3FOLDER ) )
-#define PIXMAP_INBOXFOLDER QPixmap( Resource::loadPixmap( PIC_INBOXFOLDER) )
-#define PIXMAP_MBOXFOLDER QPixmap( Resource::loadPixmap( PIC_MBOXFOLDER ) )
-#define PIXMAP_OUTBOXFOLDER QPixmap( Resource::loadPixmap( PIC_OUTBOXFOLDER) )
-#define PIXMAP_LOCALFOLDER QPixmap( Resource::loadPixmap( PIC_LOCALFOLDER) )
-#define PIXMAP_OFFLINE QPixmap( Resource::loadPixmap( PIC_OFFLINE) )
+#define PIXMAP_IMAPFOLDER QPixmap( OResource::loadPixmap( PIC_IMAPFOLDER, OResource::SmallIcon ) )
+#define PIXMAP_POP3FOLDER QPixmap( OResource::loadPixmap( PIC_POP3FOLDER, OResource::SmallIcon ) )
+#define PIXMAP_INBOXFOLDER QPixmap( OResource::loadPixmap( PIC_INBOXFOLDER, OResource::SmallIcon ) )
+#define PIXMAP_MBOXFOLDER QPixmap( OResource::loadPixmap( PIC_MBOXFOLDER, OResource::SmallIcon ) )
+#define PIXMAP_OUTBOXFOLDER QPixmap( OResource::loadPixmap( PIC_OUTBOXFOLDER, OResource::SmallIcon ) )
+#define PIXMAP_LOCALFOLDER QPixmap( OResource::loadPixmap( PIC_LOCALFOLDER, OResource::SmallIcon ) )
+#define PIXMAP_OFFLINE QPixmap( OResource::loadPixmap( PIC_OFFLINE, OResource::SmallIcon ) )
#define IMAP_PORT "143"
#define IMAP_SSL_PORT "993"
#define SMTP_PORT "25"
#define SMTP_SSL_PORT "465"
#define POP3_PORT "110"
diff --git a/noncore/net/mail/mailistviewitem.cpp b/noncore/net/mail/mailistviewitem.cpp
index d3a0723..5254616 100644
--- a/noncore/net/mail/mailistviewitem.cpp
+++ b/noncore/net/mail/mailistviewitem.cpp
@@ -1,27 +1,31 @@
#include "mailistviewitem.h"
#include <libmailwrapper/abstractmail.h>
-#include <qtextstream.h>
-#include <qpe/resource.h>
+
+/* OPIE */
+#include <opie2/oresource.h>
#include <qpe/timestring.h>
+/* QT */
+#include <qtextstream.h>
+
MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item )
:QListViewItem(parent,item),mail_data()
{
}
void MailListViewItem::showEntry()
{
if ( mail_data->getFlags().testBit( FLAG_ANSWERED ) == true) {
- setPixmap( 0, Resource::loadPixmap( "mail/kmmsgreplied") );
+ setPixmap( 0, Opie::Core::OResource::loadPixmap( "mail/kmmsgreplied", Opie::Core::OResource::SmallIcon ) );
} else if ( mail_data->getFlags().testBit( FLAG_SEEN ) == true ) {
/* I think it looks nicer if there are not such a lot of icons but only on mails
replied or new - Alwin*/
- //setPixmap( 0, Resource::loadPixmap( "mail/kmmsgunseen") );
+ //setPixmap( 0, Opie::Core::OResource::loadPixmap( "mail/kmmsgunseen", Opie::Core::OResource::SmallIcon ) );
} else {
- setPixmap( 0, Resource::loadPixmap( "mail/kmmsgnew") );
+ setPixmap( 0, Opie::Core::OResource::loadPixmap( "mail/kmmsgnew", Opie::Core::OResource::SmallIcon ) );
}
double s = mail_data->Msgsize();
int w;
w=0;
while (s>1024) {
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp
index b587424..bce4c0d 100644
--- a/noncore/net/mail/mainwindow.cpp
+++ b/noncore/net/mail/mainwindow.cpp
@@ -1,25 +1,26 @@
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qheader.h>
-#include <qtimer.h>
-#include <qlayout.h>
+#include "defines.h"
+#include "mainwindow.h"
+/* OPIE */
#include <opie2/odebug.h>
+#include <opie2/oresource.h>
#include <qpe/qpeapplication.h>
#include <qpe/qcopenvelope_qws.h>
-
-#include "defines.h"
-#include "mainwindow.h"
-
using namespace Opie::Core;
+/* QT */
+#include <qlabel.h>
+#include <qvbox.h>
+#include <qheader.h>
+#include <qtimer.h>
+#include <qlayout.h>
+
MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
: QMainWindow( parent, name, flags )
{
-
setCaption( tr( "Mail" ) );
setToolBarsMovable( false );
toolBar = new QToolBar( this );
menuBar = new QMenuBar( toolBar );
@@ -92,30 +93,30 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
showFolders->addTo( mailMenu );
showFolders->setOn( true );
connect(showFolders, SIGNAL( toggled(bool) ),
SLOT( slotShowFolders(bool) ) );
/*
- searchMails = new QAction( tr( "Search mails" ), QIconSet( Resource::loadPixmap("find") ),
+ searchMails = new QAction( tr( "Search mails" ), OResource::loadPixmap("find", OResource::SmallIcon ),
0, 0, this );
searchMails->addTo( toolBar );
searchMails->addTo( mailMenu );
*/
- deleteMails = new QAction(tr("Delete Mail"), QIconSet( Resource::loadPixmap("trash")), 0, 0, this);
+ deleteMails = new QAction(tr("Delete Mail"), OResource::loadPixmap("trash", OResource::SmallIcon ), 0, 0, this);
deleteMails->addTo( toolBar );
deleteMails->addTo( mailMenu );
connect( deleteMails, SIGNAL( activated() ),
SLOT( slotDeleteMail() ) );
- editSettings = new QAction( tr( "Edit settings" ), QIconSet( Resource::loadPixmap("SettingsIcon") ) ,
+ editSettings = new QAction( tr( "Edit settings" ), OResource::loadPixmap("SettingsIcon", OResource::SmallIcon ) ,
0, 0, this );
editSettings->addTo( settingsMenu );
connect( editSettings, SIGNAL( activated() ),
SLOT( slotEditSettings() ) );
- editAccounts = new QAction( tr( "Configure accounts" ), QIconSet( Resource::loadPixmap("mail/editaccounts") ) ,
+ editAccounts = new QAction( tr( "Configure accounts" ), OResource::loadPixmap("mail/editaccounts", OResource::SmallIcon ) ,
0, 0, this );
editAccounts->addTo( settingsMenu );
QWidget *view = new QWidget( this );
setCentralWidget( view );
diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp
index fb8877a..e07ed6f 100644
--- a/noncore/net/mail/opiemail.cpp
+++ b/noncore/net/mail/opiemail.cpp
@@ -8,27 +8,26 @@
#include "selectstore.h"
#include "selectsmtp.h"
#include <libmailwrapper/smtpwrapper.h>
#include <libmailwrapper/mailtypes.h>
#include <libmailwrapper/abstractmail.h>
+
/* OPIE */
#include <opie2/odebug.h>
-#include <qpe/resource.h>
#include <qpe/qpeapplication.h>
#include <qpe/config.h>
+using namespace Opie::Core;
/* QT */
#include <qmap.h>
#include <qvaluelist.h>
/* UNIX */
#include <signal.h>
-using namespace Opie::Core;
-
typedef QMapNode<QString,QString> tkeyvalues;
typedef QValueList<tkeyvalues> tvaluelist;
class ValueExplode
{
protected:
@@ -275,13 +274,13 @@ void OpieMail::displayMail()
if ( readMail.deleted )
{
folderView->refreshCurrent();
}
else
{
- ( (MailListViewItem*)item )->setPixmap( 0, Resource::loadPixmap( "" ) );
+ ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );
}
}
void OpieMail::slotDeleteMail()
{
if (!mailView->currentItem()) return;
diff --git a/noncore/net/mail/viewmailbase.cpp b/noncore/net/mail/viewmailbase.cpp
index 65ad0d6..9e17439 100644
--- a/noncore/net/mail/viewmailbase.cpp
+++ b/noncore/net/mail/viewmailbase.cpp
@@ -1,19 +1,21 @@
+#include "viewmailbase.h"
+
+/* OPIE */
+#include <opie2/oresource.h>
+using namespace Opie::Core;
+
+/* QT */
#include <qtextbrowser.h>
#include <qlistview.h>
#include <qaction.h>
#include <qlabel.h>
#include <qvbox.h>
-
#include <qtoolbar.h>
#include <qlayout.h>
#include <qmenubar.h>
-#include <qpe/resource.h>
-
-#include "viewmailbase.h"
-//#include "opendiag.h"
ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
: QMainWindow(parent, name, fl)
{
setCaption(tr("E-Mail view"));
setToolBarsMovable(false);
@@ -25,36 +27,36 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
toolbar->setHorizontalStretchable(true);
addToolBar(toolbar);
QLabel *spacer = new QLabel(toolbar);
spacer->setBackgroundMode(QWidget::PaletteButton);
toolbar->setStretchableWidget(spacer);
- reply = new QAction(tr("Reply"), QIconSet(Resource::loadPixmap("mail/reply")), 0, 0, this);
+ reply = new QAction(tr("Reply"), OResource::loadPixmap("mail/reply", OResource::SmallIcon), 0, 0, this);
reply->addTo(toolbar);
reply->addTo(mailmenu);
- forward = new QAction(tr("Forward"), QIconSet(Resource::loadPixmap("mail/forward")), 0, 0, this);
+ forward = new QAction(tr("Forward"), OResource::loadPixmap("mail/forward", OResource::SmallIcon), 0, 0, this);
forward->addTo(toolbar);
forward->addTo(mailmenu);
- attachbutton = new QAction(tr("Attachments"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true);
+ attachbutton = new QAction(tr("Attachments"), OResource::loadPixmap("mail/attach", OResource::SmallIcon), 0, 0, this, 0, true);
attachbutton->addTo(toolbar);
attachbutton->addTo(mailmenu);
connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool)));
- showHtml = new QAction( tr( "Show Html" ), QIconSet( Resource::loadPixmap( "mail/html" ) ), 0, 0, this, 0, true );
+ showHtml = new QAction( tr( "Show Html" ), OResource::loadPixmap( "mail/html", OResource::SmallIcon ), 0, 0, this, 0, true );
showHtml->addTo( toolbar );
showHtml->addTo( mailmenu );
- showPicsInline= new QAction(tr("Show image preview inline"), QIconSet(Resource::loadPixmap("pixmap")), 0, 0, this);
+ showPicsInline= new QAction(tr("Show image preview inline"), OResource::loadPixmap("pixmap", OResource::SmallIcon), 0, 0, this);
showPicsInline->setToggleAction(true);
showPicsInline->addTo(toolbar);
showPicsInline->addTo(mailmenu);
- deleteMail = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("trash")), 0, 0, this);
+ deleteMail = new QAction(tr("Delete Mail"), OResource::loadPixmap("trash", OResource::SmallIcon), 0, 0, this);
deleteMail->addTo(toolbar);
deleteMail->addTo(mailmenu);
QVBox * view = new QVBox(this);
view->setSpacing(1);
view->setMargin(0);