last API annoyance

Loïc Marteau loic.marteau at gmail.com
Sun Nov 2 23:55:35 CET 2008


Marco Martin wrote:
> Hi,
>
>   
About last API annoyance...

Is it BIC compatible to add some items in an enum ?
I think at :
/**
 * The popup position enumeration relatively to his attached widget
 *
 **/

enum PopupPlacement {
    FloatingPopup = 0,            /**< Free floating, non attached popup */
    TopPosedLeftAlignedPopup,     /**< Popup positioned on the top, aligned
                                     to the left of the wigdet */
    TopPosedRightAlignedPopup,    /**< Popup positioned on the top, aligned
                                     to the right of the widget */
    LeftPosedTopAlignedPopup,     /**< Popup positioned on the left, aligned
                                     to the right of the wigdet */
    LeftPosedBottomAlignedPopup,  /**< Popup positioned on the left, aligned
                                     to the bottom of the widget */
    BottomPosedLeftAlignedPopup,  /**< Popup positioned on the bottom, 
aligned
                                     to the left of the wigdet */
    BottomPosedRightAlignedPopup, /**< Popup positioned on the bottom, 
aligned
                                     to the right of the widget */
    RightPosedTopAlignedPopup,    /**< Popup positioned on the right, 
aligned
                                     to the top of the wigdet */
    RightPosedBottomAlignedPopup  /**< Popup positioned on the right, 
aligned
                                     to the bottom of the widget */
};

I would like to add in the near future things like 
TopPosedCenterAlignedPopup, etc.


The idea is that popupApplet try, in horizontal form factor, to center 
the popup (in the top or bottom of the icon of course)by default in 
updateDialogPosition().
If popupApplet really need fit law optimisation, we can let the plasmoid 
inform us of this need by calling a correct setter and then only we use 
a left or right Alignement for this case in updateDialogPosition .

(I see that tooltip are left aligned, shouldn't they be centered too ?).

About popupApplet, im still ask me why we dont emit a classical signal 
instead of using an event handler with :
virtual void PopupApplet::popupEvent(bool) ?


Cheers

Lo


More information about the Plasma-devel mailing list