Ejemplo 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();
}
Ejemplo 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();
}
Ejemplo n.º 3
0
void KstGraphFileDialog::ok_I() {
  apply_I();
  hide();
}
Ejemplo n.º 4
0
/** \note  There should be no possibility of program-level errors in the
    application of the combinator functions, which simply rearrange nodes. */
static Object *
apply_combinator( Combinator *c, Array *spine, unsigned int nargs, Manager *m )
{
    if ( DEBUG__SAFE && ( !c || !spine || !m ) )
        ABORT;

/* TODO: how about a lookup table instead of a switch statement? */
    switch ( *c )
    {
        case B_combinator:

            return apply_B( spine, nargs, m );

        case C_combinator:

            return apply_C( spine, nargs, m );

        case I_combinator:

            return apply_I( spine, nargs );

        case K_combinator:

            return apply_K( spine, nargs );

        case L_combinator:

            return apply_L( spine, nargs, m );

        case O_combinator:

            return apply_O( spine, nargs, m );

        case R_combinator:

            return apply_R( spine, nargs, m );

        case S_combinator:

            return apply_S( spine, nargs, m );

        case T_combinator:

            return apply_T( spine, nargs );

        case U_combinator:

            return apply_U( spine, nargs, m );

        case V_combinator:

            return apply_V( spine, nargs, m );

        case W_combinator:

            return apply_W( spine, nargs, m );

        case w_combinator:

            return apply_w( spine, nargs );

        case Y_combinator:

            return apply_Y( spine, nargs, m );

        default:

            ABORT;
    }
}