nodeguy/src/lib/QtWidgets/QGraphicsEffect.ts
feng8848 527a18a1e5
fix issue #503 (#519)
* fix issue #481

* fix lint

* Add QTextEdit and QTextBrowser

* Add QGraphicsBlurEffect

* Add QGraphicsDropShadowEffect

Co-authored-by: wuxiaofeng <wuxiaofeng@erayt.com>
2020-04-14 19:10:34 +02:00

25 lines
921 B
TypeScript

import { NodeObject, QObjectSignals } from '../QtCore/QObject';
/**
> This is the abstract base class of graphicseffect, providing their functionality.
* **This class is a JS wrapper around Qt's [QGraphicsEffect class](https://doc.qt.io/qt-5/qgraphicseffect.html)**
The QGraphicsEffect class is an abstract class and therefore, technically, no further instances actually have to be created.
It is inherited by QGraphicsBlurEffect, QGraphicsColorizeEffect, QGraphicsDropShadowEffect, and QGraphicsOpacityEffect.
*/
export abstract class QGraphicsEffect<Signals extends QGraphicsEffectSignals> extends NodeObject<Signals> {
setEnabled(enable: boolean): void {
this.setProperty('enabled', enable);
}
isEnabled(): boolean {
return this.property('enabled').toBool();
}
}
export interface QGraphicsEffectSignals extends QObjectSignals {
enabledChanged: (enabled: boolean) => void;
}