Source: toolbar.h


Annotated List
Files
Globals
Hierarchy
Index
/*
******************************************************************************
*  File Name  :  toolbar.h  -  application header file
*  Created on :  Sunday, May 12, 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.
******************************************************************************
*    M o d i f i c a t i o n   L o g
*
*****************************************************************************/
#ifndef _KITTOOLBAR_H_
#define _KITTOOLBAR_H_

#include "icontextmenu.h"

#include 
#include 

class KitIconTextMenu;
class KitIconSizeMenu;
class KPopupMenu;
class KToolBar;
/**
 * KitToolBar is a stationary KToolBar that doesn't need a KMainWindow.
 *
 * It provides a popup context menu for icon size or text selection and
 * will save these settings in a KDE compatible format.
 *
 * @short A KDE toolbar that doesn't need a KMainWindow.
 * @author Bruce Hunt 
 */
class KitToolBar : public KToolBar
{
   Q_OBJECT
public:
   /**
    * Constructor
    */
   KitToolBar( QWidget *parentWidget, const char *widgetName,
         bool honorStyle = false, bool readConfig = true );
   /**
    * Destructor
    */
   ~KitToolBar();
   /**
    * Apply saved toolbar settings.
    * @param grp the configuration file group name
    */
   void applySettings( KConfig * config, const QString & grp );
   /**
    * Save toolbar settings.
    * @param grp the configuration file group name
    */
   void saveSettings( KConfig * config, const QString & grp );
   /**
    * Set button text.
    * @param id the button id
    * @param text the button text
    * @param tip use button tooltip
    */
   void setButtonText( int id, const QString & text, bool tip = true );
   /**
    * Set button text.
    * @param id the button id
    * @param text the button tooltip text
    */
   void setToolTip( int id, const QString & text );
   /**
    * @return the size policy of the toolbar
    */
   QSizePolicy sizePolicy() const;

protected:
   virtual void mousePressEvent( QMouseEvent * );

private:
   int iIconSizeItm;

   KPopupMenu * puMnu;
   KitIconTextMenu * puTpm;
   KitIconSizeMenu * puIsm;

   void createPopup();

private slots:
   void slotSetIconSize( int );
   void slotSetIconText( KitIconTextMenu::IconText );
};

#endif

Generated by: bhunt on Lurch on Sun Nov 24 02:45:27 2002, using kdoc 2.0a54.