Bug #52
Sync Bufferswitches via QDataWidgetMapper
| Status: | Closed | Start date: | ||
|---|---|---|---|---|
| Priority: | High | Due date: | ||
| Assignee: | EgS | % Done: | 0% |
|
| Category: | Quassel Client | |||
| Target version: | 0.2.0-alpha1 | |||
| Version: | OS: |
Description
Currently bufferswitches are handled somewhat crude.
I just learned about QDataWidgetMapper, wich allows to map different data of an AbstractModel to Widgets.
Since the buffers are already wrapped into a BufferModel this facility should allow us to sync the bufferswitches somewhat automagically.
Syncing applies to:
- topic
- input line
- chatwidget (obviously)
- nicklist
History
#1 Updated by EgS over 4 years ago
Ok QDataWidgetmapper basically sucks. At least for what I had in mind to do with it.
Wrote my own Class to take care of this now: ModelPropertyMapper:
it can be easily used to map a specific column of a model to a property of qobject using a specific Role:
for example the following line maps the DisplayRole of Column 0 to the "topic" property of the topic widget:
Client::bufferModel()->mapProperty(0, Qt::DisplayRole, topicwidget, "topic");
-> close