|
|
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:
barId | the id of the bar to add the button to |
icon | the name of the icon of the button |
text | the button text |
tip | the button tooltip |
id | the id of the button (if -1 the group button count is used for the id) |
quit | the 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:
barId | the id of the bar to add the button to |
id | the id of the button |
icon | the name of the icon of the button |
text | the button text |
tip | the button tooltip |
void removeButton ( int barId, int id )
| removeButton |
Remove an existing button.
Parameters:
barId | the id of the bar to add the button to |
id | the 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:
barId | the id of the bar |
btnId | the id of the button |
on | sets status of the button |
Returns: true if removed
int createButtonBar ( const QString text, int id = -1 )
| createButtonBar |
Creates a button sidebar group
Parameters:
text | the button text. |
id | the 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:
barId | the id of the bar |
Returns: the pointer of the bar button group
void showBar ( int barId )
| showBar |
Shows a sidebar group.
Parameters:
barId | the 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:
group | then configuration file group name |
void saveSettings ( KConfig * config, const QString group = "Sidebar" )
| saveSettings |
Saves the current settings - does not save the sidebar contents.
Parameters:
group | then 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:
barId | the id of the bar |
btnId | the 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:
barId | the id of the bar |
void buttonClicked ( int barId, int btnId )
| buttonClicked |
[signal]
Sidebar button clicked
Parameters:
barId | the id of the bar |
btnId | the 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.