• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KParts

KParts::StatusBarExtension

KParts::StatusBarExtension Class Reference

an extension for KParts that allows more sophisticated statusbar handling More...

#include <statusbarextension.h>

Inheritance diagram for KParts::StatusBarExtension:
QObject

List of all members.

Public Member Functions

void addStatusBarItem (QWidget *widget, int stretch, bool permanent)
virtual bool eventFilter (QObject *watched, QEvent *ev)
void removeStatusBarItem (QWidget *widget)
void setStatusBar (KStatusBar *status)
KStatusBar * statusBar () const
 StatusBarExtension (KParts::ReadOnlyPart *parent)
 ~StatusBarExtension ()

Static Public Member Functions

static StatusBarExtension * childObject (QObject *obj)

Detailed Description

an extension for KParts that allows more sophisticated statusbar handling

Every part can use this class to customize the statusbar as long as it is active. Add items via addStatusBarItem and remove an item with removeStatusBarItem.

IMPORTANT: do NOT add any items immediately after constructing the extension. Give the application time to set the statusbar in the extension if necessary.

Definition at line 52 of file statusbarextension.h.


Constructor & Destructor Documentation

StatusBarExtension::StatusBarExtension ( KParts::ReadOnlyPart *  parent  ) 

Definition at line 90 of file statusbarextension.cpp.

StatusBarExtension::~StatusBarExtension (  ) 

Definition at line 96 of file statusbarextension.cpp.


Member Function Documentation

void StatusBarExtension::addStatusBarItem ( QWidget *  widget,
int  stretch,
bool  permanent 
)

This adds a widget to the statusbar for this part.

If you use this method instead of using statusBar() directly, this extension will take care of removing the items when the parts GUI is deactivated and will re-add them when it is reactivated. The parameters are the same as QStatusBar::addWidget().

Note that you can't use KStatusBar methods (inserting text items by id) but you can create a KStatusBarLabel with a dummy id instead, and use it directly in order to get the same look and feel.

Parameters:
widget the widget to add
stretch the stretch factor. 0 for a minimum size.
permanent passed to QStatusBar::addWidget as the "permanent" bool. Note that the item isn't really permanent though, it goes away when the part is unactivated. This simply controls where temporary messages hide the widget, and whether it's added to the left or to the right side.

IMPORTANT: do NOT add any items immediately after constructing the extension. Give the application time to set the statusbar in the extension if necessary.

Definition at line 165 of file statusbarextension.cpp.

StatusBarExtension * StatusBarExtension::childObject ( QObject *  obj  )  [static]

Queries obj for a child object which inherits from this BrowserExtension class.

Convenience method.

Definition at line 102 of file statusbarextension.cpp.

bool StatusBarExtension::eventFilter ( QObject *  watched,
QEvent *  ev 
) [virtual]

For internal use only.

Definition at line 120 of file statusbarextension.cpp.

void StatusBarExtension::removeStatusBarItem ( QWidget *  widget  ) 

Remove a widget from the statusbar for this part.

Definition at line 174 of file statusbarextension.cpp.

void StatusBarExtension::setStatusBar ( KStatusBar *  status  ) 

This allows the hosting application to set a particular KStatusBar for this part.

If it doesn't do this, the statusbar used will be the one of the KMainWindow in which the part is embedded. Konqueror uses this to assign a view-statusbar to the part. The part should never call this method!

Definition at line 160 of file statusbarextension.cpp.

KStatusBar * StatusBarExtension::statusBar (  )  const
Returns:
the statusbar of the KMainWindow in which this part is currently embedded. WARNING: this could return 0L

Definition at line 149 of file statusbarextension.cpp.


The documentation for this class was generated from the following files:
  • statusbarextension.h
  • statusbarextension.cpp

KParts

Skip menu "KParts"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal