![]() |
Qt 6.x
The Qt SDK
|
#include <qdockwidget_p.h>
Static Public Member Functions | |
static Qt::DockWidgetArea | toDockWidgetArea (QInternal::DockPosition pos) |
![]() | |
static QWidgetPrivate * | get (QWidget *w) |
static const QWidgetPrivate * | get (const QWidget *w) |
static void | checkRestoredGeometry (const QRect &availableGeometry, QRect *restoredGeometry, int frameHeight) |
static void | adjustFlags (Qt::WindowFlags &flags, QWidget *w=nullptr) |
static QWidget * | parentGraphicsView (const QWidget *widget) |
static QRect | screenGeometry (const QWidget *widget) |
static QRect | availableScreenGeometry (const QWidget *widget) |
static QScreen * | screen (const QWidget *widget, const QPoint &globalPosition, bool hasPosition=true) |
static QRect | screenGeometry (const QWidget *widget, const QPoint &globalPosition, bool hasPosition=true) |
static QRect | availableScreenGeometry (const QWidget *widget, const QPoint &globalPosition, bool hasPosition=true) |
static void | sendComposeStatus (QWidget *w, bool end) |
static void | setWidgetParentHelper (QObject *widgetAsObject, QObject *newParent) |
![]() | |
static bool | removeConnection (Connection *c) |
static QObjectPrivate * | get (QObject *o) |
static const QObjectPrivate * | get (const QObject *o) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot) |
static QMetaObject::Connection | connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static bool | disconnect (const QObject *sender, int signal_index, void **slot) |
static bool | disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot) |
Additional Inherited Members | |
![]() | |
enum | DrawWidgetFlag { DrawAsRoot = 0x01 , DrawPaintOnScreen = 0x02 , DrawRecursive = 0x04 , DrawInvisible = 0x08 , DontSubtractOpaqueChildren = 0x10 , DontDrawOpaqueChildren = 0x20 , DontDrawNativeChildren = 0x40 , DontSetCompositionMode = 0x80 , UseEffectRegionBounds = 0x100 } |
enum | Direction { DirectionNorth = 0x01 , DirectionEast = 0x10 , DirectionSouth = 0x02 , DirectionWest = 0x20 } |
enum class | WindowHandleMode { Direct , Closest , TopLevel } |
enum | CloseMode { CloseNoEvent , CloseWithEvent , CloseWithSpontaneousEvent } |
![]() | |
typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
using | ConnectionDataPointer = QExplicitlySharedDataPointer< ConnectionData > |
![]() | |
static QWidgetMapper * | mapper = nullptr |
static QWidgetSet * | allWidgets = nullptr |
static int | instanceCounter = 0 |
static int | maxInstances = 0 |
Definition at line 38 of file qdockwidget_p.h.
void QDockWidgetPrivate::_q_toggleTopLevel | ( | ) |
Definition at line 732 of file qdockwidget.cpp.
Referenced by init(), mouseDoubleClickEvent(), and nonClientAreaMouseEvent().
void QDockWidgetPrivate::_q_toggleView | ( | bool | b | ) |
Definition at line 684 of file qdockwidget.cpp.
Referenced by init().
Ends the drag end drop operation of the QDockWidget. The abort parameter specifies that it ends because of programmatic state reset rather than mouse release event.
Definition at line 824 of file qdockwidget.cpp.
References area(), QDockWidget::DockWidgetFloatable, hasFeature(), QWidgetPrivate::layout, mainwindow_from_dock(), QDockWidgetLayout::nativeWindowDeco(), Qt::NoDockWidgetArea, QMainWindowLayout::plug(), Q_ASSERT, qt_mainwindow_layout(), QMainWindowLayout::restore(), QMainWindowLayout::revert(), setResizerActive(), state, toDockWidgetArea(), and undockedGeometry.
Referenced by mouseReleaseEvent(), nonClientAreaMouseEvent(), and startDrag().
void QDockWidgetPrivate::init | ( | ) |
Definition at line 623 of file qdockwidget.cpp.
References _q_toggleTopLevel(), _q_toggleView(), button, QWidgetPrivate::close(), QDockWidgetLayout::CloseButton, QObject::connect(), fixedWindowTitle, QDockWidgetLayout::FloatButton, QApplication::font(), font, QWidgetPrivate::layout, QAction::NoRole, qt_setWindowTitle_helperHelper(), QAction::setCheckable(), QAction::setMenuRole(), QLayout::SetMinAndMaxSize, QObject::setObjectName(), QLayout::setSizeConstraint(), QAction::setText(), SIGNAL, SLOT, toggleViewAction, and updateButtons().
Initialize the drag state structure and remember the position of the click. This is called when the mouse is pressed, but the dock is not yet dragged out.
nca specify that the event comes from NonClientAreaMouseButtonPress
Definition at line 744 of file qdockwidget.cpp.
References QWidgetPrivate::layout, pos, Q_ASSERT, qt_mainwindow_layout_from_dock(), and state.
Referenced by mousePressEvent(), and nonClientAreaMouseEvent().
bool QDockWidgetPrivate::isAnimating | ( | ) | const |
Definition at line 902 of file qdockwidget.cpp.
References QMainWindowLayout::pluggingWidget, and qt_mainwindow_layout_from_dock().
Referenced by mousePressEvent(), and nonClientAreaMouseEvent().
bool QDockWidgetPrivate::mouseDoubleClickEvent | ( | QMouseEvent * | event | ) |
Definition at line 949 of file qdockwidget.cpp.
References _q_toggleTopLevel(), QRect::contains(), QDockWidget::DockWidgetFloatable, hasFeature(), QWidgetPrivate::layout, Qt::LeftButton, QDockWidgetLayout::nativeWindowDeco(), and QDockWidgetLayout::titleArea().
bool QDockWidgetPrivate::mouseMoveEvent | ( | QMouseEvent * | event | ) |
Definition at line 965 of file qdockwidget.cpp.
References QScreen::handle(), QMainWindowLayout::hover(), QWidgetPrivate::layout, QMargins::left(), QHighDpiScaling::mapPositionFromNative(), QHighDpiScaling::mapPositionToNative(), QDockWidgetLayout::nativeWindowDeco(), QObjectData::parent, QMainWindowLayout::pluggingWidget, pos, Q_LIKELY, qCDebug, qt_mainwindow_layout_from_dock(), ret, QGuiApplication::screenAt(), startDrag(), QApplication::startDragDistance, state, QMargins::top(), QWidgetPrivate::windowHandle(), and QPoint::x().
bool QDockWidgetPrivate::mousePressEvent | ( | QMouseEvent * | event | ) |
Definition at line 913 of file qdockwidget.cpp.
References QRect::contains(), Qt::ControlModifier, QDockWidget::DockWidgetFloatable, QDockWidget::DockWidgetMovable, hasFeature(), initDrag(), isAnimating(), QWidgetPrivate::layout, Qt::LeftButton, QDockWidgetLayout::nativeWindowDeco(), QObjectData::parent, state, and QDockWidgetLayout::titleArea().
bool QDockWidgetPrivate::mouseReleaseEvent | ( | QMouseEvent * | event | ) |
Definition at line 1056 of file qdockwidget.cpp.
References endDrag(), Qt::LeftButton, and state.
void QDockWidgetPrivate::moveEvent | ( | QMoveEvent * | event | ) |
Called when the QDockWidget or the QDockWidgetGroupWindow is moved
Definition at line 1139 of file qdockwidget.cpp.
References QWidgetPrivate::layout, QObjectData::parent, Q_ASSERT, qt_mainwindow_layout_from_dock(), and state.
void QDockWidgetPrivate::nonClientAreaMouseEvent | ( | QMouseEvent * | event | ) |
Definition at line 1073 of file qdockwidget.cpp.
References _q_toggleTopLevel(), QRect::adjust(), QRect::contains(), Qt::ControlModifier, QDockWidget::DockWidgetMovable, endDrag(), QWidget::frameGeometry, QWidget::geometry, hasFeature(), initDrag(), isAnimating(), QRect::left(), QEvent::NonClientAreaMouseButtonDblClick, QEvent::NonClientAreaMouseButtonPress, QEvent::NonClientAreaMouseButtonRelease, QEvent::NonClientAreaMouseMove, QObjectData::parent, QStyle::PM_DockWidgetFrameWidth, QRect::right(), QRect::setBottom(), QRect::setLeft(), QRect::setRight(), startDrag(), state, QRect::top(), and QWidget::topLevelWidget().
Definition at line 1173 of file qdockwidget.cpp.
References rect, and setWindowState().
void QDockWidgetPrivate::recalculatePressPos | ( | QResizeEvent * | event | ) |
Definition at line 1130 of file qdockwidget.cpp.
References state.
void QDockWidgetPrivate::setResizerActive | ( | bool | active | ) |
Definition at line 893 of file qdockwidget.cpp.
References QWidgetResizeHandler::setEnabled().
Referenced by endDrag(), and setWindowState().
void QDockWidgetPrivate::setWindowState | ( | bool | floating, |
bool | unplug = false , |
||
const QRect & | rect = QRect() |
||
) |
Definition at line 1178 of file qdockwidget.cpp.
References Qt::CustomizeWindowHint, QDockWidget::DockWidgetClosable, emit, Qt::FramelessWindowHint, hasFeature(), QWidgetPrivate::layout, QDockWidgetLayout::nativeWindowDeco(), Qt::NoDockWidgetArea, QObjectData::parent, qt_mainwindow_layout_from_dock(), rect, setResizerActive(), Qt::Tool, unplug(), updateButtons(), Qt::Widget, Qt::WindowCloseButtonHint, Qt::WindowTitleHint, and Qt::X11BypassWindowManagerHint.
Referenced by plug(), and unplug().
void QDockWidgetPrivate::startDrag | ( | bool | group = true | ) |
Actually start the drag and detach the dockwidget. The group parameter is true when we should potentially drag a group of tabbed widgets, and false if the dock widget should always be dragged alone.
Definition at line 773 of file qdockwidget.cpp.
References endDrag(), Qt::IgnoreAction, QWidgetPrivate::layout, QObjectData::parent, Q_ASSERT, qt_mainwindow_layout_from_dock(), and state.
Referenced by mouseMoveEvent(), and nonClientAreaMouseEvent().
|
static |
Definition at line 881 of file qdockwidget.cpp.
References QInternal::BottomDock, Qt::BottomDockWidgetArea, QInternal::LeftDock, Qt::LeftDockWidgetArea, Qt::NoDockWidgetArea, pos, QInternal::RightDock, Qt::RightDockWidgetArea, QInternal::TopDock, and Qt::TopDockWidgetArea.
Referenced by endDrag().
Definition at line 1162 of file qdockwidget.cpp.
References QWidgetPrivate::layout, QDockWidgetLayout::nativeWindowDeco(), rect, setWindowState(), and QDockWidgetLayout::titleHeight().
Referenced by setWindowState().
void QDockWidgetPrivate::updateButtons | ( | ) |
Definition at line 695 of file qdockwidget.cpp.
References button, QDockWidgetLayout::CloseButton, QDockWidget::DockWidgetClosable, QDockWidget::DockWidgetFloatable, QDockWidgetLayout::FloatButton, hasFeature(), QLayout::invalidate(), QWidgetPrivate::layout, QDockWidgetLayout::nativeWindowDeco(), opt, QAbstractButton::setIcon(), QWidget::setVisible(), QStyle::SP_TitleBarCloseButton, QStyle::SP_TitleBarNormalButton, QDockWidgetLayout::TitleBar, and QDockWidgetLayout::widgetForRole().
Referenced by init(), and setWindowState().
Qt::DockWidgetAreas QDockWidgetPrivate::allowedAreas = Qt::AllDockWidgetAreas |
Definition at line 69 of file qdockwidget_p.h.
QString QDockWidgetPrivate::dockedWindowTitle |
Definition at line 80 of file qdockwidget_p.h.
QDockWidget::DockWidgetFeatures QDockWidgetPrivate::features |
Definition at line 67 of file qdockwidget_p.h.
QString QDockWidgetPrivate::fixedWindowTitle |
Definition at line 79 of file qdockwidget_p.h.
Referenced by init().
QFont QDockWidgetPrivate::font |
Definition at line 71 of file qdockwidget_p.h.
Referenced by init().
DragState* QDockWidgetPrivate::state = nullptr |
Definition at line 65 of file qdockwidget_p.h.
Referenced by endDrag(), initDrag(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), moveEvent(), nonClientAreaMouseEvent(), recalculatePressPos(), and startDrag().
Definition at line 74 of file qdockwidget_p.h.
Referenced by init().
QRect QDockWidgetPrivate::undockedGeometry |
Definition at line 78 of file qdockwidget_p.h.
Referenced by endDrag().