From 62842736cf871376f947f7b27ebc6f58fbc84fdc Mon Sep 17 00:00:00 2001 From: mickeyl Date: Sun, 03 Jul 2005 21:03:44 +0000 Subject: Resource -> OResource Dan, please check if I did everything correctly --- (limited to 'noncore/net') 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 @@ -8,15 +8,17 @@ #include #include #include + /* OPIE */ #include +#include #include +using namespace Opie::Core; /* QT */ #include #include -using namespace Opie::Core; #define SETPIX(x) if (!account->getOffline()) {setPixmap( 0,x);} else {setPixmap( 0, PIXMAP_OFFLINE );} /** * POP3 Account stuff @@ -898,7 +900,7 @@ void MHfolderItem::initName() { 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 ); } 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 @@ -4,7 +4,7 @@ /* OPIE */ #include #include -#include +#include #include /* QT */ @@ -18,8 +18,8 @@ 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())); 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 @@ -9,17 +9,16 @@ /* OPIE */ #include #include -#include +#include #include #include #include +using namespace Opie::Core; +using namespace Opie::Ui; /* QT */ #include - -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 ) { @@ -299,7 +298,7 @@ AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) 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 @@ -3,8 +3,8 @@ 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,7 +1,8 @@ #ifndef DEFINE_CONSTANTS_H #define DEFINE_CONSTANTS_H -#include +#include +using namespace Opie::Core; #define USER_AGENT "OpieMail v0.3" @@ -19,22 +20,22 @@ #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" 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,9 +1,13 @@ #include "mailistviewitem.h" #include -#include -#include + +/* OPIE */ +#include #include +/* QT */ +#include + MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item ) :QListViewItem(parent,item),mail_data() { @@ -12,13 +16,13 @@ MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item ) 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; 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,22 +1,23 @@ -#include -#include -#include -#include -#include +#include "defines.h" +#include "mainwindow.h" +/* OPIE */ #include +#include #include #include - -#include "defines.h" -#include "mainwindow.h" - using namespace Opie::Core; +/* QT */ +#include +#include +#include +#include +#include + MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) : QMainWindow( parent, name, flags ) { - setCaption( tr( "Mail" ) ); setToolBarsMovable( false ); @@ -95,24 +96,24 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 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 ); 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 @@ -11,11 +11,12 @@ #include #include #include + /* OPIE */ #include -#include #include #include +using namespace Opie::Core; /* QT */ #include @@ -24,8 +25,6 @@ /* UNIX */ #include -using namespace Opie::Core; - typedef QMapNode tkeyvalues; typedef QValueList tvaluelist; @@ -278,7 +277,7 @@ void OpieMail::displayMail() } else { - ( (MailListViewItem*)item )->setPixmap( 0, Resource::loadPixmap( "" ) ); + ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); } } 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,16 +1,18 @@ +#include "viewmailbase.h" + +/* OPIE */ +#include +using namespace Opie::Core; + +/* QT */ #include #include #include #include #include - #include #include #include -#include - -#include "viewmailbase.h" -//#include "opendiag.h" ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) : QMainWindow(parent, name, fl) @@ -28,30 +30,30 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) 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); -- cgit v0.9.0.2