kitchensync
kspluckerconfigwidget.ui.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 void KSPluckerConfigWidget::init()
00035 {
00036 urlJava->setMode(KFile::File|KFile::LocalOnly);
00037 urlPlucker->setMode(KFile::Directory|KFile::LocalOnly);
00038 }
00039
00040 void KSPluckerConfigWidget::slotAdd()
00041 {
00042 QString file = KFileDialog::getOpenFileName(QString::null,
00043 "*.xml *.jxl|"+i18n("JPlucker Files"));
00044
00045
00046
00047
00048
00049 if(!file.isEmpty() && !lstBoxFiles->findItem(file) )
00050 lstBoxFiles->insertItem(file, 0);
00051 }
00052
00053
00054 void KSPluckerConfigWidget::slotRemove()
00055 {
00056 lstBoxFiles->removeItem( lstBoxFiles->currentItem() );
00057 }
00058
00059
00060 void KSPluckerConfigWidget::slotConfigOk()
00061 {
00062 KSPlucker::PluckerConfig *conf = KSPlucker::PluckerConfig::self();
00063
00064 conf->setJavaPath( urlJava->url() );
00065 conf->setPluckerPath( urlPlucker->url() );
00066
00067 QStringList lst;
00068 for ( uint i = 0; i < lstBoxFiles->count(); ++i )
00069 lst.append( lstBoxFiles->text( i ) );
00070
00071 conf->setPluckerFiles( lst );
00072 }
00073
00074 void KSPluckerConfigWidget::readConfig()
00075 {
00076 KSPlucker::PluckerConfig *conf = KSPlucker::PluckerConfig::self();
00077
00078 urlJava->setURL( conf->javaPath() );
00079 urlPlucker->setURL( conf->pluckerPath() );
00080 lstBoxFiles->insertStringList( conf->pluckerFiles() );
00081
00082 }
00083
00084 void KSPluckerConfigWidget::slotConfigureJXL()
00085 {
00086 QString file = lstBoxFiles->currentText();
00087 if ( file.isEmpty() )
00088 return;
00089
00090 KSPlucker::PluckerProcessHandler p( KSPlucker::PluckerProcessHandler::Configure, true, file);
00091 p.run();
00092 }
|