void RKInput::textChanged (RKComponentPropertyBase *) { RK_TRACE (PLUGIN); if (updating) return; updating = true; RK_ASSERT (textedit || lineedit); if (textedit) textedit->setText (fetchStringValue (text)); else lineedit->setText (fetchStringValue (text)); updateColor (); updating = false; changed (); }
RKComponent::UnserializeError RKComponentBase::unserializeState (const QStringList &state) { RK_TRACE (PLUGIN); QMap<QString, QString> props; for (int i = 0; i < state.count (); ++i) { QString line = state[i]; int sep = line.indexOf ('='); if (sep < 0) return BadFormat; props.insert (RKCommonFunctions::unescape (line.left (sep)), RKCommonFunctions::unescape (line.mid (sep+1))); } setPropertyValues (&props); // verify UnserializeError error = NoError; for (QMap<QString, QString>::const_iterator it = props.constBegin (); it != props.constEnd (); ++it) { if (fetchStringValue (it.key ()) != it.value ()) { // COMPAT: In RKWard 0.5.1, the formatting of real numbers was different. Hence we compare the numeric values, instead QString dummy; RKComponentBase *prop = lookupComponent (it.key (), &dummy); if (dummy.isEmpty () && prop && prop->type () == PropertyDouble) { if (static_cast<RKComponentPropertyDouble*> (prop)->doubleValue () == it.value ().toDouble ()) { continue; } } RK_DO(qDebug ("Tried to apply value %s to property %s, but got %s", qPrintable (it.value ()), qPrintable (it.key ()), qPrintable (fetchStringValue (it.key ()))), PLUGIN, DL_WARNING); error = NotAllSettingsApplied; } } return error; }
void RKPluginBrowser::textChanged (RKComponentPropertyBase *) { RK_TRACE (PLUGIN); if (updating) return; updating = true; selector->setLocation (fetchStringValue (selection)); updateColor (); updating = false; changed (); }
void RKMatrixInput::tsvPropertyChanged () { if (updating_tsv_data) return; updating_tsv_data = true; RK_TRACE (PLUGIN); columns.clear (); QStringList coldata = fetchStringValue (tsv_data).split ('\n', QString::KeepEmptyParts); for (int i = 0; i < coldata.size (); ++i) { setColumnValue (i, coldata[i]); } updating_tsv_data = false; updateAll (); }
void RKVarSelector::objectSelectionChanged () { RK_TRACE (PLUGIN); selected->setObjectList (list_view->selectedObjects ()); RK_DEBUG (PLUGIN, DL_DEBUG, "selected in varselector: %s", qPrintable (fetchStringValue (selected))); }
bool RKPluginBrowser::isValid () { return (!(fetchStringValue (selection).isEmpty ())); }
bool RKInput::isValid () { RK_TRACE (PLUGIN); return (!(fetchStringValue (text).isEmpty ())); }