|
|
/* ****************************************************************************** * xFile Name : icontextmenu.h - application header file * Created on : Thursday, June 27, 2002 * Product id : KitClasses version 1.0 - KInterDev Add-on Classes for KDE * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * Copyright : © 2002 by Bruce Hunt Supporting Cast * Email : SuppCast@users.sourceforge.net * Web site : http://kinterdev.sourceforge.net ****************************************************************************** * This program is being provided under the LICENSING terms and conditions as * specified in the file "COPYING" which has been included with this software * package. This program is distributed WITHOUT ANY WARRANTY, without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ****************************************************************************** * D e v e l o p e r N o t e s * Add the MenuText enums together to determine which menu entries to present ****************************************************************************** * M o d i f i c a t i o n L o g * *****************************************************************************/ #ifndef KIT_ICONTEXTMENU_H #define KIT_ICONTEXTMENU_H #include/** * KitIconTextMenu creates a popup context menu to select icon text positions. * It is similar to the context menus used by KDE tool bars. * * @short A popup context menu for icon text position selection. * @author Bruce Hunt */ class KitIconTextMenu : public KPopupMenu { Q_OBJECT public: /** * Icon text placement */ enum IconText{ IconOnly, IconTextRight, TextOnly, IconTextBottom }; /** * The menu entries to include in the popup. Combine entries and pass to the constructor. */ enum MenuEntries{ EntIconOnly = 1, EntTextOnly = 2, EntTextAside = 4, EntTextUnder = 8, EntAll = 15 }; /** * Default constructor */ KitIconTextMenu( QWidget *parent = 0, int ent = KitIconTextMenu::EntAll, const char *name = 0 ); /** * Constructor with a popup menu title */ KitIconTextMenu( const QString & title, QWidget *parent = 0, int ent = KitIconTextMenu:: EntAll, const char *name = 0 ); /** * Destructor */ ~KitIconTextMenu(); /** * @return the current icon setting. */ IconText iconText(); public slots: /** * Sets the icon text position * @param it icon text position */ void setIconText( IconText it ); signals: /** * Emitted when a menu selection is made. */ void iconTextSelected( KitIconTextMenu::IconText it ); protected: /** * Empty method for sub-classed processing. * Processed just before iconTextSelected is emitted. */ void processSelected( IconText it ); private: IconText itCurIconText; void createMenu( int ent ); private slots: void pumIconOnly(); void pumTextOnly(); void pumTextAside(); void pumTextUnder(); }; #endif
Generated by: bhunt on Lurch on Sun Nov 24 02:45:27 2002, using kdoc 2.0a54. |