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

List:       kde-core-devel
Subject:    Re: comboboxes - sorted lists in KDE4 - idea
From:       Thomas Zander <zander () kde ! org>
Date:       2007-02-22 12:58:33
Message-ID: 200702221358.33763.zander () kde ! org
[Download RAW message or body]


On Thursday 22 February 2007 13:35, you wrote:
> On Thursday 22 February 2007, Thomas Zander wrote:
> > More importantly; there is no generic method in KDE to store items that
> > can be translated in a combobox and get the untranslated 'key' back when
> > a user selects something. This is the main reason people insert items in
> > a static ordering.
>
> There is in Qt4.
>   void QComboBox::insertItem ( int index, const QString & text, const
> QVariant & userData = QVariant() ); QVariant QComboBox::itemData ( int
> index, int role = Qt::UserRole ) const;

so, it would be possible to have a;
  void KComboBox::addItems(QList<KLocalizedString>, Sorting sorting=Unsorted);
and a signal:
  void KComboBox::activatedKey(const QString &key);
assuming we add a key() method on the KLocalizedString which returns a 
QString...

I'm not sure the sorting will be used a lot, but the rest would certainly be 
useful :)
-- 
Thomas Zander

[Attachment #3 (application/pgp-signature)]

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

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