79        QDockWidget(parent, flags), 
 
   82        setObjectName(colorName + QLatin1String(
" Dock Widget"));
 
   83        setWindowTitle(objectName() + QLatin1String(
" [*]"));
 
  133        leftAction = 
new QAction(tr(
"Place on Left"), 
this);
 
  137        rightAction = 
new QAction(tr(
"Place on Right"), 
this);
 
  141        topAction = 
new QAction(tr(
"Place on Top"), 
this);
 
  145        bottomAction = 
new QAction(tr(
"Place on Bottom"), 
this);
 
  164        tabMenu->setTitle(tr(
"Tab into"));
 
  168        splitHMenu->setTitle(tr(
"Split horizontally into"));
 
  172        splitVMenu->setTitle(tr(
"Split vertically into"));
 
  175        QAction *windowModifiedAction = 
new QAction(tr(
"Modified"), 
this);
 
  176        windowModifiedAction->setCheckable(
true);
 
  177        windowModifiedAction->setChecked(
false);
 
  178        connect(windowModifiedAction, &QAction::toggled, 
this, &QWidget::setWindowModified);
 
  180        menu = 
new QMenu(colorName, 
this);
 
  181        menu->addAction(toggleViewAction());
 
  182        menu->addAction(tr(
"Raise"), 
this, &QWidget::raise);
 
  185        menu->addSeparator();
 
  191        menu->addSeparator();
 
  193        menu->addSeparator();
 
  195        menu->addSeparator();
 
  199        menu->addSeparator();
 
  200        menu->addAction(windowModifiedAction);
 
  204        if (colorName == QLatin1String(
"Black")) {
 
  205            leftAction->setShortcut(Qt::CTRL | Qt::Key_W);
 
  207            toggleViewAction()->setShortcut(Qt::CTRL | Qt::Key_R);
 
 
  213        const Qt::DockWidgetArea area = 
mainWindow->dockWidgetArea(
this);
 
  214        const Qt::DockWidgetAreas areas = allowedAreas();
 
  216        closableAction->setChecked(features() & QDockWidget::DockWidgetClosable);
 
  217        if (windowType() == Qt::Drawer) {
 
  224            floatableAction->setChecked(features() & QDockWidget::DockWidgetFloatable);
 
  227            movableAction->setChecked(features() & QDockWidget::DockWidgetMovable);
 
  229                ->setChecked(features() & QDockWidget::DockWidgetVerticalTitleBar);
 
  246            leftAction->setChecked(area == Qt::LeftDockWidgetArea);
 
  250            rightAction->setChecked(area == Qt::RightDockWidgetArea);
 
  254            topAction->setChecked(area == Qt::TopDockWidgetArea);
 
  258            bottomAction->setChecked(area == Qt::BottomDockWidgetArea);
 
  262            leftAction->setEnabled(areas & Qt::LeftDockWidgetArea);
 
  263            rightAction->setEnabled(areas & Qt::RightDockWidgetArea);
 
  264            topAction->setEnabled(areas & Qt::TopDockWidgetArea);
 
  265            bottomAction->setEnabled(areas & Qt::BottomDockWidgetArea);
 
  273            tabMenu->addAction(dock->objectName());
 
 
  320        Qt::DockWidgetAreas areas = allowedAreas();
 
  321        areas = a ? areas | area : areas & ~area;
 
  322        setAllowedAreas(areas);
 
  325            leftAction->setEnabled(areas & Qt::LeftDockWidgetArea);
 
  326            rightAction->setEnabled(areas & Qt::RightDockWidgetArea);
 
  327            topAction->setEnabled(areas & Qt::TopDockWidgetArea);
 
  328            bottomAction->setEnabled(areas & Qt::BottomDockWidgetArea);