[Kde-games-devel] Review Request: Hint in Kiriki

Parker Coates parker.coates at kdemail.net
Tue Sep 14 05:33:28 CEST 2010



> On 2010-09-14 02:58:39, Parker Coates wrote:
> > /trunk/KDE/kdegames/kiriki/src/kiriki.cpp, lines 237-245
> > <http://svn.reviewboard.kde.org/r/3793/diff/6/?file=31271#file31271line237>
> >
> >     There's no need to create a whole new QItemSelectionModel here. We can just modify the existing selection. We can also take a shortcut and highlight the entire row with just a single index. I would suggest something like this:
> >     
> >     int row = scoreRows[ComputerScoring(m_scores -> currentPlayer())];
> >     QModelIndex mi = m_scores->index(row, 0);
> >     m_highlightedRowIndex  = mi.row();
> >     m_scoresWidget -> setItemDelegateForRow(m_highlightedRowIndex, m_delegateHighlighted);
> >     
> >     QItemSelectionModel::SelectionFlags flags = QItemSelectionModel::Clear
> >                                                 | QItemSelectionModel::Select
> >                                                 | QItemSelectionModel::Rows;
> >     m_scoresWidget->selectionModel()->select( QItemSelection(mi, mi), flags );
> 
> Luiz Romário Santana Rios wrote:
>     That way only an item, not the entire row, would be selected.

Actually no. Because we pass the QItemSelectionModel::Rows flag to select, it automatically selects whole rows for us.


> On 2010-09-14 02:58:39, Parker Coates wrote:
> > /trunk/KDE/kdegames/kiriki/src/kiriki.cpp, line 213
> > <http://svn.reviewboard.kde.org/r/3793/diff/6/?file=31271#file31271line213>
> >
> >     Button labels typically capitalise each word, so this should be "Give Hint Anyway".
> 
> Luiz Romário Santana Rios wrote:
>     I personally don't like this style, but it's OK as long as it's a common KDE convention.

It is. See http://techbase.kde.org/Projects/Usability/HIG/Capitalization .


- Parker


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/3793/#review7586
-----------------------------------------------------------


On 2010-07-15 16:13:54, Luiz Romário Santana Rios wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/3793/
> -----------------------------------------------------------
> 
> (Updated 2010-07-15 16:13:54)
> 
> 
> Review request for KDE Games.
> 
> 
> Summary
> -------
> 
> This patch implements hint in Kiriki, using the computer itself to give it. Either some dice or a row are highlighted to give the hint.
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdegames/kiriki/src/diceswidget.h 1119312 
>   /trunk/KDE/kdegames/kiriki/src/diceswidget.cpp 1119312 
>   /trunk/KDE/kdegames/kiriki/src/kiriki.h 1119312 
>   /trunk/KDE/kdegames/kiriki/src/kiriki.cpp 1119312 
>   /trunk/KDE/kdegames/kiriki/src/lateralwidget.h 1119312 
>   /trunk/KDE/kdegames/kiriki/src/lateralwidget.cpp 1119312 
> 
> Diff: http://svn.reviewboard.kde.org/r/3793/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Luiz Romário
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-games-devel/attachments/20100914/130623f1/attachment.htm 


More information about the kde-games-devel mailing list