Review Request: Add a class ContactGridWidget (mostly imported from ktp-send-file)

David Edmundson kde at davidedmundson.co.uk
Sun Jan 15 16:48:52 UTC 2012



> On Jan. 15, 2012, 2:14 p.m., David Edmundson wrote:
> > I'm not sure it needs a new lib, it could just be a "Widgets" folder inside the KTp lib.
> > I think models is separated purely because they're a bit sucky rather than something we should do for everything in KTp.
> > 
> > Could you check with Dario's opinion and go with whatever he says.
> 
> Daniele Elmo Domenichelli wrote:
>     The problem with that is that the models library depends on the common library, so the common library cannot depend on the models library...
> 
> Dario Freddi wrote:
>     Although the solution seems to be a little bit over engineered, and David definitely has a point, at the current state of things going for a separate library is the only way to go, so I +1 Daniele's solution. In the future, where Models' fate will be clear, we might decide to revise that.

+1 from me then :). Fix the potential crash and I'll be happy to say ship it.

Final related comment, can you be sure to update send-file once this is merged.


> On Jan. 15, 2012, 2:14 p.m., David Edmundson wrote:
> > KTp/Widgets/contact-grid-widget.h, line 67
> > <http://git.reviewboard.kde.org/r/103702/diff/1/?file=46612#file46612line67>
> >
> >     I think in future we should expose our filter proxy model directly, that way we don't have to put everything in 3 places
> >     
> >     (the proxy, here and the contacts listview)
> >     
> >     Just brainstorming, this is fine for now.
> 
> Daniele Elmo Domenichelli wrote:
>     Since this is a brainstorming... I think it is actually nice that you just have to add the widget and use the methods from that... But whatever you choose it's fine for me.

Ok, there's a class in the contact-list which I think is destined to move here soon (ContactListWidget). I want flexibility and I don't want to have to maintain it in 3 different places.

Anyway let's normalise the two of these when that happens. 


> On Jan. 15, 2012, 2:14 p.m., David Edmundson wrote:
> > KTp/Widgets/contact-grid-widget.cpp, line 65
> > <http://git.reviewboard.kde.org/r/103702/diff/1/?file=46613#file46613line65>
> >
> >     Try and avoid a hardcoded 80. I think we should use the icon size specified by whoever is using this class (set by QAbstractItemView::iconSize).
> >     
> >     Does it read clearer as this:
> >     
> >     avatar = avatar.scaled(avatar.size().boundedTo(avatarRect));
> >     
> >
> 
> Daniele Elmo Domenichelli wrote:
>     This is actually copy&pasted code, but I will change it...

Ah, that makes it my fault... Ah well, if you're going to use my code, you can fix it :-)


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103702/#review9833
-----------------------------------------------------------


On Jan. 15, 2012, 10 a.m., Daniele Elmo Domenichelli wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103702/
> -----------------------------------------------------------
> 
> (Updated Jan. 15, 2012, 10 a.m.)
> 
> 
> Review request for Telepathy and David Edmundson.
> 
> 
> Description
> -------
> 
> This patch adds a class ContactGridWidget to the common module.
> The class is basically the widget used in ktp-send-file for displaying the contacts (grid view + filter bar)
> 
> I had to add a new directory "Widgets" and a new library, because the class depends both on the "common" and the "models" modules.
> 
> 
> Diffs
> -----
> 
>   KTp/CMakeLists.txt f17ff8c3bb54408d3bfaf7773bae0e736836b9b2 
>   KTp/Widgets/CMakeLists.txt PRE-CREATION 
>   KTp/Widgets/contact-grid-widget.h PRE-CREATION 
>   KTp/Widgets/contact-grid-widget.cpp PRE-CREATION 
>   KTp/Widgets/flat-model-proxy.h PRE-CREATION 
>   KTp/Widgets/flat-model-proxy.cpp PRE-CREATION 
> 
> Diff: http://git.reviewboard.kde.org/r/103702/diff/diff
> 
> 
> Testing
> -------
> 
> Succesfully used in the unreleased telepathy kipi plugin
> 
> 
> Thanks,
> 
> Daniele Elmo Domenichelli
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20120115/70e75ebb/attachment-0001.html>


More information about the KDE-Telepathy mailing list