diff options
Diffstat (limited to 'kresources/caldav/config.cpp')
-rw-r--r-- | kresources/caldav/config.cpp | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/kresources/caldav/config.cpp b/kresources/caldav/config.cpp index da9bd8473..550e00c97 100644 --- a/kresources/caldav/config.cpp +++ b/kresources/caldav/config.cpp @@ -88,6 +88,8 @@ void ResourceCalDavConfig::loadSettings( KRES::Resource *resource ) { mUsername->setText(p->username()); mRememberPassword->setChecked(p->rememberPassword()); mPassword->setText(p->password()); + mTasksUrl->setText(p->tasksUrl()); + mUseSTasks->setChecked(p->useSTasks()); mReloadConfig->loadSettings(res); mSaveConfig->loadSettings(res); @@ -106,6 +108,8 @@ void ResourceCalDavConfig::saveSettings( KRES::Resource *resource ) { p->setUsername(mUsername->text()); p->setRememberPassword(mRememberPassword->isChecked()); p->setPassword(mPassword->text()); + p->setTasksUrl(mTasksUrl->text()); + p->setUseSTasks(mUseSTasks->isChecked()); } } } @@ -121,22 +125,36 @@ void ResourceCalDavConfig::setupUI() { mainLayout->addWidget( label, 1, 0 ); mainLayout->addWidget( mUrl, 1, 1 ); + // Tasks URL + TQLabel *tlabel = new TQLabel( i18n( "Tasks URL:" ), this ); + mTasksUrl = new TQLineEdit( this ); + mainLayout->addWidget( tlabel, 2, 0 ); + mainLayout->addWidget( mTasksUrl, 2, 1 ); + + // Use Task URL checkbox + mUseSTasks = new TQCheckBox( i18n("Use separate Tasks URL"), this ); + mainLayout->addWidget(mUseSTasks, 3, 0 ); + // Username label = new TQLabel( i18n( "Username:" ), this ); mUsername = new TQLineEdit( this ); - mainLayout->addWidget( label, 2, 0 ); - mainLayout->addWidget( mUsername, 2, 1 ); + mainLayout->addWidget( label, 4, 0 ); + mainLayout->addWidget( mUsername, 4, 1 ); // Password label = new TQLabel( i18n( "Password:" ), this ); mPassword = new TQLineEdit( this ); mPassword->setEchoMode( TQLineEdit::Password ); - mainLayout->addWidget( label, 3, 0 ); - mainLayout->addWidget( mPassword, 3, 1 ); + mainLayout->addWidget( label, 5, 0 ); + mainLayout->addWidget( mPassword, 5, 1 ); // Remember password checkbox mRememberPassword = new TQCheckBox( i18n("Remember password"), this ); - mainLayout->addWidget(mRememberPassword, 4, 1); + mainLayout->addWidget(mRememberPassword, 6, 1); + + mTasksUrl->setEnabled(mUseSTasks->isChecked()); + connect( mUseSTasks, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( slotSTasksToggled( bool ) ) ); // configs TQHBoxLayout* horizontal = new TQHBoxLayout(this); @@ -159,4 +177,8 @@ void ResourceCalDavConfig::setupUI() { vertical->addLayout(horizontal); } +void ResourceCalDavConfig::slotSTasksToggled( bool enabled ) { + mTasksUrl->setEnabled(enabled); +} + // EOF ======================================================================== |