[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-usability
Subject:    Re: Enhancement: disable reason
From:       Gustavo Sverzut Barbieri <gustavo () gsbarbieri ! sytes ! net>
Date:       2005-07-05 15:52:17
Message-ID: 200507051252.17563.gustavo () gsbarbieri ! sytes ! net
[Download RAW message or body]

On Tuesday 05 July 2005 12:30, Florian Graessle wrote:
> Gustavo Sverzut Barbieri wrote:
> > I've made a patch to help enhance usability: now you can state why you
> > disabled some widget.
>
> Sorry, but I have not the slightest idea what you mean. Just exactly who
> can do what, why and under which circumstances?
>
> > What do you think?
>
> I think that you have to elaborate a little bit further on what this
> whole thing is about. Maybe some screenshots can help clear things up.

sorry, I did think people would consult that link. Anyway, here it goes:

Many time you just don't know why some part of your GUI is diabled and how to 
enable it. It could be done in current code if developers change the tooltip 
and then change it back when it's enabled. However this is too ackward and 
developers just don't do that.
    Maybe if the toolkit have something to help it, people would start to use 
it more often.

I have created some methods to QWidget:
	setDisableReason( const QString &reason )
	QString disableReason() const
	disable( const QString &reason )
	enable()

disable() is a helper for setDisableReason(reason) + setEnabled(false), 
enable() is a helper for setDisableReason("") + setEnabled(true).

disableReason() is recursive and will look into parent's if there is no reason 
for this child.

I have also changed QWidget::toolTip() to return the reason previously set if 
the widget is disabled.

Developers could now just do:

if (conditionDoNotMatch())
   widget->disable( "you need to select some items" )

so it will show the tooltip like the attached screenshots.

qt-disabled_reason_1.png: this item was disabled explicity and a reason was 
set.
qt-disabled_reason_2.png: this item was disabled implicity because its parent 
was disabled. It doesn't have any reason, but its parent does, so the 
parent's reason was shown.

Now I'm working to show disable reason also in status bar.

-- 
Gustavo Sverzut Barbieri
---------------------------------------
Engenharia de Computacao 2001 - UNICAMP
GPSL - Grupo Pro Software Livre
Cell..: +55 (19) 9165 8010
Jabber: gsbarbieri@jabber.org
  ICQ#: 17249123
   GPG: 0xB640E1A2 @ wwwkeys.pgp.net

["qt-disabled_reason_1.png" (image/png)]
["qt-disabled_reason_2.png" (image/png)]

_______________________________________________
kde-usability mailing list
kde-usability@kde.org
https://mail.kde.org/mailman/listinfo/kde-usability


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic