Project

General

Profile

Feature #3513

Provide WIdentityProxyModel in Wt

Added by Anonymous about 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
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
#1

Updated by Koen Deforche about 8 years ago

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

Updated by Roel Standaert almost 8 years ago

  • Status changed from InProgress to Resolved
#3

Updated by Koen Deforche almost 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF