void CalendarCondition::setCollectionId(const QString& collectionId)
{
    if(collectionId != mCollectionId)
    {
        mCollectionId = collectionId;
        emit collectionIdChanged(collectionId);
    }
}
Ejemplo n.º 2
0
CollectionAssetsModel::CollectionAssetsModel(QObject *parent)
    : QAbstractItemModel(parent),
      d(new Private(this))
{
    // set the role names based on the values of the DisplayRoles enum for
    //  the sake of QML
    QHash<int, QByteArray> roles;

    QMetaEnum e = metaObject()->enumerator(metaObject()->indexOfEnumerator("DisplayRoles"));
    for (int i = 0; i < e.keyCount(); ++i) {
        roles.insert(e.value(i), e.key(i));
    }
    setRoleNames(roles);

    connect(this, SIGNAL(rowsInserted(QModelIndex,int,int)),
            this, SIGNAL(countChanged()));
    connect(this, SIGNAL(rowsRemoved(QModelIndex,int,int)),
            this, SIGNAL(countChanged()));
    connect(this, SIGNAL(modelReset()),
            this, SIGNAL(countChanged()));
    connect(this, SIGNAL(collectionIdChanged()),
            this, SLOT(fetchAssets()));
}
Ejemplo n.º 3
0
void CollectionAssetsModel::setCollectionId(const QString& collectionId)
{
    d->collectionId = collectionId;
    emit collectionIdChanged();
}