##// END OF EJS Templates
(Minor) Fixes vera warnings for AMDA plugin
(Minor) Fixes vera warnings for AMDA plugin

File last commit:

r1033:243c12122366
r1119:d60c64f6f148
Show More
DataSourceItemAction.h
54 lines | 1.3 KiB | text/x-c | CLexer
/ core / include / DataSource / DataSourceItemAction.h
Alexandre Leroux
Defines actions for a data source items...
r144 #ifndef SCIQLOP_DATASOURCEITEMACTION_H
#define SCIQLOP_DATASOURCEITEMACTION_H
Alexandre Leroux
Exports core module as a shared library...
r461 #include "CoreGlobal.h"
Alexandre Leroux
Defines actions for a data source items...
r144 #include <Common/spimpl.h>
#include <QLoggingCategory>
#include <QObject>
Add functionnal include missing
r434 #include <functional>
Alexandre Leroux
Defines actions for a data source items...
r144 Q_DECLARE_LOGGING_CATEGORY(LOG_DataSourceItemAction)
class DataSourceItem;
/**
* @brief The DataSourceItemAction class represents an action on a data source item.
*
* An action is a function that will be executed when the slot execute() is called.
*/
Alexandre Leroux
Exports core module as a shared library...
r461 class SCIQLOP_CORE_EXPORT DataSourceItemAction : public QObject {
Alexandre Leroux
Defines actions for a data source items...
r144
Q_OBJECT
public:
/// Signature of the function associated to the action
using ExecuteFunction = std::function<void(DataSourceItem &dataSourceItem)>;
/**
* Ctor
* @param name the name of the action
* @param fun the function that will be called when the action is executed
* @sa execute()
*/
explicit DataSourceItemAction(const QString &name, ExecuteFunction fun);
Alexandre Leroux
Implements merge method (2)...
r1033 std::unique_ptr<DataSourceItemAction> clone() const;
Alexandre Leroux
Defines actions for a data source items...
r144 QString name() const noexcept;
/// Sets the data source item concerned by the action
void setDataSourceItem(DataSourceItem *dataSourceItem) noexcept;
public slots:
/// Executes the action
void execute();
private:
class DataSourceItemActionPrivate;
spimpl::unique_impl_ptr<DataSourceItemActionPrivate> impl;
};
#endif // SCIQLOP_DATASOURCEITEMACTION_H