summaryrefslogtreecommitdiffabout
path: root/kmicromail
authorzautrix <zautrix>2004-09-22 02:03:15 (UTC)
committer zautrix <zautrix>2004-09-22 02:03:15 (UTC)
commit633522024e48efc423155a04b71083a03696211d (patch) (side-by-side diff)
treec383ee8fa3489351450b948eb83a42b504752131 /kmicromail
parented2feaa9f7e2064e5b26ff678a25eb79ceae599b (diff)
downloadkdepimpi-633522024e48efc423155a04b71083a03696211d.zip
kdepimpi-633522024e48efc423155a04b71083a03696211d.tar.gz
kdepimpi-633522024e48efc423155a04b71083a03696211d.tar.bz2
global prefs integrated in kopi amd ompi
Diffstat (limited to 'kmicromail') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/kmicromailE.pro4
-rw-r--r--kmicromail/koprefsdialog.cpp16
-rw-r--r--kmicromail/koprefsdialog.h3
3 files changed, 19 insertions, 4 deletions
diff --git a/kmicromail/kmicromailE.pro b/kmicromail/kmicromailE.pro
index 0d6cf86..75ba92f 100644
--- a/kmicromail/kmicromailE.pro
+++ b/kmicromail/kmicromailE.pro
@@ -33,38 +33,38 @@ SOURCES = main.cpp \
settingsdialog.cpp \
statuswidget.cpp \
newmaildir.cpp \
selectstore.cpp \
selectsmtp.cpp \
nntpgroups.cpp \
koprefs.cpp\
koprefsdialog.cpp\
nntpgroupsdlg.cpp
INTERFACES = editaccountsui.ui \
selectmailtypeui.ui \
imapconfigui.ui \
pop3configui.ui \
nntpconfigui.ui \
smtpconfigui.ui \
composemailui.ui \
settingsdialogui.ui \
statuswidgetui.ui \
newmaildirui.ui \
selectstoreui.ui \
nntpgroupsui.ui
-INCLUDEPATH += . $(KDEPIMDIR) $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore libetpan/include $(KDEPIMDIR)/microkde/kdeui $(QPEDIR)/include
-LIBS += -L$(QPEDIR)/lib -lkmicromailwrapper -lqpe -lkmicrolibetpan -lmicrokde -lmicroqtcompat -lssl -lcrypto -ljpeg -lmicrokde -lmicroqtcompat -lmicrokabc -lmicrokcal -lmicrokdepim
+INCLUDEPATH += . $(KDEPIMDIR) $(KDEPIMDIR)/libkdepim $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore libetpan/include $(KDEPIMDIR)/microkde/kdeui $(QPEDIR)/include
+LIBS += -L$(QPEDIR)/lib -lkmicromailwrapper -lqpe -lkmicrolibetpan -lmicrokde -lmicroqtcompat -lssl -lcrypto -ljpeg -lmicroqtcompat -lmicrokdepim
LIBS += $(QTOPIALIB)
#LIBS += -lqtopia
#next line for Zaurus only
#LIBS += -luuid
#
OBJECTS_DIR = obj/$(PLATFORM)
MOC_DIR = moc/$(PLATFORM)
DESTDIR=$(QPEDIR)/bin
TARGET = ompi
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp
index 7d7bd2a..598d12f 100644
--- a/kmicromail/koprefsdialog.cpp
+++ b/kmicromail/koprefsdialog.cpp
@@ -39,83 +39,94 @@
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qpushbutton.h>
#include <qstrlist.h>
#include <qapplication.h>
#include <kcolorbutton.h>
#include <kdebug.h>
#include <klocale.h>
#include <kglobal.h>
#include <kfontdialog.h>
#include <kfiledialog.h>
#include <kmessagebox.h>
#include <kcolordialog.h>
#include <kiconloader.h>
#include <kemailsettings.h>
#include <kstandarddirs.h>
#include <klineedit.h>
#include "koprefs.h"
#include "koprefsdialog.h"
+//#include <kprefswidget.h>
KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
KPrefsDialog(KOPrefs::instance(),parent,name,true)
{
setCaption( i18n("Settings - some need a restart (nr)"));
+ setupGlobalTab();
setupMainTab();
setupMailTab();;
setupFontsTab();
readConfig();
#if 0
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!"),
&(KOPrefs::instance()->mUseKapi),topFrame);
topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1);
}
@@ -160,57 +171,58 @@ void KOPrefsDialog::setupFontsTab()
timeLabelsFont =
addWidFont(i18n("Dear Mr."),i18n("Compose mail:"),
&(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()
{
- qDebug("read ");
+
mNameEdit->setText(KOPrefs::instance()->mName);
mEmailEdit->setText(KOPrefs::instance()->mEmail);
+ kdelibcfg->readConfig();
}
void KOPrefsDialog::usrWriteConfig()
{
- qDebug("write ");
KOPrefs::instance()->mName = mNameEdit->text();
KOPrefs::instance()->mEmail = mEmailEdit->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 4b6bd4b..615574b 100644
--- a/kmicromail/koprefsdialog.h
+++ b/kmicromail/koprefsdialog.h
@@ -11,75 +11,78 @@
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef _KOPREFSDIALOG_H
#define _KOPREFSDIALOG_H
#include <qframe.h>
#include <qdict.h>
#include <qcolor.h>
#include <qlistview.h>
#include <kdialogbase.h>
#include <libkdepim/kprefsdialog.h>
#include <libkdepim/kdateedit.h>
+#include <kcmconfigs/kdepimconfigwidget.h>
class KColorButton;
class QSpinBox;
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 *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();
void toggleEmailSettings(bool);