author | harlekin <harlekin> | 2003-12-20 00:05:37 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-12-20 00:05:37 (UTC) |
commit | dc088ad432189b4883f7654ef6b2c1e2f69112cc (patch) (unidiff) | |
tree | 090f6afd960e644d7da1fae3b8c8ffa97b669b59 /noncore/net/mail/mainwindow.cpp | |
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
-
Diffstat (limited to 'noncore/net/mail/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/mainwindow.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
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 | |||
@@ -11,10 +11,12 @@ | |||
11 | 11 | ||
12 | #include "defines.h" | 12 | #include "defines.h" |
13 | #include "mainwindow.h" | 13 | #include "mainwindow.h" |
14 | #include "settingsdialog.h" | ||
14 | #include "viewmail.h" | 15 | #include "viewmail.h" |
15 | #include "mailtypes.h" | 16 | #include "mailtypes.h" |
16 | #include "mailistviewitem.h" | 17 | #include "mailistviewitem.h" |
17 | 18 | ||
19 | |||
18 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | 20 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) |
19 | : QMainWindow( parent, name, flags ) | 21 | : QMainWindow( parent, name, flags ) |
20 | { | 22 | { |
@@ -45,10 +47,12 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | |||
45 | sendQueued->addTo( toolBar ); | 47 | sendQueued->addTo( toolBar ); |
46 | sendQueued->addTo( mailMenu ); | 48 | sendQueued->addTo( mailMenu ); |
47 | 49 | ||
50 | /* | ||
48 | syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC, | 51 | syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC, |
49 | 0, 0, this ); | 52 | 0, 0, this ); |
50 | syncFolders->addTo( toolBar ); | 53 | syncFolders->addTo( toolBar ); |
51 | syncFolders->addTo( mailMenu ); | 54 | syncFolders->addTo( mailMenu ); |
55 | */ | ||
52 | 56 | ||
53 | showFolders = new QAction( tr( "Show/Hide folders" ), ICON_SHOWFOLDERS, | 57 | showFolders = new QAction( tr( "Show/Hide folders" ), ICON_SHOWFOLDERS, |
54 | 0, 0, this, 0, true ); | 58 | 0, 0, this, 0, true ); |
@@ -58,10 +62,12 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | |||
58 | connect(showFolders, SIGNAL( toggled( bool ) ), | 62 | connect(showFolders, SIGNAL( toggled( bool ) ), |
59 | SLOT( slotShowFolders( bool ) ) ); | 63 | SLOT( slotShowFolders( bool ) ) ); |
60 | 64 | ||
61 | searchMails = new QAction( tr( "Search mails" ), ICON_SEARCHMAILS, | 65 | /* |
66 | searchMails = new QAction( tr( "Search mails" ), ICON_SEARCHMAILS, | ||
62 | 0, 0, this ); | 67 | 0, 0, this ); |
63 | searchMails->addTo( toolBar ); | 68 | searchMails->addTo( toolBar ); |
64 | searchMails->addTo( mailMenu ); | 69 | searchMails->addTo( mailMenu ); |
70 | */ | ||
65 | 71 | ||
66 | deleteMails = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this); | 72 | deleteMails = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this); |
67 | deleteMails->addTo( toolBar ); | 73 | deleteMails->addTo( toolBar ); |
@@ -72,12 +78,14 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | |||
72 | editSettings = new QAction( tr( "Edit settings" ), ICON_EDITSETTINGS, | 78 | editSettings = new QAction( tr( "Edit settings" ), ICON_EDITSETTINGS, |
73 | 0, 0, this ); | 79 | 0, 0, this ); |
74 | editSettings->addTo( settingsMenu ); | 80 | editSettings->addTo( settingsMenu ); |
81 | connect( editSettings, SIGNAL( activated() ), | ||
82 | SLOT( slotEditSettings() ) ); | ||
75 | 83 | ||
76 | editAccounts = new QAction( tr( "Configure accounts" ), ICON_EDITACCOUNTS, | 84 | editAccounts = new QAction( tr( "Configure accounts" ), ICON_EDITACCOUNTS, |
77 | 0, 0, this ); | 85 | 0, 0, this ); |
78 | editAccounts->addTo( settingsMenu ); | 86 | editAccounts->addTo( settingsMenu ); |
79 | 87 | ||
80 | QWidget *view = new QWidget( this ); | 88 | QWidget *view = new QWidget( this ); |
81 | setCentralWidget( view ); | 89 | setCentralWidget( view ); |
82 | 90 | ||
83 | layout = new QBoxLayout ( view, QBoxLayout::LeftToRight ); | 91 | layout = new QBoxLayout ( view, QBoxLayout::LeftToRight ); |
@@ -99,10 +107,14 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | |||
99 | mailView->setAllColumnsShowFocus(true); | 107 | mailView->setAllColumnsShowFocus(true); |
100 | mailView->setSorting(-1); | 108 | mailView->setSorting(-1); |
101 | 109 | ||
110 | statusWidget = new StatusWidget( view ); | ||
111 | |||
102 | layout->addWidget( mailView ); | 112 | layout->addWidget( mailView ); |
113 | layout->addWidget( statusWidget ); | ||
103 | layout->setStretchFactor( folderView, 1 ); | 114 | layout->setStretchFactor( folderView, 1 ); |
104 | layout->setStretchFactor( mailView, 2 ); | 115 | layout->setStretchFactor( mailView, 2 ); |
105 | 116 | ||
117 | |||
106 | slotAdjustLayout(); | 118 | slotAdjustLayout(); |
107 | 119 | ||
108 | connect( mailView, SIGNAL( clicked( QListViewItem * ) ),this, | 120 | connect( mailView, SIGNAL( clicked( QListViewItem * ) ),this, |
@@ -141,6 +153,12 @@ void MainWindow::slotAdjustColumns() | |||
141 | mailView->setColumnWidth( 4, 50 ); | 153 | mailView->setColumnWidth( 4, 50 ); |
142 | } | 154 | } |
143 | 155 | ||
156 | void MainWindow::slotEditSettings() { | ||
157 | SettingsDialog settingsDialog( this, 0, true ); | ||
158 | settingsDialog.showMaximized(); | ||
159 | settingsDialog.exec(); | ||
160 | } | ||
161 | |||
144 | void MainWindow::slotShowFolders( bool show ) | 162 | void MainWindow::slotShowFolders( bool show ) |
145 | { | 163 | { |
146 | qDebug( "Show Folders" ); | 164 | qDebug( "Show Folders" ); |
@@ -179,7 +197,7 @@ void MainWindow::displayMail(QListViewItem*item) | |||
179 | if ( readMail.deleted ) { | 197 | if ( readMail.deleted ) { |
180 | folderView->refreshCurrent(); | 198 | folderView->refreshCurrent(); |
181 | } else { | 199 | } else { |
182 | ( (MailListViewItem*)item )->setPixmap( 0, Resource::loadPixmap( "mail/kmmsgunseen") ); | 200 | ( (MailListViewItem*)item )->setPixmap( 0, Resource::loadPixmap( "") ); |
183 | } | 201 | } |
184 | } | 202 | } |
185 | 203 | ||