[kde-edu]: Review Request: KWordQuiz: Right Justify option for arabic

Frederik Gladhorn gladhorn at kde.org
Tue Jan 19 21:23:59 CET 2010


Hi,

On Tuesday 19 January 2010 19:20:36 Peter Hedlund wrote:
> > On 2010-01-19 08:31:56, Albert Astals Cid wrote:
> > > Why not using the isRightToLeft() function Qt provides instead of a
> > > option the user has to manually choose?
> 
> If I read the documentation for isRightToLeft() correctly it can only be
>  used on the widget level. Want to have different layout directions in
>  different columns of a QTableView. In my opinion this is a regression in
>  Qt since QTable in Qt 3 handled this automatically. The report
>  http://bugreports.qt.nokia.com/browse/QTBUG-6882 partly addresses the
>  problem, but I think it is more general than stated there.
> 

Ok, I haven't even looked at a single line of code and I'm totally out of the 
loop...
From what I gather this is about right to left text, right?
And while we can switch all of KDE that is hardly wanted if it's not the 
mother language. So what we'd need is rtl for only one column/widget at a 
time?
How do we know if a language is rtl? is there some automatic way? I had a 
quick look at KGlobal/KLocal but didn't see anything related there.

Greetings
Frederik


> 
> - Peter
> 
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/2646/#review3748
> -----------------------------------------------------------
> 
> On 2010-01-18 23:53:11, Aleks wrote:
> > -----------------------------------------------------------
> > This is an automatically generated e-mail. To reply, visit:
> > http://reviewboard.kde.org/r/2646/
> > -----------------------------------------------------------
> >
> > (Updated 2010-01-18 23:53:11)
> >
> >
> > Review request for KDE-Edu.
> >
> >
> > Summary
> > -------
> >
> > This patch is an endeavour to address this issue:
> > https://bugs.kde.org/show_bug.cgi?id=175520 The Column Setting menu now
> > has a two checkboxes, one for each column. As for code itself, I used the
> > KEduVocDocumen::option field to store the flag when a checkbox is
> > triggered. The trickiest part was to let the
> > KWQTableDelegate::drawDisplay function know about the flag, so I utilized
> > an unused (in this application) QStyleOptionViewItem.decorationAlignment
> > flag Qt::AlignRight. Thus KWQTableDelegate::paint invokes
> > KWQTableDelegate::drawDisplay and passes this "magic" flag. This may be a
> > confusing moment, so I'll elaborate. I might have chosen ANY
> > QStyleOptionViewItem.decorationAlignment flag like Qt::AlignTop, the
> > outcome would be the same. Later on though in painter->drawText(textRect,
> > option.displayAlignment | Qt::TextWordWrap | Qt::AlignRight, str), the
> > flag Qt::AlignRight is used in a totally different context as it should
> > be used.
> >
> > I know this solution is far from perfect, I just tried to implement a new
> > feature making as few changes as possible, hence such workaround.
> >
> > I certainly would like to know if there was any other more efficient way
> > to do what I did.
> >
> >
> > Diffs
> > -----
> >
> >   /trunk/KDE/kdeedu/kwordquiz/src/columndialogbase.ui 1076603
> >   /trunk/KDE/kdeedu/kwordquiz/src/dlglanguage.cpp 1076603
> >   /trunk/KDE/kdeedu/kwordquiz/src/kwordquiz.cpp 1076603
> >   /trunk/KDE/kdeedu/kwordquiz/src/kwqcommands.h 1076603
> >   /trunk/KDE/kdeedu/kwordquiz/src/kwqcommands.cpp 1076603
> >   /trunk/KDE/kdeedu/kwordquiz/src/kwqtabledelegate.cpp 1076603
> >   /trunk/KDE/kdeedu/kwordquiz/src/kwqtablemodel.h 1076603
> >   /trunk/KDE/kdeedu/kwordquiz/src/kwqtablemodel.cpp 1076603
> >
> > Diff: http://reviewboard.kde.org/r/2646/diff
> >
> >
> > Testing
> > -------
> >
> > The only said thing that cropped up during testing is that when doing
> > Undo-Redo after Checking the AlignRight Box, the View area would not
> > refresh until you put a cursor over it. This is certainly a fixable
> > issue. If this patch is confirmed, I will tweak everything to perfection.
> >
> >
> > Thanks,
> >
> > Aleks
> 
> _______________________________________________
> kde-edu mailing list
> kde-edu at mail.kde.org
> https://mail.kde.org/mailman/listinfo/kde-edu
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-edu/attachments/20100119/15d04c4d/attachment-0001.sig 


More information about the kde-edu mailing list