Exemplo n.º 1
0
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();
}
Exemplo n.º 2
0
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();
}