kitchensync Library API Documentation

remotekonnectorconfig.cpp

00001 /* 00002 This file is part of KitchenSync. 00003 00004 Copyright (c) 2004 Cornelius Schumacher <schumacher@kde.org> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00019 Boston, MA 02111-1307, USA. 00020 */ 00021 00022 #include "remotekonnectorconfig.h" 00023 00024 #include "remotekonnector.h" 00025 00026 #include <libkcal/resourcelocal.h> 00027 00028 #include <kconfig.h> 00029 #include <klocale.h> 00030 #include <kabc/resourcefile.h> 00031 #include <kmessagebox.h> 00032 #include <kinputdialog.h> 00033 #include <klineedit.h> 00034 00035 #include <qlabel.h> 00036 #include <qlayout.h> 00037 #include <qpushbutton.h> 00038 00039 using namespace KSync; 00040 00041 RemoteKonnectorConfig::RemoteKonnectorConfig( QWidget *parent ) 00042 : KRES::ConfigWidget( parent, 0 ) 00043 { 00044 QBoxLayout *topLayout = new QVBoxLayout( this ); 00045 00046 QPushButton *button = new QPushButton( i18n("Standard Setup..."), this ); 00047 topLayout->addWidget( button ); 00048 connect( button, SIGNAL( clicked() ), SLOT( setupStandard() ) ); 00049 00050 topLayout->addWidget( new QLabel( i18n("Calendar file:"), this ) ); 00051 00052 mCalendarUrl = new KURLRequester( this ); 00053 mCalendarUrl->setMode( KFile::File ); 00054 topLayout->addWidget( mCalendarUrl ); 00055 00056 topLayout->addSpacing( 4 ); 00057 00058 topLayout->addWidget( new QLabel( i18n("Address book file:"), this ) ); 00059 00060 mAddressBookUrl = new KURLRequester( this ); 00061 mAddressBookUrl->setMode( KFile::File ); 00062 topLayout->addWidget( mAddressBookUrl ); 00063 } 00064 00065 RemoteKonnectorConfig::~RemoteKonnectorConfig() 00066 { 00067 } 00068 00069 void RemoteKonnectorConfig::loadSettings( KRES::Resource *r ) 00070 { 00071 RemoteKonnector *konnector = dynamic_cast<RemoteKonnector *>( r ); 00072 if ( konnector ) { 00073 mCalendarUrl->setURL( konnector->calendarUrl() ); 00074 mAddressBookUrl->setURL( konnector->addressBookUrl() ); 00075 } 00076 } 00077 00078 void RemoteKonnectorConfig::saveSettings( KRES::Resource *r ) 00079 { 00080 RemoteKonnector *konnector = dynamic_cast<RemoteKonnector *>( r ); 00081 if ( konnector ) { 00082 konnector->setCalendarUrl( mCalendarUrl->url() ); 00083 konnector->setAddressBookUrl( mAddressBookUrl->url() ); 00084 } 00085 } 00086 00087 void RemoteKonnectorConfig::setupStandard() 00088 { 00089 } 00090 00091 #include "remotekonnectorconfig.moc"
KDE Logo
This file is part of the documentation for kitchensync Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Oct 1 15:18:59 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003