summaryrefslogtreecommitdiff
authorconber <conber>2002-06-15 16:05:38 (UTC)
committer conber <conber>2002-06-15 16:05:38 (UTC)
commitf2f238ad06ce87e644bf56d0c6950a2aeae35ed4 (patch) (side-by-side diff)
tree82a465db09f4fa05a7af710492fe6c953f4a8e0f
parent3e9adfcfcc674ad9b329fcb17880ea24789dbcde (diff)
downloadopie-f2f238ad06ce87e644bf56d0c6950a2aeae35ed4.zip
opie-f2f238ad06ce87e644bf56d0c6950a2aeae35ed4.tar.gz
opie-f2f238ad06ce87e644bf56d0c6950a2aeae35ed4.tar.bz2
changed QToolBar to QPEToolBar
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mail2/composerbase.cpp6
-rw-r--r--noncore/unsupported/mail2/composerbase.h4
-rw-r--r--noncore/unsupported/mail2/mainwindowbase.cpp4
-rw-r--r--noncore/unsupported/mail2/mainwindowbase.h4
-rw-r--r--noncore/unsupported/mail2/viewmailbase.cpp4
-rw-r--r--noncore/unsupported/mail2/viewmailbase.h4
6 files changed, 13 insertions, 13 deletions
diff --git a/noncore/unsupported/mail2/composerbase.cpp b/noncore/unsupported/mail2/composerbase.cpp
index 7754863..10d567d 100644
--- a/noncore/unsupported/mail2/composerbase.cpp
+++ b/noncore/unsupported/mail2/composerbase.cpp
@@ -1,199 +1,199 @@
#include <qmultilineedit.h>
#include <qpopupmenu.h>
#include <qcombobox.h>
#include <qlineedit.h>
-#include <qtoolbar.h>
#include <qlayout.h>
#include <qaction.h>
#include <qlabel.h>
#include <qvbox.h>
+#include <qpe/qpetoolbar.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 QToolBar(this);
+ toolbar = new QPEToolBar(this);
addToolBar(toolbar);
toolbar->setHorizontalStretchable(true);
sendmail = new QAction(tr("Send the mail"), QIconSet(Resource::loadPixmap("mail/sendmail")), 0, 0, this);
sendmail->addTo(toolbar);
attachfile = new QAction(tr("Attach a file"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true);
attachfile->addTo(toolbar);
connect(attachfile, SIGNAL(toggled(bool)), SLOT(slotAttachfileChanged(bool)));
addressbook = new QAction(tr("Addressbook"), QIconSet(Resource::loadPixmap("mail/addbook")), 0, 0, this);
addressbook->addTo(toolbar);
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);
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();
fromLayout->addWidget(replyto);
receiversBox = new QComboBox(main);
receiversBox->insertItem(tr("To"), POPUP_RECV_TO);
receiversBox->insertItem(tr("Cc"), POPUP_RECV_CC);
receiversBox->insertItem(tr("Bcc"), POPUP_RECV_BCC);
layout->addWidget(receiversBox, 1, 0);
connect(receiversBox, SIGNAL(activated(int)), SLOT(slotReceiverMenuChanged(int)));
QHBoxLayout *receiverLayout = new QHBoxLayout();
layout->addLayout(receiverLayout, 1, 1);
to = new QLineEdit(main);
receiverLayout->addWidget(to);
cc = new QLineEdit(main);
cc->hide();
receiverLayout->addWidget(cc);
bcc = new QLineEdit(main);
bcc->hide();
receiverLayout->addWidget(bcc);
subjectBox = new QComboBox(main);
subjectBox->insertItem(tr("Subj."), POPUP_SUBJ_SUBJECT);
subjectBox->insertItem(tr("Prio."), POPUP_SUBJ_PRIORITY);
layout->addWidget(subjectBox, 2, 0);
connect(subjectBox, SIGNAL(activated(int)), SLOT(slotSubjectMenuChanged(int)));
QHBoxLayout *subjectLayout = new QHBoxLayout();
layout->addLayout(subjectLayout, 2, 1);
subject = new QLineEdit(main);
subjectLayout->addWidget(subject);
priority = new QComboBox(main);
priority->insertItem(tr("Low"), POPUP_PRIO_LOW);
priority->insertItem(tr("Normal"), POPUP_PRIO_NORMAL);
priority->insertItem(tr("High"), POPUP_PRIO_HIGH);
priority->setCurrentItem(POPUP_PRIO_NORMAL);
priority->hide();
subjectLayout->addWidget(priority);
QVBox *view = new QVBox(main);
layout->addMultiCellWidget(view, 3, 3, 0, 1);
message = new QMultiLineEdit(view);
message->setMinimumHeight(30);
attachWindow = new QMainWindow(view, 0, 0);
attachWindow->setMinimumHeight(100);
attachWindow->setMaximumHeight(100);
attachWindow->setToolBarsMovable(false);
attachWindow->hide();
- attachToolbar = new QToolBar(attachWindow);
+ attachToolbar = new QPEToolBar(attachWindow);
attachToolbar->setVerticalStretchable(true);
addattach = new QAction(tr("Add an Attachement"), QIconSet(Resource::loadPixmap("mail/newmail")), 0, 0, this);
addattach->addTo(attachToolbar);
delattach = new QAction(tr("Remove Attachement"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this);
delattach->addTo(attachToolbar);
QLabel *attachSpacer = new QLabel(attachToolbar);
attachSpacer->setBackgroundMode(QWidget::PaletteButton);
attachToolbar->setStretchableWidget(attachSpacer);
attachWindow->addToolBar(attachToolbar, QMainWindow::Left);
attachView = new ListViewPlus(attachWindow);
attachView->addColumn(tr("Name"), 80);
attachView->addColumn(tr("Description"), 110);
attachView->setAllColumnsShowFocus(true);
attachWindow->setCentralWidget(attachView);
attachPopup = new QPopupMenu(attachView);
attachPopup->insertItem(tr("Rename"), POPUP_ATTACH_RENAME);
attachPopup->insertItem(tr("Change Description"), POPUP_ATTACH_DESC);
attachPopup->insertSeparator();
attachPopup->insertItem(tr("Remove"), POPUP_ATTACH_REMOVE);
attachView->setPopup(attachPopup);
status = new QLabel(view);
QFont tmpFont = status->font();
tmpFont.setPixelSize(8);
status->setFont(tmpFont);
}
void ComposerBase::slotAttachfileChanged(bool toggled)
{
if (toggled) {
if (attachWindow->isHidden()) attachWindow->show();
} else {
if (!attachWindow->isHidden()) attachWindow->hide();
}
}
void ComposerBase::slotFromMenuChanged(int id)
{
if (POPUP_FROM_FROM == id) {
if (from->isHidden()) from->show();
if (!replyto->isHidden()) replyto->hide();
} else if (POPUP_FROM_REPLYTO == id) {
if (!from->isHidden()) from->hide();
if (replyto->isHidden()) replyto->show();
}
}
void ComposerBase::slotReceiverMenuChanged(int id)
{
if (POPUP_RECV_TO == id) {
if (to->isHidden()) to->show();
if (!cc->isHidden()) cc->hide();
if (!bcc->isHidden()) bcc->hide();
} else if (POPUP_RECV_CC == id) {
if (!to->isHidden()) to->hide();
if (cc->isHidden()) cc->show();
if (!bcc->isHidden()) bcc->hide();
} else if (POPUP_RECV_BCC == id) {
if (!to->isHidden()) to->hide();
if (!cc->isHidden()) cc->hide();
if (bcc->isHidden()) bcc->show();
}
}
void ComposerBase::slotSubjectMenuChanged(int id)
{
if (POPUP_SUBJ_SUBJECT == id) {
if (subject->isHidden()) subject->show();
if (!priority->isHidden()) priority->hide();
} else if (POPUP_SUBJ_PRIORITY == id) {
if (!subject->isHidden()) subject->hide();
if (priority->isHidden()) priority->show();
}
}
diff --git a/noncore/unsupported/mail2/composerbase.h b/noncore/unsupported/mail2/composerbase.h
index e5fab67..75b77f4 100644
--- a/noncore/unsupported/mail2/composerbase.h
+++ b/noncore/unsupported/mail2/composerbase.h
@@ -1,55 +1,55 @@
#ifndef COMPOSERBASE_H
#define COMPOSERBASE_H
#include <qmainwindow.h>
class QMultiLineEdit;
class ListViewPlus;
class QPopupMenu;
+class QPEToolBar;
class QComboBox;
class QLineEdit;
-class QToolBar;
class QAction;
class QLabel;
class ComposerBase : public QMainWindow
{
Q_OBJECT
public:
ComposerBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0);
protected:
static const int POPUP_FROM_FROM = 0;
static const int POPUP_FROM_REPLYTO = 1;
static const int POPUP_RECV_TO = 0;
static const int POPUP_RECV_CC = 1;
static const int POPUP_RECV_BCC = 2;
static const int POPUP_SUBJ_SUBJECT = 0;
static const int POPUP_SUBJ_PRIORITY = 1;
static const int POPUP_PRIO_LOW = 0;
static const int POPUP_PRIO_NORMAL = 1;
static const int POPUP_PRIO_HIGH = 2;
static const int POPUP_ATTACH_RENAME = 0;
static const int POPUP_ATTACH_DESC = 1;
static const int POPUP_ATTACH_REMOVE = 2;
QMultiLineEdit *message;
ListViewPlus *attachView;
QMainWindow *attachWindow;
QPopupMenu *attachPopup;
+ QPEToolBar *toolbar, *attachToolbar;
QComboBox *fromBox, *from, *receiversBox, *subjectBox, *priority;
QLineEdit *replyto, *to, *cc, *bcc, *subject;
- QToolBar *toolbar, *attachToolbar;
QAction *sendmail, *attachfile, *addressbook, *abort, *addattach, *delattach;
QLabel *fromLabel, *status;
protected slots:
void slotAttachfileChanged(bool toggled);
void slotFromMenuChanged(int id);
void slotReceiverMenuChanged(int id);
void slotSubjectMenuChanged(int id);
};
#endif
diff --git a/noncore/unsupported/mail2/mainwindowbase.cpp b/noncore/unsupported/mail2/mainwindowbase.cpp
index 4054af6..c55bd90 100644
--- a/noncore/unsupported/mail2/mainwindowbase.cpp
+++ b/noncore/unsupported/mail2/mainwindowbase.cpp
@@ -1,75 +1,75 @@
#include <qprogressbar.h>
#include <qtoolbutton.h>
#include <qpopupmenu.h>
-#include <qtoolbar.h>
#include <qaction.h>
#include <qheader.h>
#include <qlabel.h>
#include <qvbox.h>
+#include <qpe/qpetoolbar.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 QToolBar(this);
+ toolbar = new QPEToolBar(this);
addToolBar(toolbar);
toolbar->setHorizontalStretchable(true);
compose = new QAction(tr("Compose new mail"), QIconSet(Resource::loadPixmap("mail/newmail")), 0, 0, this);
compose->addTo(toolbar);
folders = new QAction(tr("Show/hide folders"), QIconSet(Resource::loadPixmap("mail/folder")), 0, 0, this, 0, true);
folders->addTo(toolbar);
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);
configure = new QAction(tr("Configuration"), QIconSet(Resource::loadPixmap("mail/configure")), 0, 0, this);
configure->addTo(toolbar);
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);
statusProgress->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
}
void MainWindowBase::slotFoldersToggled(bool toggled)
{
if (folderView->isHidden() && toggled) folderView->show();
if (!folderView->isHidden() && !toggled) folderView->hide();
}
diff --git a/noncore/unsupported/mail2/mainwindowbase.h b/noncore/unsupported/mail2/mainwindowbase.h
index cf23f4f..0776f02 100644
--- a/noncore/unsupported/mail2/mainwindowbase.h
+++ b/noncore/unsupported/mail2/mainwindowbase.h
@@ -1,35 +1,35 @@
#ifndef MAINWINDOWBASE_H
#define MAINWINDOWBASE_H
#include <qmainwindow.h>
class ServerConnection;
class QProgressBar;
class FolderWidget;
+class QPEToolBar;
class MailTable;
-class QToolBar;
class QAction;
class QLabel;
class MainWindowBase : public QMainWindow
{
Q_OBJECT
public:
MainWindowBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0);
protected slots:
void slotFoldersToggled(bool toggled);
protected:
ServerConnection *serverConnection;
QProgressBar *statusProgress;
FolderWidget *folderView;
+ QPEToolBar *toolbar;
MailTable *mailView;
- QToolBar *toolbar;
QAction *compose, *folders, *findmails, *configure, *stop;
QLabel *statusLabel;
};
#endif
diff --git a/noncore/unsupported/mail2/viewmailbase.cpp b/noncore/unsupported/mail2/viewmailbase.cpp
index 134e5cb..b650c88 100644
--- a/noncore/unsupported/mail2/viewmailbase.cpp
+++ b/noncore/unsupported/mail2/viewmailbase.cpp
@@ -1,65 +1,65 @@
#include <qtextbrowser.h>
#include <qlistview.h>
-#include <qtoolbar.h>
#include <qaction.h>
#include <qlabel.h>
#include <qvbox.h>
+#include <qpe/qpetoolbar.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 by %1"));
setToolBarsMovable(false);
- toolbar = new QToolBar(this);
+ toolbar = new QPEToolBar(this);
toolbar->setHorizontalStretchable(true);
addToolBar(toolbar);
reply = new QAction(tr("Reply"), QIconSet(Resource::loadPixmap("mail/reply")), 0, 0, this);
reply->addTo(toolbar);
forward = new QAction(tr("Forward"), QIconSet(Resource::loadPixmap("mail/forward")), 0, 0, this);
forward->addTo(toolbar);
attachbutton = new QAction(tr("Attachments"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true);
attachbutton->addTo(toolbar);
connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool)));
deleteMail = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this);
deleteMail->addTo(toolbar);
QLabel *spacer = new QLabel(toolbar);
spacer->setBackgroundMode(QWidget::PaletteButton);
toolbar->setStretchableWidget(spacer);
QVBox *view = new QVBox(this);
setCentralWidget(view);
attachments = new QListView(view);
attachments->setMinimumHeight(90);
attachments->setMaximumHeight(90);
attachments->setAllColumnsShowFocus(true);
attachments->addColumn("Mime Type", 100);
attachments->addColumn("Filename", 100);
attachments->addColumn("Description", 100);
attachments->hide();
browser = new QTextBrowser(view);
openDiag = new OpenDiag(view);
openDiag->hide();
}
void ViewMailBase::slotChangeAttachview(bool state)
{
if (state) attachments->show();
else attachments->hide();
}
diff --git a/noncore/unsupported/mail2/viewmailbase.h b/noncore/unsupported/mail2/viewmailbase.h
index 183bb04..9ddf2aa 100644
--- a/noncore/unsupported/mail2/viewmailbase.h
+++ b/noncore/unsupported/mail2/viewmailbase.h
@@ -1,32 +1,32 @@
#ifndef VIEWMAILBASE_H
#define VIEWMAILBASE_H
#include <qmainwindow.h>
class QAction;
class OpenDiag;
-class QToolBar;
class QListView;
+class QPEToolBar;
class QTextBrowser;
class ViewMailBase : public QMainWindow
{
Q_OBJECT
public:
ViewMailBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0);
protected:
QAction *reply, *forward, *attachbutton, *deleteMail;
QListView *attachments;
- QToolBar *toolbar;
+ QPEToolBar *toolbar;
QTextBrowser *browser;
OpenDiag *openDiag;
protected slots:
void slotChangeAttachview(bool state);
};
#endif