Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <qdockwidget_p.h>
Static Public Member Functions | |
static Qt::DockWidgetArea | toDockWidgetArea (QInternal::DockPosition pos) |
Static Public Member Functions inherited from QWidgetPrivate | |
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 | insertIntoFocusChain (const QWidgetList &toBeInserted, FocusDirection direction, QWidget *position) |
static QWidgetList | takeFromFocusChain (QWidget *from, QWidget *to, FocusDirection direction=FocusDirection::Next) |
Static Public Member Functions inherited from QObjectPrivate | |
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 | |
Static Public Attributes inherited from QWidgetPrivate | |
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.
|
strong |
Enumerator | |
---|---|
Group | |
Widget | |
Group |
Definition at line 54 of file qdockwidget_p.h.
|
strong |
Enumerator | |
---|---|
Group | |
Widget | |
Group |
Definition at line 39 of file qmainwindowlayout_p.h.
|
strong |
Enumerator | |
---|---|
LocationChange | |
Abort |
Definition at line 59 of file qdockwidget_p.h.
void QDockWidgetPrivate::endDrag | ( | EndDragMode | mode | ) |
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 806 of file qdockwidget.cpp.
References Abort, QWidget::activateWindow(), area(), QDockWidget::DockWidgetFloatable, hasFeature(), QWidgetPrivate::layout, LocationChange, mainwindow_from_dock(), Qt::NoDockWidgetArea, Q_ASSERT, qt_mainwindow_layout(), setResizerActive(), state, toDockWidgetArea(), and undockedGeometry.
Referenced by mouseReleaseEvent(), nonClientAreaMouseEvent(), and startDrag().
void QDockWidgetPrivate::init | ( | ) |
Definition at line 602 of file qdockwidget.cpp.
References button, QAbstractButton::clicked(), QWidget::close(), QDockWidgetLayout::CloseButton, QObject::connect(), QObjectPrivate::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(), toggleTopLevel(), toggleView(), toggleViewAction, QAction::triggered(), 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 724 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 897 of file qdockwidget.cpp.
References qt_mainwindow_layout_from_dock().
Referenced by mousePressEvent(), and nonClientAreaMouseEvent().
bool QDockWidgetPrivate::isTabbed | ( | ) | const |
Definition at line 960 of file qdockwidget.cpp.
References Q_ASSERT, and qt_mainwindow_layout_from_dock().
Referenced by mouseMoveEvent().
bool QDockWidgetPrivate::mouseDoubleClickEvent | ( | QMouseEvent * | event | ) |
Definition at line 944 of file qdockwidget.cpp.
References QRect::contains(), QDockWidget::DockWidgetFloatable, hasFeature(), QWidgetPrivate::layout, Qt::LeftButton, and toggleTopLevel().
bool QDockWidgetPrivate::mouseMoveEvent | ( | QMouseEvent * | event | ) |
Definition at line 969 of file qdockwidget.cpp.
References Group, isTabbed(), QWidgetPrivate::layout, QHighDpiScaling::mapPositionFromNative(), QHighDpiScaling::mapPositionToNative(), QObjectData::parent, pos, Q_LIKELY, qCDebug, qt_mainwindow_layout_from_dock(), ret, QGuiApplication::screenAt(), startDrag(), QApplication::startDragDistance, state, Widget, QWidgetPrivate::windowHandle(), and QPoint::x().
bool QDockWidgetPrivate::mousePressEvent | ( | QMouseEvent * | event | ) |
Definition at line 908 of file qdockwidget.cpp.
References QRect::contains(), Qt::ControlModifier, QDockWidget::DockWidgetFloatable, QDockWidget::DockWidgetMovable, hasFeature(), initDrag(), isAnimating(), QWidgetPrivate::layout, Qt::LeftButton, QObjectData::parent, and state.
bool QDockWidgetPrivate::mouseReleaseEvent | ( | QMouseEvent * | event | ) |
Definition at line 1061 of file qdockwidget.cpp.
References endDrag(), Qt::LeftButton, LocationChange, and state.
void QDockWidgetPrivate::moveEvent | ( | QMoveEvent * | event | ) |
Called when the QDockWidget or the QDockWidgetGroupWindow is moved
Definition at line 1145 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 1080 of file qdockwidget.cpp.
References QRect::adjust(), QRect::contains(), Qt::ControlModifier, QDockWidget::DockWidgetMovable, endDrag(), QWidget::frameGeometry, QWidget::geometry, Group, hasFeature(), initDrag(), isAnimating(), LocationChange, QEvent::NonClientAreaMouseButtonDblClick, QEvent::NonClientAreaMouseButtonPress, QEvent::NonClientAreaMouseButtonRelease, QEvent::NonClientAreaMouseMove, QObjectData::parent, QStyle::PM_DockWidgetFrameWidth, QRect::setBottom(), QRect::setLeft(), QRect::setRight(), startDrag(), state, toggleTopLevel(), and QWidget::topLevelWidget().
Definition at line 1179 of file qdockwidget.cpp.
References rect, and setWindowState().
void QDockWidgetPrivate::recalculatePressPos | ( | QResizeEvent * | event | ) |
Definition at line 1136 of file qdockwidget.cpp.
References QPoint::setX(), state, and QPoint::x().
void QDockWidgetPrivate::setResizerActive | ( | bool | active | ) |
Definition at line 884 of file qdockwidget.cpp.
References QWidgetPrivate::layout, and QWidgetResizeHandler::setEnabled().
Referenced by endDrag(), and setWindowState().
void QDockWidgetPrivate::setWindowState | ( | bool | floating, |
bool | unplug = false, | ||
const QRect & | rect = QRect() ) |
Definition at line 1184 of file qdockwidget.cpp.
References Qt::CustomizeWindowHint, QDockWidget::DockWidgetClosable, emit, Qt::FramelessWindowHint, hasFeature(), QWidgetPrivate::layout, 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().
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 753 of file qdockwidget.cpp.
References endDrag(), Qt::IgnoreAction, QWidgetPrivate::layout, LocationChange, QObjectData::parent, Q_ASSERT, qt_mainwindow_layout_from_dock(), and state.
Referenced by mouseMoveEvent(), and nonClientAreaMouseEvent().
|
static |
Definition at line 872 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().
void QDockWidgetPrivate::toggleTopLevel | ( | ) |
Definition at line 712 of file qdockwidget.cpp.
Referenced by init(), mouseDoubleClickEvent(), and nonClientAreaMouseEvent().
void QDockWidgetPrivate::toggleView | ( | bool | b | ) |
Definition at line 664 of file qdockwidget.cpp.
Referenced by init().
Definition at line 1168 of file qdockwidget.cpp.
References QWidgetPrivate::layout, QRect::moveTopLeft(), rect, and setWindowState().
Referenced by setWindowState().
void QDockWidgetPrivate::updateButtons | ( | ) |
Definition at line 675 of file qdockwidget.cpp.
References button, QDockWidgetLayout::CloseButton, QDockWidget::DockWidgetClosable, QDockWidget::DockWidgetFloatable, QDockWidgetLayout::FloatButton, hasFeature(), QLayout::invalidate(), QWidgetPrivate::layout, opt, QAbstractButton::setIcon(), QWidget::setVisible(), QStyle::SP_TitleBarCloseButton, QStyle::SP_TitleBarNormalButton, and QDockWidgetLayout::TitleBar.
Referenced by init(), and setWindowState().
Qt::DockWidgetAreas QDockWidgetPrivate::allowedAreas = Qt::AllDockWidgetAreas |
Definition at line 79 of file qdockwidget_p.h.
QString QDockWidgetPrivate::dockedWindowTitle |
Definition at line 90 of file qdockwidget_p.h.
QDockWidget::DockWidgetFeatures QDockWidgetPrivate::features |
Definition at line 77 of file qdockwidget_p.h.
QString QDockWidgetPrivate::fixedWindowTitle |
Definition at line 89 of file qdockwidget_p.h.
Referenced by init().
QFont QDockWidgetPrivate::font |
Definition at line 81 of file qdockwidget_p.h.
Referenced by init().
DragState* QDockWidgetPrivate::state = nullptr |
Definition at line 75 of file qdockwidget_p.h.
Referenced by endDrag(), initDrag(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), moveEvent(), nonClientAreaMouseEvent(), recalculatePressPos(), and startDrag().
Definition at line 84 of file qdockwidget_p.h.
Referenced by init().
QRect QDockWidgetPrivate::undockedGeometry |
Definition at line 88 of file qdockwidget_p.h.
Referenced by endDrag().