25 #include <tdelocale.h>
26 #include <tderesources/configwidget.h>
27 #include <kurlrequester.h>
29 #include "resourcelocal.h"
30 #include "resourcelocalconfig.h"
32 ResourceLocalConfig::ResourceLocalConfig( TQWidget *parent, const char *name )
33 : KRES::ConfigWidget( parent, name )
35 TQHBoxLayout *layout = new TQHBoxLayout( this );
37 TQLabel *label = new TQLabel( i18n( "Location:" ), this );
38 mURL = new KURLRequester( this );
39 KFile::Mode mode = static_cast<KFile::Mode >( KFile::File |
41 mURL->setMode( mode );
42 layout->addWidget( label );
43 layout->addWidget( mURL );
46 ResourceLocalConfig::~ResourceLocalConfig()
50 void ResourceLocalConfig::loadSettings( KRES::Resource *resource )
52 ResourceLocal *res = dynamic_cast<ResourceLocal * >( resource );
54 mURL->setURL( res->url().prettyURL() );
56 kdDebug() << "ERROR: ResourceLocalConfig::loadSettings(): no ResourceLocal, cast failed" << endl;
59 void ResourceLocalConfig::saveSettings( KRES::Resource *resource )
61 ResourceLocal *res = dynamic_cast<ResourceLocal * >( resource );
63 res->setURL( mURL->url() );
65 kdDebug() << "ERROR: ResourceLocalConfig::saveSettings(): no ResourceLocal, cast failed" << endl;
68 #include "resourcelocalconfig.moc"
|