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