Ejemplo n.º 1
0
void UIImageOverview::errorHandler(QUrl url, int err) {
    switch (err) {
    case 202:
    case 404:
        if (isImage(url)) {
            blackList->add(url.toString());
            setCompleted(url.toString(), "");
        }
        else {
            // If there are still images in the list, wait until they finished (maybe they still exist)
            // else close immediately
            if (isDownloadFinished()) {
                stop();

                setTabTitle("Thread 404'ed");
                emit errorMessage("404 - Page not found");
                emit closeRequest(this, 404);
            }
            else {
                closeWhenFinished = true;
            }
        }
        break;

    case 999:
        setTabTitle("Banned");
        emit errorMessage("You are banned");
        break;

    default:
        QLOG_ERROR() << "ImageOverview :: Unhandled error (" << url.toString() << "," << err << ")";
        break;
    }
}
Ejemplo n.º 2
0
//-----------------------------------------------------------------------------
// Function: updateTabTitle()
//-----------------------------------------------------------------------------
void TabDocument::updateTabTitle()
{
    // Update also the title.
    if (isModified())
    {
        setTabTitle(docName_ + docType_ + "*");
    }
    else
    {
        setTabTitle(docName_ + docType_);
    }
}
Ejemplo n.º 3
0
PowerSpectrumTab::PowerSpectrumTab(QWidget *parent)
  : DataTab(parent) {

  setupUi(this);
  setTabTitle(tr("Power Spectrum"));

}
EventMonitorTab::EventMonitorTab(QWidget *parent)
  : DataTab(parent), _logLevelDirty(false) {

  setupUi(this);
  setTabTitle(tr("Event Monitor"));

  connect(_equation, SIGNAL(textChanged(const QString &)), this, SLOT(selectionChanged()));

  connect(_debugLog, SIGNAL(toggled(const bool&)), this, SIGNAL(modified()));
  connect(_emailNotify, SIGNAL(toggled(const bool&)), this, SIGNAL(modified()));
  connect(_ELOGNotify, SIGNAL(toggled(const bool&)), this, SIGNAL(modified()));
  connect(_executeScript, SIGNAL(toggled(const bool&)), this, SIGNAL(modified()));

  connect(_equation, SIGNAL(textChanged(const QString&)), this, SIGNAL(modified()));
  connect(_description, SIGNAL(textChanged(const QString&)), this, SIGNAL(modified()));
  connect(_emailRecipients, SIGNAL(textChanged(const QString&)), this, SIGNAL(modified()));
  connect(_script, SIGNAL(textChanged()), this, SIGNAL(modified()));

  connect(_debugLogNotice, SIGNAL(clicked()), this, SIGNAL(modified()));
  connect(_debugLogWarning, SIGNAL(clicked()), this, SIGNAL(modified()));
  connect(_debugLogError, SIGNAL(clicked()), this, SIGNAL(modified()));

  connect(_debugLogNotice, SIGNAL(clicked()), this, SLOT(logLevelChanged()));
  connect(_debugLogWarning, SIGNAL(clicked()), this, SLOT(logLevelChanged()));
  connect(_debugLogError, SIGNAL(clicked()), this, SLOT(logLevelChanged()));
}
Ejemplo n.º 5
0
RangeTab::RangeTab(PlotItem* plotItem, QWidget *parent) 
    : DialogTab(parent), _plotItem(plotItem) {
  setupUi(this);
  setTabTitle(tr("Range"));

  connect(_xAuto, SIGNAL(toggled(bool)), this, SIGNAL(modified()));
  connect(_xMean, SIGNAL(toggled(bool)), this, SIGNAL(modified()));
  connect(_xBorder, SIGNAL(toggled(bool)), this, SIGNAL(modified()));
  connect(_xSpike, SIGNAL(toggled(bool)), this, SIGNAL(modified()));
  connect(_xFixed, SIGNAL(toggled(bool)), this, SIGNAL(modified()));

  connect(_yAuto, SIGNAL(toggled(bool)), this, SIGNAL(modified()));
  connect(_yMean, SIGNAL(toggled(bool)), this, SIGNAL(modified()));
  connect(_yBorder, SIGNAL(toggled(bool)), this, SIGNAL(modified()));
  connect(_ySpike, SIGNAL(toggled(bool)), this, SIGNAL(modified()));
  connect(_yFixed, SIGNAL(toggled(bool)), this, SIGNAL(modified()));

  connect(_xMin, SIGNAL(textChanged(QString)), this, SIGNAL(modified()));
  connect(_xMax, SIGNAL(textChanged(QString)), this, SIGNAL(modified()));
  connect(_xRange, SIGNAL(textChanged(QString)), this, SIGNAL(modified()));

  connect(_yMin, SIGNAL(textChanged(QString)), this, SIGNAL(modified()));
  connect(_yMax, SIGNAL(textChanged(QString)), this, SIGNAL(modified()));
  connect(_yRange, SIGNAL(textChanged(QString)), this, SIGNAL(modified()));

  connect(this, SIGNAL(modified()), this, SLOT(updateButtons()));

}
VectorTab::VectorTab(ObjectStore *store, QWidget *parent)
  : DataTab(parent), _mode(DataVector), _store(store), _initField(QString()), _requestID(0) {

  setupUi(this);
  setTabTitle(tr("Vector"));

  connect(_generatedVectorGroup, SIGNAL(clicked(bool)), this, SLOT(generateClicked()));
  connect(_dataVectorGroup, SIGNAL(clicked(bool)), this, SLOT(readFromSourceClicked()));
  connect(_fileName, SIGNAL(changed(const QString &)), this, SLOT(fileNameChanged(const QString &)));
  connect(_configure, SIGNAL(clicked()), this, SLOT(showConfigWidget()));
  connect(_field, SIGNAL(editTextChanged(const QString &)), this, SIGNAL(fieldChanged()));

  connect(_dataRange, SIGNAL(modified()), this, SIGNAL(modified()));
  connect(_numberOfSamples, SIGNAL(valueChanged(int)), this, SIGNAL(modified()));
  connect(_from, SIGNAL(textChanged(const QString&)), this, SIGNAL(modified()));
  connect(_to, SIGNAL(textChanged(const QString&)), this, SIGNAL(modified()));

  // embed data range in the data source box
  _dataRange->groupBox2->setFlat(true);
  _dataRange->groupBox2->setTitle("");
  int top_margin;
  _dataRange->groupBox2->layout()->getContentsMargins(NULL,&top_margin,NULL,NULL);
  _dataRange->groupBox2->layout()->setContentsMargins(0,top_margin,0,0); 

  _connect->setVisible(false);
}
Ejemplo n.º 7
0
FillTab::FillTab(QWidget *parent)
  : DialogTab(parent), _multiEdit(false)
 {

  setupUi(this);
  setTabTitle(tr("Fill"));

  _style->addItem("NoBrush", (int)Qt::NoBrush);
  _style->addItem("SolidPattern", (int)Qt::SolidPattern);
  _style->addItem("Dense1Pattern", (int)Qt::Dense1Pattern);
  _style->addItem("Dense2Pattern", (int)Qt::Dense2Pattern);
  _style->addItem("Dense3Pattern", (int)Qt::Dense3Pattern);
  _style->addItem("Dense4Pattern", (int)Qt::Dense4Pattern);
  _style->addItem("Dense5Pattern", (int)Qt::Dense5Pattern);
  _style->addItem("Dense6Pattern", (int)Qt::Dense6Pattern);
  _style->addItem("Dense7Pattern", (int)Qt::Dense7Pattern);
  _style->addItem("HorPattern", (int)Qt::HorPattern);
  _style->addItem("VerPattern", (int)Qt::VerPattern);
  _style->addItem("CrossPattern", (int)Qt::CrossPattern);
  _style->addItem("BDiagPattern", (int)Qt::BDiagPattern);
  _style->addItem("FDiagPattern", (int)Qt::FDiagPattern);
  _style->addItem("DiagCrossPattern", (int)Qt::DiagCrossPattern);

  connect(_color, SIGNAL(changed(const QColor &)), this, SIGNAL(modified()));
  connect(_style, SIGNAL(currentIndexChanged(int)), this, SIGNAL(modified()));
  connect(_gradientEditor, SIGNAL(changed(const QGradient &)), this, SIGNAL(modified()));
  connect(_gradientReset, SIGNAL(pressed()), this, SIGNAL(modified()));
  connect(_useGradient, SIGNAL(stateChanged(int)), this, SIGNAL(modified()));
  connect(_gradientReset, SIGNAL(pressed()), _gradientEditor, SLOT(resetGradient()));
  connect(_useGradient, SIGNAL(stateChanged(int)), this, SLOT(updateButtons()));

  updateButtons();
}
Ejemplo n.º 8
0
CSDTab::CSDTab(QWidget *parent)
  : DataTab(parent) {

  setupUi(this);
  setTabTitle(tr("Cumulative Spectral Decay"));

}
Ejemplo n.º 9
0
VectorTab::VectorTab(ObjectStore *store, QWidget *parent)
  : DataTab(parent), validating(false), _mode(DataVector), _store(store), _initField(QString()), _requestID(0), _valid(false) {

  setupUi(this);
  setTabTitle(tr("Vector"));

  connect(_generatedVectorGroup, SIGNAL(clicked(bool)), this, SLOT(generateClicked()));
  connect(_dataVectorGroup, SIGNAL(clicked(bool)), this, SLOT(readFromSourceClicked()));
  connect(_fileName, SIGNAL(changed(QString)), this, SLOT(fileNameChanged(QString)));
  connect(_configure, SIGNAL(clicked()), this, SLOT(showConfigWidget()));
  connect(_field, SIGNAL(editTextChanged(QString)), this, SIGNAL(fieldChanged()));

  connect(_dataRange, SIGNAL(modified()), this, SIGNAL(modified()));
  connect(_numberOfSamples, SIGNAL(valueChanged(int)), this, SIGNAL(modified()));
  connect(_from, SIGNAL(textChanged(QString)), this, SIGNAL(modified()));
  connect(_to, SIGNAL(textChanged(QString)), this, SIGNAL(modified()));

  // embed data range in the data source box
  _dataRange->groupBox2->setFlat(true);
  _dataRange->groupBox2->setTitle("");
  int top_margin;
  _dataRange->groupBox2->layout()->getContentsMargins(NULL,&top_margin,NULL,NULL);
  _dataRange->groupBox2->layout()->setContentsMargins(0,top_margin,0,0); 

  _connect->setVisible(false);

  _updateBox->addItem(tr("Time Interval", "update periodically"));
  _updateBox->addItem(tr("Change Detection", "update when a change is detected"));
  _updateBox->addItem(tr("No Update", "do not update the file"));
  updateUpdateBox();
  connect(_updateBox, SIGNAL(currentIndexChanged(int)), this, SLOT(updateTypeActivated(int)));
  connect(_updateBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(modified()));
}
Ejemplo n.º 10
0
void TabBar::interactiveRenameDone()
{
    int sessionId = m_renamingSessionId;

    m_renamingSessionId = -1;

    setTabTitle(sessionId, m_lineEdit->text().trimmed());
}
Ejemplo n.º 11
0
//-----------------------------------------------------------------------------
// Function: TabDocument::setModified()
//-----------------------------------------------------------------------------
void TabDocument::setModified(bool modified)
{
	if (modified == modified_)
    {
		return;
    }

    if (modified)
    {
        setTabTitle(docName_ + docType_ + "*");
    }
    else
    {
        setTabTitle(docName_ + docType_);
    }

    modified_ = modified;
	emit modifiedChanged(modified_);
}
Ejemplo n.º 12
0
LayoutTab::LayoutTab(QWidget *parent)
  : DialogTab(parent) {

  setupUi(this);
  setTabTitle(tr("Layout"));

  connect(_horMargin, SIGNAL(valueChanged(double)), this, SIGNAL(modified()));
  connect(_verMargin, SIGNAL(valueChanged(double)), this, SIGNAL(modified()));
  connect(_horSpacing, SIGNAL(valueChanged(double)), this, SIGNAL(modified()));
  connect(_verSpacing, SIGNAL(valueChanged(double)), this, SIGNAL(modified()));
}
BasicPluginTab::BasicPluginTab(QString& pluginName, QWidget *parent)
  : DataTab(parent) {

  setupUi(this);
  setTabTitle(tr("Basic Plugin"));

  QGridLayout *layout = new QGridLayout(_inputOutputBox);
  _configWidget = DataObject::pluginWidget(pluginName);
  _configWidget->setupSlots(this);
  layout->addWidget(_configWidget, 0, 0);
  layout->activate();
}
Ejemplo n.º 14
0
ImageTab::ImageTab(QWidget *parent)
  : DataTab(parent), _modeDirty(false) {

  setupUi(this);
  setTabTitle(tr("Image"));

  connect(_realTimeAutoThreshold, SIGNAL(toggled(const bool&)), this, SLOT(realTimeAutoThresholdToggled(const bool&)));
  connect(_colorOnly, SIGNAL(toggled(const bool&)), this, SLOT(updateEnabled(const bool&)));
  connect(_colorAndContour, SIGNAL(toggled(const bool&)), this, SLOT(updateEnabled(const bool&)));
  connect(_contourOnly, SIGNAL(toggled(const bool&)), this, SLOT(updateEnabled(const bool&)));
  connect(_autoThreshold, SIGNAL(clicked()), this, SLOT(calculateAutoThreshold()));
  connect(_smartThreshold, SIGNAL(clicked()), this, SLOT(calculateSmartThreshold()));

  connect(_matrix, SIGNAL(selectionChanged()), this, SLOT(selectionChanged()));

  connect(_matrix, SIGNAL(selectionChanged()), this, SIGNAL(modified()));
  connect(_colorOnly, SIGNAL(toggled(const bool&)), this, SIGNAL(modified()));
  connect(_colorAndContour, SIGNAL(toggled(const bool&)), this, SIGNAL(modified()));
  connect(_contourOnly, SIGNAL(toggled(const bool&)), this, SIGNAL(modified()));
  connect(_lowerThreshold, SIGNAL(textChanged(const QString&)), this, SIGNAL(modified()));
  connect(_upperThreshold, SIGNAL(textChanged(const QString&)), this, SIGNAL(modified()));
  connect(_realTimeAutoThreshold, SIGNAL(toggled(const bool&)), this, SIGNAL(modified()));

  connect(_contourColor, SIGNAL(changed(const QColor&)), this, SIGNAL(modified()));
  connect(_numContourLines, SIGNAL(valueChanged(int)), this, SIGNAL(modified()));
  connect(_contourWeight, SIGNAL(valueChanged(int)), this, SIGNAL(modified()));
  connect(_useVariableWeight, SIGNAL(clicked()), this, SIGNAL(modified()));

  connect(_colorPalette, SIGNAL(selectionChanged()), this, SIGNAL(modified()));

  connect(_colorOnly, SIGNAL(clicked()), this, SLOT(modeChanged()));
  connect(_contourOnly, SIGNAL(clicked()), this, SLOT(modeChanged()));
  connect(_colorAndContour, SIGNAL(clicked()), this, SLOT(modeChanged()));

  _curvePlacement->setExistingPlots(Data::self()->plotList());

  _matrixLabel->setBuddy(_matrix->_matrix);

  _matrixLabel->setProperty("si","&Matrix:");
  _colorOnly->setProperty("si","Color m&ap");
  _contourOnly->setProperty("si","Con&tour map");
  _colorAndContour->setProperty("si","&Color map and contour map");
  textLabel2->setProperty("si","&Upper:");
  textLabel2_4->setProperty("si","Threshold - &Lower:");
  _smartThreshold->setProperty("si","&Smart");
  textLabel1_4->setProperty("si","Percent&ile:");
  _autoThreshold->setProperty("si","Max&/Min");
  _realTimeAutoThreshold->setProperty("si","&Real-time auto threshold");
  textLabel1_3->setProperty("si","Num&ber of contour levels:");
  textLabel1->setProperty("si","&Weight:");
  _useVariableWeight->setProperty("si","Use &variable line weight");
}
PowerSpectrumTab::PowerSpectrumTab(QWidget *parent)
  : DataTab(parent) {

  setupUi(this);
  setTabTitle(tr("Power Spectrum"));

  connect(_vector, SIGNAL(selectionChanged(QString)), this, SLOT(selectionChanged()));
  connect(_FFTOptions, SIGNAL(modified()), this, SIGNAL(modified()));
  connect(_vector, SIGNAL(selectionChanged(QString)), this, SIGNAL(modified()));

  _vectorLabel->setBuddy(_vector->_vector);

}
Ejemplo n.º 16
0
/// Save to new file
void MultiTabScriptInterpreter::saveAs()
{
  try
  {
    m_current->saveAs();
    setTabTitle(m_current, m_current->filename());
  }
  catch(ScriptEditor::SaveCancelledException&) {}
  catch(std::runtime_error& exc)
  {
    QMessageBox::critical(this, tr("MantidPlot"), tr(exc.what()));
  }
}
Ejemplo n.º 17
0
StringTab::StringTab(ObjectStore *store, QWidget *parent)
  : DataTab(parent),  _mode(DataString), _store(store), _requestID(0) {

  setupUi(this);
  setTabTitle(tr("String"));

  _fileNameLabel->setBuddy(_fileName->_fileEdit);

  connect(_generatedStringGroup, SIGNAL(toggled(bool)), this, SLOT(generateClicked()));
  connect(_dataStringGroup, SIGNAL(toggled(bool)), this, SLOT(readFromSourceClicked()));
  connect(_stringValue, SIGNAL(textChanged(const QString&)), this, SLOT(textChanged()));
  connect(_fileName, SIGNAL(changed(const QString &)), this, SLOT(fileNameChanged(const QString &)));
  connect(_configure, SIGNAL(clicked()), this, SLOT(showConfigWidget()));
}
Ejemplo n.º 18
0
void CDiaryEdit::slotSave()
{
    collectData();

    if(!CGeoDB::self().setProjectDiaryData(diary.keyProjectGeoDB, diary))
    {
        QMessageBox::warning(0, tr("Failed..."), tr("Failed to save diary to database. Probably because it was not created from a database project."), QMessageBox::Abort, QMessageBox::Abort);
        return;
    }

    diary.modified = false;

    setTabTitle();
}
Ejemplo n.º 19
0
void CDiaryEdit::setWindowModified(bool yes)
{
    if(isInternalEdit || !yes) return;

    emit CDiaryDB::self().emitSigModified(diary.getKey());
    emit CDiaryDB::self().emitSigChanged();

    if(!diary.modified)
    {
        diary.modified = yes;
        setTabTitle();
    }

}
Ejemplo n.º 20
0
HistogramTab::HistogramTab(QWidget *parent)
  : DataTab(parent), _normalizationDirty(false) {

  setupUi(this);
  setTabTitle(tr("Histogram"));

  connect(AutoBin, SIGNAL(clicked()), this, SLOT(generateAutoBin()));
  connect(_realTimeAutoBin, SIGNAL(clicked()), this, SLOT(updateButtons()));
  connect(_vector, SIGNAL(selectionChanged(QString)), this, SLOT(selectionChanged()));

  connect(_vector, SIGNAL(selectionChanged(QString)), this, SIGNAL(modified()));
  connect(_min, SIGNAL(textChanged(const QString &)), this, SIGNAL(modified()));
  connect(_max, SIGNAL(textChanged(const QString &)), this, SIGNAL(modified()));
  connect(_numberOfBins, SIGNAL(valueChanged(int)), this, SIGNAL(modified()));
  connect(_realTimeAutoBin, SIGNAL(clicked()), this, SIGNAL(modified()));
  connect(_normalizationIsNumber, SIGNAL(clicked()), this, SIGNAL(modified()));
  connect(_normalizationIsFraction, SIGNAL(clicked()), this, SIGNAL(modified()));
  connect(_normalizationIsPercent, SIGNAL(clicked()), this, SIGNAL(modified()));
  connect(_normalizationMaximumOne, SIGNAL(clicked()), this, SIGNAL(modified()));
  connect(_normalizationIsNumber, SIGNAL(clicked()), this, SLOT(normalizationChanged()));
  connect(_normalizationIsFraction, SIGNAL(clicked()), this, SLOT(normalizationChanged()));
  connect(_normalizationIsPercent, SIGNAL(clicked()), this, SLOT(normalizationChanged()));
  connect(_normalizationMaximumOne, SIGNAL(clicked()), this, SLOT(normalizationChanged()));
  connect(_curvePlacement->_noPlot, SIGNAL(toggled(bool)), _curveAppearance, SLOT(setDisabled(bool)));

  _vectorLabel->setBuddy(_vector->_vector);

  _curvePlacement->setExistingPlots(Data::self()->plotList());

  _curveAppearance->loadWidgetDefaults();

  _curveAppearance->setShowLines(false);
  _curveAppearance->setShowPoints(false);
  _curveAppearance->setShowHead(false);
  _curveAppearance->setShowBars(true);
  _curveAppearance->setPointDensity(0);
  _curveAppearance->setColor(dialogDefaults().value("plot/strokeBrushColor",QColor(Qt::black)).value<QColor>());

  _vectorLabel->setProperty("si","Data vecto&r:");
  TextLabel1_4_2_2->setProperty("si","Bins from&:");
  TextLabel4_5_2->setProperty("si","to:");
  TextLabel5_2->setProperty("si","Num bin&s:");
  AutoBin->setProperty("si","A&uto Bin");
  _realTimeAutoBin->setProperty("si","Real&-time auto bin");
  _normalizationIsPercent->setProperty("si","Percent& in bin");
  _normalizationIsFraction->setProperty("si","&Fraction in bin");
  _normalizationIsNumber->setProperty("si","Nu&mber in bin");
  _normalizationMaximumOne->setProperty("si","Peak bin = &1.0");
}
PowerSpectrumTab::PowerSpectrumTab(QWidget *parent)
  : DataTab(parent) {

  setupUi(this);
  setTabTitle(tr("Power Spectrum"));

  _curvePlacement->setExistingPlots(Data::self()->plotList());

  connect(_vector, SIGNAL(selectionChanged(QString)), this, SLOT(selectionChanged()));
  connect(_FFTOptions, SIGNAL(modified()), this, SIGNAL(modified()));
  connect(_vector, SIGNAL(selectionChanged(QString)), this, SIGNAL(modified()));

  _vectorLabel->setBuddy(_vector->_vector);

}
Ejemplo n.º 22
0
ArrowPropertiesTab::ArrowPropertiesTab(QWidget *parent)
  : DialogTab(parent) {

  setupUi(this);
  setTabTitle(tr("ArrowProperties"));

  connect(_startArrow, SIGNAL(stateChanged(int)), this, SLOT(update()));
  connect(_endArrow, SIGNAL(stateChanged(int)), this, SLOT(update()));

  connect(_startArrow, SIGNAL(stateChanged(int)), this, SIGNAL(modified()));
  connect(_endArrow, SIGNAL(stateChanged(int)), this, SIGNAL(modified()));
  connect(_startArrowScale, SIGNAL(valueChanged(double)), this, SIGNAL(modified()));
  connect(_endArrowScale, SIGNAL(valueChanged(double)), this, SIGNAL(modified()));

  update();
}
PowerSpectrumTab::PowerSpectrumTab(QWidget *parent)
  : DataTab(parent) {

  setupUi(this);
  setTabTitle(tr("Power Spectrum"));

  _curvePlacement->setExistingPlots(Data::self()->plotList());

  connect(_vector, SIGNAL(selectionChanged(QString)), this, SLOT(selectionChanged()));
  connect(_FFTOptions, SIGNAL(modified()), this, SIGNAL(modified()));
  connect(_vector, SIGNAL(selectionChanged(QString)), this, SIGNAL(modified()));
  connect(_curvePlacement->_noPlot, SIGNAL(toggled(bool)), _curveAppearance, SLOT(setDisabled(bool)));

  _vectorLabel->setBuddy(_vector->_vector);

  _vectorLabel->setProperty("si","Data vecto&r:");
}
Ejemplo n.º 24
0
ScalarTab::ScalarTab(ObjectStore *store, QWidget *parent)
  : DataTab(parent),  _mode(DataScalar), _store(store), _requestID(0) {

  setupUi(this);
  setTabTitle(tr("Scalar"));

  setDataOptions();

  connect(_scalarValue, SIGNAL(textChanged(const QString&)), this, SLOT(entryChanged()));
  connect(_start, SIGNAL(textChanged(const QString&)), this, SLOT(entryChanged()));
  connect(_field, SIGNAL(editTextChanged(const QString&)), this, SLOT(entryChanged()));
  connect(_fieldRV, SIGNAL(editTextChanged(const QString&)), this, SLOT(entryChanged()));
  connect(_readFromSource, SIGNAL(toggled(bool)), this, SLOT(readFromSourceChanged()));
  connect(_readFromRVector, SIGNAL(toggled(bool)), this, SLOT(readFromSourceChanged()));
  connect(_fileName, SIGNAL(changed(const QString &)), this, SLOT(fileNameChanged(const QString &)));
  connect(_configure, SIGNAL(clicked()), this, SLOT(showConfigWidget()));
}
Ejemplo n.º 25
0
StrokeTab::StrokeTab(QWidget *parent)
  : DialogTab(parent) {

  setupUi(this);
  setTabTitle(tr("Stroke"));

  _style->addItem("NoPen", Qt::NoPen);
  _style->addItem("SolidLine", Qt::SolidLine);
  _style->addItem("DashLine", Qt::DashLine);
  _style->addItem("DotLine", Qt::DotLine);
  _style->addItem("DashDotLine", Qt::DashDotLine);
  _style->addItem("DashDotDotLine", Qt::DashDotDotLine);
  _style->addItem("CustomDashLine", Qt::CustomDashLine);

  _brushStyle->addItem("NoBrush", Qt::NoBrush);
  _brushStyle->addItem("SolidPattern", Qt::SolidPattern);
  _brushStyle->addItem("Dense1Pattern", Qt::Dense1Pattern);
  _brushStyle->addItem("Dense2Pattern", Qt::Dense2Pattern);
  _brushStyle->addItem("Dense3Pattern", Qt::Dense3Pattern);
  _brushStyle->addItem("Dense4Pattern", Qt::Dense4Pattern);
  _brushStyle->addItem("Dense5Pattern", Qt::Dense5Pattern);
  _brushStyle->addItem("Dense6Pattern", Qt::Dense6Pattern);
  _brushStyle->addItem("Dense7Pattern", Qt::Dense7Pattern);
  _brushStyle->addItem("HorPattern", Qt::HorPattern);
  _brushStyle->addItem("VerPattern", Qt::VerPattern);
  _brushStyle->addItem("CrossPattern", Qt::CrossPattern);
  _brushStyle->addItem("BDiagPattern", Qt::BDiagPattern);
  _brushStyle->addItem("FDiagPattern", Qt::FDiagPattern);
  _brushStyle->addItem("DiagCrossPattern", Qt::DiagCrossPattern);

  _joinStyle->addItem("MiterJoin", Qt::MiterJoin);
  _joinStyle->addItem("BevelJoin", Qt::BevelJoin);
  _joinStyle->addItem("RoundJoin", Qt::RoundJoin);
  _joinStyle->addItem("SvgMiterJoin", Qt::SvgMiterJoin);

  _capStyle->addItem("FlatCap", Qt::FlatCap);
  _capStyle->addItem("SquareCap", Qt::SquareCap);
  _capStyle->addItem("RoundCap", Qt::RoundCap);

  connect(_style, SIGNAL(currentIndexChanged(int)), this, SIGNAL(modified()));
  connect(_width, SIGNAL(valueChanged(double)), this, SIGNAL(modified()));
  connect(_brushColor, SIGNAL(changed(const QColor &)), this, SIGNAL(modified()));
  connect(_brushStyle, SIGNAL(currentIndexChanged(int)), this, SIGNAL(modified()));
  connect(_joinStyle, SIGNAL(currentIndexChanged(int)), this, SIGNAL(modified()));
  connect(_capStyle, SIGNAL(currentIndexChanged(int)), this, SIGNAL(modified()));
}
MatrixTab::MatrixTab(ObjectStore *store, QWidget *parent)
  : DataTab(parent), _mode(DataMatrix), _store(store), _requestID(0) {

  setupUi(this);
  setTabTitle(tr("Matrix"));

  connect(_readFromSource, SIGNAL(toggled(bool)), this, SLOT(readFromSourceChanged()));
  connect(_fileName, SIGNAL(changed(const QString &)), this, SLOT(fileNameChanged(const QString &)));
  connect(_configure, SIGNAL(clicked()), this, SLOT(showConfigWidget()));

  connect(_xStartCountFromEnd, SIGNAL(clicked()), this, SLOT(xStartCountFromEndClicked()));
  connect(_yStartCountFromEnd, SIGNAL(clicked()), this, SLOT(yStartCountFromEndClicked()));
  connect(_xNumStepsReadToEnd, SIGNAL(clicked()), this, SLOT(xNumStepsReadToEndClicked()));
  connect(_yNumStepsReadToEnd, SIGNAL(clicked()), this, SLOT(yNumStepsReadToEndClicked()));

  connect(_readFromSource, SIGNAL(clicked()), this, SLOT(updateEnables()));
  connect(_generateGradient, SIGNAL(clicked()), this, SLOT(updateEnables()));
  connect(_doSkip, SIGNAL(clicked()), this, SLOT(updateEnables()));

  connect(_xStart, SIGNAL(valueChanged(int)), this, SIGNAL(modified()));
  connect(_yStart, SIGNAL(valueChanged(int)), this, SIGNAL(modified()));
  connect(_xNumSteps, SIGNAL(valueChanged(int)), this, SIGNAL(modified()));
  connect(_yNumSteps, SIGNAL(valueChanged(int)), this, SIGNAL(modified()));
  connect(_skip, SIGNAL(valueChanged(int)), this, SIGNAL(modified()));
  connect(_nX, SIGNAL(valueChanged(int)), this, SIGNAL(modified()));
  connect(_nY, SIGNAL(valueChanged(int)), this, SIGNAL(modified()));
  connect(_gradientZAtMin, SIGNAL(textChanged(const QString&)), this, SIGNAL(modified()));
  connect(_gradientZAtMax, SIGNAL(textChanged(const QString&)), this, SIGNAL(modified()));
  connect(_minX, SIGNAL(textChanged(const QString&)), this, SIGNAL(modified()));
  connect(_minX, SIGNAL(textChanged(const QString&)), this, SIGNAL(modified()));
  connect(_xStep, SIGNAL(textChanged(const QString&)), this, SIGNAL(modified()));
  connect(_yStep, SIGNAL(textChanged(const QString&)), this, SIGNAL(modified()));
  connect(_xStartCountFromEnd, SIGNAL(clicked()), this, SIGNAL(modified()));
  connect(_yStartCountFromEnd, SIGNAL(clicked()), this, SIGNAL(modified()));
  connect(_xNumStepsReadToEnd, SIGNAL(clicked()), this, SIGNAL(modified()));
  connect(_yNumStepsReadToEnd, SIGNAL(clicked()), this, SIGNAL(modified()));
  connect(_doSkip, SIGNAL(clicked()), this, SIGNAL(modified()));
  connect(_doAverage, SIGNAL(clicked()), this, SIGNAL(modified()));
  connect(_gradientX, SIGNAL(clicked()), this, SIGNAL(modified()));
  connect(_gradientY, SIGNAL(clicked()), this, SIGNAL(modified()));

  _connect->setVisible(false);
}
Ejemplo n.º 27
0
/**
 * Create a new tab such that it is the specified index within the tab range.
 * @param index :: The index to give the new tab. If this is invalid the tab is simply appended
 * @param filename :: An optional filename
 */
