KParts
#include <statusbarextension.h>
Public Member Functions | |
StatusBarExtension (KParts::ReadOnlyPart *parent) | |
~StatusBarExtension () | |
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 |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Static Public Member Functions | |
static StatusBarExtension * | childObject (QObject *obj) |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Additional Inherited Members | |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
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 93 of file statusbarextension.cpp.
StatusBarExtension::~StatusBarExtension | ( | ) |
Definition at line 99 of file statusbarextension.cpp.
Member Function Documentation
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.
that the widget does not technically become a child of the StatusBarExtension in a QObject sense. However, it will be deleted when the StatusBarExtension is deleted.
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 166 of file statusbarextension.cpp.
|
static |
Queries obj
for a child object which inherits from this BrowserExtension class.
Convenience method.
Definition at line 114 of file statusbarextension.cpp.
Reimplemented from QObject.
Definition at line 119 of file statusbarextension.cpp.
void StatusBarExtension::removeStatusBarItem | ( | QWidget * | widget | ) |
Remove a widget from the statusbar for this part.
Definition at line 175 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 161 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:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:25:36 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.