From 26c201d7ce1e1fcf64129164cc97120d8cc7cb69 Mon Sep 17 00:00:00 2001 From: harlekin Date: Sat, 20 Dec 2003 00:07:03 +0000 Subject: also add the new files --- 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 + +#include + +#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 + +#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 @@ + +SettingsDialogUI + + QDialog + + name + SettingsDialogUI + + + geometry + + 0 + 0 + 328 + 379 + + + + caption + Settings Dialog + + + layoutMargin + + + layoutSpacing + + + + margin + 3 + + + spacing + 3 + + + QTabWidget + + name + TabWidget2 + + + layoutMargin + + + layoutSpacing + + + QWidget + + name + tab + + + title + View Mail + + + + margin + 3 + + + spacing + 3 + + + QRadioButton + + name + showHtmlButton + + + text + View mail as Html + + + + + name + Spacer1 + + + orientation + Vertical + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + + + + QWidget + + name + tab + + + title + Tab 2 + + + + + + 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 +#include +#include + +#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 +#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 @@ + +StatusWidgetUI + + QWidget + + name + StatusWidgetUI + + + geometry + + 0 + 0 + 596 + 480 + + + + caption + Form1 + + + layoutMargin + + + layoutSpacing + + + + margin + 3 + + + spacing + 3 + + + QProgressBar + + name + statusProgress + + + sizePolicy + + 5 + 0 + + + + + QLabel + + name + statusText + + + sizePolicy + + 5 + 1 + + + + text + TextLabel1 + + + + + -- cgit v0.9.0.2