summaryrefslogtreecommitdiffabout
path: root/pwmanager
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 /pwmanager
parente5ca8e0d8d6d08b597253f43de401aa1a99a6abe (diff)
downloadkdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.zip
kdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.tar.gz
kdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.tar.bz2
config dialog changes
Diffstat (limited to 'pwmanager') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h1
-rw-r--r--pwmanager/pwmanager/pwm.cpp45
-rw-r--r--pwmanager/pwmanager/pwm.h1
3 files changed, 37 insertions, 10 deletions
diff --git a/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h b/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h
index b9ea6b8..2d19680 100644
--- a/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h
+++ b/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h
@@ -38,2 +38,3 @@ class KCMPwmConfig : public KCModule
+ public slots:
virtual void load();
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index 9c8d12d..e12dc49 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -39,2 +39,3 @@
#include <kpimglobalprefs.h>
+#include <kprefsdialog.h>
#include <kcmconfigs/kcmpwmconfig.h>
@@ -76,3 +77,2 @@
-
#define DEFAULT_SIZE (QSize(700, 400))
@@ -119,3 +119,4 @@ enum {
enum {
- BUTTON_POPUP_OPTIONS_CONFIG = 0
+ BUTTON_POPUP_OPTIONS_CONFIG = 0,
+ BUTTON_POPUP_OPTIONS_GLOBAL_CONFIG
#ifdef PWM_EMBEDDED
@@ -361,5 +362,9 @@ void PwM::initMenubar()
optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)),
- i18n("&Configure..."), this,
+ i18n("&Configure PwM/Pi..."), this,
SLOT(config_slot()),0,
BUTTON_POPUP_OPTIONS_CONFIG);
+ optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)),
+ i18n("Global Settings..."), this,
+ SLOT(config_global_slot()),0,
+ BUTTON_POPUP_OPTIONS_GLOBAL_CONFIG);
if ( QApplication::desktop()->width() <= 240 ) {
@@ -853,3 +858,7 @@ void PwM::unlockWnd_slot()
}
-
+void PwM::config_global_slot()
+{
+ KPimPrefsGlobalDialog gc ( this );
+ gc.exec();
+}
void PwM::config_slot()
@@ -857,3 +866,4 @@ void PwM::config_slot()
int oldStyle = conf()->confWndMainViewStyle();
-#ifdef PWM_EMBEDDED
+
+#if 0
KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"pwmconfigdialog", true );
@@ -865,6 +875,25 @@ void PwM::config_slot()
ConfigureDialog->addModule(kdelibcfg );
+#endif
+
+
+ KDialogBase * ConfigureDialog = new KDialogBase ( KDialogBase::Plain , i18n("Configure KA/Pi"), KDialogBase::Default |KDialogBase::Cancel | KDialogBase::Apply | KDialogBase::Ok, KDialogBase::Ok,0, "name", true, true);
+
+ KCMPwmConfig* kabcfg = new KCMPwmConfig( ConfigureDialog , "KCMpwmConfig" );
+ ConfigureDialog->setMainWidget( kabcfg );
+ connect( ConfigureDialog, SIGNAL( applyClicked() ),
+ kabcfg, SLOT( save() ) );
+ connect( ConfigureDialog, SIGNAL( acceptClicked() ),
+ kabcfg, SLOT( save() ) );
+ connect( ConfigureDialog, SIGNAL( defaultClicked() ),
+ kabcfg, SLOT( defaults() ) );
+ //saveSettings();
+ kabcfg->load();
#ifndef DESKTOP_VERSION
+ if ( QApplication::desktop()->height() <= 480 )
+ ;// ConfigureDialog->hideButtons();
ConfigureDialog->showMaximized();
#endif
+
+
if ( ConfigureDialog->exec() )
@@ -873,7 +902,3 @@ void PwM::config_slot()
-#else //PWM_EMBEDDED
- // display the configuration window (modal mode)
- if (!conf()->showConfWnd(this))
- return;
-#endif
+
diff --git a/pwmanager/pwmanager/pwm.h b/pwmanager/pwmanager/pwm.h
index 9fa9edc..2d1b854 100644
--- a/pwmanager/pwmanager/pwm.h
+++ b/pwmanager/pwmanager/pwm.h
@@ -167,2 +167,3 @@ public slots:
void config_slot();
+ void config_global_slot();
/** (de)activate the "change master pw" button in the menu-bar */