diff --git a/vcl/CustomTarget_qt5_moc.mk b/vcl/CustomTarget_qt5_moc.mk index e49928e78ef5..da238cd1f99b 100644 --- a/vcl/CustomTarget_qt5_moc.mk +++ b/vcl/CustomTarget_qt5_moc.mk @@ -51,6 +51,7 @@ $(call gb_CustomTarget_get_target,vcl/qt5) : \ $(gb_CustomTarget_workdir)/vcl/qt5/QtInstanceScale.moc \ $(gb_CustomTarget_workdir)/vcl/qt5/QtInstanceScrollbar.moc \ $(gb_CustomTarget_workdir)/vcl/qt5/QtInstanceScrolledWindow.moc \ + $(gb_CustomTarget_workdir)/vcl/qt5/QtInstanceSizeGroup.moc \ $(gb_CustomTarget_workdir)/vcl/qt5/QtInstanceSpinButton.moc \ $(gb_CustomTarget_workdir)/vcl/qt5/QtInstanceSpinner.moc \ $(gb_CustomTarget_workdir)/vcl/qt5/QtInstanceTextView.moc \ diff --git a/vcl/CustomTarget_qt6_moc.mk b/vcl/CustomTarget_qt6_moc.mk index 6b839f1ef5e4..763958dbc252 100644 --- a/vcl/CustomTarget_qt6_moc.mk +++ b/vcl/CustomTarget_qt6_moc.mk @@ -51,6 +51,7 @@ $(call gb_CustomTarget_get_target,vcl/qt6) : \ $(gb_CustomTarget_workdir)/vcl/qt6/QtInstanceScale.moc \ $(gb_CustomTarget_workdir)/vcl/qt6/QtInstanceScrollbar.moc \ $(gb_CustomTarget_workdir)/vcl/qt6/QtInstanceScrolledWindow.moc \ + $(gb_CustomTarget_workdir)/vcl/qt6/QtInstanceSizeGroup.moc \ $(gb_CustomTarget_workdir)/vcl/qt6/QtInstanceSpinButton.moc \ $(gb_CustomTarget_workdir)/vcl/qt6/QtInstanceSpinner.moc \ $(gb_CustomTarget_workdir)/vcl/qt6/QtInstanceTextView.moc \ diff --git a/vcl/Library_vclplug_qt5.mk b/vcl/Library_vclplug_qt5.mk index 17cacb5c5151..f48553c48aea 100644 --- a/vcl/Library_vclplug_qt5.mk +++ b/vcl/Library_vclplug_qt5.mk @@ -133,6 +133,7 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_qt5,\ vcl/qt5/QtInstanceScale \ vcl/qt5/QtInstanceScrollbar \ vcl/qt5/QtInstanceScrolledWindow \ + vcl/qt5/QtInstanceSizeGroup \ vcl/qt5/QtInstanceSpinButton \ vcl/qt5/QtInstanceSpinner \ vcl/qt5/QtInstanceTextView \ diff --git a/vcl/Library_vclplug_qt6.mk b/vcl/Library_vclplug_qt6.mk index 585c7fdf06b8..c46a4997d1c1 100644 --- a/vcl/Library_vclplug_qt6.mk +++ b/vcl/Library_vclplug_qt6.mk @@ -133,6 +133,7 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_qt6,\ vcl/qt6/QtInstanceScale \ vcl/qt6/QtInstanceScrollbar \ vcl/qt6/QtInstanceScrolledWindow \ + vcl/qt6/QtInstanceSizeGroup \ vcl/qt6/QtInstanceSpinButton \ vcl/qt6/QtInstanceSpinner \ vcl/qt6/QtInstanceTextView \ diff --git a/vcl/inc/qt5/QtInstanceSizeGroup.hxx b/vcl/inc/qt5/QtInstanceSizeGroup.hxx new file mode 100644 index 000000000000..87f7f88cf12b --- /dev/null +++ b/vcl/inc/qt5/QtInstanceSizeGroup.hxx @@ -0,0 +1,28 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#pragma once + +#include + +#include + +#include + +class QtInstanceSizeGroup : public QObject, public virtual weld::SizeGroup +{ + Q_OBJECT + +public: + QtInstanceSizeGroup(VclSizeGroupMode eMode); + + virtual void add_widget(weld::Widget* pWidget) override; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/inc/qt6/QtInstanceSizeGroup.hxx b/vcl/inc/qt6/QtInstanceSizeGroup.hxx new file mode 100644 index 000000000000..9bab7605f54c --- /dev/null +++ b/vcl/inc/qt6/QtInstanceSizeGroup.hxx @@ -0,0 +1,12 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "../qt5/QtInstanceSizeGroup.hxx" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx index b5deab0408ad..39a70635c726 100644 --- a/vcl/qt5/QtInstanceBuilder.cxx +++ b/vcl/qt5/QtInstanceBuilder.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -962,10 +963,9 @@ std::unique_ptr QtInstanceBuilder::weld_scrollbar(const OUStrin return xRet; } -std::unique_ptr QtInstanceBuilder::create_size_group(VclSizeGroupMode) +std::unique_ptr QtInstanceBuilder::create_size_group(VclSizeGroupMode eMode) { - assert(false && "Not implemented yet"); - return nullptr; + return std::make_unique(eMode); } /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/qt5/QtInstanceSizeGroup.cxx b/vcl/qt5/QtInstanceSizeGroup.cxx new file mode 100644 index 000000000000..d335404d3572 --- /dev/null +++ b/vcl/qt5/QtInstanceSizeGroup.cxx @@ -0,0 +1,28 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include + +#include +#include + +#include + +QtInstanceSizeGroup::QtInstanceSizeGroup(VclSizeGroupMode eMode) +{ + if (eMode != VclSizeGroupMode::NONE) + SAL_WARN("vcl.qt", "QtInstanceSizeGroup logic not implemented yet"); +} + +void QtInstanceSizeGroup::add_widget(weld::Widget*) +{ + SAL_WARN("vcl.qt", "QtInstanceSizeGroup logic not implemented yet"); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/qt6/QtInstanceSizeGroup.cxx b/vcl/qt6/QtInstanceSizeGroup.cxx new file mode 100644 index 000000000000..61d4bf94eacd --- /dev/null +++ b/vcl/qt6/QtInstanceSizeGroup.cxx @@ -0,0 +1,12 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "../qt5/QtInstanceSizeGroup.cxx" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */