Exemplo n.º 1
0
void CSVSettings::View::buildModel (const CSMSettings::Setting *setting)
{
    QStringList values = setting->defaultValues();

    if (mHasFixedValues)
        buildFixedValueModel (setting->declaredValues());
    else
        buildUpdatableValueModel (values);

    mSelectionModel = new QItemSelectionModel (mDataModel, this);

    setSelectedValues (values, false);
}
Exemplo n.º 2
0
void CSVSettings::TextView::slotTextEdited (QString value)
{
    QStringList values = value.split (mDelimiter, QString::SkipEmptyParts);

    QStringList returnValues;

    foreach (const QString &splitValue, values)
        returnValues.append (splitValue.trimmed());

    setSelectedValues (returnValues, false);

    View::updateView();
}
Exemplo n.º 3
0
void CSVSettings::View::setSelectedValue (const QString &value,
                                           bool doViewUpdate, bool signalUpdate)
{
    setSelectedValues (QStringList() << value, doViewUpdate, signalUpdate);
}