Review Request: Add a class ContactGridWidget (mostly imported from ktp-send-file)
David Edmundson
kde at davidedmundson.co.uk
Sun Jan 15 14:14:14 UTC 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103702/#review9833
-----------------------------------------------------------
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.
KTp/Widgets/contact-grid-widget.h
<http://git.reviewboard.kde.org/r/103702/#comment8115>
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.
KTp/Widgets/contact-grid-widget.cpp
<http://git.reviewboard.kde.org/r/103702/#comment8127>
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));
KTp/Widgets/contact-grid-widget.cpp
<http://git.reviewboard.kde.org/r/103702/#comment8132>
I think this will crash if called without a selection.
.value() returns 0 and then you call ->contact() on it.
Even if no-one should call this without a selection, we should still avoid crashing.
KTp/Widgets/flat-model-proxy.h
<http://git.reviewboard.kde.org/r/103702/#comment8133>
This arguably belongs in "Models" rather than Widgets.
- David Edmundson
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/fa6756fa/attachment.html>
More information about the KDE-Telepathy
mailing list