File indexing completed on 2025-01-26 05:24:22
0001 /* 0002 This file is part of the Kasten Framework, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2006, 2008-2009, 2019 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 "viewmanager.hpp" 0010 #include "viewmanager_p.hpp" 0011 0012 namespace Kasten { 0013 0014 ViewManager::ViewManager() 0015 : d_ptr(new ViewManagerPrivate(this)) 0016 { 0017 } 0018 0019 ViewManager::~ViewManager() = default; 0020 0021 ModelCodecViewManager* ViewManager::codecViewManager() const 0022 { 0023 Q_D(const ViewManager); 0024 0025 return d->codecViewManager(); 0026 } 0027 0028 void ViewManager::setViewFactory(AbstractViewFactory* factory) 0029 { 0030 Q_D(ViewManager); 0031 0032 d->setViewFactory(factory); 0033 } 0034 0035 QVector<AbstractView*> ViewManager::views() const 0036 { 0037 Q_D(const ViewManager); 0038 0039 return d->views(); 0040 } 0041 0042 AbstractView* ViewManager::viewByWidget(QWidget* widget) const 0043 { 0044 Q_D(const ViewManager); 0045 0046 return d->viewByWidget(widget); 0047 } 0048 0049 void ViewManager::createCopyOfView(AbstractView* view, Qt::Alignment alignment) 0050 { 0051 Q_D(ViewManager); 0052 0053 d->createCopyOfView(view, alignment); 0054 } 0055 0056 void ViewManager::createViewsFor(const QVector<Kasten::AbstractDocument*>& documents) 0057 { 0058 Q_D(ViewManager); 0059 0060 d->createViewsFor(documents); 0061 } 0062 0063 void ViewManager::removeViewsFor(const QVector<Kasten::AbstractDocument*>& documents) 0064 { 0065 Q_D(ViewManager); 0066 0067 d->removeViewsFor(documents); 0068 } 0069 0070 void ViewManager::removeViews(const QVector<AbstractView*>& views) 0071 { 0072 Q_D(ViewManager); 0073 0074 d->removeViews(views); 0075 } 0076 0077 } 0078 0079 #include "moc_viewmanager.cpp"