class KitSideBar

A sidebar with toolbutton functionality. More...

Definition#include <sidebar.h>
InheritsQFrame (qt) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Slots

Signals

Protected Methods

Protected Slots


Detailed Description

KitSideBar is a widget similar to a toolbar in functionality but in a sidebar fashion.

The buttons in this sidebar are tied to the KDE environment. Thus when "default" is selected on the icon size menu the Desktop icon size from the control center is used for the icon size in the application group bar. The bar width is calculated from the fontmetrics of the icon text string and is derived from font settings in the KDE control center..

 KitSideBar ( QWidget * parent, const char * name = 0 )

KitSideBar

Constructor

 ~KitSideBar ()

~KitSideBar

Destructor

int  iconSize ()

iconSize

Returns: the current icon size - this is the actual icon size

int  iconSizeSetting ()

iconSizeSetting

Returns: the current icon size selected - this could be 0 for Default

KitIconTextMenu::IconText  iconText ()

iconText

Returns: the icon text setting

int  addButton ( int barId, const QString icon, const QString text, const QString tip = QString::null, int id = -1, bool quit = false )

addButton

Adds a button to a sidebar.

Parameters:
barIdthe id of the bar to add the button to
iconthe name of the icon of the button
textthe button text
tipthe button tooltip
idthe id of the button (if -1 the group button count is used for the id)
quitthe button is a "quit application" button (kapp->quit())

Returns: the id of the button

void  changeButton ( int barId, int id, const QString icon, const QString text, const QString tip = QString::null )

changeButton

Change an existing button.

Parameters:
barIdthe id of the bar to add the button to
idthe id of the button
iconthe name of the icon of the button
textthe button text
tipthe button tooltip

void  removeButton ( int barId, int id )

removeButton

Remove an existing button.

Parameters:
barIdthe id of the bar to add the button to
idthe id of the button

void  setDown ( int barId, int btnId, bool down )

setDown

Sets a sidebar button status. This method will not emit button clicked() or pressed() signals.

Parameters:
barIdthe id of the bar
btnIdthe id of the button
onsets status of the button

Returns: true if removed

int  createButtonBar ( const QString text, int id = -1 )

createButtonBar

Creates a button sidebar group

Parameters:
textthe button text.
idthe id of the button bar

Returns: the id of the bar created

int  currentBar ()

currentBar

Returns: the id of the currently visable bar or -1 if no bar exists

QButtonGroup *  getBarPtr ( int barId )

getBarPtr

Get pointer to a bar.

Parameters:
barIdthe id of the bar

Returns: the pointer of the bar button group

void  showBar ( int barId )

showBar

Shows a sidebar group.

Parameters:
barIdthe id of the bar

void  createClipTray ()

createClipTray

Not yet implemented

void  applySettings ( KConfig * config, const QString group = "Sidebar" )

applySettings

Applies the saved configuration settings.

Parameters:
groupthen configuration file group name

void  saveSettings ( KConfig * config, const QString group = "Sidebar" )

saveSettings

Saves the current settings - does not save the sidebar contents.

Parameters:
groupthen configuration file group name

void  setButton ( int barId, int btnId )

setButton

[slot]

Sets a sidebar button down. This method emits button clicked() and pressed() signals.

Parameters:
barIdthe id of the bar
btnIdthe id of the button

void  setIconSize ( int size )

setIconSize

[slot]

Sets the icon size

void  setIconText ( KitIconTextMenu::IconText it )

setIconText

[slot]

Sets the icon text position

void  barActivated ( int barId )

barActivated

[signal]

Sidebar group activated.

Parameters:
barIdthe id of the bar

void  buttonClicked ( int barId, int btnId )

buttonClicked

[signal]

Sidebar button clicked

Parameters:
barIdthe id of the bar
btnIdthe id of the button

void  hidden ()

hidden

[signal]

Emitted when the sidebar is hidden

void  mouseReleaseEvent ( QMouseEvent * event )

mouseReleaseEvent

[protected]

Used for RMB event to display popup menu

void  showPopup ()

showPopup

[protected slots slot]

Shows the RMB popup menu.

void  pumHide ()

pumHide

[protected slots slot]

Hides the entire sidebar.