Warning, file /office/skrooge/skgbasegui/skginterfaceplugin.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /***************************************************************************
0002  * SPDX-FileCopyrightText: 2022 S. MANKOWSKI stephane@mankowski.fr
0003  * SPDX-FileCopyrightText: 2022 G. DE BURE support@mankowski.fr
0004  * SPDX-License-Identifier: GPL-3.0-or-later
0005  ***************************************************************************/
0006 /** @file
0007 * This file is a plugin interface default implementation.
0008 *
0009 * @author Stephane MANKOWSKI / Guillaume DE BURE
0010  */
0011 #include "skginterfaceplugin.h"
0012 #include "skgmainpanel.h"
0013 
0014 #include "kactioncollection.h"
0015 
0016 SKGInterfacePlugin::SKGInterfacePlugin(QObject* iParent)
0017     : KParts::ReadOnlyPart(iParent)
0018 {}
0019 SKGInterfacePlugin::~SKGInterfacePlugin()
0020     = default;
0021 
0022 QStringList SKGInterfacePlugin::processArguments(const QStringList& iArgument)
0023 {
0024     return iArgument;
0025 }
0026 
0027 void SKGInterfacePlugin::close()
0028 {
0029     disconnect(this);
0030 }
0031 
0032 void SKGInterfacePlugin::refresh() {}
0033 
0034 void SKGInterfacePlugin::registerGlobalAction(const QString& iIdentifier, QAction* iAction,
0035         const QStringList& iListOfTable, int iMinSelection, int iMaxSelection,
0036         int iRanking, bool iSelectionMustHaveFocus)
0037 {
0038     actionCollection()->addAction(iIdentifier, iAction);
0039     if (SKGMainPanel::getMainPanel() != nullptr) {
0040         SKGMainPanel::getMainPanel()->registerGlobalAction(iIdentifier, iAction, false, iListOfTable, iMinSelection, iMaxSelection, iRanking, iSelectionMustHaveFocus);
0041     }
0042 }
0043 
0044 QDockWidget* SKGInterfacePlugin::getDockWidget()
0045 {
0046     return nullptr;
0047 }
0048 
0049 SKGTabPage* SKGInterfacePlugin::getWidget()
0050 {
0051     return nullptr;
0052 }
0053 
0054 int SKGInterfacePlugin::getNbDashboardWidgets()
0055 {
0056     return 0;
0057 }
0058 
0059 QString SKGInterfacePlugin::getDashboardWidgetTitle(int iIndex)
0060 {
0061     Q_UNUSED(iIndex)
0062     return QLatin1String("");
0063 }
0064 
0065 SKGBoardWidget* SKGInterfacePlugin::getDashboardWidget(int iIndex)
0066 {
0067     Q_UNUSED(iIndex)
0068     return nullptr;
0069 }
0070 
0071 void SKGInterfacePlugin::initPreferences()
0072 {
0073 }
0074 
0075 QWidget* SKGInterfacePlugin::getPreferenceWidget()
0076 {
0077     return nullptr;
0078 }
0079 
0080 KConfigSkeleton* SKGInterfacePlugin::getPreferenceSkeleton()
0081 {
0082     return nullptr;
0083 }
0084 
0085 SKGError SKGInterfacePlugin::savePreferences() const
0086 {
0087     return SKGError();
0088 }
0089 
0090 int SKGInterfacePlugin::getOrder() const
0091 {
0092     return 999;
0093 }
0094 
0095 QString SKGInterfacePlugin::statusTip() const
0096 {
0097     return toolTip();
0098 }
0099 
0100 QString SKGInterfacePlugin::icon() const
0101 {
0102     return QLatin1String("");
0103 }
0104 
0105 QString SKGInterfacePlugin::toolTip() const
0106 {
0107     return title();
0108 }
0109 
0110 QStringList SKGInterfacePlugin::tips() const
0111 {
0112     return QStringList();
0113 }
0114 
0115 QStringList SKGInterfacePlugin::subPlugins() const
0116 {
0117     return QStringList();
0118 }
0119 
0120 bool SKGInterfacePlugin::isInPagesChooser() const
0121 {
0122     return false;
0123 }
0124 
0125 bool SKGInterfacePlugin::isEnabled() const
0126 {
0127     return true;
0128 }
0129 
0130 SKGAdviceList SKGInterfacePlugin::advice(const QStringList& iIgnoredAdvice)
0131 {
0132     Q_UNUSED(iIgnoredAdvice)
0133     return SKGAdviceList();
0134 }
0135 
0136 SKGError SKGInterfacePlugin::executeAdviceCorrection(const QString& iAdviceIdentifier, int iSolution)
0137 {
0138     Q_UNUSED(iAdviceIdentifier)
0139     Q_UNUSED(iSolution)
0140     return SKGError(ERR_NOTIMPL, QLatin1String(""));
0141 }
0142 
0143