File indexing completed on 2024-09-22 05:16:06
0001 /* 0002 This file is part of the Kasten Framework, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2007-2008 Friedrich W. H. Kossebau <kossebau@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #include "fullscreencontroller.hpp" 0010 0011 // KF 0012 #include <KToggleFullScreenAction> 0013 #include <KXmlGuiWindow> 0014 #include <KActionCollection> 0015 #include <KStandardAction> 0016 0017 namespace Kasten { 0018 0019 FullScreenController::FullScreenController(KXmlGuiWindow* window) 0020 : mMainWindow(window) 0021 { 0022 auto* fullScreenAction = KStandardAction::fullScreen(this, &FullScreenController::switchFullScreen, 0023 window, this); 0024 0025 mMainWindow->actionCollection()->addAction(fullScreenAction->objectName(), fullScreenAction); 0026 } 0027 0028 void FullScreenController::setTargetModel(AbstractModel* model) 0029 { 0030 Q_UNUSED(model) 0031 } 0032 0033 void FullScreenController::switchFullScreen(bool toFullScreen) 0034 { 0035 KToggleFullScreenAction::setFullScreen(mMainWindow, toFullScreen); 0036 } 0037 0038 } 0039 0040 #include "moc_fullscreencontroller.cpp"