diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 5ae02d6..ba2a064 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -5,5 +5,6 @@ add_subdirectory(hideshow) add_subdirectory(sidebar) add_subdirectory(deleteonclose) add_subdirectory(centralwidget) +add_subdirectory(autohide) add_subdirectory(emptydockarea) add_subdirectory(dockindock) \ No newline at end of file diff --git a/examples/autohide/CMakeLists.txt b/examples/autohide/CMakeLists.txt index 7f57821..cec3910 100644 --- a/examples/autohide/CMakeLists.txt +++ b/examples/autohide/CMakeLists.txt @@ -1,19 +1,19 @@ cmake_minimum_required(VERSION 3.5) -project(ads_example_centralwidget VERSION ${VERSION_SHORT}) +project(ads_example_autohide VERSION ${VERSION_SHORT}) find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED) find_package(Qt${QT_VERSION_MAJOR} 5.5 COMPONENTS Core Gui Widgets REQUIRED) set(CMAKE_INCLUDE_CURRENT_DIR ON) -add_executable(CentralWidgetExample WIN32 +add_executable(AutoHideExample WIN32 main.cpp mainwindow.cpp mainwindow.ui ) -target_include_directories(CentralWidgetExample PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../../src") -target_link_libraries(CentralWidgetExample PRIVATE qtadvanceddocking) -target_link_libraries(CentralWidgetExample PUBLIC Qt${QT_VERSION_MAJOR}::Core +target_include_directories(AutoHideExample PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../../src") +target_link_libraries(AutoHideExample PRIVATE qtadvanceddocking) +target_link_libraries(AutoHideExample PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Widgets) -set_target_properties(CentralWidgetExample PROPERTIES +set_target_properties(AutoHideExample PROPERTIES AUTOMOC ON AUTORCC ON AUTOUIC ON @@ -21,7 +21,7 @@ set_target_properties(CentralWidgetExample PROPERTIES CXX_STANDARD_REQUIRED ON CXX_EXTENSIONS OFF VERSION ${VERSION_SHORT} - EXPORT_NAME "Qt Advanced Docking System Central Widget Example" + EXPORT_NAME "Qt Advanced Docking System Auto Hide Example" ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/lib" LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/lib" RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/bin" diff --git a/examples/autohide/mainwindow.cpp b/examples/autohide/mainwindow.cpp index 3ad0056..32fc754 100644 --- a/examples/autohide/mainwindow.cpp +++ b/examples/autohide/mainwindow.cpp @@ -54,7 +54,7 @@ CMainWindow::CMainWindow(QWidget *parent) TableDockWidget->setMinimumSizeHintMode(CDockWidget::MinimumSizeHintFromDockWidget); TableDockWidget->resize(250, 150); TableDockWidget->setMinimumSize(200,150); - auto TableArea = DockManager->addDockWidget(DockWidgetArea::LeftDockWidgetArea, TableDockWidget); + DockManager->addOverlayDockWidget(CDockWidgetSideTab::SideTabBarArea::Left, TableDockWidget); ui->menuView->addAction(TableDockWidget->toggleViewAction()); table = new QTableWidget(); @@ -65,7 +65,7 @@ CMainWindow::CMainWindow(QWidget *parent) TableDockWidget->setMinimumSizeHintMode(CDockWidget::MinimumSizeHintFromDockWidget); TableDockWidget->resize(250, 150); TableDockWidget->setMinimumSize(200,150); - DockManager->addDockWidget(DockWidgetArea::BottomDockWidgetArea, TableDockWidget, TableArea); + DockManager->addOverlayDockWidget(CDockWidgetSideTab::SideTabBarArea::Left, TableDockWidget); ui->menuView->addAction(TableDockWidget->toggleViewAction()); QTableWidget* propertiesTable = new QTableWidget(); diff --git a/examples/centralwidget/CMakeLists.txt b/examples/centralwidget/CMakeLists.txt index cec3910..7f57821 100644 --- a/examples/centralwidget/CMakeLists.txt +++ b/examples/centralwidget/CMakeLists.txt @@ -1,19 +1,19 @@ cmake_minimum_required(VERSION 3.5) -project(ads_example_autohide VERSION ${VERSION_SHORT}) +project(ads_example_centralwidget VERSION ${VERSION_SHORT}) find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED) find_package(Qt${QT_VERSION_MAJOR} 5.5 COMPONENTS Core Gui Widgets REQUIRED) set(CMAKE_INCLUDE_CURRENT_DIR ON) -add_executable(AutoHideExample WIN32 +add_executable(CentralWidgetExample WIN32 main.cpp mainwindow.cpp mainwindow.ui ) -target_include_directories(AutoHideExample PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../../src") -target_link_libraries(AutoHideExample PRIVATE qtadvanceddocking) -target_link_libraries(AutoHideExample PUBLIC Qt${QT_VERSION_MAJOR}::Core +target_include_directories(CentralWidgetExample PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../../src") +target_link_libraries(CentralWidgetExample PRIVATE qtadvanceddocking) +target_link_libraries(CentralWidgetExample PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Widgets) -set_target_properties(AutoHideExample PROPERTIES +set_target_properties(CentralWidgetExample PROPERTIES AUTOMOC ON AUTORCC ON AUTOUIC ON @@ -21,7 +21,7 @@ set_target_properties(AutoHideExample PROPERTIES CXX_STANDARD_REQUIRED ON CXX_EXTENSIONS OFF VERSION ${VERSION_SHORT} - EXPORT_NAME "Qt Advanced Docking System Auto Hide Example" + EXPORT_NAME "Qt Advanced Docking System Central Widget Example" ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/lib" LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/lib" RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/bin" diff --git a/examples/centralwidget/mainwindow.cpp b/examples/centralwidget/mainwindow.cpp index eca2e94..3ad0056 100644 --- a/examples/centralwidget/mainwindow.cpp +++ b/examples/centralwidget/mainwindow.cpp @@ -54,7 +54,7 @@ CMainWindow::CMainWindow(QWidget *parent) TableDockWidget->setMinimumSizeHintMode(CDockWidget::MinimumSizeHintFromDockWidget); TableDockWidget->resize(250, 150); TableDockWidget->setMinimumSize(200,150); - DockManager->addOverlayDockWidget(SideTabBarArea::Left, TableDockWidget); + auto TableArea = DockManager->addDockWidget(DockWidgetArea::LeftDockWidgetArea, TableDockWidget); ui->menuView->addAction(TableDockWidget->toggleViewAction()); table = new QTableWidget(); @@ -65,7 +65,7 @@ CMainWindow::CMainWindow(QWidget *parent) TableDockWidget->setMinimumSizeHintMode(CDockWidget::MinimumSizeHintFromDockWidget); TableDockWidget->resize(250, 150); TableDockWidget->setMinimumSize(200,150); - DockManager->addOverlayDockWidget(SideTabBarArea::Left, TableDockWidget); + DockManager->addDockWidget(DockWidgetArea::BottomDockWidgetArea, TableDockWidget, TableArea); ui->menuView->addAction(TableDockWidget->toggleViewAction()); QTableWidget* propertiesTable = new QTableWidget();