34 #include <QApplication> 35 #include <QMouseEvent> 39 #include <QAbstractButton> 40 #include <QElapsedTimer> 52 #pragma comment(lib, "User32.lib") 63 #if 0 // set to 1 if you need this function for debugging 67 static const char* windowsMessageString(
int MessageId)
71 case 0:
return "WM_NULL";
72 case 1:
return "WM_CREATE";
73 case 2:
return "WM_DESTROY";
74 case 3:
return "WM_MOVE";
75 case 5:
return "WM_SIZE";
76 case 6:
return "WM_ACTIVATE";
77 case 7:
return "WM_SETFOCUS";
78 case 8:
return "WM_KILLFOCUS";
79 case 10:
return "WM_ENABLE";
80 case 11:
return "WM_SETREDRAW";
81 case 12:
return "WM_SETTEXT";
82 case 13:
return "WM_GETTEXT";
83 case 14:
return "WM_GETTEXTLENGTH";
84 case 15:
return "WM_PAINT";
85 case 16:
return "WM_CLOSE";
86 case 17:
return "WM_QUERYENDSESSION";
87 case 18:
return "WM_QUIT";
88 case 19:
return "WM_QUERYOPEN";
89 case 20:
return "WM_ERASEBKGND";
90 case 21:
return "WM_SYSCOLORCHANGE";
91 case 22:
return "WM_ENDSESSION";
92 case 24:
return "WM_SHOWWINDOW";
93 case 25:
return "WM_CTLCOLOR";
94 case 26:
return "WM_WININICHANGE";
95 case 27:
return "WM_DEVMODECHANGE";
96 case 28:
return "WM_ACTIVATEAPP";
97 case 29:
return "WM_FONTCHANGE";
98 case 30:
return "WM_TIMECHANGE";
99 case 31:
return "WM_CANCELMODE";
100 case 32:
return "WM_SETCURSOR";
101 case 33:
return "WM_MOUSEACTIVATE";
102 case 34:
return "WM_CHILDACTIVATE";
103 case 35:
return "WM_QUEUESYNC";
104 case 36:
return "WM_GETMINMAXINFO";
105 case 38:
return "WM_PAINTICON";
106 case 39:
return "WM_ICONERASEBKGND";
107 case 40:
return "WM_NEXTDLGCTL";
108 case 42:
return "WM_SPOOLERSTATUS";
109 case 43:
return "WM_DRAWITEM";
110 case 44:
return "WM_MEASUREITEM";
111 case 45:
return "WM_DELETEITEM";
112 case 46:
return "WM_VKEYTOITEM";
113 case 47:
return "WM_CHARTOITEM";
114 case 48:
return "WM_SETFONT";
115 case 49:
return "WM_GETFONT";
116 case 50:
return "WM_SETHOTKEY";
117 case 51:
return "WM_GETHOTKEY";
118 case 55:
return "WM_QUERYDRAGICON";
119 case 57:
return "WM_COMPAREITEM";
120 case 61:
return "WM_GETOBJECT";
121 case 65:
return "WM_COMPACTING";
122 case 68:
return "WM_COMMNOTIFY";
123 case 70:
return "WM_WINDOWPOSCHANGING";
124 case 71:
return "WM_WINDOWPOSCHANGED";
125 case 72:
return "WM_POWER";
126 case 73:
return "WM_COPYGLOBALDATA";
127 case 74:
return "WM_COPYDATA";
128 case 75:
return "WM_CANCELJOURNAL";
129 case 78:
return "WM_NOTIFY";
130 case 80:
return "WM_INPUTLANGCHANGEREQUEST";
131 case 81:
return "WM_INPUTLANGCHANGE";
132 case 82:
return "WM_TCARD";
133 case 83:
return "WM_HELP";
134 case 84:
return "WM_USERCHANGED";
135 case 85:
return "WM_NOTIFYFORMAT";
136 case 123:
return "WM_CONTEXTMENU";
137 case 124:
return "WM_STYLECHANGING";
138 case 125:
return "WM_STYLECHANGED";
139 case 126:
return "WM_DISPLAYCHANGE";
140 case 127:
return "WM_GETICON";
141 case 128:
return "WM_SETICON";
142 case 129:
return "WM_NCCREATE";
143 case 130:
return "WM_NCDESTROY";
144 case 131:
return "WM_NCCALCSIZE";
145 case 132:
return "WM_NCHITTEST";
146 case 133:
return "WM_NCPAINT";
147 case 134:
return "WM_NCACTIVATE";
148 case 135:
return "WM_GETDLGCODE";
149 case 136:
return "WM_SYNCPAINT";
150 case 160:
return "WM_NCMOUSEMOVE";
151 case 161:
return "WM_NCLBUTTONDOWN";
152 case 162:
return "WM_NCLBUTTONUP";
153 case 163:
return "WM_NCLBUTTONDBLCLK";
154 case 164:
return "WM_NCRBUTTONDOWN";
155 case 165:
return "WM_NCRBUTTONUP";
156 case 166:
return "WM_NCRBUTTONDBLCLK";
157 case 167:
return "WM_NCMBUTTONDOWN";
158 case 168:
return "WM_NCMBUTTONUP";
159 case 169:
return "WM_NCMBUTTONDBLCLK";
160 case 171:
return "WM_NCXBUTTONDOWN";
161 case 172:
return "WM_NCXBUTTONUP";
162 case 173:
return "WM_NCXBUTTONDBLCLK";
163 case 176:
return "EM_GETSEL";
164 case 177:
return "EM_SETSEL";
165 case 178:
return "EM_GETRECT";
166 case 179:
return "EM_SETRECT";
167 case 180:
return "EM_SETRECTNP";
168 case 181:
return "EM_SCROLL";
169 case 182:
return "EM_LINESCROLL";
170 case 183:
return "EM_SCROLLCARET";
171 case 185:
return "EM_GETMODIFY";
172 case 187:
return "EM_SETMODIFY";
173 case 188:
return "EM_GETLINECOUNT";
174 case 189:
return "EM_LINEINDEX";
175 case 190:
return "EM_SETHANDLE";
176 case 191:
return "EM_GETHANDLE";
177 case 192:
return "EM_GETTHUMB";
178 case 193:
return "EM_LINELENGTH";
179 case 194:
return "EM_REPLACESEL";
180 case 195:
return "EM_SETFONT";
181 case 196:
return "EM_GETLINE";
182 case 197:
return "EM_LIMITTEXT / EM_SETLIMITTEXT";
183 case 198:
return "EM_CANUNDO";
184 case 199:
return "EM_UNDO";
185 case 200:
return "EM_FMTLINES";
186 case 201:
return "EM_LINEFROMCHAR";
187 case 202:
return "EM_SETWORDBREAK";
188 case 203:
return "EM_SETTABSTOPS";
189 case 204:
return "EM_SETPASSWORDCHAR";
190 case 205:
return "EM_EMPTYUNDOBUFFER";
191 case 206:
return "EM_GETFIRSTVISIBLELINE";
192 case 207:
return "EM_SETREADONLY";
193 case 209:
return "EM_SETWORDBREAKPROC / EM_GETWORDBREAKPROC";
194 case 210:
return "EM_GETPASSWORDCHAR";
195 case 211:
return "EM_SETMARGINS";
196 case 212:
return "EM_GETMARGINS";
197 case 213:
return "EM_GETLIMITTEXT";
198 case 214:
return "EM_POSFROMCHAR";
199 case 215:
return "EM_CHARFROMPOS";
200 case 216:
return "EM_SETIMESTATUS";
201 case 217:
return "EM_GETIMESTATUS";
202 case 224:
return "SBM_SETPOS";
203 case 225:
return "SBM_GETPOS";
204 case 226:
return "SBM_SETRANGE";
205 case 227:
return "SBM_GETRANGE";
206 case 228:
return "SBM_ENABLE_ARROWS";
207 case 230:
return "SBM_SETRANGEREDRAW";
208 case 233:
return "SBM_SETSCROLLINFO";
209 case 234:
return "SBM_GETSCROLLINFO";
210 case 235:
return "SBM_GETSCROLLBARINFO";
211 case 240:
return "BM_GETCHECK";
212 case 241:
return "BM_SETCHECK";
213 case 242:
return "BM_GETSTATE";
214 case 243:
return "BM_SETSTATE";
215 case 244:
return "BM_SETSTYLE";
216 case 245:
return "BM_CLICK";
217 case 246:
return "BM_GETIMAGE";
218 case 247:
return "BM_SETIMAGE";
219 case 248:
return "BM_SETDONTCLICK";
220 case 255:
return "WM_INPUT";
221 case 256:
return "WM_KEYDOWN";
222 case 257:
return "WM_KEYUP";
223 case 258:
return "WM_CHAR";
224 case 259:
return "WM_DEADCHAR";
225 case 260:
return "WM_SYSKEYDOWN";
226 case 261:
return "WM_SYSKEYUP";
227 case 262:
return "WM_SYSCHAR";
228 case 263:
return "WM_SYSDEADCHAR";
229 case 265:
return "WM_UNICHAR / WM_WNT_CONVERTREQUESTEX";
230 case 266:
return "WM_CONVERTREQUEST";
231 case 267:
return "WM_CONVERTRESULT";
232 case 268:
return "WM_INTERIM";
233 case 269:
return "WM_IME_STARTCOMPOSITION";
234 case 270:
return "WM_IME_ENDCOMPOSITION";
235 case 272:
return "WM_INITDIALOG";
236 case 273:
return "WM_COMMAND";
237 case 274:
return "WM_SYSCOMMAND";
238 case 275:
return "WM_TIMER";
239 case 276:
return "WM_HSCROLL";
240 case 277:
return "WM_VSCROLL";
241 case 278:
return "WM_INITMENU";
242 case 279:
return "WM_INITMENUPOPUP";
243 case 280:
return "WM_SYSTIMER";
244 case 287:
return "WM_MENUSELECT";
245 case 288:
return "WM_MENUCHAR";
246 case 289:
return "WM_ENTERIDLE";
247 case 290:
return "WM_MENURBUTTONUP";
248 case 291:
return "WM_MENUDRAG";
249 case 292:
return "WM_MENUGETOBJECT";
250 case 293:
return "WM_UNINITMENUPOPUP";
251 case 294:
return "WM_MENUCOMMAND";
252 case 295:
return "WM_CHANGEUISTATE";
253 case 296:
return "WM_UPDATEUISTATE";
254 case 297:
return "WM_QUERYUISTATE";
255 case 306:
return "WM_CTLCOLORMSGBOX";
256 case 307:
return "WM_CTLCOLOREDIT";
257 case 308:
return "WM_CTLCOLORLISTBOX";
258 case 309:
return "WM_CTLCOLORBTN";
259 case 310:
return "WM_CTLCOLORDLG";
260 case 311:
return "WM_CTLCOLORSCROLLBAR";
261 case 312:
return "WM_CTLCOLORSTATIC";
262 case 512:
return "WM_MOUSEMOVE";
263 case 513:
return "WM_LBUTTONDOWN";
264 case 514:
return "WM_LBUTTONUP";
265 case 515:
return "WM_LBUTTONDBLCLK";
266 case 516:
return "WM_RBUTTONDOWN";
267 case 517:
return "WM_RBUTTONUP";
268 case 518:
return "WM_RBUTTONDBLCLK";
269 case 519:
return "WM_MBUTTONDOWN";
270 case 520:
return "WM_MBUTTONUP";
271 case 521:
return "WM_MBUTTONDBLCLK";
272 case 522:
return "WM_MOUSEWHEEL";
273 case 523:
return "WM_XBUTTONDOWN";
274 case 524:
return "WM_XBUTTONUP";
275 case 525:
return "WM_XBUTTONDBLCLK";
276 case 528:
return "WM_PARENTNOTIFY";
277 case 529:
return "WM_ENTERMENULOOP";
278 case 530:
return "WM_EXITMENULOOP";
279 case 531:
return "WM_NEXTMENU";
280 case 532:
return "WM_SIZING";
281 case 533:
return "WM_CAPTURECHANGED";
282 case 534:
return "WM_MOVING";
283 case 536:
return "WM_POWERBROADCAST";
284 case 537:
return "WM_DEVICECHANGE";
285 case 544:
return "WM_MDICREATE";
286 case 545:
return "WM_MDIDESTROY";
287 case 546:
return "WM_MDIACTIVATE";
288 case 547:
return "WM_MDIRESTORE";
289 case 548:
return "WM_MDINEXT";
290 case 549:
return "WM_MDIMAXIMIZE";
291 case 550:
return "WM_MDITILE";
292 case 551:
return "WM_MDICASCADE";
293 case 552:
return "WM_MDIICONARRANGE";
294 case 553:
return "WM_MDIGETACTIVE";
295 case 560:
return "WM_MDISETMENU";
296 case 561:
return "WM_ENTERSIZEMOVE";
297 case 562:
return "WM_EXITSIZEMOVE";
298 case 563:
return "WM_DROPFILES";
299 case 564:
return "WM_MDIREFRESHMENU";
300 case 640:
return "WM_IME_REPORT";
301 case 641:
return "WM_IME_SETCONTEXT";
302 case 642:
return "WM_IME_NOTIFY";
303 case 643:
return "WM_IME_CONTROL";
304 case 644:
return "WM_IME_COMPOSITIONFULL";
305 case 645:
return "WM_IME_SELECT";
306 case 646:
return "WM_IME_CHAR";
307 case 648:
return "WM_IME_REQUEST";
308 case 656:
return "WM_IME_KEYDOWN";
309 case 657:
return "WM_IME_KEYUP";
310 case 672:
return "WM_NCMOUSEHOVER";
311 case 673:
return "WM_MOUSEHOVER";
312 case 674:
return "WM_NCMOUSELEAVE";
313 case 675:
return "WM_MOUSELEAVE";
314 case 768:
return "WM_CUT";
315 case 769:
return "WM_COPY";
316 case 770:
return "WM_PASTE";
317 case 771:
return "WM_CLEAR";
318 case 772:
return "WM_UNDO";
319 case 773:
return "WM_RENDERFORMAT";
320 case 774:
return "WM_RENDERALLFORMATS";
321 case 775:
return "WM_DESTROYCLIPBOARD";
322 case 776:
return "WM_DRAWCLIPBOARD";
323 case 777:
return "WM_PAINTCLIPBOARD";
324 case 778:
return "WM_VSCROLLCLIPBOARD";
325 case 779:
return "WM_SIZECLIPBOARD";
326 case 780:
return "WM_ASKCBFORMATNAME";
327 case 781:
return "WM_CHANGECBCHAIN";
328 case 782:
return "WM_HSCROLLCLIPBOARD";
329 case 783:
return "WM_QUERYNEWPALETTE";
330 case 784:
return "WM_PALETTEISCHANGING";
331 case 785:
return "WM_PALETTECHANGED";
332 case 786:
return "WM_HOTKEY";
333 case 791:
return "WM_PRINT";
334 case 792:
return "WM_PRINTCLIENT";
335 case 793:
return "WM_APPCOMMAND";
336 case 856:
return "WM_HANDHELDFIRST";
337 case 863:
return "WM_HANDHELDLAST";
338 case 864:
return "WM_AFXFIRST";
339 case 895:
return "WM_AFXLAST";
340 case 896:
return "WM_PENWINFIRST";
341 case 897:
return "WM_RCRESULT";
342 case 898:
return "WM_HOOKRCRESULT";
343 case 899:
return "WM_GLOBALRCCHANGE / WM_PENMISCINFO";
344 case 900:
return "WM_SKB";
345 case 901:
return "WM_HEDITCTL / WM_PENCTL";
346 case 902:
return "WM_PENMISC";
347 case 903:
return "WM_CTLINIT";
348 case 904:
return "WM_PENEVENT";
349 case 911:
return "WM_PENWINLAST";
351 return "unknown WM_ message";
354 return "unknown WM_ message";
377 QWidget* MouseEventHandler =
nullptr;
379 bool IsResizing =
false;
408 DraggingState = StateId;
419 _this->setWindowTitle(Text);
439 QIcon CurrentWidgetIcon = CurrentWidget->
icon();
441 && !CurrentWidgetIcon.isNull())
443 _this->setWindowIcon(CurrentWidget->
icon());
447 _this->setWindowIcon(QApplication::windowIcon());
475 if (
DockManager->dockAreaOverlay()->dropAreaUnderCursor()
477 ||
DockManager->containerOverlay()->dropAreaUnderCursor()
480 CDockOverlay *Overlay =
DockManager->containerOverlay();
481 if (!Overlay->dropOverlayRect().isValid())
488 QRect Rect = Overlay->dropOverlayRect();
489 int FrameWidth = (
_this->frameSize().width() -
_this->rect().width())
491 int TitleBarHeight =
_this->frameSize().height()
492 -
_this->rect().height() - FrameWidth;
495 QPoint TopLeft = Overlay->mapToGlobal(Rect.topLeft());
496 TopLeft.ry() += TitleBarHeight;
499 QSize(Rect.width(), Rect.height() - TitleBarHeight)));
500 QApplication::processEvents();
519 for (
auto ContainerWidget : Containers)
521 if (!ContainerWidget->isVisible())
531 QPoint MappedPos = ContainerWidget->mapFromGlobal(GlobalPos);
532 if (ContainerWidget->rect().contains(MappedPos))
534 if (!TopContainer || ContainerWidget->
isInFrontOf(TopContainer))
536 TopContainer = ContainerWidget;
542 auto ContainerOverlay =
DockManager->containerOverlay();
543 auto DockAreaOverlay =
DockManager->dockAreaOverlay();
547 ContainerOverlay->hideOverlay();
548 DockAreaOverlay->hideOverlay();
553 ContainerOverlay->setAllowedAreas(
555 DockWidgetArea ContainerArea = ContainerOverlay->showOverlay(TopContainer);
557 auto DockArea = TopContainer->
dockAreaAt(GlobalPos);
558 if (DockArea && DockArea->isVisible() && VisibleDockAreas > 0)
560 DockAreaOverlay->enableDropPreview(
true);
572 DockAreaOverlay->enableDropPreview(
false);
573 ContainerOverlay->enableDropPreview(
true);
582 DockAreaOverlay->hideOverlay();
590 ADS_PRINT(
"FloatingDockContainerPrivate::handleEscapeKey()");
611 QDockWidget::setFloating(
true);
612 QDockWidget::setFeatures(QDockWidget::AllDockWidgetFeatures);
614 bool native_window =
true;
617 auto env = qgetenv(
"ADS_UseNativeTitle").toUpper();
620 native_window =
true;
624 native_window =
false;
628 native_window =
true;
632 native_window =
false;
637 QString window_manager = internal::windowManager().toUpper().split(
" ")[0];
638 native_window = window_manager !=
"KWIN";
643 setTitleBarWidget(
new QWidget());
644 setWindowFlags(Qt::Window | Qt::WindowMaximizeButtonHint | Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint);
649 setTitleBarWidget(
d->TitleBar);
650 setWindowFlags(Qt::Window | Qt::WindowMinMaxButtonsHint | Qt::FramelessWindowHint);
652 connect(
d->TitleBar, SIGNAL(closeRequested()), SLOT(close()));
654 this, &CFloatingDockContainer::onMaximizeRequest);
658 Qt::Window | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint);
659 QBoxLayout *l =
new QBoxLayout(QBoxLayout::TopToBottom);
660 l->setContentsMargins(0, 0, 0, 0);
676 if (TopLevelDockWidget)
678 TopLevelDockWidget->emitTopLevelChanged(
true);
690 if (TopLevelDockWidget)
692 TopLevelDockWidget->emitTopLevelChanged(
true);
695 d->
DockManager->notifyWidgetOrAreaRelocation(DockWidget);
718 Super::changeEvent(event);
719 if ((event->type() == QEvent::ActivationChange) && isActiveWindow())
721 ADS_PRINT(
"FloatingWidget::changeEvent QEvent::ActivationChange ");
737 bool CFloatingDockContainer::nativeEvent(
const QByteArray &eventType,
void *message,
long *
result)
739 QWidget::nativeEvent(eventType, message, result);
740 MSG *msg =
static_cast<MSG*
>(message);
741 switch (msg->message)
752 case WM_NCLBUTTONDOWN:
755 ADS_PRINT(
"CFloatingDockContainer::nativeEvent WM_NCLBUTTONDOWN");
761 case WM_NCLBUTTONDBLCLK:
765 case WM_ENTERSIZEMOVE:
768 ADS_PRINT(
"CFloatingDockContainer::nativeEvent WM_ENTERSIZEMOVE");
774 case WM_EXITSIZEMOVE:
777 ADS_PRINT(
"CFloatingDockContainer::nativeEvent WM_EXITSIZEMOVE");
778 if (GetAsyncKeyState(VK_ESCAPE) & 0x8000)
797 ADS_PRINT(
"CFloatingDockContainer closeEvent");
806 if (!TopLevelDockWidget->closeDockWidgetInternal())
828 Super::hideEvent(event);
829 if (event->spontaneous())
843 for (
auto DockWidget : DockArea->openedDockWidgets())
855 Super::showEvent(event);
859 this->window()->activateWindow();
867 const QSize &Size,
eDragState DragState, QWidget *MouseEventHandler)
878 d->MouseEventHandler = MouseEventHandler;
879 if (
d->MouseEventHandler)
881 d->MouseEventHandler->grabMouse();
891 Q_UNUSED(MouseEventHandler)
903 int BorderSize = (frameSize().width() - size().width()) / 2;
905 - QPoint(BorderSize, 0);
921 QApplication::setActiveWindow(
this);
939 ADS_PRINT(
"CFloatingDockContainer::onDockAreasAddedOrRemoved()");
941 if (TopLevelDockArea)
958 setWindowIcon(QApplication::windowIcon());
974 if (TopLevelDockArea)
976 CDockWidget* CurrentWidget = TopLevelDockArea->currentDockWidget();
985 setWindowIcon(QApplication::windowIcon());
1009 d->TitleBar->setMaximizedIcon(windowState() == Qt::WindowMaximized);
1037 ADS_PRINT(
"CFloatingDockContainer::finishDragging");
1039 setWindowOpacity(1);
1041 if (
d->MouseEventHandler)
1043 d->MouseEventHandler->releaseMouse();
1044 d->MouseEventHandler =
nullptr;
1052 bool CFloatingDockContainer::event(QEvent *e)
1065 #if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 2)) 1066 if (e->type() == QEvent::NonClientAreaMouseButtonPress )
1068 if (e->type() == QEvent::NonClientAreaMouseButtonPress && QGuiApplication::mouseButtons().testFlag(Qt::LeftButton))
1071 ADS_PRINT(
"FloatingWidget::event Event::NonClientAreaMouseButtonPress" << e->type());
1081 case QEvent::NonClientAreaMouseButtonDblClick:
1082 ADS_PRINT(
"FloatingWidget::event QEvent::NonClientAreaMouseButtonDblClick");
1086 case QEvent::Resize:
1107 if (e->type() == QEvent::NonClientAreaMouseButtonRelease)
1109 ADS_PRINT(
"FloatingWidget::event QEvent::NonClientAreaMouseButtonRelease");
1118 #if (ADS_DEBUG_LEVEL > 0) 1119 qDebug() << QTime::currentTime() <<
"CFloatingDockContainer::event " << e->type();
1121 return QWidget::event(e);
1126 void CFloatingDockContainer::moveEvent(QMoveEvent *event)
1128 QWidget::moveEvent(event);
1142 QApplication::setActiveWindow(
this);
1155 void CFloatingDockContainer::onMaximizeRequest()
1157 if (windowState() == Qt::WindowMaximized)
1169 void CFloatingDockContainer::showNormal(
bool fixGeometry)
1171 if (windowState() == Qt::WindowMaximized)
1173 QRect oldNormal = normalGeometry();
1174 Super::showNormal();
1177 setGeometry(oldNormal);
1182 d->TitleBar->setMaximizedIcon(
false);
1188 void CFloatingDockContainer::showMaximized()
1190 Super::showMaximized();
1193 d->TitleBar->setMaximizedIcon(
true);
1199 bool CFloatingDockContainer::isMaximized()
const 1201 return windowState() == Qt::WindowMaximized;
1206 void CFloatingDockContainer::show()
1209 internal::xcb_add_prop(
true, winId(),
"_NET_WM_STATE",
"_NET_WM_STATE_SKIP_TASKBAR");
1210 internal::xcb_add_prop(
true, winId(),
"_NET_WM_STATE",
"_NET_WM_STATE_SKIP_PAGER");
1216 void CFloatingDockContainer::resizeEvent(QResizeEvent *event)
1218 d->IsResizing =
true;
1219 Super::resizeEvent(event);
1224 void CFloatingDockContainer::moveEvent(QMoveEvent *event)
1226 Super::moveEvent(event);
1227 if (!
d->IsResizing && event->spontaneous())
1232 d->IsResizing =
false;
1237 bool CFloatingDockContainer::hasNativeTitleBar()
1239 return d->TitleBar ==
nullptr;
static bool testConfigFlag(eConfigFlag Flag)
void registerFloatingWidget(CFloatingDockContainer *FloatingWidget)
QPointer< CDockManager > DockManager
CDockWidget * topLevelDockWidget() const
void setWindowTitle(const QString &Text)
QPoint DragStartMousePosition
friend class CFloatingWidgetTitleBar
void onDockAreasAddedOrRemoved()
virtual void closeEvent(QCloseEvent *event) override
bool hasTopLevelDockWidget() const
CDockAreaWidget * SingleDockArea
QList< CDockWidget * > dockWidgets() const
CDockContainerWidget * DropContainer
virtual void finishDragging() override
CDockContainerWidget * dockContainer() const
If set, the Floating Widget icon reflects the icon of the current dock widget otherwise it displays a...
enables styling of focused dock widget tabs or floating widget titlebar
void titleMouseReleaseEvent()
!< if enabled, the space is equally distributed to all widgets in a splitter
Declaration of CFloatingDockContainer class.
#define tFloatingWidgetBase
CDockContainerWidget * DockContainer
CFloatingDockContainer(CDockManager *DockManager)
void onDockAreaCurrentChanged(int Index)
void moveFloating() override
virtual ~CFloatingDockContainer()
void reflectCurrentWidget(CDockWidget *CurrentWidget)
void updateDropOverlays(const QPoint &GlobalPos)
virtual void startFloating(const QPoint &DragStartMousePos, const QSize &Size, eDragState DragState, QWidget *MouseEventHandler) override
static bool testConfigFlag(CDockManager::eConfigFlag Flag)
virtual void changeEvent(QEvent *event) override
void setState(eDragState StateId)
const T & move(const T &v)
bool isState(eDragState StateId) const
bool restoreState(CDockingStateReader &Stream, bool Testing)
CFloatingDockContainer * _this
Declaration of CDockManager class.
FloatingDockContainerPrivate(CFloatingDockContainer *_public)
virtual void hideEvent(QHideEvent *event) override
FloatingDockContainerPrivate * d
private data (pimpl)
static unsigned int zOrderCounter
If set, the Floating Widget window title reflects the title of the current dock widget otherwise it d...
virtual void showEvent(QShowEvent *event) override