From 1af5d8bf685b2b7f74a6d7aca7dfd2bd5d1255bf Mon Sep 17 00:00:00 2001 From: master-atul Date: Tue, 20 Aug 2019 16:56:00 +0200 Subject: [PATCH] Fixed QPaint error --- docs/development/signal_and_event_handling.md | 2 +- src/cpp/QtWidgets/QCheckBox/ncheckbox.h | 2 +- src/cpp/QtWidgets/QLabel/nlabel.h | 2 +- src/cpp/QtWidgets/QLineEdit/nlineedit.h | 2 +- src/cpp/QtWidgets/QMainWindow/nmainwindow.h | 2 +- src/cpp/QtWidgets/QPlainTextEdit/nplaintextedit.h | 2 +- src/cpp/QtWidgets/QProgressBar/nprogressbar.h | 2 +- src/cpp/QtWidgets/QPushButton/npushbutton.h | 2 +- src/cpp/QtWidgets/QRadioButton/nradiobutton.h | 2 +- src/cpp/QtWidgets/QWidget/nwidget.h | 2 +- src/cpp/core/Events/eventwidget_macro.h | 4 ++-- src/cpp/core/NodeWidget/nodewidget.h | 4 ++-- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/development/signal_and_event_handling.md b/docs/development/signal_and_event_handling.md index 6ebe01623..c72d6b1fa 100644 --- a/docs/development/signal_and_event_handling.md +++ b/docs/development/signal_and_event_handling.md @@ -104,7 +104,7 @@ Also make sure to connect all the signals of the widgets to the event emitter in class NPushButton: public QPushButton, public NodeWidget { - NODEWIDGET_IMPLEMENTATIONS + NODEWIDGET_IMPLEMENTATIONS(QPushButton) public: using QPushButton::QPushButton; //inherit all constructors of QPushButton diff --git a/src/cpp/QtWidgets/QCheckBox/ncheckbox.h b/src/cpp/QtWidgets/QCheckBox/ncheckbox.h index 5213f9f5e..e9e660c5b 100644 --- a/src/cpp/QtWidgets/QCheckBox/ncheckbox.h +++ b/src/cpp/QtWidgets/QCheckBox/ncheckbox.h @@ -5,7 +5,7 @@ class NCheckBox: public QCheckBox, public NodeWidget { - NODEWIDGET_IMPLEMENTATIONS + NODEWIDGET_IMPLEMENTATIONS(QCheckBox) public: using QCheckBox::QCheckBox; //inherit all constructors of QCheckBox }; diff --git a/src/cpp/QtWidgets/QLabel/nlabel.h b/src/cpp/QtWidgets/QLabel/nlabel.h index 830d9491e..686a0c82f 100644 --- a/src/cpp/QtWidgets/QLabel/nlabel.h +++ b/src/cpp/QtWidgets/QLabel/nlabel.h @@ -5,7 +5,7 @@ class NLabel: public QLabel, public NodeWidget { - NODEWIDGET_IMPLEMENTATIONS + NODEWIDGET_IMPLEMENTATIONS(QLabel) public: using QLabel::QLabel; //inherit all constructors of QLabel }; diff --git a/src/cpp/QtWidgets/QLineEdit/nlineedit.h b/src/cpp/QtWidgets/QLineEdit/nlineedit.h index 4e372bb62..130e6d34b 100644 --- a/src/cpp/QtWidgets/QLineEdit/nlineedit.h +++ b/src/cpp/QtWidgets/QLineEdit/nlineedit.h @@ -5,7 +5,7 @@ class NLineEdit: public QLineEdit, public NodeWidget { - NODEWIDGET_IMPLEMENTATIONS + NODEWIDGET_IMPLEMENTATIONS(QLineEdit) public: using QLineEdit::QLineEdit; //inherit all constructors of QLineEdit diff --git a/src/cpp/QtWidgets/QMainWindow/nmainwindow.h b/src/cpp/QtWidgets/QMainWindow/nmainwindow.h index cc0ea7a36..975e66df8 100644 --- a/src/cpp/QtWidgets/QMainWindow/nmainwindow.h +++ b/src/cpp/QtWidgets/QMainWindow/nmainwindow.h @@ -6,7 +6,7 @@ class NMainWindow: public QMainWindow, public NodeWidget { - NODEWIDGET_IMPLEMENTATIONS + NODEWIDGET_IMPLEMENTATIONS(QMainWindow) public: using QMainWindow::QMainWindow; //inherit all constructors of QMainWindow private: diff --git a/src/cpp/QtWidgets/QPlainTextEdit/nplaintextedit.h b/src/cpp/QtWidgets/QPlainTextEdit/nplaintextedit.h index 76581de9f..b1da3ec04 100644 --- a/src/cpp/QtWidgets/QPlainTextEdit/nplaintextedit.h +++ b/src/cpp/QtWidgets/QPlainTextEdit/nplaintextedit.h @@ -6,7 +6,7 @@ class NPlainTextEdit : public QPlainTextEdit, public NodeWidget { - NODEWIDGET_IMPLEMENTATIONS + NODEWIDGET_IMPLEMENTATIONS(QPlainTextEdit) public: using QPlainTextEdit::QPlainTextEdit; //inherit all constructors of QPlainTextEdit diff --git a/src/cpp/QtWidgets/QProgressBar/nprogressbar.h b/src/cpp/QtWidgets/QProgressBar/nprogressbar.h index 55141aa71..106d89bc6 100644 --- a/src/cpp/QtWidgets/QProgressBar/nprogressbar.h +++ b/src/cpp/QtWidgets/QProgressBar/nprogressbar.h @@ -5,7 +5,7 @@ class NProgressBar: public QProgressBar, public NodeWidget { - NODEWIDGET_IMPLEMENTATIONS + NODEWIDGET_IMPLEMENTATIONS(QProgressBar) public: using QProgressBar::QProgressBar; //inherit all constructors of QProgressBar }; diff --git a/src/cpp/QtWidgets/QPushButton/npushbutton.h b/src/cpp/QtWidgets/QPushButton/npushbutton.h index 65cd634d5..654fd2253 100644 --- a/src/cpp/QtWidgets/QPushButton/npushbutton.h +++ b/src/cpp/QtWidgets/QPushButton/npushbutton.h @@ -6,7 +6,7 @@ class NPushButton: public QPushButton, public NodeWidget { - NODEWIDGET_IMPLEMENTATIONS + NODEWIDGET_IMPLEMENTATIONS(QPushButton) public: using QPushButton::QPushButton; //inherit all constructors of QPushButton diff --git a/src/cpp/QtWidgets/QRadioButton/nradiobutton.h b/src/cpp/QtWidgets/QRadioButton/nradiobutton.h index a126665d8..56155e4d1 100644 --- a/src/cpp/QtWidgets/QRadioButton/nradiobutton.h +++ b/src/cpp/QtWidgets/QRadioButton/nradiobutton.h @@ -5,7 +5,7 @@ class NRadioButton: public QRadioButton, public NodeWidget { - NODEWIDGET_IMPLEMENTATIONS + NODEWIDGET_IMPLEMENTATIONS(QRadioButton) public: using QRadioButton::QRadioButton; //inherit all constructors of QRadioButton }; diff --git a/src/cpp/QtWidgets/QWidget/nwidget.h b/src/cpp/QtWidgets/QWidget/nwidget.h index 5b1c8bc72..1187d6152 100644 --- a/src/cpp/QtWidgets/QWidget/nwidget.h +++ b/src/cpp/QtWidgets/QWidget/nwidget.h @@ -7,7 +7,7 @@ class NWidget: public QWidget, public NodeWidget { - NODEWIDGET_IMPLEMENTATIONS + NODEWIDGET_IMPLEMENTATIONS(QWidget) public: using QWidget::QWidget; // https://doc.qt.io/qt-5/stylesheet-reference.html diff --git a/src/cpp/core/Events/eventwidget_macro.h b/src/cpp/core/Events/eventwidget_macro.h index a5bc323e8..745a2cc56 100644 --- a/src/cpp/core/Events/eventwidget_macro.h +++ b/src/cpp/core/Events/eventwidget_macro.h @@ -46,10 +46,10 @@ Napi::Value unSubscribeToQtEvent(const Napi::CallbackInfo& info){ \ #ifndef EVENTWIDGET_IMPLEMENTATIONS -#define EVENTWIDGET_IMPLEMENTATIONS \ +#define EVENTWIDGET_IMPLEMENTATIONS(BaseWidgetName) \ bool event(QEvent* event) { \ EventWidget::event(event); \ - return QWidget::event(event); \ + return BaseWidgetName::event(event); \ } \ #endif //EVENTWIDGET_IMPLEMENTATIONS \ No newline at end of file diff --git a/src/cpp/core/NodeWidget/nodewidget.h b/src/cpp/core/NodeWidget/nodewidget.h index f4769b073..ca16ecbbf 100644 --- a/src/cpp/core/NodeWidget/nodewidget.h +++ b/src/cpp/core/NodeWidget/nodewidget.h @@ -10,12 +10,12 @@ class NodeWidget : public YogaWidget, public EventWidget { #ifndef NODEWIDGET_IMPLEMENTATIONS -#define NODEWIDGET_IMPLEMENTATIONS \ +#define NODEWIDGET_IMPLEMENTATIONS(BaseWidgetName) \ \ Q_OBJECT \ public: \ SET_YOGA_WIDGET_Q_PROPERTIES \ - EVENTWIDGET_IMPLEMENTATIONS \ + EVENTWIDGET_IMPLEMENTATIONS(BaseWidgetName) \ #endif //NODEWIDGET_IMPLEMENTATIONS