Fixes spacing and doc generation (#343)
This commit is contained in:
parent
47d92c57ad
commit
a0522ccce3
@ -14,7 +14,6 @@ import { ScrollBarPolicy } from '../QtEnums/ScrollBarPolicy';
|
||||
QAbstractScrollArea will list all methods and properties that are common to all scrollable widgets in the NodeGui world.
|
||||
|
||||
*/
|
||||
|
||||
export abstract class QAbstractScrollArea<Signals extends QAbstractScrollAreaSignals> extends NodeWidget<Signals> {
|
||||
viewportWidget?: NodeWidget<any>;
|
||||
setViewport(widget: NodeWidget<any>): void {
|
||||
|
||||
@ -14,7 +14,6 @@ import { Orientation } from '../QtEnums';
|
||||
QAbstractSlider will list all methods and properties that are common to all slider widgets in the NodeGui world.
|
||||
|
||||
*/
|
||||
|
||||
export abstract class QAbstractSlider<Signals extends QAbstractSliderSignals> extends NodeWidget<Signals> {
|
||||
setSingleStep(step: number): void {
|
||||
this.native.setSingleStep(step);
|
||||
|
||||
@ -11,7 +11,6 @@ The QAbstractSpinBox class is an abstract class and therefore, technically, no f
|
||||
It is inherited by QDateTimeEdit and QSpinBox. (n/a QDoubleSpinBox)
|
||||
|
||||
*/
|
||||
|
||||
export abstract class QAbstractSpinBox<Signals extends QAbstractSpinBoxSignals> extends NodeWidget<Signals> {
|
||||
selectAll(): void {
|
||||
this.native.selectAll();
|
||||
|
||||
@ -29,7 +29,6 @@ menuAction.addEventListener("triggered", () => {
|
||||
menu.addAction(menuAction);
|
||||
```
|
||||
*/
|
||||
|
||||
export class QAction extends NodeObject<QActionSignals> {
|
||||
native: NativeElement;
|
||||
icon?: QIcon;
|
||||
|
||||
@ -21,7 +21,6 @@ const calendarWidget = new QCalendarWidget();
|
||||
// more will follow when .selectedDate() et cetera are implemented
|
||||
```
|
||||
*/
|
||||
|
||||
export class QCalendarWidget extends NodeWidget<QCalendarWidgetSignals> {
|
||||
native: NativeElement;
|
||||
constructor();
|
||||
|
||||
@ -21,7 +21,6 @@ const checkbox = new QCheckBox();
|
||||
checkbox.setText("Hello");
|
||||
```
|
||||
*/
|
||||
|
||||
export class QCheckBox extends QAbstractButton<QCheckBoxSignals> {
|
||||
native: NativeElement;
|
||||
constructor();
|
||||
|
||||
@ -33,7 +33,6 @@ comboBox.addEventListener('currentIndexChanged', (index) => {
|
||||
});
|
||||
```
|
||||
*/
|
||||
|
||||
export class QComboBox extends NodeWidget<QComboBoxSignals> {
|
||||
native: NativeElement;
|
||||
constructor();
|
||||
|
||||
@ -16,7 +16,7 @@ A `QDateEdit` provides a widget for editing dates based on the QDateTimeEdit wid
|
||||
```javascript
|
||||
const { QDateEdit } = require("@nodegui/nodegui");
|
||||
|
||||
const comboBox = new QDateEdit();
|
||||
const dateEdit = new QDateEdit();
|
||||
// must be implemented
|
||||
```
|
||||
*/
|
||||
|
||||
@ -31,7 +31,6 @@ dateTimeEdit.setDate(date);
|
||||
dateTimeEdit.setTime(time);
|
||||
```
|
||||
*/
|
||||
|
||||
export class QDateTimeEdit extends QAbstractSpinBox<QDateTimeEditSignals> {
|
||||
native: NativeElement;
|
||||
calendar?: QCalendarWidget;
|
||||
|
||||
@ -19,7 +19,6 @@ const { QDial } = require("@nodegui/nodegui");
|
||||
const dial = new QDial();
|
||||
```
|
||||
*/
|
||||
|
||||
export class QDial extends QAbstractSlider<QDialSignals> {
|
||||
native: NativeElement;
|
||||
constructor();
|
||||
|
||||
@ -41,7 +41,6 @@ export abstract class NodeDialog<Signals extends QDialogSignals> extends NodeWid
|
||||
|
||||
It is inherited by QFileDialog and QMessageBox (n/a QColorDialog, QErrorMessage, QFontDialog, QInputDialog, QMessageBox, QProgressDialog, and QWizard)
|
||||
*/
|
||||
|
||||
export class QDialog extends NodeDialog<QDialogSignals> {
|
||||
native: NativeElement;
|
||||
constructor(arg?: NodeDialog<QDialogSignals> | NativeElement) {
|
||||
|
||||
@ -28,7 +28,6 @@ layout.addWidget(label2);
|
||||
```
|
||||
|
||||
*/
|
||||
|
||||
export class QGridLayout extends NodeLayout<QGridLayoutSignals> {
|
||||
native: NativeElement;
|
||||
constructor();
|
||||
|
||||
@ -36,9 +36,9 @@ win.setCentralWidget(groupBox);
|
||||
win.resize(400, 400);
|
||||
|
||||
win.show();
|
||||
(global as any).win = win;```
|
||||
(global as any).win = win;
|
||||
```
|
||||
*/
|
||||
|
||||
export class QGroupBox extends NodeWidget<QGroupBoxSignals> {
|
||||
native: NativeElement;
|
||||
constructor();
|
||||
|
||||
@ -24,7 +24,6 @@ label.setText("Hello");
|
||||
```
|
||||
|
||||
*/
|
||||
|
||||
export class QLabel extends NodeWidget<QLabelSignals> {
|
||||
native: NativeElement;
|
||||
private _pixmap?: QPixmap;
|
||||
|
||||
@ -32,7 +32,6 @@ addChildToLayout(new FlexLayout(), new QPushButton());
|
||||
addChildToLayout(new GridLayout(), new QWidget());
|
||||
```
|
||||
*/
|
||||
|
||||
export abstract class NodeLayout<Signals extends QLayoutSignals> extends NodeObject<Signals> {
|
||||
type = 'layout';
|
||||
abstract addWidget(childWidget: NodeWidget<any>, ...args: any[]): void;
|
||||
|
||||
@ -19,7 +19,6 @@ const lineEdit = new QLineEdit();
|
||||
```
|
||||
|
||||
*/
|
||||
|
||||
export class QLineEdit extends NodeWidget<QLineEditSignals> {
|
||||
native: NativeElement;
|
||||
constructor();
|
||||
|
||||
@ -32,7 +32,6 @@ for (let i = 0; i < 30; i++) {
|
||||
}
|
||||
```
|
||||
*/
|
||||
|
||||
export class QListWidget extends QAbstractItemView<QListWidgetSignals> {
|
||||
native: NativeElement;
|
||||
items: Set<NativeElement | Component>;
|
||||
|
||||
@ -30,7 +30,6 @@ global.win = win; // prevent's gc of win
|
||||
QMainWindow needs to have a central widget set before other widgets can be added as a children/nested children.
|
||||
Once a central widget is set you can add children/layout to the central widget.
|
||||
*/
|
||||
|
||||
export class QMainWindow extends NodeWidget<QMainWindowSignals> {
|
||||
native: NativeElement;
|
||||
public centralWidget?: NodeWidget<any> | null;
|
||||
|
||||
@ -17,7 +17,6 @@ const { QMenu } = require("@nodegui/nodegui");
|
||||
const menu = new QMenu();
|
||||
```
|
||||
*/
|
||||
|
||||
export class QMenu extends NodeWidget<QMenuSignals> {
|
||||
native: NativeElement;
|
||||
actions: Set<QAction>;
|
||||
|
||||
@ -22,7 +22,6 @@ win.show();
|
||||
global.win = win;
|
||||
```
|
||||
*/
|
||||
|
||||
export class QMenuBar extends NodeWidget<QMenuBarSignals> {
|
||||
native: NativeElement;
|
||||
constructor();
|
||||
|
||||
@ -38,7 +38,6 @@ win.show();
|
||||
|
||||
https://github.com/nodegui/examples/blob/master/nodegui/custom-native-widget-qpainter
|
||||
*/
|
||||
|
||||
export class QPainter extends Component {
|
||||
native: NativeElement;
|
||||
constructor();
|
||||
|
||||
@ -31,7 +31,6 @@ const { QPlainTextEdit } = require("@nodegui/nodegui");
|
||||
const plainTextEdit = new QPlainTextEdit();
|
||||
```
|
||||
*/
|
||||
|
||||
export class QPlainTextEdit extends QAbstractScrollArea<QPlainTextEditSignals> {
|
||||
native: NativeElement;
|
||||
placeholderText?: string;
|
||||
|
||||
@ -19,7 +19,6 @@ const { QProgressBar } = require("@nodegui/nodegui");
|
||||
const progressBar = new QProgressBar();
|
||||
```
|
||||
*/
|
||||
|
||||
export class QProgressBar extends NodeWidget<QProgressBarSignals> {
|
||||
native: NativeElement;
|
||||
constructor();
|
||||
|
||||
@ -21,7 +21,6 @@ const button = new QPushButton();
|
||||
button.setText("Hello");
|
||||
```
|
||||
*/
|
||||
|
||||
export class QPushButton extends QAbstractButton<QPushButtonSignals> {
|
||||
native: NativeElement;
|
||||
constructor();
|
||||
|
||||
@ -22,7 +22,6 @@ radioButton.setText("Hello");
|
||||
```
|
||||
|
||||
*/
|
||||
|
||||
export class QRadioButton extends QAbstractButton<QRadioButtonSignals> {
|
||||
native: NativeElement;
|
||||
constructor();
|
||||
|
||||
@ -26,7 +26,6 @@ imageLabel.setPixmap(pixmap);
|
||||
scrollArea.setWidget(imageLabel);
|
||||
```
|
||||
*/
|
||||
|
||||
export class QScrollArea extends QAbstractScrollArea<QScrollAreaSignals> {
|
||||
native: NativeElement;
|
||||
contentWidget?: NodeWidget<any> | null;
|
||||
|
||||
@ -29,7 +29,6 @@ global.win = win;
|
||||
global.shortcut = shortcut;
|
||||
```
|
||||
*/
|
||||
|
||||
export class QShortcut extends NodeObject<QShortcutSignals> {
|
||||
native: NativeElement;
|
||||
constructor(parent: NodeWidget<any>) {
|
||||
|
||||
@ -18,7 +18,6 @@ const { QSpinBox } = require("@nodegui/nodegui");
|
||||
const spinBox = new QSpinBox();
|
||||
```
|
||||
*/
|
||||
|
||||
export class QSpinBox extends NodeWidget<QSpinBoxSignals> {
|
||||
native: NativeElement;
|
||||
constructor();
|
||||
|
||||
@ -43,7 +43,6 @@ win.show();
|
||||
|
||||
```
|
||||
*/
|
||||
|
||||
export class QStackedWidget extends NodeWidget<QStackedWidgetSignals> {
|
||||
native: NativeElement;
|
||||
constructor();
|
||||
|
||||
@ -27,7 +27,6 @@ tray.show();
|
||||
global.tray = tray; // prevents garbage collection of tray
|
||||
```
|
||||
*/
|
||||
|
||||
export class QSystemTrayIcon extends NodeObject<QSystemTrayIconSignals> {
|
||||
native: NativeElement;
|
||||
contextMenu?: QMenu;
|
||||
|
||||
@ -24,7 +24,6 @@ tabWidget.addTab(new QCalendarWidget(), new QIcon(), 'Tab 1');
|
||||
tabWidget.addTab(new QCalendarWidget(), new QIcon(), 'Tab 2');
|
||||
```
|
||||
*/
|
||||
|
||||
export class QTabWidget extends NodeWidget<QTabWidgetSignals> {
|
||||
native: NativeElement;
|
||||
tabs: NodeWidget<any>[];
|
||||
|
||||
@ -36,7 +36,6 @@ win.show();
|
||||
|
||||
```
|
||||
*/
|
||||
|
||||
export class QTableWidget extends QAbstractScrollArea<QTableWidgetSignals> {
|
||||
native: NativeElement;
|
||||
items: Set<NativeElement | Component>;
|
||||
|
||||
@ -16,7 +16,7 @@ A `QTimeEdit` a widget for editing times based on the QDateTimeEdit widget
|
||||
```javascript
|
||||
const { QTimeEdit } = require("@nodegui/nodegui");
|
||||
|
||||
const comboBox = new QTimeEdit();
|
||||
const timeEdit = new QTimeEdit();
|
||||
// must be implemented
|
||||
```
|
||||
*/
|
||||
|
||||
@ -42,7 +42,6 @@ win.show();
|
||||
(global as any).win = win;
|
||||
```
|
||||
*/
|
||||
|
||||
export class QTreeWidget extends QAbstractScrollArea<QTreeWidgetSignals> {
|
||||
native: NativeElement;
|
||||
topLevelItems: Set<QTreeWidgetItem>;
|
||||
|
||||
@ -15,7 +15,7 @@ A `QDateEdit` provides a widget for editing dates based on the QDateTimeEdit wid
|
||||
```javascript
|
||||
const { QDateEdit } = require("@nodegui/nodegui");
|
||||
|
||||
const comboBox = new QDateEdit();
|
||||
const dateEdit = new QDateEdit();
|
||||
// must be implemented
|
||||
```
|
||||
|
||||
|
||||
@ -35,7 +35,8 @@ win.setCentralWidget(groupBox);
|
||||
win.resize(400, 400);
|
||||
|
||||
win.show();
|
||||
(global as any).win = win;```
|
||||
(global as any).win = win;
|
||||
```
|
||||
|
||||
## Hierarchy
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ A `QTimeEdit` a widget for editing times based on the QDateTimeEdit widget
|
||||
```javascript
|
||||
const { QTimeEdit } = require("@nodegui/nodegui");
|
||||
|
||||
const comboBox = new QTimeEdit();
|
||||
const timeEdit = new QTimeEdit();
|
||||
// must be implemented
|
||||
```
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user