KParts
partmanager.cpp
168 if (ev->type() != QEvent::MouseButtonPress && ev->type() != QEvent::MouseButtonDblClick && ev->type() != QEvent::FocusIn) {
178 if (((w->windowFlags().testFlag(Qt::Dialog)) && w->isModal()) || (w->windowFlags().testFlag(Qt::Popup)) || (w->windowFlags().testFlag(Qt::Tool))) {
186 qCDebug(KPARTSLOG) << "PartManager::eventFilter button:" << mev->button() << "d->m_activationButtonMask=" << d->m_activationButtonMask;
233 qCDebug(KPARTSLOG) << "Part" << part << "(non-selectable) made active because" << w->metaObject()->className() << "got event" << evType;
245 qCDebug(KPARTSLOG) << "Part" << part << "made active because" << w->metaObject()->className() << "got event" << evType;
257 if (w && (((w->windowFlags() & Qt::Dialog) && w->isModal()) || (w->windowFlags() & Qt::Popup) || (w->windowFlags() & Qt::Tool))) {
258 qCDebug(KPARTSLOG) << "No part made active although" << obj->objectName() << "/" << obj->metaObject()->className() << "got event - loop aborted";
264 qCDebug(KPARTSLOG) << "No part made active although" << obj->objectName() << "/" << obj->metaObject()->className() << "got event - loop aborted";
346 // qCDebug(KPARTSLOG) << "replacePart" << oldPart->name() << "->" << newPart->name() << "setActive=" << setActive;
347 // This methods does exactly removePart + addPart but without calling setActivePart(0) in between
349 qFatal("Can't remove part %s, not in KPartManager's list.", oldPart->objectName().toLocal8Bit().constData());
368 // check whether nested parts are disallowed and activate the top parent part then, by traversing the
379 qCDebug(KPARTSLOG) << "PartManager::setActivePart d->m_activePart=" << d->m_activePart << "<->part=" << part << "d->m_activeWidget=" << d->m_activeWidget
383 if (d->m_activePart && part && d->m_activePart == part && (!widget || d->m_activeWidget == widget)) {
This event is sent by the part manager when the active part changes.
Definition partactivateevent.h:33
void setIgnoreScrollBars(bool ignore)
Specifies whether the partmanager should ignore mouse click events for scrollbars or not.
Definition partmanager.cpp:146
short int activationButtonMask() const
Definition partmanager.cpp:161
void partAdded(KParts::Part *part)
Emitted when a new part has been added.
virtual void removePart(Part *part)
Removes a part from the manager (this does not delete the object) .
Definition partmanager.cpp:326
void setActivationButtonMask(short int buttonMask)
Specifies which mouse buttons the partmanager should react upon.
Definition partmanager.cpp:156
virtual QWidget * activeWidget() const
Returns the active widget of the current active part (see activePart ).
Definition partmanager.cpp:433
bool eventFilter(QObject *obj, QEvent *ev) override
Definition partmanager.cpp:166
SelectionPolicy
Selection policy. The default policy of a PartManager is Direct.
Definition partmanager.h:44
virtual void replacePart(Part *oldPart, Part *newPart, bool setActive=true)
Replaces oldPart with newPart, and sets newPart as active if setActive is true.
Definition partmanager.cpp:344
void setSelectionPolicy(SelectionPolicy policy)
Sets the selection policy of the partmanager.
Definition partmanager.cpp:126
const QList< Part * > parts() const
Returns the list of parts being managed by the partmanager.
Definition partmanager.cpp:453
void activePartChanged(KParts::Part *newPart)
Emitted when the active part has changed.
virtual void setActivePart(Part *part, QWidget *widget=nullptr)
Sets the active part.
Definition partmanager.cpp:361
void slotManagedTopLevelWidgetDestroyed()
Definition partmanager.cpp:477
void setIgnoreExplictFocusRequests(bool)
Sets whether the PartManager ignores explicit set focus requests from the part.
Definition partmanager.cpp:488
void removeManagedTopLevelWidget(const QWidget *topLevel)
Removes the topLevel widget from the list of managed toplevel widgets.
Definition partmanager.cpp:472
virtual void addPart(Part *part, bool setActive=true)
Adds a part to the manager.
Definition partmanager.cpp:290
void setAllowNestedParts(bool allow)
Specifies whether the partmanager should handle/allow nested parts or not.
Definition partmanager.cpp:136
void partRemoved(KParts::Part *part)
Emitted when a part has been removed.
void addManagedTopLevelWidget(const QWidget *topLevel)
Adds the topLevel widget to the list of managed toplevel widgets.
Definition partmanager.cpp:458
virtual Part * hitTest(QWidget *widget, const QPoint &globalPos)
Returns the part (this, or a child part) at the given global position.
Definition part.cpp:101
bool sendEvent(QObject *receiver, QEvent *event)
MouseButtonPress
Type type() const const
Qt::FocusReason reason() const const
const char * className() const const
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void destroyed(QObject *obj)
bool disconnect(const QMetaObject::Connection &connection)
void installEventFilter(QObject *filterObj)
bool isWidgetType() const const
virtual const QMetaObject * metaObject() const const
objectName
QObject * parent() const const
T qobject_cast(QObject *object)
QObject * sender() const const
QPoint toPoint() const const
Qt::MouseButton button() const const
QPointF globalPosition() const const
NoFocus
OtherFocusReason
LeftButton
Dialog
QWidget * topLevelWidget() const const
focusPolicy
bool isWindow() const const
bool isModal() const const
QWidget * parentWidget() const const
windowFlags
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 12:00:53 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 12:00:53 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.