Esempio n. 1
0
EFXEditor::EFXEditor(QWidget* parent, EFX* efx, Doc* doc)
    : QWidget(parent)
    , m_doc(doc)
    , m_efx(efx)
    , m_previewArea(NULL)
    , m_points(NULL)
    , m_speedDials(NULL)
{
    Q_ASSERT(doc != NULL);
    Q_ASSERT(efx != NULL);

    setupUi(this);

    initGeneralPage();
    initMovementPage();

    // Used for intensity changes
    m_testTimer.setSingleShot(true);
    m_testTimer.setInterval(500);
    connect(&m_testTimer, SIGNAL(timeout()), this, SLOT(slotRestartTest()));
    connect(m_doc, SIGNAL(modeChanged(Doc::Mode)), this, SLOT(slotModeChanged(Doc::Mode)));

    createSpeedDials();

    // Set focus to the editor
    m_nameEdit->setFocus();
}
Esempio n. 2
0
EFXEditor::EFXEditor(QWidget* parent, EFX* efx) : QDialog(parent)
{
	setupUi(this);

	Q_ASSERT(efx != NULL);
	m_original = efx;

	/* Create a copy of the original scene so that we can freely modify it.
	   Keep also a pointer to the original so that we can move the
	   contents from the copied chaser to the original when OK is clicked */
	m_efx = new EFX(_app->doc());
	m_efx->copyFrom(efx);
	Q_ASSERT(m_efx != NULL);

	initGeneralPage();
	initMovementPage();
	initInitializationPage();
}
Esempio n. 3
0
EFXEditor::EFXEditor(QWidget* parent, EFX* efx, Doc* doc)
    : QWidget(parent)
    , m_doc(doc)
    , m_efx(efx)
    , m_previewArea(NULL)
    , m_points(NULL)
    , m_speedDials(NULL)
{
    Q_ASSERT(doc != NULL);
    Q_ASSERT(efx != NULL);

    setupUi(this);

    connect(m_speedDial, SIGNAL(toggled(bool)),
            this, SLOT(slotSpeedDialToggle(bool)));

    initGeneralPage();
    initMovementPage();

    // Start new (==empty) scenes from the first tab and ones with something in them
    // on the first fixture page.
    if (m_tab->count() == 0)
        slotTabChanged(KTabGeneral);
    else
        m_tab->setCurrentIndex(efxUiState()->currentTab());

    /* Tab widget */
    connect(m_tab, SIGNAL(currentChanged(int)),
            this, SLOT(slotTabChanged(int)));

    // Used for UI parameter changes
    m_testTimer.setSingleShot(true);
    m_testTimer.setInterval(500);
    connect(&m_testTimer, SIGNAL(timeout()), this, SLOT(slotRestartTest()));
    connect(m_doc, SIGNAL(modeChanged(Doc::Mode)), this, SLOT(slotModeChanged(Doc::Mode)));

    updateSpeedDials();

    // Set focus to the editor
    m_nameEdit->setFocus();
}
Esempio n. 4
0
Plot3DDialog::Plot3DDialog( QWidget* parent,  Qt::WFlags fl )
    : QDialog( parent, fl )
{
    setName( "Plot3DDialog" );
    setWindowTitle( tr( "QtiPlot - Surface Plot Options" ) );
    setSizeGripEnabled(true);

    bars=0;
    points=0;

    QHBoxLayout *hbox = new QHBoxLayout();
    hbox->addStretch();
    btnTable = new QPushButton();
    hbox->addWidget(btnTable);
    buttonApply = new QPushButton(tr( "&Apply" ));
    hbox->addWidget(buttonApply);
    buttonOk = new QPushButton(tr( "&OK" ));
    buttonOk->setDefault( true );
    hbox->addWidget(buttonOk);
    buttonCancel = new QPushButton(tr( "&Cancel" ));
    hbox->addWidget(buttonCancel);

    generalDialog = new QTabWidget();

    initScalesPage();
    initAxesPage();
    initGridPage();
    initTitlePage();
    initColorsPage();
    initGeneralPage();
    initPrintPage();

    QVBoxLayout* vl = new QVBoxLayout(this);
    vl->addWidget(generalDialog);
    vl->addLayout(hbox);

    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
    connect( buttonApply, SIGNAL( clicked() ), this, SLOT(updatePlot() ) );
    connect( btnTable, SIGNAL( clicked() ), this, SLOT(worksheet() ) );
}
Esempio n. 5
0
FilePropsDialog::FilePropsDialog(FmFileInfoList* files, QWidget* parent, Qt::WindowFlags f):
  QDialog(parent, f),
  fileInfos_(fm_file_info_list_ref(files)),
  singleType(fm_file_info_list_is_same_type(files)),
  singleFile(fm_file_info_list_get_length(files) == 1 ? true:false),
  fileInfo(fm_file_info_list_peek_head(files)),
  mimeType(NULL) {

  setAttribute(Qt::WA_DeleteOnClose);

  ui = new Ui::FilePropsDialog();
  ui->setupUi(this);

  if(singleType) {
    mimeType = fm_mime_type_ref(fm_file_info_get_mime_type(fileInfo));
  }

  FmPathList* paths = fm_path_list_new_from_file_info_list(files);
  deepCountJob = fm_deep_count_job_new(paths, FM_DC_JOB_DEFAULT);
  fm_path_list_unref(paths);

  initGeneralPage();
  initPermissionsPage();
}