summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mail2/composerbase.cpp8
-rw-r--r--noncore/unsupported/mail2/configdiag.cpp20
-rw-r--r--noncore/unsupported/mail2/configdiag.h2
-rw-r--r--noncore/unsupported/mail2/configdiagbase.ui11
-rw-r--r--noncore/unsupported/mail2/mainwindowbase.cpp8
5 files changed, 8 insertions, 41 deletions
diff --git a/noncore/unsupported/mail2/composerbase.cpp b/noncore/unsupported/mail2/composerbase.cpp
index ff00a73..c456ae5 100644
--- a/noncore/unsupported/mail2/composerbase.cpp
+++ b/noncore/unsupported/mail2/composerbase.cpp
@@ -6,69 +6,69 @@
#include <qaction.h>
#include <qlabel.h>
#include <qvbox.h>
#include <qpe/qpetoolbar.h>
#include <qpe/qpemenubar.h>
#include <qpe/resource.h>
#include "listviewplus.h"
#include "composerbase.h"
ComposerBase::ComposerBase(QWidget *parent, const char *name, WFlags fl)
: QMainWindow(parent, name, fl)
{
setCaption(tr("Compose Message"));
setToolBarsMovable(false);
toolbar = new QPEToolBar(this);
menubar = new QPEMenuBar( toolbar );
mailmenu = new QPopupMenu( menubar );
menubar->insertItem( tr( "Mail" ), mailmenu );
addToolBar(toolbar);
toolbar->setHorizontalStretchable(true);
+ QLabel *spacer = new QLabel(toolbar);
+ spacer->setBackgroundMode(QWidget::PaletteButton);
+ toolbar->setStretchableWidget(spacer);
+
sendmail = new QAction(tr("Send the mail"), QIconSet(Resource::loadPixmap("mail/sendmail")), 0, 0, this);
sendmail->addTo(toolbar);
sendmail->addTo(mailmenu);
queuemail = new QAction(tr("Queue the mail"), QIconSet(Resource::loadPixmap("mail/sendall")), 0, 0, this);
queuemail->addTo(toolbar);
queuemail->addTo(mailmenu);
attachfile = new QAction(tr("Attach a file"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true);
attachfile->addTo(toolbar);
attachfile->addTo(mailmenu);
connect(attachfile, SIGNAL(toggled(bool)), SLOT(slotAttachfileChanged(bool)));
addressbook = new QAction(tr("Addressbook"), QIconSet(Resource::loadPixmap("mail/addbook")), 0, 0, this);
addressbook->addTo(toolbar);
addressbook->addTo(mailmenu);
- QLabel *spacer = new QLabel(toolbar);
- spacer->setBackgroundMode(QWidget::PaletteButton);
- toolbar->setStretchableWidget(spacer);
-
abort = new QAction(tr("Abort sending"), QIconSet(Resource::loadPixmap("mail/abort")), 0, 0, this);
abort->addTo(toolbar);
abort->addTo(mailmenu);
QWidget *main = new QWidget(this);
setCentralWidget(main);
QGridLayout *layout = new QGridLayout(main);
fromBox = new QComboBox(main);
fromBox->insertItem(tr("From"), POPUP_FROM_FROM);
fromBox->insertItem(tr("Reply"), POPUP_FROM_REPLYTO);
layout->addWidget(fromBox, 0, 0);
connect(fromBox, SIGNAL(activated(int)), SLOT(slotFromMenuChanged(int)));
QHBoxLayout *fromLayout = new QHBoxLayout();
layout->addLayout(fromLayout, 0, 1);
from = new QComboBox(main);
fromLayout->addWidget(from);
replyto = new QLineEdit(main);
replyto->hide();
diff --git a/noncore/unsupported/mail2/configdiag.cpp b/noncore/unsupported/mail2/configdiag.cpp
index b89b937..e2b2f13 100644
--- a/noncore/unsupported/mail2/configdiag.cpp
+++ b/noncore/unsupported/mail2/configdiag.cpp
@@ -1,77 +1,74 @@
#include <qmessagebox.h>
#include <qpushbutton.h>
#include <qtoolbutton.h>
#include <qgroupbox.h>
#include <qcheckbox.h>
#include <qspinbox.h>
#include <qheader.h>
#include <qtimer.h>
#include <qlabel.h>
#include <qpe/resource.h>
#include <qpe/config.h>
#include "accounteditor.h"
-#include "zaurusstuff.h"
#include "configdiag.h"
#include "defines.h"
AccountListItem::AccountListItem(QListView *parent, Account &account)
: QListViewItem(parent), _account(account)
{
QString displayText;
if (!_account.realName().isEmpty() && !_account.email().isEmpty())
setText(0, _account.realName() + " <" + _account.email() + ">");
else if (_account.realName().isEmpty() && !_account.email().isEmpty())
setText(0, _account.email());
else if (!_account.realName().isEmpty() && _account.email().isEmpty())
setText(0, _account.realName());
else
setText(0, QObject::tr("(no name)"));
setPixmap(0, Resource::loadPixmap("mail/inbox"));
}
ConfigDiag::ConfigDiag(QWidget *parent, const char *name, bool modal, WFlags fl)
: ConfigDiagBase(parent, name, modal, fl)
{
_configBenD = new Config("mail");
_configBenD->setGroup("Settings");
disabled->setChecked(_configBenD->readBoolEntry("Disabled", false));
playSound->setChecked(_configBenD->readBoolEntry("PlaySound", false));
blinkLed->setChecked(_configBenD->readBoolEntry("BlinkLed", true));
checkDelay->setValue(_configBenD->readNumEntry("CheckDelay", 5));
accountList->header()->hide();
disclaimer->setText(disclaimer->text().arg(VERSION));
connect(accountNew, SIGNAL(clicked()), SLOT(slotNewAccount()));
connect(accountEdit, SIGNAL(clicked()), SLOT(slotEditAccount()));
connect(accountDelete, SIGNAL(clicked()), SLOT(slotDelAccount()));
- connect(testbutton, SIGNAL(clicked()), SLOT(slotTestSettings()));
-
slotFillLists();
}
void ConfigDiag::accept()
{
_configBenD->setGroup("Settings");
_configBenD->writeEntry("Disabled", disabled->isChecked());
_configBenD->writeEntry("PlaySound", playSound->isChecked());
_configBenD->writeEntry("BlinkLed", blinkLed->isChecked());
_configBenD->writeEntry("CheckDelay", checkDelay->value());
_configBenD->write();
QDialog::accept();
}
void ConfigDiag::slotFillLists()
{
accountList->clear();
QValueList<Account> accounts = ConfigFile::getAccounts();
QValueList<Account>::Iterator it;
for (it = accounts.begin(); it != accounts.end(); it++)
(void) new AccountListItem(accountList, *it);
@@ -105,41 +102,24 @@ void ConfigDiag::slotEditAccount()
if (QDialog::Accepted == editor.exec()) {
ConfigFile::updateAccount(editor._account);
slotFillLists();
emit changed();
}
}
void ConfigDiag::slotDelAccount()
{
if (!accountList->currentItem()) {
QMessageBox::information(this, tr("Error"), tr("<p>You have to select an account first.</p>"), tr("Ok"));
return;
}
Account account = ((AccountListItem *)accountList->currentItem())->account();
int ret = QMessageBox::information(this, tr("Question"), tr("<p>Do you relly want to delete the selected account?</p>"), tr("Yes"), tr("No"));
if (1 == ret) return;
ConfigFile::deleteAccount(account);
slotFillLists();
emit changed();
}
-void ConfigDiag::slotTestSettings()
-{
- testbutton->setEnabled(false);
-
- if (blinkLed->isChecked()) ZaurusStuff::blinkLedOn();
- if (playSound->isChecked()) ZaurusStuff::buzzerOn();
- QTimer::singleShot(3000, this, SLOT(slotEndTest()));
-}
-
-void ConfigDiag::slotEndTest()
-{
- if (playSound->isChecked()) ZaurusStuff::buzzerOff();
- if (blinkLed->isChecked()) ZaurusStuff::blinkLedOff();
-
- testbutton->setEnabled(true);
-}
-
diff --git a/noncore/unsupported/mail2/configdiag.h b/noncore/unsupported/mail2/configdiag.h
index f70ba7f..cbc9b22 100644
--- a/noncore/unsupported/mail2/configdiag.h
+++ b/noncore/unsupported/mail2/configdiag.h
@@ -16,33 +16,31 @@ public:
Account account() { return _account; }
protected:
Account _account;
};
class ConfigDiag : public ConfigDiagBase
{
Q_OBJECT
public:
ConfigDiag(QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags fl = 0);
signals:
void changed();
protected slots:
void accept();
void slotFillLists();
void slotNewAccount();
void slotEditAccount();
void slotDelAccount();
- void slotTestSettings();
- void slotEndTest();
private:
Config *_configBenD;
};
#endif
diff --git a/noncore/unsupported/mail2/configdiagbase.ui b/noncore/unsupported/mail2/configdiagbase.ui
index 182fedc..8b225fe 100644
--- a/noncore/unsupported/mail2/configdiagbase.ui
+++ b/noncore/unsupported/mail2/configdiagbase.ui
@@ -212,59 +212,48 @@
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>3</number>
</property>
<widget row="1" column="0" rowspan="1" colspan="3" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>blinkLed</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>0</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>text</name>
<string>Blink LED</string>
</property>
</widget>
- <widget row="2" column="2" >
- <class>QToolButton</class>
- <property stdset="1">
- <name>name</name>
- <cstring>testbutton</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string> Test </string>
- </property>
- </widget>
<widget row="0" column="0" rowspan="1" colspan="3" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>playSound</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Play sound</string>
</property>
</widget>
<widget row="2" column="0" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&lt;b&gt;Check&amp;nbsp;every</string>
</property>
</widget>
<widget row="2" column="1" >
<class>QSpinBox</class>
diff --git a/noncore/unsupported/mail2/mainwindowbase.cpp b/noncore/unsupported/mail2/mainwindowbase.cpp
index 9ffe6f0..d61899b 100644
--- a/noncore/unsupported/mail2/mainwindowbase.cpp
+++ b/noncore/unsupported/mail2/mainwindowbase.cpp
@@ -9,73 +9,73 @@
#include <qpe/qpetoolbar.h>
#include <qpe/qpemenubar.h>
#include <qpe/resource.h>
#include "mainwindowbase.h"
#include "folderwidget.h"
#include "mailtable.h"
MainWindowBase::MainWindowBase(QWidget *parent, const char *name, WFlags fl)
: QMainWindow(parent, name, fl)
{
setCaption(tr("E-Mail"));
setToolBarsMovable(false);
toolbar = new QPEToolBar(this);
menubar = new QPEMenuBar( toolbar );
mailmenu = new QPopupMenu( menubar );
servermenu = new QPopupMenu( menubar );
menubar->insertItem( tr( "Mail" ), mailmenu );
menubar->insertItem( tr( "Servers" ), servermenu );
addToolBar(toolbar);
toolbar->setHorizontalStretchable(true);
+ QLabel *spacer = new QLabel(toolbar);
+ spacer->setBackgroundMode(QWidget::PaletteButton);
+ toolbar->setStretchableWidget(spacer);
+
compose = new QAction(tr("Compose new mail"), QIconSet(Resource::loadPixmap("mail/newmail")), 0, 0, this);
compose->addTo(toolbar);
compose->addTo(mailmenu);
sendQueue = new QAction(tr("Send queued mails"), QIconSet(Resource::loadPixmap("mail/sendqueue")), 0, 0, this);
sendQueue->addTo(toolbar);
sendQueue->addTo(mailmenu);
folders = new QAction(tr("Show/hide folders"), QIconSet(Resource::loadPixmap("mail/folder")), 0, 0, this, 0, true);
folders->addTo(toolbar);
folders->addTo(servermenu);
connect(folders, SIGNAL(toggled(bool)), SLOT(slotFoldersToggled(bool)));
findmails = new QAction(tr("Search mails"), QIconSet(Resource::loadPixmap("mail/find")), 0, 0, this);
findmails->addTo(toolbar);
findmails->addTo(mailmenu);
configure = new QAction(tr("Configuration"), QIconSet(Resource::loadPixmap("mail/configure")), 0, 0, this);
configure->addTo(toolbar);
configure->addTo(servermenu);
- QLabel *spacer = new QLabel(toolbar);
- spacer->setBackgroundMode(QWidget::PaletteButton);
- toolbar->setStretchableWidget(spacer);
-
stop = new QAction(tr("Abort"), QIconSet(Resource::loadPixmap("mail/abort")), 0, 0, this);
stop->addTo(toolbar);
QVBox *view = new QVBox(this);
setCentralWidget(view);
folderView = new FolderWidget(view);
folderView->setMinimumHeight(90);
folderView->setMaximumHeight(90);
folderView->hide();
mailView = new MailTable(view);
mailView->setMinimumHeight(50);
QHBox *status = new QHBox(view);
statusLabel = new QLabel(status);
QFont tmpFont = statusLabel->font();
tmpFont.setPixelSize(8);
statusLabel->setFont(tmpFont);
statusProgress = new QProgressBar(status);
statusProgress->setCenterIndicator(true);
statusProgress->setMaximumHeight(15);