author | harlekin <harlekin> | 2003-12-20 00:05:37 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-12-20 00:05:37 (UTC) |
commit | dc088ad432189b4883f7654ef6b2c1e2f69112cc (patch) (side-by-side diff) | |
tree | 090f6afd960e644d7da1fae3b8c8ffa97b669b59 | |
parent | 00a0c8cf03fe746c1e3ba608bf298c8e66d065f9 (diff) | |
download | opie-dc088ad432189b4883f7654ef6b2c1e2f69112cc.zip opie-dc088ad432189b4883f7654ef6b2c1e2f69112cc.tar.gz opie-dc088ad432189b4883f7654ef6b2c1e2f69112cc.tar.bz2 |
- beginning of a settings dialog
- button for switching between html and plain text view of the mail
- hide some unused icons
- completed alwins idea about status icons ( alwin you missed the one that sets the read icon .-) )
- beginning of a status widget
-
-rw-r--r-- | noncore/net/mail/mail.pro | 12 | ||||
-rw-r--r-- | noncore/net/mail/mainwindow.cpp | 20 | ||||
-rw-r--r-- | noncore/net/mail/mainwindow.h | 3 | ||||
-rw-r--r-- | noncore/net/mail/opiemail.cpp | 2 | ||||
-rw-r--r-- | noncore/net/mail/viewmail.cpp | 21 | ||||
-rw-r--r-- | noncore/net/mail/viewmail.h | 5 | ||||
-rw-r--r-- | noncore/net/mail/viewmailbase.cpp | 5 | ||||
-rw-r--r-- | noncore/net/mail/viewmailbase.h | 3 |
8 files changed, 64 insertions, 7 deletions
diff --git a/noncore/net/mail/mail.pro b/noncore/net/mail/mail.pro index d058db7..49be889 100644 --- a/noncore/net/mail/mail.pro +++ b/noncore/net/mail/mail.pro @@ -17,3 +17,5 @@ HEADERS = defines.h \ pop3wrapper.h \ - abstractmail.h + abstractmail.h \ + settingsdialog.h \ + statuswidget.h @@ -34,3 +36,5 @@ SOURCES = main.cpp \ pop3wrapper.cpp \ - abstractmail.cpp + abstractmail.cpp \ + settingsdialog.cpp \ + statuswidget.cpp @@ -44,3 +48,5 @@ INTERFACES = editaccountsui.ui \ logindialogui.ui \ - composemailui.ui + composemailui.ui \ + settingsdialogui.ui \ + statuswidgetui.ui diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp index 9a37510..d3b9c34 100644 --- a/noncore/net/mail/mainwindow.cpp +++ b/noncore/net/mail/mainwindow.cpp @@ -13,2 +13,3 @@ #include "mainwindow.h" +#include "settingsdialog.h" #include "viewmail.h" @@ -17,2 +18,3 @@ + MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) @@ -47,2 +49,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) + /* syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC, @@ -51,2 +54,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) syncFolders->addTo( mailMenu ); + */ @@ -60,2 +64,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) + /* searchMails = new QAction( tr( "Search mails" ), ICON_SEARCHMAILS, @@ -64,2 +69,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) searchMails->addTo( mailMenu ); + */ @@ -74,2 +80,4 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) editSettings->addTo( settingsMenu ); + connect( editSettings, SIGNAL( activated() ), + SLOT( slotEditSettings() ) ); @@ -101,3 +109,6 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) + statusWidget = new StatusWidget( view ); + layout->addWidget( mailView ); + layout->addWidget( statusWidget ); layout->setStretchFactor( folderView, 1 ); @@ -105,2 +116,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) + slotAdjustLayout(); @@ -143,2 +155,8 @@ void MainWindow::slotAdjustColumns() +void MainWindow::slotEditSettings() { + SettingsDialog settingsDialog( this, 0, true ); + settingsDialog.showMaximized(); + settingsDialog.exec(); +} + void MainWindow::slotShowFolders( bool show ) @@ -181,3 +199,3 @@ void MainWindow::displayMail(QListViewItem*item) } else { - ( (MailListViewItem*)item )->setPixmap( 0, Resource::loadPixmap( "mail/kmmsgunseen") ); + ( (MailListViewItem*)item )->setPixmap( 0, Resource::loadPixmap( "") ); } diff --git a/noncore/net/mail/mainwindow.h b/noncore/net/mail/mainwindow.h index 21af190..4e4f4bb 100644 --- a/noncore/net/mail/mainwindow.h +++ b/noncore/net/mail/mainwindow.h @@ -11,2 +11,3 @@ #include "accountview.h" +#include "statuswidget.h" @@ -30,2 +31,3 @@ protected slots: void slotAdjustLayout(); + void slotEditSettings(); @@ -33,2 +35,3 @@ protected: QToolBar *toolBar; + StatusWidget *statusWidget; QMenuBar *menuBar; diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp index 740e4cf..7ab4e0d 100644 --- a/noncore/net/mail/opiemail.cpp +++ b/noncore/net/mail/opiemail.cpp @@ -13,3 +13,3 @@ OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); - connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); +// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); connect( editSettings, SIGNAL( activated() ), SLOT( slotEditSettings() ) ); diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp index d86454c..e11fe1f 100644 --- a/noncore/net/mail/viewmail.cpp +++ b/noncore/net/mail/viewmail.cpp @@ -8,2 +8,4 @@ +#include <qpe/config.h> + #include <opie/ofiledialog.h> @@ -111,2 +113,8 @@ for (unsigned int i = 0; i < body.Parts().count();++i) { + +void ViewMail::slotShowHtml( bool state ) { + m_showHtml = state; + setText(); +} + void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int ) { @@ -191,2 +199,3 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) connect( deleteMail, SIGNAL( activated() ), SLOT( slotDeleteMail( ) ) ); + connect( showHtml, SIGNAL( toggled( bool ) ), SLOT( slotShowHtml( bool ) ) ); @@ -195,2 +204,3 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) + readConfig(); @@ -198,2 +208,9 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) +void ViewMail::readConfig() { + Config cfg( "mail" ); + cfg.setGroup( "Settings" ); + m_showHtml = cfg.readBoolEntry( "showHtml", false ); + showHtml->setOn( m_showHtml ); +} + void ViewMail::setText() @@ -227,3 +244,7 @@ void ViewMail::setText() + if ( !m_showHtml ) { browser->setText( QString( m_mailHtml) + deHtml( m_mail[2] ) + "</font></html>" ); + } else { + browser->setText( QString( m_mailHtml) + m_mail[2] + "</font></html>" ); + } // remove later in favor of a real handling diff --git a/noncore/net/mail/viewmail.h b/noncore/net/mail/viewmail.h index dd7f854..bf7a4dd 100644 --- a/noncore/net/mail/viewmail.h +++ b/noncore/net/mail/viewmail.h @@ -44,5 +44,7 @@ protected slots: void slotDeleteMail( ); - + void slotShowHtml( bool ); private: + void readConfig(); + bool _inLoop; @@ -52,2 +54,3 @@ private: RecMail m_recMail; + bool m_showHtml; diff --git a/noncore/net/mail/viewmailbase.cpp b/noncore/net/mail/viewmailbase.cpp index 0c7f671..e69617d 100644 --- a/noncore/net/mail/viewmailbase.cpp +++ b/noncore/net/mail/viewmailbase.cpp @@ -45,2 +45,7 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) + + showHtml = new QAction( tr( "Show Html" ), QIconSet( Resource::loadPixmap( "mail/attach" ) ), 0, 0, this, 0, true ); + showHtml->addTo( toolbar ); + showHtml->addTo( mailmenu ); + deleteMail = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this); diff --git a/noncore/net/mail/viewmailbase.h b/noncore/net/mail/viewmailbase.h index 898522e..6d2a5b2 100644 --- a/noncore/net/mail/viewmailbase.h +++ b/noncore/net/mail/viewmailbase.h @@ -21,3 +21,3 @@ public: protected: - QAction *reply, *forward, *attachbutton, *deleteMail; + QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml; QListView *attachments; @@ -32,2 +32,3 @@ protected slots: + }; |