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

List:       kde-devel
Subject:    Re: ANNOUNCMENT: easier usage of libraries
From:       Johannes Sixt <Johannes.Sixt () telecom ! at>
Date:       1998-04-04 11:37:47
[Download RAW message or body]

On Sun, 29 Mar 1998, ettrich@peanuts.Informatik.Uni-Tuebingen.De wrote:
> Changes to KTopLevelWidget (libkdeui)
> -------------------------------------
>
>- new functions:
>
>    /** 
>      * This is called when the widget is closed.
>      * The default implementation will also destroy the
>      * widget.
>      */
>    virtual void closeEvent ( QCloseEvent *);

Does it do  a "delete this"? AAAARRRRGGGGHHH!!! I want to put my KTopLevelWidget
on the stack, which works very well for the common case of a single toplevel
window!!!!

>    /**
>     * Returns a pointer to the menu bar. If there is no
>     * menu bar yet, it will be generated
>     */
>    KMenuBar *menuBar();

What if I want to have a class derived from KMenuBar?

>- obsolete functions (TO BE REMOVED, DO NOT USE!)
>
>    /**
>      * THIS FEATURE IS OBSOLETE AND WILL BE REMOVED.
>      * DO NOT USE! Use setMenu() instead 
>      *
>      */
>    void setMenu( KMenuBar *menu );

NO, NO, NO, NO!!!!! How do I work with classes Derived from KMenuBar?

>    /**
>      * THIS FEATURE IS OBSOLETE AND WILL BE REMOVED.
>      * DO NOT USE! Use statusBar() instead 
>     */
>    void setStatusBar( KStatusBar *statusbar );

NO, NO, NO, NO!!!!! How do I work with classes Derived from KStatusBar?

>- modified functions:
>
>    /**
>     * Returns a pointer to the toolbar with the specified ID. 
>     * If there is no such tool bar yet, it will be generated
>     */
>    KToolBar *toolBar( int ID = 0 );

Why isn't there a setToolBar? How would I work with classes derived from
KToolBar???

>    /**
>     * Returns a pointer to the status bar. If there is no
>     * status bar yet, it will be generated
>     */
>    KStatusBar *statusBar();

What if I want to have a class derived from KStatusBar????

>With these few changes you can create a small toolbar inside
>a KTopLevelWidget with the following:
>
> toolBar()->insertButton(Icon("exit.xpm"),TOOLBAR_EXIT, true,"Exit");
> toolBar()->insertButton(Icon("fileopen.xpm"),TOOLBAR_OPEN, true,"Open File");
>
>This was the first toolbar (id 0). A second and third toolbar can be
>created with
>
> toolBar(1)->insertButton(Icon("exit.xpm"),TOOLBAR_EXIT, true,"Exit");
> toolBar(2)->insertButton(Icon("fileopen.xpm"),TOOLBAR_OPEN, true,"Open File");
>
>and so on. 

Very nice and easy, indeed. But you shouldn't have modifiede KTopLevelWidget for
it! It's not only binary incompatible, it's also breaks existing applications,
even if they are recompiled!!!! You should have invented a new class
KEasyTopLevelWidget (derived from KTopLevelWidget), which wouldn't be a problem
at all!!

Next time please think harder before you introduce such elementary changes!

-- Hannes

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

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