File indexing completed on 2024-06-16 04:47:16

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 SKGDELETEPLUGIN_H
0007 #define SKGDELETEPLUGIN_H
0008 /** @file
0009  * This file is a plugin for delete operation.
0010 *
0011 * @author Stephane MANKOWSKI / Guillaume DE BURE
0012  */
0013 #include "skginterfaceplugin.h"
0014 
0015 class QAction;
0016 
0017 /**
0018  * This file is a plugin for delete operation
0019  */
0020 class SKGDeletePlugin : public SKGInterfacePlugin
0021 {
0022     Q_OBJECT
0023     Q_INTERFACES(SKGInterfacePlugin)
0024 
0025 public:
0026     /**
0027      * Default Constructor
0028      */
0029     explicit SKGDeletePlugin(QWidget* iWidget, QObject* iParent, const QVariantList& iArg);
0030 
0031     /**
0032      * Default Destructor
0033      */
0034     ~SKGDeletePlugin() override;
0035 
0036     /**
0037      * Called to initialise the plugin
0038      * @param iDocument the main document
0039      * @return true if the plugin is compatible with the document
0040      */
0041     bool setupActions(SKGDocument* iDocument) override;
0042 
0043     /**
0044      * The title of the plugin.
0045      * @return The title of the plugin
0046      */
0047     QString title() const override;
0048 
0049     /**
0050      * Must be implemented to set the position of the plugin.
0051      * @return integer value between 0 and 999 (default = 999)
0052      */
0053     int getOrder() const override;
0054 
0055 private Q_SLOTS:
0056     void onDelete();
0057 private:
0058     Q_DISABLE_COPY(SKGDeletePlugin)
0059 
0060     SKGDocument* m_currentDocument;
0061 };
0062 
0063 #endif  // SKGDEBUGPLUGIN_H