author | harlekin <harlekin> | 2003-12-20 00:07:03 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-12-20 00:07:03 (UTC) |
commit | 26c201d7ce1e1fcf64129164cc97120d8cc7cb69 (patch) (side-by-side diff) | |
tree | 708c16e6a840c972ed01c4db2f7466cda5ee6d31 /noncore | |
parent | dc088ad432189b4883f7654ef6b2c1e2f69112cc (diff) | |
download | opie-26c201d7ce1e1fcf64129164cc97120d8cc7cb69.zip opie-26c201d7ce1e1fcf64129164cc97120d8cc7cb69.tar.gz opie-26c201d7ce1e1fcf64129164cc97120d8cc7cb69.tar.bz2 |
also add the new files
-rw-r--r-- | noncore/net/mail/settingsdialog.cpp | 34 | ||||
-rw-r--r-- | noncore/net/mail/settingsdialog.h | 29 | ||||
-rw-r--r-- | noncore/net/mail/settingsdialogui.ui | 116 | ||||
-rw-r--r-- | noncore/net/mail/statuswidget.cpp | 33 | ||||
-rw-r--r-- | noncore/net/mail/statuswidget.h | 24 | ||||
-rw-r--r-- | noncore/net/mail/statuswidgetui.ui | 71 |
6 files changed, 307 insertions, 0 deletions
diff --git a/noncore/net/mail/settingsdialog.cpp b/noncore/net/mail/settingsdialog.cpp new file mode 100644 index 0000000..9741e94 --- a/dev/null +++ b/noncore/net/mail/settingsdialog.cpp @@ -0,0 +1,34 @@ +#include <qradiobutton.h> + +#include <qpe/config.h> + +#include "settingsdialog.h" + + +SettingsDialog::SettingsDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) + : SettingsDialogUI( parent, name, modal, fl ) { + + readConfig(); +} + +SettingsDialog::~SettingsDialog() { + +} + +void SettingsDialog::readConfig() { + Config cfg("mail"); + cfg.setGroup( "Settings" ); + showHtmlButton->setChecked( cfg.readBoolEntry( "showHtml", false ) ); +} + +void SettingsDialog::writeConfig() { + Config cfg( "mail" ); + cfg.setGroup( "Settings" ); + cfg.writeEntry( "showHtml", showHtmlButton->isChecked() ); + +} + +void SettingsDialog::accept() { + writeConfig(); + QDialog::accept(); +} diff --git a/noncore/net/mail/settingsdialog.h b/noncore/net/mail/settingsdialog.h new file mode 100644 index 0000000..6b4d456 --- a/dev/null +++ b/noncore/net/mail/settingsdialog.h @@ -0,0 +1,29 @@ +#ifndef SETTINGS_DIALOG_H +#define SETTINGS_DIALOG_H + +#include <qwidget.h> + +#include "settingsdialogui.h" + +class SettingsDialog : public SettingsDialogUI { + +Q_OBJECT + +public: + SettingsDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + ~SettingsDialog(); + +private: + void readConfig(); + void writeConfig(); + + +private slots: + void accept(); + + +}; + + + +#endif diff --git a/noncore/net/mail/settingsdialogui.ui b/noncore/net/mail/settingsdialogui.ui new file mode 100644 index 0000000..3b03aeb --- a/dev/null +++ b/noncore/net/mail/settingsdialogui.ui @@ -0,0 +1,116 @@ +<!DOCTYPE UI><UI> +<class>SettingsDialogUI</class> +<widget> + <class>QDialog</class> + <property stdset="1"> + <name>name</name> + <cstring>SettingsDialogUI</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>0</x> + <y>0</y> + <width>328</width> + <height>379</height> + </rect> + </property> + <property stdset="1"> + <name>caption</name> + <string>Settings Dialog</string> + </property> + <property> + <name>layoutMargin</name> + </property> + <property> + <name>layoutSpacing</name> + </property> + <vbox> + <property stdset="1"> + <name>margin</name> + <number>3</number> + </property> + <property stdset="1"> + <name>spacing</name> + <number>3</number> + </property> + <widget> + <class>QTabWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>TabWidget2</cstring> + </property> + <property> + <name>layoutMargin</name> + </property> + <property> + <name>layoutSpacing</name> + </property> + <widget> + <class>QWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>tab</cstring> + </property> + <attribute> + <name>title</name> + <string>View Mail</string> + </attribute> + <vbox> + <property stdset="1"> + <name>margin</name> + <number>3</number> + </property> + <property stdset="1"> + <name>spacing</name> + <number>3</number> + </property> + <widget> + <class>QRadioButton</class> + <property stdset="1"> + <name>name</name> + <cstring>showHtmlButton</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>View mail as Html </string> + </property> + </widget> + <spacer> + <property> + <name>name</name> + <cstring>Spacer1</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> + <widget> + <class>QWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>tab</cstring> + </property> + <attribute> + <name>title</name> + <string>Tab 2</string> + </attribute> + </widget> + </widget> + </vbox> +</widget> +</UI> diff --git a/noncore/net/mail/statuswidget.cpp b/noncore/net/mail/statuswidget.cpp new file mode 100644 index 0000000..19cf635 --- a/dev/null +++ b/noncore/net/mail/statuswidget.cpp @@ -0,0 +1,33 @@ +#include <qtimer.h> +#include <qprogressbar.h> +#include <qlabel.h> + +#include "statuswidget.h" + +// the current problem I see is "locking": used exclusive by one sender + + +StatusWidget::StatusWidget( QWidget* parent, const char* name,WFlags fl ) + : StatusWidgetUI( parent, name, fl ) { + + setMaximumHeight( 15 ); + // hide for now since nothing reports decent progress data yet. + statusProgress->hide(); + } + +StatusWidget::~StatusWidget() { +} + +void StatusWidget::setText( const QString& text ) { + show(); + statusText->setText( text ); + QTimer::singleShot( 5000, this, SLOT( hide() ) ); +} + +void StatusWidget::setProgress( int progress ) { + show(); + statusProgress->setProgress( progress ); + if ( progress == 100 ) { + hide(); + } +} diff --git a/noncore/net/mail/statuswidget.h b/noncore/net/mail/statuswidget.h new file mode 100644 index 0000000..73f0d75 --- a/dev/null +++ b/noncore/net/mail/statuswidget.h @@ -0,0 +1,24 @@ +#ifndef STATUS_WIDGET_H +#define STATUS_WIDGET_H + +#include <qwidget.h> +#include "statuswidgetui.h" + +class StatusWidget : public StatusWidgetUI { + +Q_OBJECT + +public: + StatusWidget( QWidget* parent = 0, const char* name = 0,WFlags fl = 0 ); + ~StatusWidget(); + + +public slots: + + void setText( const QString& text ); + void setProgress( int progress ); +}; + + +#endif + diff --git a/noncore/net/mail/statuswidgetui.ui b/noncore/net/mail/statuswidgetui.ui new file mode 100644 index 0000000..ffe3528 --- a/dev/null +++ b/noncore/net/mail/statuswidgetui.ui @@ -0,0 +1,71 @@ +<!DOCTYPE UI><UI> +<class>StatusWidgetUI</class> +<widget> + <class>QWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>StatusWidgetUI</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>0</x> + <y>0</y> + <width>596</width> + <height>480</height> + </rect> + </property> + <property stdset="1"> + <name>caption</name> + <string>Form1</string> + </property> + <property> + <name>layoutMargin</name> + </property> + <property> + <name>layoutSpacing</name> + </property> + <hbox> + <property stdset="1"> + <name>margin</name> + <number>3</number> + </property> + <property stdset="1"> + <name>spacing</name> + <number>3</number> + </property> + <widget> + <class>QProgressBar</class> + <property stdset="1"> + <name>name</name> + <cstring>statusProgress</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>5</hsizetype> + <vsizetype>0</vsizetype> + </sizepolicy> + </property> + </widget> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>statusText</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>5</hsizetype> + <vsizetype>1</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>text</name> + <string>TextLabel1</string> + </property> + </widget> + </hbox> +</widget> +</UI> |