22#include "resourcelocaldirconfig.h"
23#include "resourcelocaldir.h"
24#include "resourcelocaldir_p.h"
26#include <klocalizedstring.h>
28#include <kstandarddirs.h>
29#include <kurlrequester.h>
46class KCal::ResourceLocalDirConfig::Private
59 QGridLayout *mainLayout =
new QGridLayout(
this );
61 QLabel *label =
new QLabel( i18n(
"Location:" ),
this );
62 d->mURL =
new KUrlRequester(
this );
63 d->mURL->setMode( KFile::Directory | KFile::LocalOnly );
64 mainLayout->addWidget( label, 1, 0 );
65 mainLayout->addWidget( d->mURL, 1, 1 );
68ResourceLocalDirConfig::~ResourceLocalDirConfig()
73void ResourceLocalDirConfig::loadSettings(
KRES::Resource *resource )
77 d->mURL->setUrl( res->d->mURL.prettyUrl() );
79 kDebug() <<
"ERROR: no ResourceLocalDir, cast failed";
83void ResourceLocalDirConfig::saveSettings( KRES::Resource *resource )
85 ResourceLocalDir *res =
static_cast<ResourceLocalDir*
>( resource );
87 res->d->mURL = d->mURL->url();
88 if ( d->mURL->url().isEmpty() && !resource->
readOnly() ) {
89 KMessageBox::information(
91 i18nc(
"@info",
"No location specified. The calendar will be invalid." ),
93 "ResourceLocalDirUrl");
97 kDebug() <<
"ERROR: no ResourceLocalDir, cast failed";
ResourceLocalDirConfig(QWidget *parent=0)
Private class that helps to provide binary compatibility between releases.
This class provides a calendar stored as a file per incidence in a directory.
virtual void setReadOnly(bool value)
virtual bool readOnly() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.