本文整理汇总了C++中parameterChanged函数的典型用法代码示例。如果您正苦于以下问题:C++ parameterChanged函数的具体用法?C++ parameterChanged怎么用?C++ parameterChanged使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了parameterChanged函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: connect
void ALCPeakFittingView::initialize() {
m_ui.setupUi(m_widget);
connect(m_ui.fit, SIGNAL(clicked()), this, SIGNAL(fitRequested()));
m_ui.plot->setCanvasBackground(Qt::white);
m_ui.plot->setAxisFont(QwtPlot::xBottom, m_widget->font());
m_ui.plot->setAxisFont(QwtPlot::yLeft, m_widget->font());
m_dataCurve->setStyle(QwtPlotCurve::NoCurve);
m_dataCurve->setSymbol(
QwtSymbol(QwtSymbol::Ellipse, QBrush(), QPen(), QSize(7, 7)));
m_dataCurve->setRenderHint(QwtPlotItem::RenderAntialiased, true);
m_dataCurve->attach(m_ui.plot);
m_fittedCurve->setPen(QPen(Qt::red, 1.5));
m_fittedCurve->setRenderHint(QwtPlotItem::RenderAntialiased, true);
m_fittedCurve->attach(m_ui.plot);
// XXX: Being a QwtPlotItem, should get deleted when m_ui.plot gets deleted
// (auto-delete option)
m_peakPicker = new MantidWidgets::PeakPicker(m_ui.plot, Qt::red);
connect(m_peakPicker, SIGNAL(changed()), SIGNAL(peakPickerChanged()));
connect(m_ui.peaks, SIGNAL(currentFunctionChanged()),
SIGNAL(currentFunctionChanged()));
connect(m_ui.peaks, SIGNAL(parameterChanged(QString, QString)),
SIGNAL(parameterChanged(QString, QString)));
connect(m_ui.help, SIGNAL(clicked()), this, SLOT(help()));
connect(m_ui.plotGuess, SIGNAL(clicked()), this, SLOT(plotGuess()));
}
示例2: parameterChanged
//==============================================================================
void DRowAudioFilter::prepareToPlay (double sampleRate, int samplesPerBlock)
{
currentSampleRate = sampleRate;
parameterChanged(PREFILTER, 0.0f);
parameterChanged(POSTFILTER, 0.0f);
}
示例3: QStringLiteral
void QgsAtlasComposition::readXml( const QDomElement& atlasElem, const QDomDocument& )
{
mEnabled = atlasElem.attribute( QStringLiteral( "enabled" ), QStringLiteral( "false" ) ) == QLatin1String( "true" ) ? true : false;
emit toggled( mEnabled );
if ( !mEnabled )
{
emit parameterChanged();
return;
}
// look for stored layer name
mCoverageLayer = nullptr;
QMap<QString, QgsMapLayer*> layers = QgsMapLayerRegistry::instance()->mapLayers();
for ( QMap<QString, QgsMapLayer*>::const_iterator it = layers.begin(); it != layers.end(); ++it )
{
if ( it.key() == atlasElem.attribute( QStringLiteral( "coverageLayer" ) ) )
{
mCoverageLayer = dynamic_cast<QgsVectorLayer*>( it.value() );
break;
}
}
mPageNameExpression = atlasElem.attribute( QStringLiteral( "pageNameExpression" ), QString() );
mSingleFile = atlasElem.attribute( QStringLiteral( "singleFile" ), QStringLiteral( "false" ) ) == QLatin1String( "true" ) ? true : false;
mFilenamePattern = atlasElem.attribute( QStringLiteral( "filenamePattern" ), QLatin1String( "" ) );
mSortFeatures = atlasElem.attribute( QStringLiteral( "sortFeatures" ), QStringLiteral( "false" ) ) == QLatin1String( "true" ) ? true : false;
if ( mSortFeatures )
{
mSortKeyAttributeName = atlasElem.attribute( QStringLiteral( "sortKey" ), QLatin1String( "" ) );
// since 2.3, the field name is saved instead of the field index
// following code keeps compatibility with version 2.2 projects
// to be removed in QGIS 3.0
bool isIndex;
int idx = mSortKeyAttributeName.toInt( &isIndex );
if ( isIndex && mCoverageLayer )
{
QgsFields fields = mCoverageLayer->fields();
if ( idx >= 0 && idx < fields.count() )
{
mSortKeyAttributeName = fields.at( idx ).name();
}
}
mSortAscending = atlasElem.attribute( QStringLiteral( "sortAscending" ), QStringLiteral( "true" ) ) == QLatin1String( "true" ) ? true : false;
}
mFilterFeatures = atlasElem.attribute( QStringLiteral( "filterFeatures" ), QStringLiteral( "false" ) ) == QLatin1String( "true" ) ? true : false;
if ( mFilterFeatures )
{
mFeatureFilter = atlasElem.attribute( QStringLiteral( "featureFilter" ), QLatin1String( "" ) );
}
mHideCoverage = atlasElem.attribute( QStringLiteral( "hideCoverage" ), QStringLiteral( "false" ) ) == QLatin1String( "true" ) ? true : false;
emit parameterChanged();
}
示例4: toggled
void QgsAtlasComposition::readXML( const QDomElement& atlasElem, const QDomDocument& )
{
mEnabled = atlasElem.attribute( "enabled", "false" ) == "true" ? true : false;
emit toggled( mEnabled );
if ( !mEnabled )
{
emit parameterChanged();
return;
}
// look for stored layer name
mCoverageLayer = 0;
QMap<QString, QgsMapLayer*> layers = QgsMapLayerRegistry::instance()->mapLayers();
for ( QMap<QString, QgsMapLayer*>::const_iterator it = layers.begin(); it != layers.end(); ++it )
{
if ( it.key() == atlasElem.attribute( "coverageLayer" ) )
{
mCoverageLayer = dynamic_cast<QgsVectorLayer*>( it.value() );
break;
}
}
// look for stored composer map
mComposerMap = 0;
QList<const QgsComposerMap*> maps = mComposition->composerMapItems();
for ( QList<const QgsComposerMap*>::const_iterator it = maps.begin(); it != maps.end(); ++it )
{
if (( *it )->id() == atlasElem.attribute( "composerMap" ).toInt() )
{
mComposerMap = const_cast<QgsComposerMap*>( *it );
break;
}
}
mMargin = atlasElem.attribute( "margin", "0.0" ).toDouble();
mHideCoverage = atlasElem.attribute( "hideCoverage", "false" ) == "true" ? true : false;
mFixedScale = atlasElem.attribute( "fixedScale", "false" ) == "true" ? true : false;
mSingleFile = atlasElem.attribute( "singleFile", "false" ) == "true" ? true : false;
mFilenamePattern = atlasElem.attribute( "filenamePattern", "" );
mSortFeatures = atlasElem.attribute( "sortFeatures", "false" ) == "true" ? true : false;
if ( mSortFeatures )
{
mSortKeyAttributeIdx = atlasElem.attribute( "sortKey", "0" ).toInt();
mSortAscending = atlasElem.attribute( "sortAscending", "true" ) == "true" ? true : false;
}
mFilterFeatures = atlasElem.attribute( "filterFeatures", "false" ) == "true" ? true : false;
if ( mFilterFeatures )
{
mFeatureFilter = atlasElem.attribute( "featureFilter", "" );
}
emit parameterChanged();
}
示例5: QStringLiteral
void QgsAtlasComposition::readXml( const QDomElement &atlasElem, const QDomDocument & )
{
mEnabled = atlasElem.attribute( QStringLiteral( "enabled" ), QStringLiteral( "false" ) ) == QLatin1String( "true" );
emit toggled( mEnabled );
if ( !mEnabled )
{
emit parameterChanged();
return;
}
// look for stored layer name
QString layerId = atlasElem.attribute( QStringLiteral( "coverageLayer" ) );
QString layerName = atlasElem.attribute( QStringLiteral( "coverageLayerName" ) );
QString layerSource = atlasElem.attribute( QStringLiteral( "coverageLayerSource" ) );
QString layerProvider = atlasElem.attribute( QStringLiteral( "coverageLayerProvider" ) );
mCoverageLayer = QgsVectorLayerRef( layerId, layerName, layerSource, layerProvider );
mCoverageLayer.resolveWeakly( mComposition->project() );
mPageNameExpression = atlasElem.attribute( QStringLiteral( "pageNameExpression" ), QString() );
mSingleFile = atlasElem.attribute( QStringLiteral( "singleFile" ), QStringLiteral( "false" ) ) == QLatin1String( "true" );
mFilenamePattern = atlasElem.attribute( QStringLiteral( "filenamePattern" ), QLatin1String( "" ) );
mSortFeatures = atlasElem.attribute( QStringLiteral( "sortFeatures" ), QStringLiteral( "false" ) ) == QLatin1String( "true" );
if ( mSortFeatures )
{
mSortKeyAttributeName = atlasElem.attribute( QStringLiteral( "sortKey" ), QLatin1String( "" ) );
// since 2.3, the field name is saved instead of the field index
// following code keeps compatibility with version 2.2 projects
// to be removed in QGIS 3.0
bool isIndex;
int idx = mSortKeyAttributeName.toInt( &isIndex );
if ( isIndex && mCoverageLayer )
{
QgsFields fields = mCoverageLayer->fields();
if ( idx >= 0 && idx < fields.count() )
{
mSortKeyAttributeName = fields.at( idx ).name();
}
}
mSortAscending = atlasElem.attribute( QStringLiteral( "sortAscending" ), QStringLiteral( "true" ) ) == QLatin1String( "true" );
}
mFilterFeatures = atlasElem.attribute( QStringLiteral( "filterFeatures" ), QStringLiteral( "false" ) ) == QLatin1String( "true" );
if ( mFilterFeatures )
{
mFeatureFilter = atlasElem.attribute( QStringLiteral( "featureFilter" ), QLatin1String( "" ) );
}
mHideCoverage = atlasElem.attribute( QStringLiteral( "hideCoverage" ), QStringLiteral( "false" ) ) == QLatin1String( "true" );
emit parameterChanged();
}
示例6: QWidget
ComplexParameter::ComplexParameter(QWidget *parent) :
QWidget(parent)
{
m_ui.setupUi(this);
//m_ui.effectlist->horizontalHeader()->setVisible(false);
//m_ui.effectlist->verticalHeader()->setVisible(false);
m_ui.buttonLeftRight->setIcon(KIcon("go-next"));//better icons needed
m_ui.buttonLeftRight->setToolTip(i18n("Allow horizontal moves"));
m_ui.buttonUpDown->setIcon(KIcon("go-up"));
m_ui.buttonUpDown->setToolTip(i18n("Allow vertical moves"));
m_ui.buttonShowInTimeline->setIcon(KIcon("kmplayer"));
m_ui.buttonShowInTimeline->setToolTip(i18n("Show keyframes in timeline"));
m_ui.buttonHelp->setIcon(KIcon("help-about"));
m_ui.buttonHelp->setToolTip(i18n("Parameter info"));
m_ui.buttonNewPoints->setIcon(KIcon("document-new"));
m_ui.buttonNewPoints->setToolTip(i18n("Add keyframe"));
connect(m_ui.buttonLeftRight, SIGNAL(clicked()), this , SLOT(slotSetMoveX()));
connect(m_ui.buttonUpDown, SIGNAL(clicked()), this , SLOT(slotSetMoveY()));
connect(m_ui.buttonShowInTimeline, SIGNAL(clicked()), this , SLOT(slotShowInTimeline()));
connect(m_ui.buttonNewPoints, SIGNAL(clicked()), this , SLOT(slotSetNew()));
connect(m_ui.buttonHelp, SIGNAL(clicked()), this , SLOT(slotSetHelp()));
connect(m_ui.parameterList, SIGNAL(currentIndexChanged(const QString &)), this, SLOT(slotParameterChanged(const QString&)));
connect(m_ui.kplotwidget, SIGNAL(parameterChanged(QDomElement)), this , SLOT(slotUpdateEffectParams(QDomElement)));
connect(m_ui.kplotwidget, SIGNAL(parameterList(QStringList)), this , SLOT(slotUpdateParameterList(QStringList)));
/*ÜeffectLists["audio"]=audioEffectList;
effectLists["video"]=videoEffectList;
effectLists["custom"]=customEffectList;*/
setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
m_ui.infoBox->hide();
updateButtonStatus();
}
示例7: slotPositionChanged
void Geometryval::slotDeleteFrame(int pos)
{
// check there is more than one keyframe
Mlt::GeometryItem item;
int frame = m_timePos.getValue();
if (pos == -1) pos = frame;
int error = m_geom->next_key(&item, pos + 1);
if (error) {
error = m_geom->prev_key(&item, pos - 1);
if (error || item.frame() == pos) return;
}
m_geom->remove(frame);
buttonAdd->setEnabled(true);
buttonDelete->setEnabled(false);
widget->setEnabled(false);
spinTransp->setEnabled(false);
frameOptions->setEnabled(false);
m_reset->setEnabled(false);
m_helper->update();
slotPositionChanged(pos, false);
updateTransitionPath();
emit parameterChanged();
}
示例8: parameterChanged
void PositionEdit::slotUpdatePosition()
{
m_slider->blockSignals(true);
m_slider->setValue(m_display->getValue());
m_slider->blockSignals(false);
emit parameterChanged(m_display->getValue());
}
示例9: ViNoiseDetector
ViZscoreNoiseDetector::ViZscoreNoiseDetector()
: ViNoiseDetector()
{
setScale(30);
setWindowSize(DEFAULT_WINDOW_SIZE);
addParameter("Window Size");
QObject::connect(this, SIGNAL(parameterChanged(QString,qreal)), this, SLOT(changeParameter(QString,qreal)));
}
示例10: parameterChanged
//-----------------------------------------------------------------------------
// Function: modelDataChanged()
//-----------------------------------------------------------------------------
void ModelParameterEditor::modelDataChanged(QModelIndex const& index)
{
// Only changes in the default value emits parameterChanged.
if (index.column() == ModelParameterColumns::VALUE)
{
QSharedPointer<ModelParameter> changedParameter = model_->getParameter(index);
emit parameterChanged(changedParameter);
}
emit contentChanged();
}
示例11: toggled
void QgsAtlasComposition::setEnabled( bool enabled )
{
if ( enabled == mEnabled )
{
return;
}
mEnabled = enabled;
mComposition->setAtlasMode( QgsComposition::AtlasOff );
emit toggled( enabled );
emit parameterChanged();
}
示例12: parameterChanged
void KeyframeEdit::generateAllParams()
{
for (int col = 0; col < keyframe_list->columnCount(); ++col) {
QString keyframes;
for (int i = 0; i < keyframe_list->rowCount(); ++i) {
if (keyframe_list->item(i, col))
keyframes.append(QString::number(getPos(i)) + '=' + keyframe_list->item(i, col)->text() + ';');
}
m_params[col].setAttribute(getTag(), keyframes);
}
emit parameterChanged();
}
示例13: sendChangeMessage
void DRowAudioFilter::setScaledParameter (int index, float newValue)
{
for (int i = 0; i < noParams; i++)
{
if (index == i) {
if (params[i].getValue() != newValue) {
params[i].setValue(newValue);
sendChangeMessage (this);
}
}
}
parameterChanged(index, newValue);
}
示例14: connect
void ALCPeakFittingPresenter::initialize()
{
m_view->initialize();
connect(m_view, SIGNAL(fitRequested()), SLOT(fit()));
connect(m_view, SIGNAL(currentFunctionChanged()), SLOT(onCurrentFunctionChanged()));
connect(m_view, SIGNAL(peakPickerChanged()), SLOT(onPeakPickerChanged()));
// We are updating the whole function anyway, so paramName if left out
connect(m_view, SIGNAL(parameterChanged(QString,QString)), SLOT(onParameterChanged(QString)));
connect(m_model, SIGNAL(fittedPeaksChanged()), SLOT(onFittedPeaksChanged()));
connect(m_model, SIGNAL(dataChanged()), SLOT(onDataChanged()));
}
示例15: parameterChanged
void Geometryval::slotTransparencyChanged(int transp)
{
int pos = m_ui.spinPos->value();
Mlt::GeometryItem item;
int error = m_geom->fetch(&item, pos);
if (error || item.key() == false) {
// no keyframe under cursor
return;
}
item.mix(transp);
m_paramRect->setBrush(QColor(255, 0, 0, transp));
m_geom->insert(item);
emit parameterChanged();
}