[PATCH] KToggleToolbarAction, KWidgetAction

Michael Brade brade at kde.org
Wed Apr 17 13:16:03 BST 2002


On Monday 08 April 2002 04:45, John Firebaugh wrote:
> The attached patch adds two new KAction-subclasses: KToggleToolbarAction
> and KWidgetAction. The first handles everything associated with a "Show ___
> Toolbar" menu item, including updating itself when the toolbar is shown or
> hidden programmatically. Use of this class will make bugs like "Bug#40413:
> Selections in Settings are displayed incorrectly" easy to fix. The second
> provides an easy way to insert custom widgets into toolbars. It removes the
> necessity of subclassing KAction for every widget you want to insert into a
> toolbar.
Argh! And I wrote a KActionWidget some time ago (for KNotes only ATM). The 
purpose was being able to plug many actions into a widget, thus KActionWidget 
inherits from QWidget. The layout of the widgets can either be modified by 
subclassing KActionWidget or by using a member method, the first one being 
more powerful. I need this for KNotes because I don't have toolbars or 
menubars in KNotes and I can't use toolbars because they need a mainwindow as 
parent :-(

So to my question: can't we either merge the two ideas or rename KWidgetAction 
to something like KToolbarWidgetAction? IMHO KActionWidget is a more 
appropriate name for my concept.

PS: sorry for reading this thread so late...

-- 
Michael Brade;                 KDE Developer, Student of Computer Science
  |-mail: echo brade !#|tr -d "c oh"|s\e\d 's/e/\@/2;s/$/.org/;s/bra/k/2'
  °--web: http://www.kde.org/people/michaelb.html

KDE 3.0: Konquering the Desktops






More information about the kde-core-devel mailing list