Pimcommon

abstractgenericplugininterface.cpp
1/*
2 SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "abstractgenericplugininterface.h"
8
9using namespace PimCommon;
10
11class PimCommon::AbstractGenericPluginInterfacePrivate
12{
13public:
14 AbstractGenericPluginInterfacePrivate() = default;
15
16 AbstractGenericPlugin *plugin = nullptr;
17 QWidget *parentWidget = nullptr;
18};
19
20AbstractGenericPluginInterface::AbstractGenericPluginInterface(QObject *parent)
21 : QObject(parent)
22 , d(new AbstractGenericPluginInterfacePrivate)
23{
24}
25
26AbstractGenericPluginInterface::~AbstractGenericPluginInterface() = default;
27
28void AbstractGenericPluginInterface::setParentWidget(QWidget *parent)
29{
30 d->parentWidget = parent;
31}
32
33QWidget *AbstractGenericPluginInterface::parentWidget() const
34{
35 return d->parentWidget;
36}
37
38void AbstractGenericPluginInterface::setPlugin(AbstractGenericPlugin *plugin)
39{
40 d->plugin = plugin;
41}
42
43AbstractGenericPlugin *AbstractGenericPluginInterface::plugin() const
44{
45 return d->plugin;
46}
47
48void AbstractGenericPluginInterface::showConfigureDialog(QWidget *parentWidget)
49{
50 Q_UNUSED(parentWidget)
51}
52
53ActionType::ActionType(QAction *action, ActionType::Type type)
54 : mAction(action)
55 , mType(type)
56{
57}
58
59QAction *ActionType::action() const
60{
61 return mAction;
62}
63
64ActionType::Type ActionType::type() const
65{
66 return mType;
67}
68
69bool ActionType::operator==(ActionType other) const
70{
71 return mAction == other.mAction && mType == other.mType;
72}
73
74#include "moc_abstractgenericplugininterface.cpp"
The AbstractGenericPlugin class.
VehicleSection::Type type(QStringView coachNumber, QStringView coachClassification)
folderdialogacltab.h
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:39:22 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.