Project

General

Profile

Actions

Feature #3513

closed

Provide WIdentityProxyModel in Wt

Added by Anonymous over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Roel Standaert
Target version:
Start date:
08/04/2014
Due date:
% Done:

0%

Estimated time:

Description

Dear devs,

WAbstractProxyModel's index(), parent(), rowCount() and columnCount()

are pure virtuals. The class, though, knows enough about the proxied

model to afford reasonable default implementations of those methods. It

could also forward the proxied model's signals to connected views, but

doesn't. Derived classes have to implement both on their own. I found

that than inconvenient, if not for the work involved, then for the fact

that derived classes might break with signals newly introduced into

future versions of WAbstractProxyModel.

Wondering why that is so, I checked out QAbstractProxyModel and found it

to be implemented similarly. What Qt does provide, however, is a

QIdentityProxyModel that reimplements those methods and does the signal

plumbing for you. If I understood its purpose correctly, it should in

general be used as the base class for home-grown proxy model

implementations. As Wt doesn't have such a beast, I've implemented

and attached one that works for me. Please use it if you find it useful.

Best Regards,

Jan


Files

WIdentityProxyModel (2.42 KB) WIdentityProxyModel Anonymous, 08/04/2014 01:33 PM
WIdentityProxyModel.C (7.7 KB) WIdentityProxyModel.C Anonymous, 08/04/2014 01:33 PM
Actions #1

Updated by Koen Deforche over 9 years ago

  • Status changed from New to InProgress
  • Assignee set to Roel Standaert
  • Target version set to 3.3.4
Actions #2

Updated by Roel Standaert over 9 years ago

  • Status changed from InProgress to Resolved
Actions #3

Updated by Koen Deforche over 9 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF