author | harlekin <harlekin> | 2004-01-08 20:01:50 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2004-01-08 20:01:50 (UTC) |
commit | b672058ac470a1b9534296fa8bc4b8725ab7913b (patch) (side-by-side diff) | |
tree | 1a357fe8626431b7d93140546359bf2d48fb4151 /noncore | |
parent | 94428da008bea0aaff6db79d7963a2107b0da336 (diff) | |
download | opie-b672058ac470a1b9534296fa8bc4b8725ab7913b.zip opie-b672058ac470a1b9534296fa8bc4b8725ab7913b.tar.gz opie-b672058ac470a1b9534296fa8bc4b8725ab7913b.tar.bz2 |
prepare for context help and online help
-rw-r--r-- | noncore/net/mail/editaccounts.cpp | 14 | ||||
-rw-r--r-- | noncore/net/mail/opiemail.cpp | 12 | ||||
-rw-r--r-- | noncore/net/mail/pop3configui.ui | 581 | ||||
-rw-r--r-- | noncore/net/mail/viewmail.h | 2 |
4 files changed, 278 insertions, 331 deletions
diff --git a/noncore/net/mail/editaccounts.cpp b/noncore/net/mail/editaccounts.cpp index 439b619..0c0ecaf 100644 --- a/noncore/net/mail/editaccounts.cpp +++ b/noncore/net/mail/editaccounts.cpp @@ -67,87 +67,87 @@ void EditAccounts::slotNewAccount( const QString &type ) IMAPconfig imap( account, this, 0, true ); imap.showMaximized(); if ( QDialog::Accepted == imap.exec() ) { settings->addAccount( account ); account->save(); slotFillLists(); } else { account->remove(); } } else if ( type.compare( "POP3" ) == 0 ) { qDebug( "-> config POP3" ); POP3account *account = new POP3account(); - POP3config pop3( account, this, 0, true ); + POP3config pop3( account, this, 0, true, WStyle_ContextHelp ); pop3.showMaximized(); if ( QDialog::Accepted == pop3.exec() ) { settings->addAccount( account ); account->save(); slotFillLists(); } else { account->remove(); } } else if ( type.compare( "SMTP" ) == 0 ) { qDebug( "-> config SMTP" ); SMTPaccount *account = new SMTPaccount(); - SMTPconfig smtp( account, this, 0, true ); + SMTPconfig smtp( account, this, 0, true, WStyle_ContextHelp ); smtp.showMaximized(); if ( QDialog::Accepted == smtp.exec() ) { settings->addAccount( account ); account->save(); slotFillLists(); } else { account->remove(); } } else if ( type.compare( "NNTP" ) == 0 ) { qDebug( "-> config NNTP" ); NNTPaccount *account = new NNTPaccount(); - NNTPconfig nntp( account, this, 0, true ); + NNTPconfig nntp( account, this, 0, true, WStyle_ContextHelp ); nntp.showMaximized(); if ( QDialog::Accepted == nntp.exec() ) { settings->addAccount( account ); account->save(); slotFillLists(); } else { account->remove(); } } } void EditAccounts::slotEditAccount( Account *account ) { if ( account->getType().compare( "IMAP" ) == 0 ) { IMAPaccount *imapAcc = static_cast<IMAPaccount *>(account); - IMAPconfig imap( imapAcc, this, 0, true ); + IMAPconfig imap( imapAcc, this, 0, true, WStyle_ContextHelp ); imap.showMaximized(); if ( QDialog::Accepted == imap.exec() ) { slotFillLists(); } } else if ( account->getType().compare( "POP3" ) == 0 ) { POP3account *pop3Acc = static_cast<POP3account *>(account); - POP3config pop3( pop3Acc, this, 0, true ); + POP3config pop3( pop3Acc, this, 0, true, WStyle_ContextHelp ); pop3.showMaximized(); if ( QDialog::Accepted == pop3.exec() ) { slotFillLists(); } } else if ( account->getType().compare( "SMTP" ) == 0 ) { SMTPaccount *smtpAcc = static_cast<SMTPaccount *>(account); - SMTPconfig smtp( smtpAcc, this, 0, true ); + SMTPconfig smtp( smtpAcc, this, 0, true, WStyle_ContextHelp ); smtp.showMaximized(); if ( QDialog::Accepted == smtp.exec() ) { slotFillLists(); } } else if ( account->getType().compare( "NNTP" ) == 0 ) { NNTPaccount *nntpAcc = static_cast<NNTPaccount *>(account); - NNTPconfig nntp( nntpAcc, this, 0, true ); + NNTPconfig nntp( nntpAcc, this, 0, true, WStyle_ContextHelp ); nntp.showMaximized(); if ( QDialog::Accepted == nntp.exec() ) { slotFillLists(); } } } void EditAccounts::slotDeleteAccount( Account *account ) { if ( QMessageBox::information( this, tr( "Question" ), tr( "<p>Do you really want to delete the selected Account?</p>" ), tr( "Yes" ), tr( "No" ) ) == 0 ) { diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp index dee3f70..39e3a64 100644 --- a/noncore/net/mail/opiemail.cpp +++ b/noncore/net/mail/opiemail.cpp @@ -5,25 +5,25 @@ #include "composemail.h" #include <libmailwrapper/smtpwrapper.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/resource.h> #include <qaction.h> #include <qapplication.h> #include <libmailwrapper/mailtypes.h> #include "mailistviewitem.h" #include "viewmail.h" #include "selectstore.h" OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) - : MainWindow( parent, name, flags ) + : MainWindow( parent, name, WStyle_ContextHelp ) { settings = new Settings(); folderView->populate( settings->getAccounts() ); } OpieMail::~OpieMail() { if (settings) delete settings; } void OpieMail::appMessage(const QCString &msg, const QByteArray &data) @@ -33,25 +33,25 @@ void OpieMail::appMessage(const QCString &msg, const QByteArray &data) QDataStream stream(data,IO_ReadOnly); QString name, email; stream >> name >> email; // removing the whitespaces at beginning and end is needed! slotwriteMail(name.stripWhiteSpace(),email.stripWhiteSpace()); } else if (msg == "newMail()") { slotComposeMail(); } } void OpieMail::slotwriteMail(const QString&name,const QString&email) { - ComposeMail compose( settings, this, 0 , true ); + ComposeMail compose( settings, this, 0, true , WStyle_ContextHelp ); if (!email.isEmpty()) { if (!name.isEmpty()) { compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">"); } else { compose.setTo(email); } } compose.showMaximized(); compose.slotAdjustColumns(); compose.exec(); } @@ -82,58 +82,58 @@ void OpieMail::slotSendQueued() QMessageBox::information(0,tr("Info"),tr("Mail queue flushed")); } } } void OpieMail::slotSearchMails() { qDebug( "Search Mails" ); } void OpieMail::slotEditSettings() { - SettingsDialog settingsDialog( this, 0, true ); + SettingsDialog settingsDialog( this, 0, true, WStyle_ContextHelp ); settingsDialog.showMaximized(); settingsDialog.exec(); } void OpieMail::slotEditAccounts() { qDebug( "Edit Accounts" ); - EditAccounts eaDialog( settings, this, 0, true ); + EditAccounts eaDialog( settings, this, 0, true, WStyle_ContextHelp ); eaDialog.showMaximized(); eaDialog.slotAdjustColumns(); eaDialog.exec(); if ( settings ) delete settings; settings = new Settings(); folderView->populate( settings->getAccounts() ); } void OpieMail::displayMail() { QListViewItem*item = mailView->currentItem(); if (!item) return; RecMail mail = ((MailListViewItem*)item)->data(); RecBody body = folderView->fetchBody(mail); - ViewMail readMail( this ); + ViewMail readMail( this,"", Qt::WType_Modal | WStyle_ContextHelp ); readMail.setBody( body ); readMail.setMail( mail ); readMail.showMaximized(); readMail.exec(); if ( readMail.deleted ) { folderView->refreshCurrent(); } else { - ( (MailListViewItem*)item )->setPixmap( 0, Resource::loadPixmap( "") ); + ( (MailListViewItem*)item )->setPixmap( 0, Resource::loadPixmap( "" ) ); } } void OpieMail::slotDeleteMail() { if (!mailView->currentItem()) return; RecMail mail = ((MailListViewItem*)mailView->currentItem() )->data(); if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + mail.getFrom() + " - " + mail.getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) { mail.Wrapper()->deleteMail( mail ); folderView->refreshCurrent(); } } diff --git a/noncore/net/mail/pop3configui.ui b/noncore/net/mail/pop3configui.ui index 95cbdc2..1014ef4 100644 --- a/noncore/net/mail/pop3configui.ui +++ b/noncore/net/mail/pop3configui.ui @@ -2,404 +2,351 @@ <class>POP3configUI</class> <widget> <class>QDialog</class> <property stdset="1"> <name>name</name> <cstring>POP3configUI</cstring> </property> <property stdset="1"> <name>geometry</name> <rect> <x>0</x> <y>0</y> - <width>232</width> - <height>320</height> + <width>314</width> + <height>410</height> </rect> </property> <property stdset="1"> <name>caption</name> <string>Configure POP3</string> </property> <property> <name>layoutMargin</name> </property> <property> <name>layoutSpacing</name> </property> - <widget> - <class>QLayoutWidget</class> + <vbox> <property stdset="1"> - <name>name</name> - <cstring>Layout12</cstring> + <name>margin</name> + <number>3</number> </property> <property stdset="1"> - <name>geometry</name> - <rect> - <x>3</x> - <y>3</y> - <width>226</width> - <height>32</height> - </rect> + <name>spacing</name> + <number>3</number> </property> - <hbox> + <widget> + <class>QLayoutWidget</class> <property stdset="1"> - <name>margin</name> - <number>0</number> + <name>name</name> + <cstring>Layout12</cstring> </property> - <property stdset="1"> - <name>spacing</name> - <number>6</number> - </property> - <widget> - <class>QLabel</class> - <property stdset="1"> - <name>name</name> - <cstring>accountLabel</cstring> - </property> + <hbox> <property stdset="1"> - <name>text</name> - <string>Account</string> + <name>margin</name> + <number>0</number> </property> - </widget> - <widget> - <class>QLineEdit</class> <property stdset="1"> - <name>name</name> - <cstring>accountLine</cstring> - </property> - <property> - <name>toolTip</name> - <string>Name of the Account</string> + <name>spacing</name> + <number>6</number> </property> - </widget> - </hbox> - </widget> - <widget> - <class>Line</class> - <property stdset="1"> - <name>name</name> - <cstring>line1</cstring> - </property> - <property stdset="1"> - <name>geometry</name> - <rect> - <x>3</x> - <y>38</y> - <width>226</width> - <height>16</height> - </rect> - </property> - <property stdset="1"> - <name>orientation</name> - <enum>Horizontal</enum> - </property> - </widget> - <widget> - <class>QLayoutWidget</class> - <property stdset="1"> - <name>name</name> - <cstring>Layout11</cstring> - </property> - <property stdset="1"> - <name>geometry</name> - <rect> - <x>3</x> - <y>44</y> - <width>226</width> - <height>70</height> - </rect> - </property> - <hbox> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>accountLabel</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Account</string> + </property> + </widget> + <widget> + <class>QLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>accountLine</cstring> + </property> + <property> + <name>toolTip</name> + <string>Name of the Account</string> + </property> + </widget> + </hbox> + </widget> + <widget> + <class>Line</class> + <property stdset="1"> + <name>name</name> + <cstring>line1</cstring> + </property> <property stdset="1"> - <name>margin</name> - <number>0</number> + <name>orientation</name> + <enum>Horizontal</enum> </property> + </widget> + <widget> + <class>QLayoutWidget</class> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>name</name> + <cstring>Layout11</cstring> </property> - <widget> - <class>QLayoutWidget</class> + <hbox> <property stdset="1"> - <name>name</name> - <cstring>Layout9</cstring> + <name>margin</name> + <number>0</number> </property> - <vbox> - <property stdset="1"> - <name>margin</name> - <number>0</number> - </property> + <property stdset="1"> + <name>spacing</name> + <number>6</number> + </property> + <widget> + <class>QLayoutWidget</class> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>name</name> + <cstring>Layout9</cstring> </property> - <widget> - <class>QLabel</class> + <vbox> <property stdset="1"> - <name>name</name> - <cstring>serverLabel</cstring> + <name>margin</name> + <number>0</number> </property> <property stdset="1"> - <name>text</name> - <string>Server</string> + <name>spacing</name> + <number>6</number> </property> - </widget> - <widget> - <class>QLabel</class> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>serverLabel</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Server</string> + </property> + </widget> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>portLabel</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Port</string> + </property> + </widget> + </vbox> + </widget> + <widget> + <class>QLayoutWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>Layout10</cstring> + </property> + <vbox> <property stdset="1"> - <name>name</name> - <cstring>portLabel</cstring> + <name>margin</name> + <number>0</number> </property> <property stdset="1"> - <name>text</name> - <string>Port</string> + <name>spacing</name> + <number>6</number> </property> - </widget> - </vbox> - </widget> - <widget> - <class>QLayoutWidget</class> + <widget> + <class>QLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>serverLine</cstring> + </property> + </widget> + <widget> + <class>QLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>portLine</cstring> + </property> + </widget> + </vbox> + </widget> + </hbox> + </widget> + <widget> + <class>QLayoutWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>Layout13</cstring> + </property> + <vbox> + <property stdset="1"> + <name>margin</name> + <number>0</number> + </property> <property stdset="1"> - <name>name</name> - <cstring>Layout10</cstring> + <name>spacing</name> + <number>6</number> </property> - <vbox> + <widget> + <class>QLabel</class> <property stdset="1"> - <name>margin</name> - <number>0</number> + <name>name</name> + <cstring>TextLabel1</cstring> </property> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>text</name> + <string>Use secure sockets:</string> </property> - <widget> - <class>QLineEdit</class> - <property stdset="1"> - <name>name</name> - <cstring>serverLine</cstring> - </property> - </widget> - <widget> - <class>QLineEdit</class> - <property stdset="1"> - <name>name</name> - <cstring>portLine</cstring> - </property> - </widget> - </vbox> - </widget> - </hbox> - </widget> - <widget> - <class>QLayoutWidget</class> - <property stdset="1"> - <name>name</name> - <cstring>Layout13</cstring> - </property> - <property stdset="1"> - <name>geometry</name> - <rect> - <x>3</x> - <y>117</y> - <width>226</width> - <height>64</height> - </rect> - </property> - <vbox> + </widget> + <widget> + <class>QComboBox</class> + <property stdset="1"> + <name>name</name> + <cstring>ComboBox1</cstring> + </property> + </widget> + </vbox> + </widget> + <widget> + <class>QLineEdit</class> <property stdset="1"> - <name>margin</name> - <number>0</number> + <name>name</name> + <cstring>CommandEdit</cstring> </property> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>text</name> + <string>ssh $SERVER exec imapd</string> + </property> + </widget> + <widget> + <class>Line</class> + <property stdset="1"> + <name>name</name> + <cstring>line2</cstring> </property> - <widget> - <class>QLabel</class> - <property stdset="1"> - <name>name</name> - <cstring>TextLabel1</cstring> - </property> - <property stdset="1"> - <name>text</name> - <string>Use secure sockets:</string> - </property> - </widget> - <widget> - <class>QComboBox</class> - <property stdset="1"> - <name>name</name> - <cstring>ComboBox1</cstring> - </property> - </widget> - </vbox> - </widget> - <widget> - <class>QLayoutWidget</class> - <property stdset="1"> - <name>name</name> - <cstring>Layout6</cstring> - </property> - <property stdset="1"> - <name>geometry</name> - <rect> - <x>3</x> - <y>223</y> - <width>226</width> - <height>70</height> - </rect> - </property> - <hbox> <property stdset="1"> - <name>margin</name> - <number>0</number> + <name>orientation</name> + <enum>Horizontal</enum> </property> + </widget> + <widget> + <class>QLayoutWidget</class> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>name</name> + <cstring>Layout6</cstring> </property> - <widget> - <class>QLayoutWidget</class> + <hbox> <property stdset="1"> - <name>name</name> - <cstring>Layout4</cstring> + <name>margin</name> + <number>0</number> </property> - <vbox> - <property stdset="1"> - <name>margin</name> - <number>0</number> - </property> + <property stdset="1"> + <name>spacing</name> + <number>6</number> + </property> + <widget> + <class>QLayoutWidget</class> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>name</name> + <cstring>Layout4</cstring> </property> - <widget> - <class>QLabel</class> - <property stdset="1"> - <name>name</name> - <cstring>userLabel</cstring> - </property> + <vbox> <property stdset="1"> - <name>text</name> - <string>User</string> + <name>margin</name> + <number>0</number> </property> - </widget> - <widget> - <class>QLabel</class> <property stdset="1"> - <name>name</name> - <cstring>passLabel</cstring> + <name>spacing</name> + <number>6</number> </property> - <property stdset="1"> - <name>text</name> - <string>Password</string> - </property> - </widget> - </vbox> - </widget> - <widget> - <class>QLayoutWidget</class> - <property stdset="1"> - <name>name</name> - <cstring>Layout5</cstring> - </property> - <vbox> - <property stdset="1"> - <name>margin</name> - <number>0</number> - </property> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>userLabel</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>User</string> + </property> + </widget> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>passLabel</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Password</string> + </property> + </widget> + </vbox> + </widget> + <widget> + <class>QLayoutWidget</class> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>name</name> + <cstring>Layout5</cstring> </property> - <widget> - <class>QLineEdit</class> + <vbox> <property stdset="1"> - <name>name</name> - <cstring>userLine</cstring> + <name>margin</name> + <number>0</number> </property> - </widget> - <widget> - <class>QLineEdit</class> <property stdset="1"> - <name>name</name> - <cstring>passLine</cstring> + <name>spacing</name> + <number>6</number> </property> - <property stdset="1"> - <name>echoMode</name> - <enum>Password</enum> - </property> - </widget> - </vbox> - </widget> - </hbox> - </widget> - <spacer> - <property> - <name>name</name> - <cstring>spacer</cstring> - </property> - <property stdset="1"> - <name>orientation</name> - <enum>Vertical</enum> - </property> - <property stdset="1"> - <name>sizeType</name> - <enum>Expanding</enum> - </property> - <property> - <name>sizeHint</name> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - <widget> - <class>QLineEdit</class> - <property stdset="1"> - <name>name</name> - <cstring>CommandEdit</cstring> - </property> - <property stdset="1"> - <name>geometry</name> - <rect> - <x>0</x> - <y>180</y> - <width>226</width> - <height>30</height> - </rect> - </property> - <property stdset="1"> - <name>text</name> - <string>ssh $SERVER exec imapd</string> - </property> - </widget> - <widget> - <class>Line</class> - <property stdset="1"> - <name>name</name> - <cstring>line2</cstring> - </property> - <property stdset="1"> - <name>geometry</name> - <rect> - <x>3</x> - <y>204</y> - <width>226</width> - <height>16</height> - </rect> - </property> - <property stdset="1"> - <name>orientation</name> - <enum>Horizontal</enum> - </property> - </widget> + <widget> + <class>QLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>userLine</cstring> + </property> + </widget> + <widget> + <class>QLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>passLine</cstring> + </property> + <property stdset="1"> + <name>echoMode</name> + <enum>Password</enum> + </property> + </widget> + </vbox> + </widget> + </hbox> + </widget> + <spacer> + <property> + <name>name</name> + <cstring>spacer</cstring> + </property> + <property stdset="1"> + <name>orientation</name> + <enum>Vertical</enum> + </property> + <property stdset="1"> + <name>sizeType</name> + <enum>Expanding</enum> + </property> + <property> + <name>sizeHint</name> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </vbox> </widget> <tabstops> <tabstop>accountLine</tabstop> <tabstop>serverLine</tabstop> <tabstop>portLine</tabstop> <tabstop>userLine</tabstop> <tabstop>passLine</tabstop> </tabstops> </UI> diff --git a/noncore/net/mail/viewmail.h b/noncore/net/mail/viewmail.h index 2d0e024..abbd5b3 100644 --- a/noncore/net/mail/viewmail.h +++ b/noncore/net/mail/viewmail.h @@ -22,25 +22,25 @@ public: private: int _partNum; /* needed for a better display of attachments */ QValueList<int> _path; }; class ViewMail : public ViewMailBase { Q_OBJECT public: - ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = Qt::WType_Modal); + ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = 0); ~ViewMail(); void hide(); void exec(); void setMail( RecMail mail ); void setBody( RecBody body ); bool deleted; protected: QString deHtml(const QString &string); AttachItem* searchParent(const QValueList<int>&path); AttachItem* lastChild(AttachItem*parent); |