libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
qpointfjs.h
Go to the documentation of this file.
1#pragma once
2
3/////////////////////// stdlib includes
4
5
6/////////////////////// Qt includes
7#include <QObject>
8#include <QPointF>
9#include <QtQml>
10
11
12/////////////////////// Local includes
13#include "jsclassregistrar.h"
15
16namespace pappso
17{
18
19 /* BEGIN CLASS JS REFERENCE
20 * namespace: pappso
21 * class name: QPointF
22 */
23
24class PMSPP_LIB_DECL QPointFJs : public QObject
25{
26 Q_OBJECT
27 Q_PROPERTY(double x READ x WRITE setX NOTIFY xChanged)
28 Q_PROPERTY(double y READ y WRITE setY NOTIFY yChanged)
29 QML_NAMED_ELEMENT(QPointF)
30
31 public:
32 Q_INVOKABLE explicit QPointFJs(QObject *parent = nullptr);
33 Q_INVOKABLE explicit QPointFJs(double x, double y, QObject *parent = nullptr);
34 Q_INVOKABLE explicit QPointFJs(const QPointF &pointf, QObject *parent = nullptr);
35
36 Q_INVOKABLE double x() const;
37 Q_INVOKABLE void setX(double x);
38
39 Q_INVOKABLE double y() const;
40 Q_INVOKABLE void setY(double y);
41
42 const QPointF &point() const;
43 void setPointF(const QPointF &pointf);
44
45 static void registerJsConstructor(QJSEngine *engine);
46
47 signals:
48 void xChanged();
49 void yChanged();
50
51 private:
52 QPointF m_pointf;
53};
54
55 /* END CLASS JS REFERENCE
56 * namespace: pappso
57 * class name: QPointF
58 */
59
61
62} // namespace pappso
void setPointF(const QPointF &pointf)
Definition qpointfjs.cpp:61
Q_INVOKABLE void setX(double x)
Definition qpointfjs.cpp:22
Q_INVOKABLE void setY(double y)
Definition qpointfjs.cpp:39
Q_INVOKABLE QPointFJs(QObject *parent=nullptr)
Definition qpointfjs.cpp:8
const QPointF & point() const
Definition qpointfjs.cpp:55
static void registerJsConstructor(QJSEngine *engine)
Definition qpointfjs.cpp:69
#define PMSPP_LIB_DECL
#define PAPPSO_REGISTER_JS_CLASS(NS_IDENT, CLASS_NAME)
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39