File indexing completed on 2025-02-02 04:57:03

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 SKGADDOPERATION_H
0007 #define SKGADDOPERATION_H
0008 
0009 #include <krunner/abstractrunner.h>
0010 
0011 /**
0012  * @brief An KRunner addon to create a new transaction
0013  *
0014  */
0015 class SKGAddOperation : public Plasma::AbstractRunner
0016 {
0017     Q_OBJECT
0018 
0019 public:
0020     /**
0021      * @brief The constructor
0022      *
0023      * @param iParent The parent object
0024      * @param args The list of arguments
0025      */
0026     SKGAddOperation(QObject* iParent, const QVariantList& args);
0027 
0028     /**
0029      * @brief Check if the user input match
0030      *
0031      * @param iContext The KRunner context
0032      * @return void
0033      */
0034     void match(Plasma::RunnerContext& iContext) override;
0035 
0036     /**
0037      * @brief Execute the creation of operation
0038      *
0039      * @param iContext The KRunner context
0040      * @param iMatch The query match
0041      * @return void
0042      */
0043     void run(const Plasma::RunnerContext& iContext, const Plasma::QueryMatch& iMatch) override;
0044 
0045     /**
0046      * @brief Reload the configuration
0047      *
0048      * @return void
0049      */
0050     void reloadConfiguration() override;
0051 
0052 private:
0053     QString m_triggerWord;
0054 };
0055 
0056 #endif