Esempio n. 1
0
MeshLayerEditDialog::MeshLayerEditDialog(const MeshLib::Mesh* mesh, QDialog* parent)
	: QDialog(parent), _msh(mesh), _n_layers(0),
	  _nLayerExplanation (new QLabel(this)),
	  _layerEdit (new QLineEdit("0", this)),
	  _noDataReplacementEdit(nullptr),
	  _minThicknessEdit(nullptr),
	  _nextButton (new QPushButton("Next", this)),
	  _layerBox (nullptr),
	  _radioButtonBox (nullptr),
	  _ogsMeshButton (nullptr),
	  _layerSelectionLayout (new QGridLayout(_layerBox)),
	  _use_rasters(true)
{
	setupUi(this);

	_nLayerExplanation->setText("(select \"0\" for surface mapping)");
	this->gridLayoutLayerMapping->addWidget(new QLabel("Please specify the number of layers to add:", this), 0, 0);
	this->gridLayoutLayerMapping->addWidget(_nLayerExplanation, 1, 0);
	this->gridLayoutLayerMapping->addWidget(_layerEdit, 0, 1);
	this->gridLayoutLayerMapping->addWidget(_nextButton, 0, 2);
	_layerEdit->setValidator(new QIntValidator(0,999,_layerEdit));
	connect(_nextButton, SIGNAL(pressed()), this, SLOT(nextButtonPressed()));

	// configure group box + layout
	this->_layerSelectionLayout->setMargin(10);
	this->_layerSelectionLayout->setColumnMinimumWidth(2,10);
	this->_layerSelectionLayout->setColumnStretch(0, 80);
	this->_layerSelectionLayout->setColumnStretch(1, 200);
	this->_layerSelectionLayout->setColumnStretch(2, 10);
}
Esempio n. 2
0
MshEditDialog::MshEditDialog(const MeshLib::Mesh* mesh, QDialog* parent)
    : QDialog(parent),
      _msh(mesh),
      _noDataDeleteBox(nullptr),
      _nLayerLabel(new QLabel("Please specify the number of layers to add:")),
      _nLayerExplanation(new QLabel("(select '0' for surface mapping)")),
      _layerEdit(new QLineEdit("0")),
      _nextButton(new QPushButton("Next")),
      _layerBox(nullptr),
      _radioButtonBox(nullptr),
      _layerSelectionLayout(new QGridLayout),
      _radiobuttonLayout(new QVBoxLayout),
      _selectButton1(new QRadioButton("Add layers based on raster files")),
      _selectButton2(new QRadioButton("Add layers with static thickness")),
      _n_layers(0),
      _use_rasters(true)
{
    setupUi(this);

    this->gridLayoutLayerMapping->addWidget(_nLayerLabel, 0, 0);
    this->gridLayoutLayerMapping->addWidget(_nLayerExplanation, 1, 0);
    this->gridLayoutLayerMapping->addWidget(_layerEdit, 0, 1);
    this->gridLayoutLayerMapping->addWidget(_nextButton, 0, 2);
    connect(_nextButton, SIGNAL(pressed()), this, SLOT(nextButtonPressed()));
}
Esempio n. 3
0
WizardController::WizardController(QObject *wizardDialog, QObject *parent)
    : QObject(parent)
{
    connect(this, SIGNAL(wizardStepChanged(int)), wizardDialog, SLOT(setWizardStep(int)));
    connect(this, SIGNAL(wizardStepDescriptionChanged(const QString&, const QString&)), wizardDialog, SLOT(setWizardStepDescription(const QString&, const QString&)));
    connect(this, SIGNAL(prevButtonEnabled(bool)), wizardDialog, SLOT(setPrevButtonEnabled(bool)));
    connect(this, SIGNAL(nextButtonEnabled(bool)), wizardDialog, SLOT(setNextButtonEnabled(bool)));
    connect(this, SIGNAL(previewStateChanged(const QString&)), wizardDialog, SLOT(setPreviewState(const QString&)));
    connect(this, SIGNAL(showManualSignal(const QString&, const QString&)), wizardDialog, SLOT(showManual(const QString&, const QString&)));
    connect(this, SIGNAL(showWizardStepHelpSignal(const QString&, const QString&)), wizardDialog, SLOT(showWizardStepHelp(const QString&, const QString&)));
    connect(wizardDialog, SIGNAL(imageLoaded()), SLOT(handleImageLoaded()));
    connect(wizardDialog, SIGNAL(prevButtonPressed()), SLOT(handlePrevButtonPressed()));
    connect(wizardDialog, SIGNAL(nextButtonPressed()), SLOT(handleNextButtonPressed()));
    connect(wizardDialog, SIGNAL(manualSignal()), SLOT(showManual()));
    connect(wizardDialog, SIGNAL(wizardStepHelpSignal()), SLOT(showHelpForCurrentStep()));

    updateDialogWizardStep();
}
Esempio n. 4
0
void Wizard::createConnections()
{
    connect(m_stepNextButton,                       SIGNAL(clicked()),                  SIGNAL(nextButtonPressed()));
    connect(m_stepPrevButton,                       SIGNAL(clicked()),                  SIGNAL(prevButtonPressed()));
    connect(m_stepHelpButton,                       SIGNAL(clicked()),                  SIGNAL(wizardStepHelpSignal()));
    connect(m_paperFormatTypeTabs,                  SIGNAL(currentChanged(int)),        SLOT(handlePaperFormatTabChanged(int)));
    connect(m_paperFormatComboBox,                  SIGNAL(activated(const QString &)), SIGNAL(paperFormatChanged(const QString &)));
    connect(m_paperOrientationPortraitRadioButton,  SIGNAL(clicked()),                  SLOT(handlePaperOrientationPortraitSelected()));
    connect(m_paperOrientationLandscapeRadioButton, SIGNAL(clicked()),                  SLOT(handlePaperOrientationLandscapeSelected()));
    connect(m_paperCustomWidthSpinner,              SIGNAL(valueEdited(double)),        SIGNAL(paperCustomWidthChanged(double)));
    connect(m_paperCustomHeightSpinner,             SIGNAL(valueEdited(double)),        SIGNAL(paperCustomHeightChanged(double)));
    connect(m_paperBorderTopInput,                  SIGNAL(valueEdited(double)),        SIGNAL(paperBorderTopChanged(double)));
    connect(m_paperBorderRightInput,                SIGNAL(valueEdited(double)),        SIGNAL(paperBorderRightChanged(double)));
    connect(m_paperBorderBottomInput,               SIGNAL(valueEdited(double)),        SIGNAL(paperBorderBottomChanged(double)));
    connect(m_paperBorderLeftInput,                 SIGNAL(valueEdited(double)),        SIGNAL(paperBorderLeftChanged(double)));
    connect(m_imageLoadButton,                      SIGNAL(clicked()),                  SIGNAL(loadImageSignal()));
    connect(m_posterSizeAbsoluteRadioButton,        SIGNAL(clicked()),                  SLOT(updatePosterSizeGroupsState()));
    connect(m_posterSizeInPagesRadioButton,         SIGNAL(clicked()),                  SLOT(updatePosterSizeGroupsState()));
    connect(m_posterSizePercentualRadioButton,      SIGNAL(clicked()),                  SLOT(updatePosterSizeGroupsState()));
    connect(m_overlappingWidthInput,                SIGNAL(valueEdited(double)),        SIGNAL(overlappingWidthChanged(double)));
    connect(m_overlappingHeightInput,               SIGNAL(valueEdited(double)),        SIGNAL(overlappingHeightChanged(double)));
    QSignalMapper *overlappingMapper = new QSignalMapper(this);
    foreach (const Qt::Alignment alignment, m_overlappingButtons.keys()) {
        QAbstractButton *sender = m_overlappingButtons.value(alignment);
        connect(sender, SIGNAL(clicked()), overlappingMapper, SLOT(map()));
        overlappingMapper->setMapping(sender, alignment);
    }
    connect(overlappingMapper, SIGNAL(mapped(int)), SLOT(emitOverlappingPositionChange(int)));
    connect(m_posterAbsoluteWidthInput,             SIGNAL(valueEdited(double)),        SIGNAL(posterWidthAbsoluteChanged(double)));
    connect(m_posterAbsoluteHeightInput,            SIGNAL(valueEdited(double)),        SIGNAL(posterHeightAbsoluteChanged(double)));
    connect(m_posterPagesWidthInput,                SIGNAL(valueEdited(double)),        SIGNAL(posterWidthPagesChanged(double)));
    connect(m_posterPagesHeightInput,               SIGNAL(valueEdited(double)),        SIGNAL(posterHeightPagesChanged(double)));
    connect(m_posterPercentualSizeInput,            SIGNAL(valueEdited(double)),        SIGNAL(posterSizePercentualChanged(double)));
    QSignalMapper *alignmentMapper = new QSignalMapper(this);
    foreach (const Qt::Alignment alignment, m_alignmentButtons.keys()) {
        QAbstractButton *sender = m_alignmentButtons.value(alignment);
        connect(sender, SIGNAL(clicked()), alignmentMapper, SLOT(map()));
        alignmentMapper->setMapping(sender, alignment);
    }
    connect(alignmentMapper, SIGNAL(mapped(int)),   SLOT(emitPosterAlignmentChange(int)));
    connect(m_savePosterButton,                     SIGNAL(clicked()),                  SIGNAL(savePosterSignal()));
    connect(m_launchPDFApplicationCheckBox,         SIGNAL(toggled(bool)),              SIGNAL(launchPDFApplicationChanged(bool)));
    connect(m_paintCanvas,                          SIGNAL(needsPaint(PaintCanvasInterface*, const QVariant&)), SIGNAL(needsPaint(PaintCanvasInterface*, const QVariant&)));
}