Source: tabwidget.h


Annotated List
Files
Globals
Hierarchy
Index
/* $@KEC10@$ Generated by KEncoder 1.0
******************************************************************************
*  File Name  :  tabwidget.h  -  Tab widget using KitTabBar
*  Created on :  Wednesday, October 30, 2002
*  Product id :  KitClasses  version 1.1 - 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 _TABWIDGET_H_
#define _TABWIDGET_H_

#include "tabbar.h"

#include 

class QIconSet;

class KitTabWidgetPrivate;
/**
 * @short Tab widget using KitTabBar
 * @author Bruce Hunt  SuppCast@users.sourceforge.net
 */
class KitTabWidget : public QWidget
{

   Q_OBJECT

public:
   /**
    * Default constructor
    */
   KitTabWidget( QWidget * parent, const char * name = 0 );
   /**
    * Constructor with bar position
    */
   KitTabWidget( KitTabBar::Position pos, QWidget * parent, const char * name = 0 );
   /**
    * Destructor
    */
   ~KitTabWidget();
   /**
    * Adds a new tab with a label
    */
   void addPage( QWidget * page, const QString & label );
   /**
    * Adds a new tab with an icon and label
    */
   void addPage( QWidget * page, const QIconSet & icon, const QString & label );
   /**
    * Inserts a new tab with a label at index
    */
   void insertPage( QWidget * page, const QString & label, int index = -1 );
   /**
    * Inserts a new tab with an icon and label at index
    */
   void insertPage( QWidget * page, const QIconSet & icon, const QString & label, int index = -1 );
   /**
    * @return the current tab bar position
    */
   const KitTabBar::Position tabBarPos();
   /**
    * Sets the position of the tab bar
    */
   void setTabBarPos( KitTabBar::Position pos );
   /**
    * Get a pointer to the tab bar.
    */
   KitTabBar * tabBar();
   /**
    * Get a pointer to the current page widget.
    * @return the pointer to the current page widget
    */
   QWidget * currentPage();
   /**
    * Get a pointer to the page widget.
    * @param id the tab id
    * @return the pointer to the page widget
    */
   QWidget * page( int id );
   /**
    * Get the tab id.
    */
   int tabId( QWidget * page );
   /**
    * Sets the tooltip text for the tab.
    * @param page the pointer of the tab's page widget
    * @param tip the tooltip text for the tab
    */
   void setTabToolTip( QWidget * page, const QString & tip );
   /**
    * Removes the tooltip from the tab.
    * @param page the pointer of the tab's page widget
    */
   void removeTabToolTip( QWidget * page );
   /**
    * Sets the 'whats this' text for the tab.
    * @param page the pointer of the tab's page widget
    * @param text the 'whats this' text for the tab
    * @param both sets just tab if false or both tab and page if true
    */
   void setWhatsThis( QWidget * page, const QString & text, bool both = true );
   /**
    * Removes the 'whats this' from the tab.
    * @param page the pointer of the tab's page widget
    */
   void removeWhatsThis( QWidget * page );
   void setSizeHint( QSize size );
   QSize sizeHint() const;

public slots:
   /**
    * Show a page
    * @param pointer to the page widget
    */
   void showPage( QWidget * page );
   /**
    * Removes a tab. It does not delete the page widget.
    * @param page the pointer to the page
    */
   void removePage( QWidget * page );

signals:
   /**
    * @return pointer to the page widget
    */
   void aboutToShow( QWidget * page );
   /**
    * Emitted when the current page changes
    * @return pointer to the page widget
    */
   void currentChanged( QWidget * page );

protected:
   QSize minimumSizeHint() const;
   void resizeEvent( QResizeEvent * );

protected slots:

private:
   KitTabWidgetPrivate * k;

   void create( KitTabBar::Position pos );
   void createPage( QWidget * page, int id );
   void setSizes();

private slots:
   void showPage( int id );
   void toggled( int id, bool selected );
};

#endif

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