File indexing completed on 2024-05-05 04:19:13
0001 /* 0002 Gwenview: an image viewer 0003 Copyright 2007 Aurélien Gâteau <agateau@kde.org> 0004 0005 This program is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU General Public License 0007 as published by the Free Software Foundation; either version 2 0008 of the License, or (at your option) any later version. 0009 0010 This program is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0013 GNU General Public License for more details. 0014 0015 You should have received a copy of the GNU General Public License 0016 along with this program; if not, write to the Free Software 0017 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 0018 0019 */ 0020 #include "abstractcontextmanageritem.h" 0021 0022 // Local 0023 #include <lib/contextmanager.h> 0024 0025 namespace Gwenview 0026 { 0027 struct AbstractContextManagerItemPrivate { 0028 ContextManager *mContextManager = nullptr; 0029 QWidget *mWidget = nullptr; 0030 }; 0031 0032 AbstractContextManagerItem::AbstractContextManagerItem(ContextManager *manager) 0033 : QObject(manager) 0034 , d(new AbstractContextManagerItemPrivate) 0035 { 0036 d->mContextManager = manager; 0037 d->mWidget = nullptr; 0038 } 0039 0040 AbstractContextManagerItem::~AbstractContextManagerItem() 0041 { 0042 delete d; 0043 } 0044 0045 ContextManager *AbstractContextManagerItem::contextManager() const 0046 { 0047 return d->mContextManager; 0048 } 0049 0050 QWidget *AbstractContextManagerItem::widget() const 0051 { 0052 return d->mWidget; 0053 } 0054 0055 void AbstractContextManagerItem::setWidget(QWidget *widget) 0056 { 0057 d->mWidget = widget; 0058 } 0059 0060 } // namespace 0061 0062 #include "moc_abstractcontextmanageritem.cpp"