Bug #52
Sync Bufferswitches via QDataWidgetMapper
Start date:
Due date:
% Done:
0%
Estimated time:
Version:
0.13.1
OS:
Any
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 about 17 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