[Kstars-devel] Unable to create additional tool bars to a KMainWindow

Jasem Mutlaq mutlaqja at ikarustech.com
Mon Jan 26 01:49:47 CET 2004


Nevermind, it's fixed.

On Monday 26 January 2004 12:35 am, Jasem Mutlaq wrote:
> Hello,
>
> I can't create additional tool bars in a KMainWindow. Here is the code for
> the KMainWindow child
>
> FitsViewer::FitsViewer (const KURL url, QWidget *parent, const char *name)
>
>         : KMainWindow (parent, name)
>
> {
>     new KAction( i18n("Action1"), "launch", KShortcut( "Ctrl+I" ), this,
> SLOT( imageReduction()), actionCollection(), "image_reduce");
>     new KAction( i18n("Action2"), "launch", KShortcut( "Ctrl+B" ), this,
> SLOT( imageReduction()), actionCollection(), "image_brightness_contrast");
>     new KAction( i18n("Action3"), "launch", KShortcut( "Ctrl+M" ), this,
> SLOT( imageReduction()), actionCollection(), "image_filters");
>
>    createGUI("fitsviewer.rc");
> }
>
> here is the fitsviewer.rc file
>
> !DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
> <kpartgui name="FitsViewer" version="1">
> <ToolBar noMerge="1" name="processToolBar"><text>Process ToolBar</text>
>         <Action name="image_reduce" />
>         <Action name="image_brightness_contrast" />
>         <Action name="image_filters" />
> </ToolBar>
> </kpartgui>
>
> ---------------------------------------------------------------------------
>---------------------------------------------
>
> The main application (KStars) calls FitsViewer but no tool bars are created
> in the FitsViewer window. Note that I _can_ add KActions in the _main_
> toolbar of FitsViewer by calling calling action->plug(toolbar()); but this
> only adds the action to the main tool bar; and I need additional tool bars
> in FitsViewer besides the main toolbar.
>
> Any help greatly appreciated!
>
> cheers,
> Jasem Mutlaq
> http://edu.kde.org/kstars
> _______________________________________________
> Kstars-devel mailing list
> Kstars-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kstars-devel


More information about the Kstars-devel mailing list