summaryrefslogtreecommitdiff
path: root/doc/api/examples/exampleplugin/exampleplugin.h
blob: 208612e72b08d703a118aa6354667d0bf82beb51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef EXAMPLE_H
#define EXAMPLE_H

#include "example_global.h"

#include <extensionsystem/iplugin.h>

//! [namespaces]
namespace Example {
namespace Internal {
//! [namespaces]

//! [base class]
class ExamplePlugin : public ExtensionSystem::IPlugin
{
    Q_OBJECT
    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "Example.json")
//! [base class]

public:
    ExamplePlugin();
    ~ExamplePlugin();

//! [plugin functions]
    bool initialize(const QStringList &arguments, QString *errorString);
    void extensionsInitialized();
    ShutdownFlag aboutToShutdown();
//! [plugin functions]

//! [slot]
private slots:
    void triggerAction();
//! [slot]
};

} // namespace Internal
} // namespace Example

#endif // EXAMPLE_H