void MultiTabScriptInterpreter::newTab(int index, const QString & filename)
{
  ScriptFileInterpreter *scriptRunner = new ScriptFileInterpreter(this,"ScriptWindow");
  scriptRunner->setup(*scriptingEnv(), filename);
  scriptRunner->toggleProgressReporting(m_reportProgress);
  connect(scriptRunner, SIGNAL(editorModificationChanged(bool)),
          this, SLOT(currentEditorModified(bool)));
  index = insertTab(index, scriptRunner, "");
  setCurrentIndex(index);
  setTabTitle(scriptRunner, filename); // Make sure the tooltip is set
  scriptRunner->setFocus();
  scriptRunner->editor()->zoomIn(globalZoomLevel());
  connect(scriptRunner->editor(), SIGNAL(textZoomedIn()), this, SLOT(zoomInAllButCurrent()));
  connect(scriptRunner->editor(), SIGNAL(textZoomedIn()), this, SLOT(trackZoomIn()));
  connect(scriptRunner->editor(), SIGNAL(textZoomedOut()), this, SLOT(zoomOutAllButCurrent()));
  connect(scriptRunner->editor(), SIGNAL(textZoomedOut()), this, SLOT(trackZoomOut()));

  emit newTabCreated(index);
  emit tabCountChanged(count());
}
Ejemplo n.º 28
0
FilterFitTab::FilterFitTab(QString& pluginName, QWidget *parent)
    : DataTab(parent), _configWidget(0), _layout(0), _store(0), _vectorX(0), _vectorY(0), _lockVectors(false) {

    setupUi(this);
    setTabTitle(tr("Plugin"));

    _type = (DataObjectPluginInterface::PluginTypeID)DataObject::pluginType(pluginName);
    if (_type == DataObjectPluginInterface::Filter) {
        _pluginCombo->addItems(DataObject::filterPluginList());
    } else if (_type == DataObjectPluginInterface::Fit) {
        _pluginCombo->addItems(DataObject::fitsPluginList());
    }

    _curveAppearance->setVisible(false);
    _curvePlacement->setVisible(false);
    _ignoreAutoScale->setVisible(false);
    _curvePlacement->setPlace(CurvePlacement::NoPlot);

    pluginChanged(pluginName);
    connect(_pluginCombo, SIGNAL(currentIndexChanged(QString)), this, SLOT(pluginChanged(QString)));
    connect(_curvePlacement->_noPlot, SIGNAL(toggled(bool)), _curveAppearance, SLOT(setDisabled(bool)));
}
Ejemplo n.º 29
0
void CDiaryEdit::slotReload(bool fromDB)
{
    CDiaryEditLock lock(this);

    QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));

    if(fromDB)
    {
        if(CGeoDB::self().getProjectDiaryData(diary.keyProjectGeoDB, diary))
        {
            diary.modified = false;
        }
    }

    setTabTitle();

    textEdit->clear();
    textEdit->document()->setTextWidth(textEdit->size().width() - 20);
    draw(*textEdit->document());

    QApplication::restoreOverrideCursor();
}
Ejemplo n.º 30
0
OverrideLabelTab::OverrideLabelTab(QString title, QWidget *parent)
  : DialogTab(parent), _fontDirty(false) {

  setupUi(this);
  _bold->setIcon(QPixmap(":kst_bold.png"));
  _bold->setFixedWidth(32);
  _italic->setIcon(QPixmap(":kst_italic.png"));
  _italic->setFixedWidth(32);
  _labelColor->setFixedWidth(32);
  _labelColor->setFixedHeight(32);

  setTabTitle(title);

  connect(_fontSize, SIGNAL(valueChanged(double)), this, SIGNAL(modified()));
  connect(_bold, SIGNAL(toggled(bool)), this, SIGNAL(modified()));
  connect(_italic, SIGNAL(toggled(bool)), this, SIGNAL(modified()));
  connect(_family, SIGNAL(currentIndexChanged(int)), this, SIGNAL(modified()));
  connect(_labelColor, SIGNAL(changed(QColor)), this, SIGNAL(modified()));
  connect(_useDefault, SIGNAL(toggled(bool)), this, SIGNAL(useDefaultChanged(bool)));

  connect(_bold, SIGNAL(toggled(bool)), this, SLOT(buttonUpdate()));
  connect(_italic, SIGNAL(toggled(bool)), this, SLOT(buttonUpdate()));
}