File indexing completed on 2025-02-02 04:56:52

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 #ifndef SKGADVICEPLUGIN_H
0007 #define SKGADVICEPLUGIN_H
0008 /** @file
0009  * A plugin to advice.
0010  *
0011  * @author Stephane MANKOWSKI
0012  */
0013 #include <qvariant.h>
0014 
0015 #include "skginterfaceplugin.h"
0016 
0017 
0018 /**
0019  * A plugin to advice
0020  */
0021 class SKGAdvicePlugin : public SKGInterfacePlugin
0022 {
0023     Q_OBJECT
0024     Q_INTERFACES(SKGInterfacePlugin)
0025 
0026 public:
0027     /**
0028      * Default Constructor
0029      */
0030     explicit SKGAdvicePlugin(QWidget* iWidget, QObject* iParent, const QVariantList& iArg);
0031 
0032     /**
0033      * Default Destructor
0034      */
0035     ~SKGAdvicePlugin() override;
0036 
0037     /**
0038      * Called to initialise the plugin
0039      * @param iDocument the main document
0040      * @return true if the plugin is compatible with the document
0041      */
0042     bool setupActions(SKGDocument* iDocument) override;
0043 
0044     /**
0045      * The number of dashboard widgets of the plugin.
0046      * @return The number of dashboard widgets of the plugin
0047      */
0048     int getNbDashboardWidgets() override;
0049 
0050     /**
0051      * Get a dashboard widget title of the plugin.
0052      * @param iIndex the index of the widget
0053      * @return The title
0054      */
0055     QString getDashboardWidgetTitle(int iIndex) override;
0056 
0057     /**
0058      * Get a dashboard widget of the plugin.
0059      * @param iIndex the index of the widget
0060      * @return The dashboard widget of the plugin
0061      */
0062     SKGBoardWidget* getDashboardWidget(int iIndex) override;
0063 
0064     /**
0065      * The title of the plugin.
0066      * @return The title of the plugin
0067      */
0068     QString title() const override;
0069 
0070     /**
0071      * The icon of the plugin.
0072      * @return The icon of the plugin
0073      */
0074     QString icon() const override;
0075 
0076     /**
0077      * The toolTip of the plugin.
0078      * @return The toolTip of the plugin
0079      */
0080     QString toolTip() const override;
0081 
0082     /**
0083      * The tips list of the plugin.
0084      * @return The tips list of the plugin
0085      */
0086     QStringList tips() const override;
0087 
0088     /**
0089      * Must be implemented to set the position of the plugin.
0090      * @return integer value between 0 and 999 (default = 999)
0091      */
0092     int getOrder() const override;
0093 
0094 private Q_SLOTS:
0095 
0096 private:
0097     Q_DISABLE_COPY(SKGAdvicePlugin)
0098 
0099     SKGDocument* currentDocument;
0100 };
0101 
0102 #endif  // SKGADVICEPLUGIN_H