summaryrefslogtreecommitdiffabout
path: root/kmicromail
authorzautrix <zautrix>2005-06-10 11:53:12 (UTC)
committer zautrix <zautrix>2005-06-10 11:53:12 (UTC)
commitd2f00fc2034450bc9a3cd1d2c3510bef1758d3bc (patch) (side-by-side diff)
tree0764371abfdb5d663ffebf408d47d49f0ca919f3 /kmicromail
parente5ca8e0d8d6d08b597253f43de401aa1a99a6abe (diff)
downloadkdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.zip
kdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.tar.gz
kdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.tar.bz2
config dialog changes
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/koprefsdialog.cpp7
-rw-r--r--kmicromail/koprefsdialog.h1
-rw-r--r--kmicromail/mainwindow.cpp15
-rw-r--r--kmicromail/mainwindow.h1
-rw-r--r--kmicromail/opiemail.cpp5
-rw-r--r--kmicromail/opiemail.h1
6 files changed, 22 insertions, 8 deletions
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp
index 7de7064..017f1f7 100644
--- a/kmicromail/koprefsdialog.cpp
+++ b/kmicromail/koprefsdialog.cpp
@@ -84,52 +84,49 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
setupMainTab();
setupLocaleTab();
setupTimeZoneTab();
setupTimeTab();
setupLocaleDateTab();
setupFontsTab();
setupColorsTab();
setupViewsTab();
//setupSyncTab();
//setupSyncAlgTab();
//setupPrinterTab();
//setupGroupSchedulingTab();
//setupGroupAutomationTab();
#endif
}
#include "kpimglobalprefs.h"
KOPrefsDialog::~KOPrefsDialog()
{
}
void KOPrefsDialog::setupGlobalTab()
{
- QFrame *topFrame = addPage(i18n("Global"),0,0);
- kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" );
- QVBoxLayout *topLayout = new QVBoxLayout(topFrame);
- topLayout->addWidget( kdelibcfg );
+
}
void KOPrefsDialog::setupMainTab()
{
QFrame *topFrame = addPage(i18n("General"),0,0);
QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
mNameEdit = new QLineEdit(topFrame);
mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame);
topLayout->addWidget(mNameLabel,0,0);
topLayout->addWidget(mNameEdit,0,1);
mEmailEdit = new QLineEdit(topFrame);
mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame);
topLayout->addWidget(mEmailLabel,1,0);
topLayout->addWidget(mEmailEdit,1,1);
QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame);
topLayout->addMultiCellWidget(lab,2,2,0,1);
KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"),
@@ -207,56 +204,54 @@ void KOPrefsDialog::setupFontsTab()
&(KOPrefs::instance()->mComposeFont),topFrame);
topLayout->addWidget(timeLabelsFont->label(),i,0);
topLayout->addWidget(timeLabelsFont->preview(),i,1);
topLayout->addWidget(timeLabelsFont->button(),i,2);
++i;
KPrefsDialogWidFont *timeBarFont =
addWidFont(i18n("Hello"),i18n("Read mail:"),
&(KOPrefs::instance()->mReadFont),topFrame);
topLayout->addWidget(timeBarFont->label(),i,0);
topLayout->addWidget(timeBarFont->preview(),i,1);
topLayout->addWidget(timeBarFont->button(),i,2);
++i;
topLayout->setColStretch(1,1);
topLayout->setRowStretch(4,1);
}
void KOPrefsDialog::usrReadConfig()
{
mNameEdit->setText(KOPrefs::instance()->mName);
mEmailEdit->setText(KOPrefs::instance()->mEmail);
//mCodecEdit->setText(KOPrefs::instance()->mSendCodec);
- kdelibcfg->readConfig();
}
void KOPrefsDialog::usrWriteConfig()
{
KOPrefs::instance()->mName = mNameEdit->text();
KOPrefs::instance()->mEmail = mEmailEdit->text();
//KOPrefs::instance()->mSendCodec = mCodecEdit->text();
- kdelibcfg->writeConfig();
}
#if 0
void KOPrefsDialog::setupLocaleDateTab()
{
QFrame *topFrame = addPage(i18n("Date Format"),0,0);
QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
int iii = 0;
KPrefsWidRadios *syncPrefsGroup =
addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame);
QString format;
if ( QApplication::desktop()->width() < 480 )
format = "(%d.%m.%Y)";
else
format = "(%d.%m.%Y|%A %d %B %Y)";
syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
if ( QApplication::desktop()->width() < 480 )
format = "(%m.%d.%Y)";
diff --git a/kmicromail/koprefsdialog.h b/kmicromail/koprefsdialog.h
index a0416ae..7fa9261 100644
--- a/kmicromail/koprefsdialog.h
+++ b/kmicromail/koprefsdialog.h
@@ -40,49 +40,48 @@ class QSlider;
class KURLRequester;
class QComboBox;
class QLineEdit;
class QStringList;
/** Dialog to change the korganizer configuration.
*/
class KOPrefsDialog : public KPrefsDialog
{
Q_OBJECT
public:
/** Initialize dialog and pages */
KOPrefsDialog(QWidget *parent=0,char *name=0,bool modal=false);
~KOPrefsDialog();
protected:
void usrReadConfig();
void usrWriteConfig();
void setupMainTab();
void setupGlobalTab();
void setupMailTab();
void setupFontsTab();
private:
- KDEPIMConfigWidget* kdelibcfg;
QLineEdit *mNameEdit;
QLineEdit *mCodecEdit;
QLineEdit *mEmailEdit;
QLabel *mNameLabel;
QLabel *mEmailLabel;
#if 0
/*
public slots:
void showPrinterTab();
void updateCategories();
void showSyncPage();
protected slots:
void selectSoundFile();
void setCategoryColor();
void updateCategoryColor();
void updateTimezoneOffset( int );
void warningExperimental(bool on);
void warningGroupScheduling();
void warningProjectView();
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index 9a52d1b..e3c5ec3 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -74,53 +74,63 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
syncFolders->addTo( mailMenu );
*/
showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") ,
0, 0, this, 0, true );
showFolders->addTo( toolBar );
showFolders->addTo( mailMenu );
showFolders->setOn( true );
connect(showFolders, SIGNAL( toggled(bool) ),
SLOT( slotShowFolders(bool) ) );
/*
searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ),
0, 0, this );
searchMails->kopddTo( toolBar );
searchMails->addTo( mailMenu );
*/
deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this);
deleteMails->addTo( toolBar );
deleteMails->addTo( mailMenu );
connect( deleteMails, SIGNAL( activated() ),
SLOT( slotDeleteAllMail() ) );
- editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") ,
+ editSettings = new QAction( i18n( "Configure OM/Pi..." ), SmallIcon("SettingsIcon") ,
0, 0, this );
editSettings->addTo( settingsMenu );
connect( editSettings, SIGNAL( activated() ),
SLOT( slotEditSettings() ) );
+
+
+ QAction * editSettings2 = new QAction( i18n( "Global Settings..." ), SmallIcon("SettingsIcon") ,
+ 0, 0, this );
+ editSettings2->addTo( settingsMenu );
+ connect( editSettings2, SIGNAL( activated() ),
+ SLOT( slotEditGlobalSettings() ) );
+
+
+
editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") ,
0, 0, this );
editAccounts->addTo( settingsMenu );
codecMenu = new QPopupMenu( menuBar );
codecMenu->insertItem( "Western (iso-8859-1)",0,0);
codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1);
codecMenu->insertItem( "Western (iso-8859-15)",2,2);
codecMenu->insertItem( "Chinese (big-5)",3,3);
codecMenu->insertItem( "Unicode (utf-8)",4,4);
codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5);
//disabled
//settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu);
//setCentralWidget( view );
QVBox* wrapperBox = new QVBox( this );
setCentralWidget( wrapperBox );
// QWidget *view = new QWidget( wrapperBox );
KDGanttMinimizeSplitter* splithor = new KDGanttMinimizeSplitter( Qt::Vertical, wrapperBox);
splithor->setMinimizeDirection( KDGanttMinimizeSplitter::Down);
KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, splithor);
split->setMinimizeDirection( KDGanttMinimizeSplitter::Left);
//layout = new QBoxLayout ( split, QBoxLayout::LeftToRight );
subLE = 0;
@@ -348,48 +358,51 @@ void MainWindow::slotAdjustLayout() {
layout->setDirection( QBoxLayout::LeftToRight );
}
*/
}
void MainWindow::slotAdjustColumns()
{
bool hidden = folderView->isHidden();
if ( hidden ) folderView->show();
folderView->setColumnWidth( 0, folderView->visibleWidth() );
if ( hidden ) folderView->hide();
mailView->setColumnWidth( 0, 10 );
mailView->setColumnWidth( 1, 100 );
mailView->setColumnWidth( 2, 100 );
mailView->setColumnWidth( 3, 50 );
mailView->setColumnWidth( 4, 120 );
if ( KOPrefs::instance()->mShowToField )
mailView->setColumnWidth( 5, 100 );
}
void MainWindow::slotEditSettings()
{
}
+void MainWindow::slotEditGlobalSettings()
+{
+}
void MainWindow::slotShowFolders( bool )
{
qDebug("not implemented: ");
}
void MainWindow::refreshMailView(const QValueList<RecMailP>&)
{
qDebug("not implemented: ");
}
void MainWindow::mailLeftClicked(QListViewItem * )
{
qDebug("not implemented: ");
}
void MainWindow::displayMail()
{
qDebug("not implemented: ");
}
void MainWindow::slotDeleteMail()
{
qDebug("not implemented: ");
diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h
index ddb3fca..6894039 100644
--- a/kmicromail/mainwindow.h
+++ b/kmicromail/mainwindow.h
@@ -31,43 +31,44 @@ class MainWindow : public QMainWindow
public:
MainWindow( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 );
virtual ~MainWindow();
public slots:
virtual void slotAdjustColumns();
virtual void appMessage(const QCString &msg, const QByteArray &data);
virtual void slotComposeMail();
protected slots:
virtual void setInfoFields(QListViewItem* );
virtual void slotSendQueued();
virtual void slotEditAccounts();
virtual void slotShowFolders( bool show );
virtual void refreshMailView(const QValueList<RecMailP>&);
virtual void displayMail();
virtual void slotGetMail() = 0;
virtual void slotGetAllMail() = 0;
virtual void slotDeleteMail();
virtual void slotDeleteAllMail() = 0;
virtual void slotSetCodec(int);
virtual void mailHold(int, QListViewItem *,const QPoint&,int);
virtual void slotAdjustLayout();
virtual void slotEditSettings();
+ virtual void slotEditGlobalSettings();
virtual void mailLeftClicked( QListViewItem * );
void showLicence();
void showAbout();
void showEtpanLicence();
protected:
QToolBar *toolBar;
StatusWidget *statusWidget;
QPEMenuBar *menuBar;
QPopupMenu *mailMenu, *settingsMenu, *codecMenu;
QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails,
*editSettings, *editAccounts, *syncFolders;
AccountView *folderView;
QListView *mailView;
QLineEdit* toLE,*fromLE,*subLE;
//QBoxLayout *layout;
};
#endif
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index 4436ad6..8ac3451 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -223,48 +223,53 @@ void OpieMail::slotSendQueued()
selsmtp.resize( selsmtp.sizeHint() );
if ( selsmtp.exec() == QDialog::Accepted )
{
smtp = selsmtp.selected_smtp();
}
}
if (smtp)
{
Global::statusMessage("Sending mails...!");
SMTPwrapper * wrap = new SMTPwrapper(smtp);
if ( wrap->flushOutbox() )
{
Global::statusMessage("Mails sent!");
}
delete wrap;
}
folderView->refreshOutgoing();
}
void OpieMail::slotSearchMails()
{
qDebug("OpieMail::slotSearchMails():not implemented ");
}
+void OpieMail::slotEditGlobalSettings()
+{
+ KPimPrefsGlobalDialog gc ( this );
+ gc.exec();
+}
void OpieMail::slotEditSettings()
{
KOPrefsDialog settingsDialog( this, "koprefs", true );
#ifndef DESKTOP_VERSION
settingsDialog.showMaximized();
#endif
settingsDialog.exec();
slotSetCodec( KOPrefs::instance()->mCurrentCodec );
// KApplication::execDialog(settingsDialog);
}
void OpieMail::slotEditAccounts()
{
EditAccounts eaDialog( settings, this, 0, true );
eaDialog.slotAdjustColumns();
#ifndef DESKTOP_VERSION
eaDialog.showMaximized();
#endif
eaDialog.exec();
if ( settings ) delete settings;
settings = new Settings();
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h
index 4f75b3f..48c5dda 100644
--- a/kmicromail/opiemail.h
+++ b/kmicromail/opiemail.h
@@ -14,48 +14,49 @@ class ComposeMail;
class OpieMail : public MainWindow
{
Q_OBJECT
public:
OpieMail( QWidget *parent = 0, const char *name = 0 );
virtual ~OpieMail();
static QString appName() { return QString::fromLatin1("kopiemail"); }
public slots:
virtual void slotwriteMail(const QString&name,const QString&email);
virtual void slotwriteMail2(const QString&nameemail);
virtual void slotComposeMail();
virtual void slotExtAppHandler();
virtual void appMessage(const QCString &msg, const QByteArray &data);
virtual void message(const QCString &msg, const QByteArray &data);
void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist);
protected slots:
virtual void deleteAndDisplayNextMail(ViewMail * vm);
virtual void displayNextMail(ViewMail * vm);
virtual void slotSendQueued();
virtual void slotSearchMails();
virtual void slotEditSettings();
+ virtual void slotEditGlobalSettings();
virtual void slotEditAccounts();
virtual void displayMail();
virtual void replyMail();
virtual void slotDeleteMail();
virtual void slotGetMail();
virtual void slotGetAllMail();
virtual void slotDeleteAllMail();
virtual void mailHold(int, QListViewItem *,const QPoint&,int);
virtual void slotShowFolders( bool show );
virtual void refreshMailView(const QValueList<RecMailP>&);
virtual void mailLeftClicked( QListViewItem * );
virtual void slotMoveCopyMail();
virtual void slotMoveCopyAllMail();
virtual void reEditMail();
void clearSelection();
void slotDownloadMail();
private:
ComposeMail* mCurrentComposer;
void closeViewMail(ViewMail * vm);
QString mPendingEmail;
QString mPendingName;
QByteArray mPendingData;
QCString mPendingMessage;
Settings *settings;