bool SingleCellSimulationViewInformationSolversWidget::doSolverChanged(SingleCellSimulationViewInformationSolversWidgetData *pSolverData, const QString &pSolverName, const bool &pForceHandling) { // By default, we don't handle the change in the list property bool res = false; // Check whether the list property that got changed is the one we are after if ( (pSolverData->solversListProperty() == currentProperty()) || pForceHandling) { // It is the list property we are after or we want to force the // handling, so update our result res = true; // Go through the different properties for the given type of solver and // show/hide whatever needs showing/hiding for (QMap<QString, Core::Properties>::ConstIterator iter = pSolverData->solversProperties().constBegin(), iterEnd = pSolverData->solversProperties().constEnd(); iter != iterEnd; ++iter) { bool propertyVisible = !iter.key().compare(pSolverName); foreach (Core::Property *property, iter.value()) setPropertyVisible(property, propertyVisible); } } // Return our result return res; }
void SimulationExperimentViewInformationParametersWidget::emitGraphRequired() { // Let people know that we want to plot the current parameter against // another emit graphRequired(mParameterActions.value(qobject_cast<QAction *>(sender())), mParameters.value(currentProperty())); }
void PQBaseItem::serialize(QTextStream &stream, const unsigned &baseIndentSize) const { unsigned indentSize = baseIndentSize; QStringList properties(property("_PQProperties").toStringList()); // Open self declaration stream << PQSerializer::indentStep().repeated(indentSize) << qmlName() << QLatin1String(" {") << endl; ++indentSize; Q_FOREACH(const QString ¤tPropertyName, properties+extraProperties) { QDeclarativeProperty currentProperty(const_cast<PQBaseItem *>(this), currentPropertyName); serializeProperty(stream, currentProperty, indentSize); } // Close self declaration --indentSize; stream << PQSerializer::indentStep().repeated(indentSize) << QLatin1Char('}') << endl; }
void SimulationExperimentViewInformationParametersWidget::contextMenuEvent(QContextMenuEvent *pEvent) { // Make sure that we have a current property Core::Property *crtProperty = currentProperty(); if (crtProperty == nullptr) { return; } // Make sure that our current property is not a section if (crtProperty->type() == Core::Property::Type::Section) { return; } // Generate and show the context menu mContextMenu->exec(pEvent->globalPos()); }
{ kdDebug( 14307 ) << "NLNoatun::update() DCOP error on " << appname << endl; } else { QDataStream reply( replyData, IO_ReadOnly ); if ( replyType == "int" ) { int state = 0; reply >> state; m_playing = ( state == 2 ); //kdDebug( 14307 ) << "checked if Noatun is playing!" << endl; } } // poll it for its current songtitle, artist and album // Using properties m_artist = currentProperty( appname, "author" ); m_album = currentProperty( appname, "album" ); QString title = currentProperty( appname, "title" ); // if properties not set ( no id3 tags... ) fallback to filename if ( !title.isEmpty() ) newTrack = title; else // Using the title() method if ( !m_client->call( appname, "Noatun", "title()", data, replyType, replyData ) ) kdDebug( 14307 ) << "NLNoatun::update() DCOP error on " << appname << endl; else { QDataStream reply( replyData, IO_ReadOnly ); if ( replyType == "QString" ) { reply >> newTrack;