File indexing completed on 2024-10-27 04:13:17

0001 /*
0002     SPDX-FileCopyrightText: 2012-2018 Gilles Caulier <caulier dot gilles at gmail dot com>
0003     SPDX-FileCopyrightText: 2012 Victor Dodon <dodonvictor at gmail dot com>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 /** Standard C++ header wrapper
0009  */
0010 #ifndef PLUGIN_KXMLHELLOWORLD_H
0011 #define PLUGIN_KXMLHELLOWORLD_H
0012 
0013 // NOTE: Always limit include in headers file to speed-up compilation.
0014 
0015 // Libkipi includes
0016 
0017 #include "plugin.h"
0018 
0019 /** To make source code more readable, we will declare KIPI namespace as well.
0020  */
0021 using namespace KIPI;
0022 
0023 /** Each plugin must be fully wrapped into a dedicated C++ namespace to prevent conflicts with symbols and identifiers.
0024  */
0025 namespace KIPIKXMLHelloWorldPlugin
0026 {
0027 
0028 /** We will use KIPI::Plugin class as parent from libkipi
0029  *  See this API for details : http://api.kde.org/4.x-api/kdegraphics-apidocs/libs/libkipi/libkipi/html/index.html
0030  */
0031 class Plugin_KXMLHelloWorld : public Plugin
0032 {
0033     Q_OBJECT
0034 
0035 public:
0036 
0037     /** Notice the constructor
0038         takes two arguments QObject* const parent (the parent of this object),
0039         and const QStringList& args (the arguments passed).
0040     */
0041     Plugin_KXMLHelloWorld(QObject* const parent, const QVariantList& args);
0042     ~Plugin_KXMLHelloWorld() override;
0043 
0044     /** This method setup the plugin actions and connect internal signals and slots to handle plugin actions.
0045      */
0046     void setup(QWidget* const widget) override;
0047 
0048 private Q_SLOTS:
0049 
0050     /** There are slots to handle action events.
0051      */
0052     void slotActivateActionImages();
0053     void slotActivateActionTools();
0054     void slotActivateActionExport();
0055     void slotActivateActionImport();
0056 
0057 private:
0058 
0059     /** Create and setup plugin actions
0060       */
0061     void setupActions();
0062 
0063 private:
0064 
0065     /** We use d private internal container everywhere to speed up compilation. See implementation for details.
0066      */
0067     class Private;
0068     Private* const d;
0069 };
0070 
0071 }  // namespace KIPIKXMLHelloWorldPlugin
0072 
0073 #endif // PLUGIN_KXMLHELLOWORLD_H