Make connectSignalsToEventEmitter() virtual to support wrappers on plain Qt widget instances
This commit is contained in:
parent
d81b781d1f
commit
1f11f1cf8b
@ -14,7 +14,7 @@ class DLL_EXPORT NAbstractItemModel : public QAbstractItemModel,
|
|||||||
public:
|
public:
|
||||||
Napi::FunctionReference dispatchOnNode;
|
Napi::FunctionReference dispatchOnNode;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter(){
|
virtual void connectSignalsToEventEmitter(){
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QOBJECT_SIGNALS}
|
QOBJECT_SIGNALS}
|
||||||
|
|
||||||
|
|||||||
@ -12,5 +12,5 @@ class DLL_EXPORT NObject : public QObject, public EventWidget {
|
|||||||
public:
|
public:
|
||||||
using QObject::QObject;
|
using QObject::QObject;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() { QOBJECT_SIGNALS }
|
virtual void connectSignalsToEventEmitter() { QOBJECT_SIGNALS }
|
||||||
};
|
};
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class DLL_EXPORT NApplication : public QApplication, public EventWidget {
|
|||||||
EVENTWIDGET_IMPLEMENTATIONS(QApplication)
|
EVENTWIDGET_IMPLEMENTATIONS(QApplication)
|
||||||
public:
|
public:
|
||||||
using QApplication::QApplication; // inherit all constructors of QApplication
|
using QApplication::QApplication; // inherit all constructors of QApplication
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QOBJECT_SIGNALS
|
QOBJECT_SIGNALS
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class DLL_EXPORT NDrag : public QDrag, public EventWidget {
|
|||||||
public:
|
public:
|
||||||
using QDrag::QDrag;
|
using QDrag::QDrag;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QOBJECT_SIGNALS
|
QOBJECT_SIGNALS
|
||||||
QObject::connect(this, &QDrag::actionChanged, [=](Qt::DropAction action) {
|
QObject::connect(this, &QDrag::actionChanged, [=](Qt::DropAction action) {
|
||||||
Napi::Env env = this->emitOnNode.Env();
|
Napi::Env env = this->emitOnNode.Env();
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class DLL_EXPORT NMovie : public QMovie, public EventWidget {
|
|||||||
public:
|
public:
|
||||||
using QMovie::QMovie;
|
using QMovie::QMovie;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QOBJECT_SIGNALS
|
QOBJECT_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QObject::connect(this, &QMovie::error,
|
QObject::connect(this, &QMovie::error,
|
||||||
|
|||||||
@ -11,7 +11,7 @@ class DLL_EXPORT NAction : public QAction, public EventWidget {
|
|||||||
EVENTWIDGET_IMPLEMENTATIONS(QAction)
|
EVENTWIDGET_IMPLEMENTATIONS(QAction)
|
||||||
public:
|
public:
|
||||||
using QAction::QAction; // inherit all constructors of QAction
|
using QAction::QAction; // inherit all constructors of QAction
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QOBJECT_SIGNALS
|
QOBJECT_SIGNALS
|
||||||
QObject::connect(this, &QAction::triggered, [=](bool checked) {
|
QObject::connect(this, &QAction::triggered, [=](bool checked) {
|
||||||
|
|||||||
@ -10,5 +10,5 @@ class DLL_EXPORT NBoxLayout : public QBoxLayout, public EventWidget {
|
|||||||
public:
|
public:
|
||||||
EVENTWIDGET_IMPLEMENTATIONS(QBoxLayout)
|
EVENTWIDGET_IMPLEMENTATIONS(QBoxLayout)
|
||||||
using QBoxLayout::QBoxLayout;
|
using QBoxLayout::QBoxLayout;
|
||||||
void connectSignalsToEventEmitter() { QLAYOUT_SIGNALS }
|
virtual void connectSignalsToEventEmitter() { QLAYOUT_SIGNALS }
|
||||||
};
|
};
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class DLL_EXPORT NButtonGroup : public QButtonGroup, public EventWidget {
|
|||||||
EVENTWIDGET_IMPLEMENTATIONS(QButtonGroup)
|
EVENTWIDGET_IMPLEMENTATIONS(QButtonGroup)
|
||||||
public:
|
public:
|
||||||
using QButtonGroup::QButtonGroup; // inherit all constructors of QButtonGroup
|
using QButtonGroup::QButtonGroup; // inherit all constructors of QButtonGroup
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QOBJECT_SIGNALS
|
QOBJECT_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
connect(this, QOverload<int>::of(&QButtonGroup::buttonClicked),
|
connect(this, QOverload<int>::of(&QButtonGroup::buttonClicked),
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class DLL_EXPORT NCalendarWidget : public QCalendarWidget, public NodeWidget {
|
|||||||
// inherit all constructors of QCalendarWidget
|
// inherit all constructors of QCalendarWidget
|
||||||
using QCalendarWidget::QCalendarWidget;
|
using QCalendarWidget::QCalendarWidget;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QWIDGET_SIGNALS
|
QWIDGET_SIGNALS
|
||||||
QObject::connect(this, &QCalendarWidget::activated, [=](const QDate &date) {
|
QObject::connect(this, &QCalendarWidget::activated, [=](const QDate &date) {
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class DLL_EXPORT NCheckBox : public QCheckBox, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QCheckBox::QCheckBox; // inherit all constructors of QCheckBox
|
using QCheckBox::QCheckBox; // inherit all constructors of QCheckBox
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QABSTRACT_BUTTON_SIGNALS
|
QABSTRACT_BUTTON_SIGNALS
|
||||||
QObject::connect(this, &QCheckBox::stateChanged, [=](int state) {
|
QObject::connect(this, &QCheckBox::stateChanged, [=](int state) {
|
||||||
Napi::Env env = this->emitOnNode.Env();
|
Napi::Env env = this->emitOnNode.Env();
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class DLL_EXPORT NColorDialog : public QColorDialog, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QColorDialog::QColorDialog;
|
using QColorDialog::QColorDialog;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QDIALOG_SIGNALS
|
QDIALOG_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class DLL_EXPORT NComboBox : public QComboBox, public NodeWidget {
|
|||||||
NODEWIDGET_IMPLEMENTATIONS(QComboBox)
|
NODEWIDGET_IMPLEMENTATIONS(QComboBox)
|
||||||
using QComboBox::QComboBox;
|
using QComboBox::QComboBox;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QWIDGET_SIGNALS
|
QWIDGET_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class DLL_EXPORT NDateEdit : public QDateEdit, public NodeWidget {
|
|||||||
// inherit all constructors of QDateEdit
|
// inherit all constructors of QDateEdit
|
||||||
using QDateEdit::QDateEdit;
|
using QDateEdit::QDateEdit;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QDATETIMEEDIT_SIGNALS
|
QDATETIMEEDIT_SIGNALS
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class DLL_EXPORT NDateTimeEdit : public QDateTimeEdit, public NodeWidget {
|
|||||||
// inherit all constructors of QDateTimeEdit
|
// inherit all constructors of QDateTimeEdit
|
||||||
using QDateTimeEdit::QDateTimeEdit;
|
using QDateTimeEdit::QDateTimeEdit;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QDATETIMEEDIT_SIGNALS
|
QDATETIMEEDIT_SIGNALS
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,7 @@ class DLL_EXPORT NDial : public QDial, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QDial::QDial; // inherit all constructors of QDial
|
using QDial::QDial; // inherit all constructors of QDial
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QABSTRACT_SLIDER_SIGNALS
|
QABSTRACT_SLIDER_SIGNALS
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,5 +11,5 @@ class DLL_EXPORT NDialog : public QDialog, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QDialog::QDialog;
|
using QDialog::QDialog;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() { QDIALOG_SIGNALS }
|
virtual void connectSignalsToEventEmitter() { QDIALOG_SIGNALS }
|
||||||
};
|
};
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class DLL_EXPORT NDoubleSpinBox : public QDoubleSpinBox, public NodeWidget {
|
|||||||
using QDoubleSpinBox::QDoubleSpinBox; // inherit all constructors of
|
using QDoubleSpinBox::QDoubleSpinBox; // inherit all constructors of
|
||||||
// QDoubleSpinBox
|
// QDoubleSpinBox
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QABSTRACTSPINBOX_SIGNALS
|
QABSTRACTSPINBOX_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class DLL_EXPORT NErrorMessage : public QErrorMessage, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QErrorMessage::QErrorMessage;
|
using QErrorMessage::QErrorMessage;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QDIALOG_SIGNALS
|
QDIALOG_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class DLL_EXPORT NFileDialog : public QFileDialog, public NodeWidget {
|
|||||||
NODEWIDGET_IMPLEMENTATIONS(QFileDialog)
|
NODEWIDGET_IMPLEMENTATIONS(QFileDialog)
|
||||||
using QFileDialog::QFileDialog;
|
using QFileDialog::QFileDialog;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QDIALOG_SIGNALS
|
QDIALOG_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class DLL_EXPORT NFontDialog : public QFontDialog, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QFontDialog::QFontDialog;
|
using QFontDialog::QFontDialog;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QDIALOG_SIGNALS
|
QDIALOG_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
|
|||||||
@ -12,5 +12,5 @@ class DLL_EXPORT NFrame : public QFrame, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QFrame::QFrame;
|
using QFrame::QFrame;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() { QFRAME_SIGNALS }
|
virtual void connectSignalsToEventEmitter() { QFRAME_SIGNALS }
|
||||||
};
|
};
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class DLL_EXPORT NGraphicsBlurEffect : public QGraphicsBlurEffect,
|
|||||||
public:
|
public:
|
||||||
using QGraphicsBlurEffect::QGraphicsBlurEffect;
|
using QGraphicsBlurEffect::QGraphicsBlurEffect;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QGRAPHICSEFFECT_SIGNALS
|
QGRAPHICSEFFECT_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QObject::connect(this, &QGraphicsBlurEffect::blurHintsChanged,
|
QObject::connect(this, &QGraphicsBlurEffect::blurHintsChanged,
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class DLL_EXPORT NGraphicsDropShadowEffect : public QGraphicsDropShadowEffect,
|
|||||||
public:
|
public:
|
||||||
using QGraphicsDropShadowEffect::QGraphicsDropShadowEffect;
|
using QGraphicsDropShadowEffect::QGraphicsDropShadowEffect;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QGRAPHICSEFFECT_SIGNALS
|
QGRAPHICSEFFECT_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
|
|||||||
@ -10,5 +10,5 @@ class DLL_EXPORT NGridLayout : public QGridLayout, public EventWidget {
|
|||||||
public:
|
public:
|
||||||
EVENTWIDGET_IMPLEMENTATIONS(QGridLayout)
|
EVENTWIDGET_IMPLEMENTATIONS(QGridLayout)
|
||||||
using QGridLayout::QGridLayout;
|
using QGridLayout::QGridLayout;
|
||||||
void connectSignalsToEventEmitter() { QLAYOUT_SIGNALS }
|
virtual void connectSignalsToEventEmitter() { QLAYOUT_SIGNALS }
|
||||||
};
|
};
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class DLL_EXPORT NGroupBox : public QGroupBox, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QGroupBox::QGroupBox; // inherit all constructors of QGroupBox
|
using QGroupBox::QGroupBox; // inherit all constructors of QGroupBox
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QWIDGET_SIGNALS
|
QWIDGET_SIGNALS
|
||||||
QObject::connect(this, &QGroupBox::clicked, [=](bool checked) {
|
QObject::connect(this, &QGroupBox::clicked, [=](bool checked) {
|
||||||
Napi::Env env = this->emitOnNode.Env();
|
Napi::Env env = this->emitOnNode.Env();
|
||||||
|
|||||||
@ -12,5 +12,5 @@ class DLL_EXPORT NHeaderView : public QHeaderView, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QHeaderView::QHeaderView;
|
using QHeaderView::QHeaderView;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() { QABSTRACTITEMVIEW_SIGNALS }
|
virtual void connectSignalsToEventEmitter() { QABSTRACTITEMVIEW_SIGNALS }
|
||||||
};
|
};
|
||||||
|
|||||||
@ -11,7 +11,7 @@ class DLL_EXPORT NInputDialog : public QInputDialog, public NodeWidget {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
NODEWIDGET_IMPLEMENTATIONS(QInputDialog)
|
NODEWIDGET_IMPLEMENTATIONS(QInputDialog)
|
||||||
using QInputDialog::QInputDialog;
|
using QInputDialog::QInputDialog;
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QDIALOG_SIGNALS
|
QDIALOG_SIGNALS
|
||||||
QObject::connect(this, &QInputDialog::doubleValueChanged, [=](double val) {
|
QObject::connect(this, &QInputDialog::doubleValueChanged, [=](double val) {
|
||||||
Napi::Env env = this->emitOnNode.Env();
|
Napi::Env env = this->emitOnNode.Env();
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class DLL_EXPORT NLCDNumber : public QLCDNumber, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QLCDNumber::QLCDNumber; // inherit all constructors of QLCDNumber
|
using QLCDNumber::QLCDNumber; // inherit all constructors of QLCDNumber
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QWIDGET_SIGNALS
|
QWIDGET_SIGNALS
|
||||||
QObject::connect(this, &QLCDNumber::overflow, [=]() {
|
QObject::connect(this, &QLCDNumber::overflow, [=]() {
|
||||||
Napi::Env env = this->emitOnNode.Env();
|
Napi::Env env = this->emitOnNode.Env();
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class DLL_EXPORT NLabel : public QLabel, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QLabel::QLabel; // inherit all constructors of QLabel
|
using QLabel::QLabel; // inherit all constructors of QLabel
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QFRAME_SIGNALS
|
QFRAME_SIGNALS
|
||||||
QObject::connect(this, &QLabel::linkActivated, [=](const QString& link) {
|
QObject::connect(this, &QLabel::linkActivated, [=](const QString& link) {
|
||||||
Napi::Env env = this->emitOnNode.Env();
|
Napi::Env env = this->emitOnNode.Env();
|
||||||
|
|||||||
@ -10,5 +10,5 @@ class DLL_EXPORT NLayout : public QLayout, public EventWidget {
|
|||||||
public:
|
public:
|
||||||
EVENTWIDGET_IMPLEMENTATIONS(QLayout)
|
EVENTWIDGET_IMPLEMENTATIONS(QLayout)
|
||||||
using QLayout::QLayout;
|
using QLayout::QLayout;
|
||||||
void connectSignalsToEventEmitter() { QLAYOUT_SIGNALS }
|
virtual void connectSignalsToEventEmitter() { QLAYOUT_SIGNALS }
|
||||||
};
|
};
|
||||||
|
|||||||
@ -11,7 +11,7 @@ class DLL_EXPORT NLineEdit : public QLineEdit, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QLineEdit::QLineEdit; // inherit all constructors of QLineEdit
|
using QLineEdit::QLineEdit; // inherit all constructors of QLineEdit
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QWIDGET_SIGNALS
|
QWIDGET_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QObject::connect(this, &QLineEdit::cursorPositionChanged,
|
QObject::connect(this, &QLineEdit::cursorPositionChanged,
|
||||||
|
|||||||
@ -12,5 +12,5 @@ class DLL_EXPORT NListView : public QListView, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QListView::QListView;
|
using QListView::QListView;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() { QLISTVIEW_SIGNALS }
|
virtual void connectSignalsToEventEmitter() { QLISTVIEW_SIGNALS }
|
||||||
};
|
};
|
||||||
|
|||||||
@ -15,7 +15,7 @@ class DLL_EXPORT NListWidget : public QListWidget, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QListWidget::QListWidget;
|
using QListWidget::QListWidget;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QLISTVIEW_SIGNALS
|
QLISTVIEW_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
|
|||||||
@ -11,5 +11,5 @@ class DLL_EXPORT NMainWindow : public QMainWindow, public NodeWidget {
|
|||||||
NODEWIDGET_IMPLEMENTATIONS(QMainWindow)
|
NODEWIDGET_IMPLEMENTATIONS(QMainWindow)
|
||||||
public:
|
public:
|
||||||
using QMainWindow::QMainWindow; // inherit all constructors of QMainWindow
|
using QMainWindow::QMainWindow; // inherit all constructors of QMainWindow
|
||||||
void connectSignalsToEventEmitter() { QWIDGET_SIGNALS }
|
virtual void connectSignalsToEventEmitter() { QWIDGET_SIGNALS }
|
||||||
};
|
};
|
||||||
|
|||||||
@ -11,7 +11,7 @@ class DLL_EXPORT NMenu : public QMenu, public NodeWidget {
|
|||||||
NODEWIDGET_IMPLEMENTATIONS(QMenu)
|
NODEWIDGET_IMPLEMENTATIONS(QMenu)
|
||||||
public:
|
public:
|
||||||
using QMenu::QMenu; // inherit all constructors of QMenu
|
using QMenu::QMenu; // inherit all constructors of QMenu
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QWIDGET_SIGNALS
|
QWIDGET_SIGNALS
|
||||||
|
|
||||||
QObject::connect(this, &QMenu::triggered, [=](QAction* action) {
|
QObject::connect(this, &QMenu::triggered, [=](QAction* action) {
|
||||||
|
|||||||
@ -11,5 +11,5 @@ class DLL_EXPORT NMenuBar : public QMenuBar, public NodeWidget {
|
|||||||
NODEWIDGET_IMPLEMENTATIONS(QMenuBar)
|
NODEWIDGET_IMPLEMENTATIONS(QMenuBar)
|
||||||
public:
|
public:
|
||||||
using QMenuBar::QMenuBar; // inherit all constructors of QMenuBar
|
using QMenuBar::QMenuBar; // inherit all constructors of QMenuBar
|
||||||
void connectSignalsToEventEmitter() { QWIDGET_SIGNALS }
|
virtual void connectSignalsToEventEmitter() { QWIDGET_SIGNALS }
|
||||||
};
|
};
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class DLL_EXPORT NMessageBox : public QMessageBox, public NodeWidget {
|
|||||||
NODEWIDGET_IMPLEMENTATIONS(QMessageBox)
|
NODEWIDGET_IMPLEMENTATIONS(QMessageBox)
|
||||||
using QMessageBox::QMessageBox;
|
using QMessageBox::QMessageBox;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QDIALOG_SIGNALS
|
QDIALOG_SIGNALS
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
this, &QMessageBox::buttonClicked, [=](QAbstractButton* button) {
|
this, &QMessageBox::buttonClicked, [=](QAbstractButton* button) {
|
||||||
|
|||||||
@ -11,7 +11,7 @@ class DLL_EXPORT NPlainTextEdit : public QPlainTextEdit, public NodeWidget {
|
|||||||
using QPlainTextEdit::QPlainTextEdit; // inherit all constructors of
|
using QPlainTextEdit::QPlainTextEdit; // inherit all constructors of
|
||||||
// QPlainTextEdit
|
// QPlainTextEdit
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QABSTRACTSCROLLAREA_SIGNALS
|
QABSTRACTSCROLLAREA_SIGNALS
|
||||||
|
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class DLL_EXPORT NProgressBar : public QProgressBar, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QProgressBar::QProgressBar; // inherit all constructors of QProgressBar
|
using QProgressBar::QProgressBar; // inherit all constructors of QProgressBar
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QWIDGET_SIGNALS
|
QWIDGET_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QObject::connect(this, &QProgressBar::valueChanged, [=](int value) {
|
QObject::connect(this, &QProgressBar::valueChanged, [=](int value) {
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class DLL_EXPORT NProgressDialog : public QProgressDialog, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QProgressDialog::QProgressDialog;
|
using QProgressDialog::QProgressDialog;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QDIALOG_SIGNALS
|
QDIALOG_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QObject::connect(this, &QProgressDialog::canceled, [=]() {
|
QObject::connect(this, &QProgressDialog::canceled, [=]() {
|
||||||
|
|||||||
@ -14,5 +14,5 @@ class DLL_EXPORT NPushButton : public QPushButton, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QPushButton::QPushButton; // inherit all constructors of QPushButton
|
using QPushButton::QPushButton; // inherit all constructors of QPushButton
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() { QABSTRACT_BUTTON_SIGNALS }
|
virtual void connectSignalsToEventEmitter() { QABSTRACT_BUTTON_SIGNALS }
|
||||||
};
|
};
|
||||||
|
|||||||
@ -11,7 +11,7 @@ class DLL_EXPORT NRadioButton : public QRadioButton, public NodeWidget {
|
|||||||
NODEWIDGET_IMPLEMENTATIONS(QRadioButton)
|
NODEWIDGET_IMPLEMENTATIONS(QRadioButton)
|
||||||
public:
|
public:
|
||||||
using QRadioButton::QRadioButton; // inherit all constructors of QRadioButton
|
using QRadioButton::QRadioButton; // inherit all constructors of QRadioButton
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QABSTRACT_BUTTON_SIGNALS
|
QABSTRACT_BUTTON_SIGNALS
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class DLL_EXPORT NScrollArea : public QScrollArea, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QScrollArea::QScrollArea; // inherit all constructors of QScrollArea
|
using QScrollArea::QScrollArea; // inherit all constructors of QScrollArea
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() { QABSTRACTSCROLLAREA_SIGNALS }
|
virtual void connectSignalsToEventEmitter() { QABSTRACTSCROLLAREA_SIGNALS }
|
||||||
|
|
||||||
// By-pass `protected` access and expose it.
|
// By-pass `protected` access and expose it.
|
||||||
void setViewportMargins(int left, int top, int right, int bottom) {
|
void setViewportMargins(int left, int top, int right, int bottom) {
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class DLL_EXPORT NScrollBar : public QScrollBar, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QScrollBar::QScrollBar; // inherit all constructors of QScrollBar
|
using QScrollBar::QScrollBar; // inherit all constructors of QScrollBar
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QABSTRACT_SLIDER_SIGNALS
|
QABSTRACT_SLIDER_SIGNALS
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,7 @@ class DLL_EXPORT NShortcut : public QShortcut, public EventWidget {
|
|||||||
EVENTWIDGET_IMPLEMENTATIONS(QShortcut)
|
EVENTWIDGET_IMPLEMENTATIONS(QShortcut)
|
||||||
public:
|
public:
|
||||||
using QShortcut::QShortcut; // inherit all constructors of QShortcut
|
using QShortcut::QShortcut; // inherit all constructors of QShortcut
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QOBJECT_SIGNALS
|
QOBJECT_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QObject::connect(this, &QShortcut::activated, [=]() {
|
QObject::connect(this, &QShortcut::activated, [=]() {
|
||||||
|
|||||||
@ -11,7 +11,7 @@ class DLL_EXPORT NSlider : public QSlider, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QSlider::QSlider; // inherit all constructors of QSlider
|
using QSlider::QSlider; // inherit all constructors of QSlider
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QABSTRACT_SLIDER_SIGNALS
|
QABSTRACT_SLIDER_SIGNALS
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class DLL_EXPORT NSpinBox : public QSpinBox, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QSpinBox::QSpinBox; // inherit all constructors of QSpinBox
|
using QSpinBox::QSpinBox; // inherit all constructors of QSpinBox
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QABSTRACTSPINBOX_SIGNALS
|
QABSTRACTSPINBOX_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
|
|||||||
@ -15,7 +15,7 @@ class DLL_EXPORT NStackedWidget : public QStackedWidget, public NodeWidget {
|
|||||||
using QStackedWidget::QStackedWidget; // inherit all constructors of
|
using QStackedWidget::QStackedWidget; // inherit all constructors of
|
||||||
// QStackedWidget
|
// QStackedWidget
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QFRAME_SIGNALS
|
QFRAME_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QObject::connect(this, &QStackedWidget::currentChanged, [=](int index) {
|
QObject::connect(this, &QStackedWidget::currentChanged, [=](int index) {
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class DLL_EXPORT NStandardItemModel : public QStandardItemModel,
|
|||||||
public:
|
public:
|
||||||
using QStandardItemModel::QStandardItemModel; // inherit all constructors of
|
using QStandardItemModel::QStandardItemModel; // inherit all constructors of
|
||||||
// QStandardItemModel
|
// QStandardItemModel
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QOBJECT_SIGNALS
|
QOBJECT_SIGNALS
|
||||||
|
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class DLL_EXPORT NStatusBar : public QStatusBar, public NodeWidget {
|
|||||||
NODEWIDGET_IMPLEMENTATIONS(QStatusBar)
|
NODEWIDGET_IMPLEMENTATIONS(QStatusBar)
|
||||||
using QStatusBar::QStatusBar; // inherit all constructors of QStatusBar
|
using QStatusBar::QStatusBar; // inherit all constructors of QStatusBar
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
this, &QStatusBar::messageChanged, [=](const QString &message) {
|
this, &QStatusBar::messageChanged, [=](const QString &message) {
|
||||||
Napi::Env env = this->emitOnNode.Env();
|
Napi::Env env = this->emitOnNode.Env();
|
||||||
|
|||||||
@ -13,5 +13,5 @@ class DLL_EXPORT NSvgWidget : public QSvgWidget, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QSvgWidget::QSvgWidget; // inherit all constructors of QSvgWidget
|
using QSvgWidget::QSvgWidget; // inherit all constructors of QSvgWidget
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() { QWIDGET_SIGNALS }
|
virtual void connectSignalsToEventEmitter() { QWIDGET_SIGNALS }
|
||||||
};
|
};
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class DLL_EXPORT NSystemTrayIcon : public QSystemTrayIcon, public EventWidget {
|
|||||||
public:
|
public:
|
||||||
// inherit all constructors of QSystemTrayIcon
|
// inherit all constructors of QSystemTrayIcon
|
||||||
using QSystemTrayIcon::QSystemTrayIcon;
|
using QSystemTrayIcon::QSystemTrayIcon;
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QOBJECT_SIGNALS
|
QOBJECT_SIGNALS
|
||||||
QObject::connect(this, &QSystemTrayIcon::activated, [=](int reason) {
|
QObject::connect(this, &QSystemTrayIcon::activated, [=](int reason) {
|
||||||
Napi::Env env = this->emitOnNode.Env();
|
Napi::Env env = this->emitOnNode.Env();
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class DLL_EXPORT NTabBar : public QTabBar, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QTabBar::QTabBar; // inherit all constructors of QTabBar
|
using QTabBar::QTabBar; // inherit all constructors of QTabBar
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QWIDGET_SIGNALS
|
QWIDGET_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QObject::connect(this, &QTabBar::currentChanged, [=](int index) {
|
QObject::connect(this, &QTabBar::currentChanged, [=](int index) {
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class DLL_EXPORT NTabWidget : public QTabWidget, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QTabWidget::QTabWidget; // inherit all constructors of QTabWidget
|
using QTabWidget::QTabWidget; // inherit all constructors of QTabWidget
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QWIDGET_SIGNALS
|
QWIDGET_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QObject::connect(this, &QTabWidget::currentChanged, [=](int index) {
|
QObject::connect(this, &QTabWidget::currentChanged, [=](int index) {
|
||||||
|
|||||||
@ -12,5 +12,5 @@ class DLL_EXPORT NTableView : public QTableView, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QTableView::QTableView;
|
using QTableView::QTableView;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() { QTABLEVIEW_SIGNALS }
|
virtual void connectSignalsToEventEmitter() { QTABLEVIEW_SIGNALS }
|
||||||
};
|
};
|
||||||
|
|||||||
@ -11,7 +11,7 @@ class DLL_EXPORT NTableWidget : public QTableWidget, public NodeWidget {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
NODEWIDGET_IMPLEMENTATIONS(QTableWidget)
|
NODEWIDGET_IMPLEMENTATIONS(QTableWidget)
|
||||||
using QTableWidget::QTableWidget;
|
using QTableWidget::QTableWidget;
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QABSTRACTSCROLLAREA_SIGNALS
|
QABSTRACTSCROLLAREA_SIGNALS
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class DLL_EXPORT NTextBrowser : public QTextBrowser, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QTextBrowser::QTextBrowser; // inherit all constructors of QTextBrowser
|
using QTextBrowser::QTextBrowser; // inherit all constructors of QTextBrowser
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QTEXTEDIT_SIGNALS
|
QTEXTEDIT_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QObject::connect(this, &QTextBrowser::anchorClicked, [=](const QUrl& link) {
|
QObject::connect(this, &QTextBrowser::anchorClicked, [=](const QUrl& link) {
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class DLL_EXPORT NTextEdit : public QTextEdit, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QTextEdit::QTextEdit; // inherit all constructors of QTextEdit
|
using QTextEdit::QTextEdit; // inherit all constructors of QTextEdit
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QTEXTEDIT_SIGNALS
|
QTEXTEDIT_SIGNALS
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class DLL_EXPORT NTimeEdit : public QTimeEdit, public NodeWidget {
|
|||||||
// inherit all constructors of QTimeEdit
|
// inherit all constructors of QTimeEdit
|
||||||
using QTimeEdit::QTimeEdit;
|
using QTimeEdit::QTimeEdit;
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QDATETIMEEDIT_SIGNALS
|
QDATETIMEEDIT_SIGNALS
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,7 @@ class DLL_EXPORT NToolButton : public QToolButton, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QToolButton::QToolButton; // inherit all constructors of QToolButton
|
using QToolButton::QToolButton; // inherit all constructors of QToolButton
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
// Qt Connects: Implement all signal connects here
|
// Qt Connects: Implement all signal connects here
|
||||||
QABSTRACT_BUTTON_SIGNALS
|
QABSTRACT_BUTTON_SIGNALS
|
||||||
QObject::connect(this, &QToolButton::triggered, [=](QAction* action) {
|
QObject::connect(this, &QToolButton::triggered, [=](QAction* action) {
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class DLL_EXPORT NTreeWidget : public QTreeWidget, public NodeWidget {
|
|||||||
public:
|
public:
|
||||||
using QTreeWidget::QTreeWidget; // inherit all constructors of QTreeWidget
|
using QTreeWidget::QTreeWidget; // inherit all constructors of QTreeWidget
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() {
|
virtual void connectSignalsToEventEmitter() {
|
||||||
QABSTRACTSCROLLAREA_SIGNALS
|
QABSTRACTSCROLLAREA_SIGNALS
|
||||||
QObject::connect(this, &QTreeWidget::itemSelectionChanged, [=]() {
|
QObject::connect(this, &QTreeWidget::itemSelectionChanged, [=]() {
|
||||||
Napi::Env env = this->emitOnNode.Env();
|
Napi::Env env = this->emitOnNode.Env();
|
||||||
|
|||||||
@ -22,5 +22,5 @@ class DLL_EXPORT NWidget : public QWidget, public NodeWidget {
|
|||||||
QWidget::paintEvent(e);
|
QWidget::paintEvent(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
void connectSignalsToEventEmitter() { QWIDGET_SIGNALS }
|
virtual void connectSignalsToEventEmitter() { QWIDGET_SIGNALS }
|
||||||
};
|
};
|
||||||
|
|||||||
@ -17,7 +17,7 @@ class DLL_EXPORT EventWidget {
|
|||||||
|
|
||||||
bool event(QEvent* event);
|
bool event(QEvent* event);
|
||||||
|
|
||||||
void connectSignalsToEventEmitter();
|
virtual void connectSignalsToEventEmitter();
|
||||||
|
|
||||||
~EventWidget();
|
~EventWidget();
|
||||||
};
|
};
|
||||||
@ -54,5 +54,5 @@ class DLL_EXPORT FlexLayout : public QLayout, public EventWidget {
|
|||||||
bool hasHeightForWidth() const override;
|
bool hasHeightForWidth() const override;
|
||||||
|
|
||||||
EVENTWIDGET_IMPLEMENTATIONS(QLayout)
|
EVENTWIDGET_IMPLEMENTATIONS(QLayout)
|
||||||
void connectSignalsToEventEmitter();
|
virtual void connectSignalsToEventEmitter();
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user