diff --git a/README.md b/README.md index d4c1d99..18e5586 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,9 @@ [![Build status](https://ci.appveyor.com/api/projects/status/qcfb3cy932jw9mpy/branch/master?svg=true)](https://ci.appveyor.com/project/githubuser0xFFFF/qt-advanced-docking-system/branch/master) [![License: LGPL v2.1](https://img.shields.io/badge/License-LGPL%20v2.1-blue.svg)](gnu-lgpl-v2.1.md) +[What's new](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/releases/latest) • +[Documentation](doc/user-guide.md) + Qt Advanced Docking System lets you create customizable layouts using a full featured window docking system similar to what is found in many popular integrated development environments (IDEs) such as Visual Studio. diff --git a/demo/MainWindow.cpp b/demo/MainWindow.cpp index 6e5e95a..52a72a8 100644 --- a/demo/MainWindow.cpp +++ b/demo/MainWindow.cpp @@ -564,6 +564,7 @@ CMainWindow::CMainWindow(QWidget *parent) : // CDockManager::setConfigFlag(CDockManager::HideSingleCentralWidgetTitleBar, true); // Now create the dock manager and its content + CDockManager::setConfigFlag(CDockManager::DockAreaHasCloseButton, true); d->DockManager = new CDockManager(this); // uncomment the following line to have the old style where the dock diff --git a/doc/cfg_flag_ActiveTabHasCloseButton_false.png b/doc/cfg_flag_ActiveTabHasCloseButton_false.png new file mode 100644 index 0000000..3632baa Binary files /dev/null and b/doc/cfg_flag_ActiveTabHasCloseButton_false.png differ diff --git a/doc/cfg_flag_ActiveTabHasCloseButton_true.png b/doc/cfg_flag_ActiveTabHasCloseButton_true.png new file mode 100644 index 0000000..be83d37 Binary files /dev/null and b/doc/cfg_flag_ActiveTabHasCloseButton_true.png differ diff --git a/doc/cfg_flag_DockAreaHasCloseButton_false.png b/doc/cfg_flag_DockAreaHasCloseButton_false.png new file mode 100644 index 0000000..9109146 Binary files /dev/null and b/doc/cfg_flag_DockAreaHasCloseButton_false.png differ diff --git a/doc/cfg_flag_DockAreaHasCloseButton_true.png b/doc/cfg_flag_DockAreaHasCloseButton_true.png new file mode 100644 index 0000000..b35afc2 Binary files /dev/null and b/doc/cfg_flag_DockAreaHasCloseButton_true.png differ diff --git a/doc/user-guide.md b/doc/user-guide.md new file mode 100644 index 0000000..b4c01a9 --- /dev/null +++ b/doc/user-guide.md @@ -0,0 +1,56 @@ +# User Guide + +## Configuration Flags + +The Advanced Docking System has a number of global configuration options to +configure the design and the functionality of the docking system. Each +configuration will be explained in detail in the following sections. + +### Setting Configuration Flags + +You should set the configuration flags before you create the dock manager +instance. That means, setting the configurations flags is the first thing +you do, if you use the library. + +```c++ +CDockManager::setConfigFlags(CDockManager::DefaultOpaqueConfig); +CDockManager::setConfigFlag(CDockManager::RetainTabSizeWhenCloseButtonHidden, true); +... +d->DockManager = new CDockManager(this); +``` + +If you set the configurations flags, you can set individual flags using the +function `CDockManager::setConfigFlag` or you can set all flags using +the function `CDockManager::setConfigFlags`. Instead of settings all +flags individualy, it is better to pick a predefined set of configuration +flags and then modify individual flags. The following predefined +configurations are avilable + +- `DefaultNonOpaqueConfig` - uses non opaque splitter resizing and non opaque docking +- `DefaultOpaqueConfig` - uses opaque splitter resizing and opaque docking + +Pick one of those predefined configurations and then modify the following +configurations flags to adjust the docking system to your needs. + +### `ActiveTabHasCloseButton` + +If this flag is set (default configuration), the active tab in a tab area has +a close button. + +![ActiveTabHasCloseButton true](cfg_flag_ActiveTabHasCloseButton_true.png) + +If this flag is cleared, the active tab has no close button. You can combine +this with the flag `DockAreaCloseButtonClosesTab` to use the close button +of the dock are to close the single tabs. + +![ActiveTabHasCloseButton true](cfg_flag_ActiveTabHasCloseButton_false.png) + +### `DockAreaHasCloseButton` + +If the flag is set (default configuration) each dock area has a close button. + +![DockAreaHasCloseButton true](cfg_flag_DockAreaHasCloseButton_true.png) + +If this flag is cleared, dock areas do not have a close button. + +![DockAreaHasCloseButton true](cfg_flag_DockAreaHasCloseButton_false.png) \ No newline at end of file