void XSLExpress::saveCurrent() { SettingsNameDialog dlg( mSettings->allKeys(), this ); if( dlg.exec() ) { QString name = dlg.name(); if( mSettings->contains(name) ) if( QMessageBox::question (this, tr("XSLExpress"), tr("Do you wish to replace the existing settings with that name?"), QMessageBox::Yes|QMessageBox::No, QMessageBox::No ) == QMessageBox::No ) return; QString settingsString; settingsString += ui->replaceThis->text() + "\n"; settingsString += ui->replaceWith->text() + "\n"; settingsString += ui->xslFile->text() + "\n"; for(int i=0; i<aParameterValues.count(); i++) { settingsString += aParameterNames.at(i)->text() + "\n"; settingsString += aParameterValues.at(i)->text() + "\n"; } mSettings->setValue(name , settingsString ); populateCombo(); ui->savedSettings->setCurrentText(name); } }
uorPageSetup::uorPageSetup(QWidget *parent) :QDialog(parent) { setupUi(this); hide(); m_pagesSetings = NULL; connect(m_rbPortrait, SIGNAL(clicked()), this,SLOT(refreshPageLabel())); connect(m_rbLandscape, SIGNAL(clicked()), this,SLOT(refreshPageLabel())); connect(m_rbScalePunctual, SIGNAL(clicked()), this,SLOT(refreshPageLabel())); connect(m_rbScalePunctual2, SIGNAL(clicked()), this,SLOT(refreshPageLabel())); populateCombo(); }
void Picdok::setDirFiles() // Retrieve the list of files and populate the combo with them. { WaitPtr(true); QDir *dirQ = new QDir(curDir, "", QDir::Name); QStringList filt; filt << "*.jpg" << "*.jpeg" << "*.JPG" << "*.JPEG"; dirQ->setNameFilters(filt); dirQ->setSorting(QDir::Name); dirFiles = dirQ->entryList(); if (dirFiles.count() == 0) { curFile = ""; } else { curFile = dirFiles.at(0); } delete dirQ; populateCombo(); WaitPtr(false); }
XSLExpress::XSLExpress(QWidget *parent) : QWidget(parent), ui(new Ui::XSLExpressClass) { ui->setupUi(this); mSettings = new QSettings("AdamBaker","XSLExpress"); setParameterBoxVisibility(); populateCombo(); connect( ui->process, SIGNAL(clicked()), this, SLOT(process()) ); connect( ui->inputFiles, SIGNAL(drop()), this, SLOT(autoProcess()) ); connect( ui->saveCurrent, SIGNAL(clicked()), this, SLOT(saveCurrent()) ); connect( ui->deleteCurrent, SIGNAL(clicked()), this, SLOT(deleteCurrent()) ); connect( ui->savedSettings, SIGNAL(currentIndexChanged(QString)), this, SLOT(settingsChosen(QString)) ); connect( ui->getParametersWithDefaults, SIGNAL(clicked()), this, SLOT(loadParametersWithDefaults())); connect( ui->clearValues, SIGNAL(clicked()), this, SLOT(clearValues()) ); connect( ui->xslFile, SIGNAL(textChanged(QString)), this, SLOT(loadParametersWithDefaults()) ); connect( ui->copyButton, SIGNAL(clicked(bool)), this, SLOT(copyCall()) ); }
void XSLExpress::deleteCurrent() { mSettings->remove( ui->savedSettings->currentText() ); populateCombo(); }