DockWidget.cpp
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Qt Advanced Docking System
3 ** Copyright (C) 2017 Uwe Kindler
4 **
5 ** This library is free software; you can redistribute it and/or
6 ** modify it under the terms of the GNU Lesser General Public
7 ** License as published by the Free Software Foundation; either
8 ** version 2.1 of the License, or (at your option) any later version.
9 **
10 ** This library is distributed in the hope that it will be useful,
11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ** Lesser General Public License for more details.
14 **
15 ** You should have received a copy of the GNU Lesser General Public
16 ** License along with this library; If not, see <http://www.gnu.org/licenses/>.
17 ******************************************************************************/
18 
19 
20 //============================================================================
25 //============================================================================
26 
27 
28 //============================================================================
29 // INCLUDES
30 //============================================================================
31 #include "DockWidgetTab.h"
32 #include "DockWidget.h"
33 
34 #include <iostream>
35 
36 #include <QBoxLayout>
37 #include <QAction>
38 #include <QSplitter>
39 #include <QStack>
40 #include <QScrollArea>
41 #include <QTextStream>
42 #include <QPointer>
43 #include <QEvent>
44 #include <QDebug>
45 #include <QToolBar>
46 #include <QXmlStreamWriter>
47 #include <QWindow>
48 
49 #include <QGuiApplication>
50 #include <QScreen>
51 #include <QWindow>
52 
53 #include "DockContainerWidget.h"
54 #include "DockAreaWidget.h"
55 #include "DockManager.h"
56 #include "FloatingDockContainer.h"
57 #include "DockSplitter.h"
58 #include "DockComponentsFactory.h"
59 #include "ads_globals.h"
60 
61 
62 namespace ads
63 {
68 {
69  CDockWidget* _this = nullptr;
70  QBoxLayout* Layout = nullptr;
71  QWidget* Widget = nullptr;
73  CDockWidget::DockWidgetFeatures Features = CDockWidget::DefaultDockWidgetFeatures;
76  QAction* ToggleViewAction = nullptr;
77  bool Closed = false;
78  QScrollArea* ScrollArea = nullptr;
79  QToolBar* ToolBar = nullptr;
80  Qt::ToolButtonStyle ToolBarStyleDocked = Qt::ToolButtonIconOnly;
81  Qt::ToolButtonStyle ToolBarStyleFloating = Qt::ToolButtonTextUnderIcon;
82  QSize ToolBarIconSizeDocked = QSize(16, 16);
83  QSize ToolBarIconSizeFloating = QSize(24, 24);
84  bool IsFloatingTopLevel = false;
87 
92 
96  void showDockWidget();
97 
101  void hideDockWidget();
102 
108  void updateParentDockArea();
109 
113  void setupToolBar();
114 
118  void setupScrollArea();
119 };
120 // struct DockWidgetPrivate
121 
122 //============================================================================
124  _this(_public)
125 {
126 
127 }
128 
129 
130 //============================================================================
132 {
133  if (!DockArea)
134  {
135  CFloatingDockContainer* FloatingWidget = new CFloatingDockContainer(_this);
136  FloatingWidget->resize(_this->size());
137  TabWidget->show();
138  FloatingWidget->show();
139  }
140  else
141  {
143  DockArea->toggleView(true);
144  TabWidget->show();
145  QSplitter* Splitter = internal::findParent<QSplitter*>(DockArea);
146  while (Splitter && !Splitter->isVisible())
147  {
148  Splitter->show();
149  Splitter = internal::findParent<QSplitter*>(Splitter);
150  }
151 
153  if (Container->isFloating())
154  {
156  CFloatingDockContainer*>(Container);
157  FloatingWidget->show();
158  }
159  }
160 }
161 
162 
163 //============================================================================
165 {
166  TabWidget->hide();
168 }
169 
170 
171 //============================================================================
173 {
174  if (!DockArea)
175  {
176  return;
177  }
178 
179  // we don't need to change the current tab if the
180  // current dock widget is not the one being closed
181  if (DockArea->currentDockWidget() != _this){
182  return;
183  }
184 
185  auto NextDockWidget = DockArea->nextOpenDockWidget(_this);
186  if (NextDockWidget)
187  {
188  DockArea->setCurrentDockWidget(NextDockWidget);
189  }
190  else
191  {
193  }
194 }
195 
196 
197 //============================================================================
199 {
200  ToolBar = new QToolBar(_this);
201  ToolBar->setObjectName("dockWidgetToolBar");
202  Layout->insertWidget(0, ToolBar);
203  ToolBar->setIconSize(QSize(16, 16));
204  ToolBar->toggleViewAction()->setEnabled(false);
205  ToolBar->toggleViewAction()->setVisible(false);
206  _this->connect(_this, SIGNAL(topLevelChanged(bool)), SLOT(setToolbarFloatingStyle(bool)));
207 }
208 
209 
210 
211 //============================================================================
213 {
214  ScrollArea = new QScrollArea(_this);
215  ScrollArea->setObjectName("dockWidgetScrollArea");
216  ScrollArea->setWidgetResizable(true);
217  Layout->addWidget(ScrollArea);
218  ScrollArea->setFrameShape(QFrame::NoFrame);
219 }
220 
221 
222 //============================================================================
223 CDockWidget::CDockWidget(const QString &title, QWidget *parent) :
224  QFrame(parent),
225  d(new DockWidgetPrivate(this))
226 {
227  d->Layout = new QBoxLayout(QBoxLayout::TopToBottom);
228  d->Layout->setContentsMargins(0, 0, 0, 0);
229  d->Layout->setSpacing(0);
230  setLayout(d->Layout);
231  setWindowTitle(title);
232  setObjectName(title);
233 
235  d->ToggleViewAction = new QAction(title, this);
236  d->ToggleViewAction->setCheckable(true);
237  connect(d->ToggleViewAction, SIGNAL(triggered(bool)), this,
238  SLOT(toggleView(bool)));
240 
242  {
243  setFocusPolicy(Qt::ClickFocus);
244  }
245 }
246 
247 //============================================================================
249 {
250  ADS_PRINT("~CDockWidget()");
251  delete d;
252 }
253 
254 
255 //============================================================================
257 {
258  QAction* Action = d->ToggleViewAction;
259  Action->blockSignals(true);
260  Action->setChecked(Checked);
261  Action->blockSignals(false);
262 }
263 
264 
265 //============================================================================
266 void CDockWidget::setWidget(QWidget* widget, eInsertMode InsertMode)
267 {
268  if (d->Widget)
269  {
270  takeWidget();
271  }
272 
273  auto ScrollAreaWidget = qobject_cast<QAbstractScrollArea*>(widget);
274  if (ScrollAreaWidget || ForceNoScrollArea == InsertMode)
275  {
276  d->Layout->addWidget(widget);
277  if (ScrollAreaWidget && ScrollAreaWidget->viewport())
278  {
279  ScrollAreaWidget->viewport()->setProperty("dockWidgetContent", true);
280  }
281  }
282  else
283  {
284  d->setupScrollArea();
285  d->ScrollArea->setWidget(widget);
286  }
287 
288  d->Widget = widget;
289  d->Widget->setProperty("dockWidgetContent", true);
290 }
291 
292 
293 //============================================================================
295 {
296  QWidget* w = nullptr;
297  if (d->ScrollArea)
298  {
299  d->Layout->removeWidget(d->ScrollArea);
300  w = d->ScrollArea->takeWidget();
301  delete d->ScrollArea;
302  d->ScrollArea = nullptr;
303  d->Widget = nullptr;
304  }
305  else if (d->Widget)
306  {
307  d->Layout->removeWidget(d->Widget);
308  w = d->Widget;
309  d->Widget = nullptr;
310  }
311 
312  if (w)
313  {
314  w->setParent(nullptr);
315  }
316  return w;
317 }
318 
319 
320 //============================================================================
321 QWidget* CDockWidget::widget() const
322 {
323  return d->Widget;
324 }
325 
326 
327 //============================================================================
329 {
330  return d->TabWidget;
331 }
332 
333 
334 //============================================================================
335 void CDockWidget::setFeatures(DockWidgetFeatures features)
336 {
337  if (d->Features == features)
338  {
339  return;
340  }
341  d->Features = features;
342  emit featuresChanged(d->Features);
344  if(CDockAreaWidget* DockArea = dockAreaWidget())
345  DockArea->onDockWidgetFeaturesChanged();
346 }
347 
348 
349 //============================================================================
351 {
352  auto Features = features();
353  internal::setFlag(Features, flag, on);
354  setFeatures(Features);
355 }
356 
357 
358 //============================================================================
359 CDockWidget::DockWidgetFeatures CDockWidget::features() const
360 {
361  return d->Features;
362 }
363 
364 
365 //============================================================================
367 {
368  return d->DockManager;
369 }
370 
371 
372 //============================================================================
374 {
375  d->DockManager = DockManager;
376 }
377 
378 
379 //============================================================================
381 {
382  if (d->DockArea)
383  {
384  return d->DockArea->dockContainer();
385  }
386  else
387  {
388  return 0;
389  }
390 }
391 
392 
393 //============================================================================
395 {
396  return d->DockArea;
397 }
398 
399 
400 //============================================================================
402 {
403  if (!isInFloatingContainer())
404  {
405  return false;
406  }
407 
408  return dockContainer()->topLevelDockWidget() == this;
409 }
410 
411 
412 //============================================================================
414 {
415  auto Container = dockContainer();
416  if (!Container)
417  {
418  return false;
419  }
420 
421  if (!Container->isFloating())
422  {
423  return false;
424  }
425 
426  return true;
427 }
428 
429 
430 //============================================================================
432 {
433  return d->Closed;
434 }
435 
436 
437 //============================================================================
439 {
440  return d->ToggleViewAction;
441 }
442 
443 
444 //============================================================================
446 {
447  if (ActionModeToggle == Mode)
448  {
449  d->ToggleViewAction->setCheckable(true);
450  d->ToggleViewAction->setIcon(QIcon());
451  }
452  else
453  {
454  d->ToggleViewAction->setCheckable(false);
455  d->ToggleViewAction->setIcon(d->TabWidget->icon());
456  }
457 }
458 
459 
460 //============================================================================
462 {
463  d->MinimumSizeHintMode = Mode;
464 }
465 
466 
467 //============================================================================
469 {
470  return dockManager()->centralWidget() == this;
471 }
472 
473 
474 //============================================================================
475 void CDockWidget::toggleView(bool Open)
476 {
477  // If the toggle view action mode is ActionModeShow, then Open is always
478  // true if the sender is the toggle view action
479  QAction* Sender = qobject_cast<QAction*>(sender());
480  if (Sender == d->ToggleViewAction && !d->ToggleViewAction->isCheckable())
481  {
482  Open = true;
483  }
484  // If the dock widget state is different, then we really need to toggle
485  // the state. If we are in the right state, then we simply make this
486  // dock widget the current dock widget
487  if (d->Closed != !Open)
488  {
489  toggleViewInternal(Open);
490  }
491  else if (Open && d->DockArea)
492  {
494  }
495 }
496 
497 
498 //============================================================================
500 {
501  CDockContainerWidget* DockContainer = dockContainer();
502  CDockWidget* TopLevelDockWidgetBefore = DockContainer
503  ? DockContainer->topLevelDockWidget() : nullptr;
504 
505  if (Open)
506  {
507  d->showDockWidget();
508  }
509  else
510  {
511  d->hideDockWidget();
512  }
513  d->Closed = !Open;
514  d->ToggleViewAction->blockSignals(true);
515  d->ToggleViewAction->setChecked(Open);
516  d->ToggleViewAction->blockSignals(false);
517  if (d->DockArea)
518  {
519  d->DockArea->toggleDockWidgetView(this, Open);
520  }
521 
522  if (Open && TopLevelDockWidgetBefore)
523  {
524  CDockWidget::emitTopLevelEventForWidget(TopLevelDockWidgetBefore, false);
525  }
526 
527  // Here we need to call the dockContainer() function again, because if
528  // this dock widget was unassigned before the call to showDockWidget() then
529  // it has a dock container now
530  DockContainer = dockContainer();
531  CDockWidget* TopLevelDockWidgetAfter = DockContainer
532  ? DockContainer->topLevelDockWidget() : nullptr;
533  CDockWidget::emitTopLevelEventForWidget(TopLevelDockWidgetAfter, true);
534  CFloatingDockContainer* FloatingContainer = DockContainer->floatingWidget();
535  if (FloatingContainer)
536  {
537  FloatingContainer->updateWindowTitle();
538  }
539 
540  if (!Open)
541  {
542  emit closed();
543  }
544  emit viewToggled(Open);
545 }
546 
547 
548 //============================================================================
550 {
551  d->DockArea = DockArea;
552  d->ToggleViewAction->setChecked(DockArea != nullptr && !this->isClosed());
553  setParent(DockArea);
554 }
555 
556 
557 //============================================================================
558 void CDockWidget::saveState(QXmlStreamWriter& s) const
559 {
560  s.writeStartElement("Widget");
561  s.writeAttribute("Name", objectName());
562  s.writeAttribute("Closed", QString::number(d->Closed ? 1 : 0));
563  s.writeEndElement();
564 }
565 
566 
567 //============================================================================
569 {
570  d->Closed = true;
571  setParent(d->DockManager);
572  setVisible(false);
573  setDockArea(nullptr);
574  tabWidget()->setParent(this);
575 }
576 
577 
578 //============================================================================
579 bool CDockWidget::event(QEvent *e)
580 {
581  switch (e->type())
582  {
583  case QEvent::Hide:
584  emit visibilityChanged(false);
585  break;
586 
587  case QEvent::Show:
588  emit visibilityChanged(geometry().right() >= 0 && geometry().bottom() >= 0);
589  break;
590 
591  case QEvent::WindowTitleChange :
592  {
593  const auto title = windowTitle();
594  if (d->TabWidget)
595  {
596  d->TabWidget->setText(title);
597  }
598  if (d->ToggleViewAction)
599  {
600  d->ToggleViewAction->setText(title);
601  }
602  if (d->DockArea)
603  {
604  d->DockArea->markTitleBarMenuOutdated();//update tabs menu
605  }
606  emit titleChanged(title);
607  }
608  break;
609 
610  default:
611  break;
612  }
613 
614  return Super::event(e);
615 }
616 
617 
618 #ifndef QT_NO_TOOLTIP
619 //============================================================================
620 void CDockWidget::setTabToolTip(const QString &text)
621 {
622  if (d->TabWidget)
623  {
624  d->TabWidget->setToolTip(text);
625  }
626  if (d->ToggleViewAction)
627  {
628  d->ToggleViewAction->setToolTip(text);
629  }
630  if (d->DockArea)
631  {
632  d->DockArea->markTitleBarMenuOutdated();//update tabs menu
633  }
634 }
635 #endif
636 
637 
638 //============================================================================
639 void CDockWidget::setIcon(const QIcon& Icon)
640 {
641  d->TabWidget->setIcon(Icon);
642  if (!d->ToggleViewAction->isCheckable())
643  {
644  d->ToggleViewAction->setIcon(Icon);
645  }
646 }
647 
648 
649 //============================================================================
650 QIcon CDockWidget::icon() const
651 {
652  return d->TabWidget->icon();
653 }
654 
655 
656 //============================================================================
657 QToolBar* CDockWidget::toolBar() const
658 {
659  return d->ToolBar;
660 }
661 
662 
663 //============================================================================
665 {
666  if (!d->ToolBar)
667  {
668  d->setupToolBar();
669  }
670 
671  return d->ToolBar;
672 }
673 
674 
675 //============================================================================
676 void CDockWidget::setToolBar(QToolBar* ToolBar)
677 {
678  if (d->ToolBar)
679  {
680  delete d->ToolBar;
681  }
682 
683  d->ToolBar = ToolBar;
684  d->Layout->insertWidget(0, d->ToolBar);
685  this->connect(this, SIGNAL(topLevelChanged(bool)), SLOT(setToolbarFloatingStyle(bool)));
687 }
688 
689 
690 //============================================================================
691 void CDockWidget::setToolBarStyle(Qt::ToolButtonStyle Style, eState State)
692 {
693  if (StateFloating == State)
694  {
695  d->ToolBarStyleFloating = Style;
696  }
697  else
698  {
699  d->ToolBarStyleDocked = Style;
700  }
701 
703 }
704 
705 
706 //============================================================================
707 Qt::ToolButtonStyle CDockWidget::toolBarStyle(eState State) const
708 {
709  if (StateFloating == State)
710  {
711  return d->ToolBarStyleFloating;
712  }
713  else
714  {
715  return d->ToolBarStyleDocked;
716  }
717 }
718 
719 
720 //============================================================================
721 void CDockWidget::setToolBarIconSize(const QSize& IconSize, eState State)
722 {
723  if (StateFloating == State)
724  {
725  d->ToolBarIconSizeFloating = IconSize;
726  }
727  else
728  {
729  d->ToolBarIconSizeDocked = IconSize;
730  }
731 
733 }
734 
735 
736 //============================================================================
738 {
739  if (StateFloating == State)
740  {
741  return d->ToolBarIconSizeFloating;
742  }
743  else
744  {
745  return d->ToolBarIconSizeDocked;
746  }
747 }
748 
749 
750 //============================================================================
752 {
753  if (!d->ToolBar)
754  {
755  return;
756  }
757 
758  auto IconSize = Floating ? d->ToolBarIconSizeFloating : d->ToolBarIconSizeDocked;
759  if (IconSize != d->ToolBar->iconSize())
760  {
761  d->ToolBar->setIconSize(IconSize);
762  }
763 
764  auto ButtonStyle = Floating ? d->ToolBarStyleFloating : d->ToolBarStyleDocked;
765  if (ButtonStyle != d->ToolBar->toolButtonStyle())
766  {
767  d->ToolBar->setToolButtonStyle(ButtonStyle);
768  }
769 }
770 
771 
772 //============================================================================
773 void CDockWidget::emitTopLevelEventForWidget(CDockWidget* TopLevelDockWidget, bool Floating)
774 {
775  if (TopLevelDockWidget)
776  {
777  TopLevelDockWidget->dockAreaWidget()->updateTitleBarVisibility();
778  TopLevelDockWidget->emitTopLevelChanged(Floating);
779  }
780 }
781 
782 
783 //============================================================================
785 {
786  if (Floating != d->IsFloatingTopLevel)
787  {
788  d->IsFloatingTopLevel = Floating;
790  }
791 }
792 
793 
794 //============================================================================
796 {
797  d->Closed = Closed;
798 }
799 
800 
801 //============================================================================
803 {
805  {
806  return QSize(60, 40);
807  }
808  else
809  {
810  return d->Widget->minimumSizeHint();
811  }
812 }
813 
814 
815 //============================================================================
817 {
818  if (isClosed())
819  {
820  return;
821  }
823 }
824 
825 
826 //============================================================================
828 {
829  dockManager()->removeDockWidget(this);
830  deleteLater();
831  d->Closed = true;
832 }
833 
834 
835 //============================================================================
837 {
839 }
840 
841 
842 //============================================================================
844 {
845  if (!ForceClose)
846  {
847  emit closeRequested();
848  }
849 
850  if (!ForceClose && features().testFlag(CDockWidget::CustomCloseHandling))
851  {
852  return false;
853  }
854 
856  {
857  // If the dock widget is floating, then we check if we also need to
858  // delete the floating widget
859  if (isFloating())
860  {
862  CFloatingDockContainer*>(this);
863  if (FloatingWidget->dockWidgets().count() == 1)
864  {
865  FloatingWidget->deleteLater();
866  }
867  else
868  {
869  FloatingWidget->hide();
870  }
871  }
873  emit closed();
874  }
875  else
876  {
877  toggleView(false);
878  }
879 
880  return true;
881 }
882 
883 
884 //============================================================================
886 {
887  d->TitleBarActions = actions;
888 }
889 
890 
891 //============================================================================
893 {
894  return d->TitleBarActions;
895 }
896 
897 
898 //============================================================================
900 {
901  if (isFloating())
902  {
903  dockContainer()->floatingWidget()->showFullScreen();
904  }
905  else
906  {
907  Super::showFullScreen();
908  }
909 }
910 
911 
912 //============================================================================
914 {
915  if (isFloating())
916  {
917  dockContainer()->floatingWidget()->showNormal();
918  }
919  else
920  {
921  Super::showNormal();
922  }
923 }
924 
925 
926 //============================================================================
928 {
929  if (isFloating())
930  {
931  return dockContainer()->floatingWidget()->isFullScreen();
932  }
933  else
934  {
935  return Super::isFullScreen();
936  }
937 }
938 
939 
940 //============================================================================
942 {
943  if (d->DockArea && !isClosed())
944  {
946  }
947 }
948 
949 
950 //============================================================================
952 {
953  return d->DockArea && (d->DockArea->openDockWidgetsCount() > 1);
954 }
955 
956 
957 
958 //============================================================================
960 {
961  return d->DockArea && (d->DockArea->currentDockWidget() == this);
962 }
963 
964 
965 //============================================================================
967 {
968  if (isClosed())
969  {
970  return;
971  }
972 
973  setAsCurrentTab();
974  if (isInFloatingContainer())
975  {
976  auto FloatingWindow = window();
977  FloatingWindow->raise();
978  FloatingWindow->activateWindow();
979  }
980 }
981 
982 
983 } // namespace ads
984 
985 //---------------------------------------------------------------------------
986 // EOF DockWidget.cpp
DockSplitter.h
Declaration of CDockSplitter.
ads::CDockWidget::widget
QWidget * widget() const
Definition: DockWidget.cpp:321
ads::CDockWidget::viewToggled
void viewToggled(bool Open)
ads::CDockWidget::eInsertMode
eInsertMode
Definition: DockWidget.h:188
ads::CDockWidget::icon
QIcon icon() const
Definition: DockWidget.cpp:650
ads_globals.h
Declaration of.
ads::DockWidgetPrivate::Layout
QBoxLayout * Layout
Definition: DockWidget.cpp:70
ads::CDockAreaWidget::toggleDockWidgetView
void toggleDockWidgetView(CDockWidget *DockWidget, bool Open)
Definition: DockAreaWidget.cpp:734
ads::CDockWidget::d
DockWidgetPrivate * d
private data (pimpl)
Definition: DockWidget.h:58
ads::DockWidgetPrivate::ToolBarIconSizeFloating
QSize ToolBarIconSizeFloating
Definition: DockWidget.cpp:83
ads::CDockWidget::setAsCurrentTab
void setAsCurrentTab()
Definition: DockWidget.cpp:941
ads::CDockWidget::dockAreaWidget
CDockAreaWidget * dockAreaWidget() const
Definition: DockWidget.cpp:394
ads::CDockWidget::setFeatures
void setFeatures(DockWidgetFeatures features)
Definition: DockWidget.cpp:335
ads::CDockManager::centralWidget
CDockWidget * centralWidget() const
Definition: DockManager.cpp:919
ads::CDockWidget::minimumSizeHint
virtual QSize minimumSizeHint() const override
Definition: DockWidget.cpp:802
ads::CDockWidget::toggleViewAction
QAction * toggleViewAction() const
Definition: DockWidget.cpp:438
DockContainerWidget.h
Declaration of CDockContainerWidget class.
ads::CDockAreaWidget::toggleView
void toggleView(bool Open)
Definition: DockAreaWidget.cpp:857
FloatingDockContainer.h
Declaration of CFloatingDockContainer class.
ads::CDockWidget::StateFloating
@ StateFloating
Definition: DockWidget.h:168
s
XmlRpcServer s
ads::CDockWidget::setDockArea
void setDockArea(CDockAreaWidget *DockArea)
Definition: DockWidget.cpp:549
ads::CDockWidgetTab::detachDockWidget
void detachDockWidget()
Definition: DockWidgetTab.cpp:660
ads::CDockAreaWidget::markTitleBarMenuOutdated
void markTitleBarMenuOutdated()
Definition: DockAreaWidget.cpp:767
ads::CDockWidget::titleChanged
void titleChanged(const QString &Title)
ads::DockWidgetPrivate::setupScrollArea
void setupScrollArea()
Definition: DockWidget.cpp:212
right
lu_byte right
Definition: lparser.c:1227
ads::CDockWidget::ActionModeToggle
@ ActionModeToggle
ActionModeToggle.
Definition: DockWidget.h:222
ads::CDockWidget::createDefaultToolBar
QToolBar * createDefaultToolBar()
Definition: DockWidget.cpp:664
ads::CDockWidget::setClosedState
void setClosedState(bool Closed)
Definition: DockWidget.cpp:795
ads::CDockWidget::deleteDockWidget
void deleteDockWidget()
Definition: DockWidget.cpp:827
ads::CDockWidget::~CDockWidget
virtual ~CDockWidget()
Definition: DockWidget.cpp:248
ads::CDockWidget::closeDockWidgetInternal
bool closeDockWidgetInternal(bool ForceClose=false)
Definition: DockWidget.cpp:843
ads::DockWidgetPrivate::TabWidget
CDockWidgetTab * TabWidget
Definition: DockWidget.cpp:72
ads::CDockWidget::CustomCloseHandling
@ CustomCloseHandling
clicking the close button will not close the dock widget but emits the closeRequested() signal instea...
Definition: DockWidget.h:154
ads::CDockContainerWidget::floatingWidget
CFloatingDockContainer * floatingWidget() const
Definition: DockContainerWidget.cpp:1831
ads::CDockWidget::isFullScreen
bool isFullScreen() const
Definition: DockWidget.cpp:927
TabWidget
Definition: tab_widget.h:20
DockWidget.h
Declaration of CDockWidget class.
ads::CDockWidget::CDockWidget
CDockWidget(const QString &title, QWidget *parent=0)
Definition: DockWidget.cpp:223
ads::CDockWidget::raise
void raise()
Definition: DockWidget.cpp:966
ads::DockWidgetPrivate::IsFloatingTopLevel
bool IsFloatingTopLevel
Definition: DockWidget.cpp:84
ads::DockWidgetPrivate::MinimumSizeHintMode
CDockWidget::eMinimumSizeHintMode MinimumSizeHintMode
Definition: DockWidget.cpp:86
ads::CDockWidget::emitTopLevelChanged
void emitTopLevelChanged(bool Floating)
Definition: DockWidget.cpp:784
QList< QAction * >
ads::CDockAreaWidget
Definition: DockAreaWidget.h:55
ads::CDockWidget::dockManager
CDockManager * dockManager() const
Definition: DockWidget.cpp:366
ads::CDockWidget::setToolBarIconSize
void setToolBarIconSize(const QSize &IconSize, eState State)
Definition: DockWidget.cpp:721
ads::DockWidgetPrivate::DockManager
CDockManager * DockManager
Definition: DockWidget.cpp:74
ads::CDockContainerWidget::isFloating
bool isFloating() const
Definition: DockContainerWidget.cpp:1494
ads::CDockWidget::takeWidget
QWidget * takeWidget()
Definition: DockWidget.cpp:294
ads::CDockWidget::emitTopLevelEventForWidget
static void emitTopLevelEventForWidget(CDockWidget *TopLevelDockWidget, bool Floating)
Definition: DockWidget.cpp:773
ads::componentsFactory
const CDockComponentsFactory * componentsFactory()
Definition: DockComponentsFactory.h:82
ads::CDockWidget::setFloating
void setFloating()
Definition: DockWidget.cpp:816
ads::CFloatingDockContainer::dockWidgets
QList< CDockWidget * > dockWidgets() const
Definition: FloatingDockContainer.cpp:1029
ads::CDockWidget::setToggleViewActionMode
void setToggleViewActionMode(eToggleViewActionMode Mode)
Definition: DockWidget.cpp:445
ads::CDockAreaWidget::openDockWidgetsCount
int openDockWidgetsCount() const
Definition: DockAreaWidget.cpp:656
ads::CDockWidget::isFloating
bool isFloating() const
Definition: DockWidget.cpp:401
ads::CDockWidget::isClosed
bool isClosed() const
Definition: DockWidget.cpp:431
ads::CDockAreaWidget::nextOpenDockWidget
CDockWidget * nextOpenDockWidget(CDockWidget *DockWidget) const
Definition: DockAreaWidget.cpp:807
ads::DockWidgetPrivate::setupToolBar
void setupToolBar()
Definition: DockWidget.cpp:198
ads::CDockContainerWidget::topLevelDockWidget
CDockWidget * topLevelDockWidget() const
Definition: DockContainerWidget.cpp:1765
ads::DockWidgetPrivate::ScrollArea
QScrollArea * ScrollArea
Definition: DockWidget.cpp:78
ads::CDockWidget::isCentralWidget
bool isCentralWidget() const
Definition: DockWidget.cpp:468
ads::CDockWidget::setTabToolTip
void setTabToolTip(const QString &text)
Definition: DockWidget.cpp:620
ads::CDockManager
Definition: DockManager.h:69
ads::CFloatingDockContainer::updateWindowTitle
void updateWindowTitle()
Definition: FloatingDockContainer.cpp:963
ads::CDockWidget::eState
eState
Definition: DockWidget.h:164
ads
Definition: ads_globals.h:69
ads::CDockWidget::dockContainer
CDockContainerWidget * dockContainer() const
Definition: DockWidget.cpp:380
ads::CDockWidget::isCurrentTab
bool isCurrentTab() const
Definition: DockWidget.cpp:959
DockComponentsFactory.h
Declaration of DockComponentsFactory.
ads::CDockWidget::tabWidget
CDockWidgetTab * tabWidget() const
Definition: DockWidget.cpp:328
ads::CDockWidget::closeRequested
void closeRequested()
ads::CDockAreaWidget::updateTitleBarVisibility
void updateTitleBarVisibility()
Definition: DockAreaWidget.cpp:743
ads::CDockWidget::toolBarStyle
Qt::ToolButtonStyle toolBarStyle(eState State) const
Definition: DockWidget.cpp:707
ADS_PRINT
#define ADS_PRINT(s)
Definition: ads_globals.h:60
ads::CDockWidget::saveState
void saveState(QXmlStreamWriter &Stream) const
Definition: DockWidget.cpp:558
ads::CDockWidget::flagAsUnassigned
void flagAsUnassigned()
Definition: DockWidget.cpp:568
ads::DockWidgetPrivate::ToolBar
QToolBar * ToolBar
Definition: DockWidget.cpp:79
ads::CDockWidget
Definition: DockWidget.h:54
ads::CDockAreaWidget::currentDockWidget
CDockWidget * currentDockWidget() const
Definition: DockAreaWidget.cpp:554
ads::CDockWidget::eToggleViewActionMode
eToggleViewActionMode
Definition: DockWidget.h:220
DockAreaWidget.h
Declaration of CDockAreaWidget class.
ads::CDockWidget::DefaultDockWidgetFeatures
@ DefaultDockWidgetFeatures
Definition: DockWidget.h:157
ads::CDockWidget::toggleViewInternal
void toggleViewInternal(bool Open)
Definition: DockWidget.cpp:499
d
d
ads::CDockWidget::DockWidgetFeature
DockWidgetFeature
Definition: DockWidget.h:148
ads::CDockWidget::showNormal
void showNormal()
Definition: DockWidget.cpp:913
ads::CDockComponentsFactory::createDockWidgetTab
virtual CDockWidgetTab * createDockWidgetTab(CDockWidget *DockWidget) const
Definition: DockComponentsFactory.cpp:27
ads::DockWidgetPrivate::_this
CDockWidget * _this
Definition: DockWidget.cpp:69
ads::CDockWidget::setDockManager
void setDockManager(CDockManager *DockManager)
Definition: DockWidget.cpp:373
ads::CDockWidget::toolBar
QToolBar * toolBar() const
Definition: DockWidget.cpp:657
ads::DockWidgetPrivate::ToggleViewAction
QAction * ToggleViewAction
Definition: DockWidget.cpp:76
ads::CDockWidgetTab::setText
void setText(const QString &title)
Definition: DockWidgetTab.cpp:638
ads::CDockWidgetTab::setIcon
void setIcon(const QIcon &Icon)
Definition: DockWidgetTab.cpp:567
ads::CDockWidget::ForceNoScrollArea
@ ForceNoScrollArea
Definition: DockWidget.h:192
ads::CDockWidget::features
DockWidgetFeatures features() const
Definition: DockWidget.cpp:359
ads::DockWidgetPrivate::TitleBarActions
QList< QAction * > TitleBarActions
Definition: DockWidget.cpp:85
ads::CDockWidget::setFeature
void setFeature(DockWidgetFeature flag, bool on)
Definition: DockWidget.cpp:350
ads::CDockWidget::isTabbed
bool isTabbed() const
Definition: DockWidget.cpp:951
ads::CDockAreaWidget::dockContainer
CDockContainerWidget * dockContainer() const
Definition: DockAreaWidget.cpp:403
ads::CDockAreaWidget::hideAreaWithNoVisibleContent
void hideAreaWithNoVisibleContent()
Definition: DockAreaWidget.cpp:504
ads::CDockWidget::DockWidgetDeleteOnClose
@ DockWidgetDeleteOnClose
deletes the dock widget when it is closed
Definition: DockWidget.h:153
DockManager.h
Declaration of CDockManager class.
ads::DockWidgetPrivate::Closed
bool Closed
Definition: DockWidget.cpp:77
DockWidgetTab.h
Declaration of CDockWidgetTab class.
ads::CDockWidget::topLevelChanged
void topLevelChanged(bool topLevel)
ads::DockWidgetPrivate::Widget
QWidget * Widget
Definition: DockWidget.cpp:71
ads::DockWidgetPrivate::showDockWidget
void showDockWidget()
Definition: DockWidget.cpp:131
ads::DockWidgetPrivate::updateParentDockArea
void updateParentDockArea()
Definition: DockWidget.cpp:172
ads::CDockWidget::event
virtual bool event(QEvent *e) override
Definition: DockWidget.cpp:579
ads::CDockAreaWidget::setCurrentDockWidget
void setCurrentDockWidget(CDockWidget *DockWidget)
Definition: DockAreaWidget.cpp:567
ads::CDockWidget::eMinimumSizeHintMode
eMinimumSizeHintMode
Definition: DockWidget.h:205
ads::CDockWidget::closeDockWidget
void closeDockWidget()
Definition: DockWidget.cpp:836
ads::CDockWidget::setToolbarFloatingStyle
void setToolbarFloatingStyle(bool topLevel)
Definition: DockWidget.cpp:751
ads::CDockWidgetTab::onDockWidgetFeaturesChanged
void onDockWidgetFeaturesChanged()
Definition: DockWidgetTab.cpp:687
ads::DockWidgetPrivate
Definition: DockWidget.cpp:67
ads::DockWidgetPrivate::hideDockWidget
void hideDockWidget()
Definition: DockWidget.cpp:164
ads::CFloatingDockContainer
Definition: FloatingDockContainer.h:104
ads::CDockWidget::featuresChanged
void featuresChanged(ads::CDockWidget::DockWidgetFeatures features)
ads::CDockWidget::setTitleBarActions
void setTitleBarActions(QList< QAction * > actions)
Definition: DockWidget.cpp:885
ads::CDockContainerWidget
Definition: DockContainerWidget.h:61
ads::CDockWidget::setToggleViewActionChecked
void setToggleViewActionChecked(bool Checked)
Definition: DockWidget.cpp:256
ads::DockWidgetPrivate::DockWidgetPrivate
DockWidgetPrivate(CDockWidget *_public)
Definition: DockWidget.cpp:123
ads::CDockWidget::MinimumSizeHintFromDockWidget
@ MinimumSizeHintFromDockWidget
Definition: DockWidget.h:207
ads::CDockWidget::toolBarIconSize
QSize toolBarIconSize(eState State) const
Definition: DockWidget.cpp:737
ads::CDockWidget::setWidget
void setWidget(QWidget *widget, eInsertMode InsertMode=AutoScrollArea)
Definition: DockWidget.cpp:266
ads::CDockManager::FocusHighlighting
@ FocusHighlighting
enables styling of focused dock widget tabs or floating widget titlebar
Definition: DockManager.h:182
ads::CDockWidget::setMinimumSizeHintMode
void setMinimumSizeHintMode(eMinimumSizeHintMode Mode)
Definition: DockWidget.cpp:461
ads::CDockWidget::toggleView
void toggleView(bool Open=true)
Definition: DockWidget.cpp:475
ads::CDockWidget::visibilityChanged
void visibilityChanged(bool visible)
ads::CDockWidget::setIcon
void setIcon(const QIcon &Icon)
Definition: DockWidget.cpp:639
ads::CDockManager::removeDockWidget
void removeDockWidget(CDockWidget *Dockwidget)
Definition: DockManager.cpp:804
ads::CDockWidget::closed
void closed()
ads::CDockWidgetTab::icon
const QIcon & icon() const
Definition: DockWidgetTab.cpp:599
ads::CDockWidgetTab
Definition: DockWidgetTab.h:50
ads::CDockWidget::titleBarActions
virtual QList< QAction * > titleBarActions() const
Definition: DockWidget.cpp:892
ads::DockWidgetPrivate::Features
CDockWidget::DockWidgetFeatures Features
Definition: DockWidget.cpp:73
ads::CDockManager::testConfigFlag
static bool testConfigFlag(eConfigFlag Flag)
Definition: DockManager.cpp:1041
ads::internal::findParent
T findParent(const QWidget *w)
Definition: ads_globals.h:203
ads::CDockWidget::setToolBar
void setToolBar(QToolBar *ToolBar)
Definition: DockWidget.cpp:676
ads::CDockWidget::setToolBarStyle
void setToolBarStyle(Qt::ToolButtonStyle Style, eState State)
Definition: DockWidget.cpp:691
ads::DockWidgetPrivate::ToolBarStyleDocked
Qt::ToolButtonStyle ToolBarStyleDocked
Definition: DockWidget.cpp:80
ads::CDockWidget::showFullScreen
void showFullScreen()
Definition: DockWidget.cpp:899
ads::DockWidgetPrivate::DockArea
CDockAreaWidget * DockArea
Definition: DockWidget.cpp:75
ads::CDockWidget::isInFloatingContainer
bool isInFloatingContainer() const
Definition: DockWidget.cpp:413
ads::DockWidgetPrivate::ToolBarStyleFloating
Qt::ToolButtonStyle ToolBarStyleFloating
Definition: DockWidget.cpp:81
ads::DockWidgetPrivate::ToolBarIconSizeDocked
QSize ToolBarIconSizeDocked
Definition: DockWidget.cpp:82
ads::internal::setFlag
void setFlag(T &Flags, typename T::enum_type flag, bool on=true)
Definition: ads_globals.h:230


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:44