StreamModel

A model of the user's Friends feeds. More...

Properties

Detailed Description

The SteamsModel is a model based on the model provided by the Friends service, conveniently sorted with pre-defined filters. By default, the model contains everything except comments. You can filter based on stream, account or service.

Examples of use:

1. Model of the complete Friends feed:

Item {
    StreamModel {
        id: StreamModel
    }

    ListView {
        model: StreamModel
        delegate: Text { text: "message: " + message }
    }
}

2. Model of the Friends feed, limited to facebook:

Item {
    StreamModel {
        id: StreamModel
        service: "facebook"
    }

    ListView {
        model: StreamModel
        delegate: Text { text: "message: " + message }
    }
}

3. Model of the Friends feed, limited to a single account:

Item {
    StreamModel {
        id: StreamModel
        account: 1 // The account ID provided but Ubuntu.OnlineAccounts
    }

    ListView {
        model: StreamModel
        delegate: Text { text: "message: " + message }
    }
}

4. Model of the Friends feed, limited to a thread of comments:

Item {
    StreamModel {
        id: StreamModel
        stream: "reply_to/"+messageId
    }

    ListView {
        model: StreamModel
        delegate: Text { text: "message: " + message }
    }
}

5. Model of the Friends feed, limited to a specific stream, like private messages:

Item {
    StreamModel {
        id: StreamModel
        stream: "private"
    }

    ListView {
        model: StreamModel
        delegate: Text { text: "message: " + message }
    }
}

Property Documentation

account : uint

If set, the model will include only this account


service : string

If set, the model will include only this service


stream : string

If set, the model will include only this stream