KstGraphFileDialogI::KstGraphFileDialogI(QWidget* parent, Qt::WindowFlags fl) : QDialog(parent, fl) { setupUi(this); _autoSaveTimer = new QTimer(this); connect(_cancel, SIGNAL(clicked()), this, SLOT(reject())); connect(_autoSaveTimer, SIGNAL(timeout()), this, SLOT(reqGraphFile())); connect(_ok, SIGNAL(clicked()), this, SLOT(ok_I())); connect(_Apply, SIGNAL(clicked()), this, SLOT(apply_I())); connect(_comboBoxSizeOption, SIGNAL(activated(int)), this, SLOT(enableWidthHeight())); connect(_comboBoxFormats, SIGNAL(activated(const QString&)), this, SLOT(enableEPSVector(const QString&))); _saveLocation->setFilter(KImageIO::mimeTypes().join(" ")); _saveLocation->setMode(KFile::File); QStringList formats; foreach (QByteArray format, QImageWriter::supportedImageFormats()) { formats << format; } _comboBoxFormats->addItems(formats); _comboBoxFormats->setCurrentIndex(0); loadProperties(); applyAutosave(); }
void KstGraphFileDialog::apply_I() { // xxx _url = _saveLocation->url(); _format = _comboBoxFormats->currentText(); _w = _xSize->value(); _h = _ySize->value(); _displayOption = _comboBoxSizeOption->currentIndex(); _allWindows = _radioButtonAll->isChecked(); _autoSave = _autosave->isChecked(); _savePeriod = _period->value(); _saveEPSAsVector = _saveEPSVector->isChecked(); applyAutosave(); if (!_autoSave) { if (_format == "EPS" && _saveEPSAsVector) { reqEpsGraphFile(); } else { reqGraphFile(); } } saveProperties(); }
KstGraphFileDialog::KstGraphFileDialog(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl) : QDialog(parent, fl) { setupUi(this); _autoSaveTimer = new QTimer(this); connect(_autoSaveTimer, SIGNAL(timeout()), this, SLOT(reqGraphFile())); connect(_ok, SIGNAL(clicked()), this, SLOT(ok_I())); connect(_Apply, SIGNAL(clicked()), this, SLOT(apply_I())); connect(_comboBoxSizeOption, SIGNAL(activated(int)), this, SLOT(enableWidthHeight())); connect(_comboBoxFormats, SIGNAL(activated(const QString&)), this, SLOT(enableEPSVector(const QString&))); /* xxx _saveLocation->setFilter(KImageIO::mimeTypes().join(" ")); _saveLocation->setMode(KFile::File); */ // xxx _comboBoxFormats->insertStrList(QImageIO::outputFormats()); _comboBoxFormats->setCurrentIndex(0); loadProperties(); applyAutosave(); }