Fixes spacing and doc generation (#343)

This commit is contained in:
Atul R 2020-01-10 12:11:00 +05:30 committed by GitHub
parent 47d92c57ad
commit a0522ccce3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
37 changed files with 8 additions and 38 deletions

View File

@ -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 {

View File

@ -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);

View File

@ -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();

View File

@ -29,7 +29,6 @@ menuAction.addEventListener("triggered", () => {
menu.addAction(menuAction);
```
*/
export class QAction extends NodeObject<QActionSignals> {
native: NativeElement;
icon?: QIcon;

View File

@ -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();

View File

@ -21,7 +21,6 @@ const checkbox = new QCheckBox();
checkbox.setText("Hello");
```
*/
export class QCheckBox extends QAbstractButton<QCheckBoxSignals> {
native: NativeElement;
constructor();

View File

@ -33,7 +33,6 @@ comboBox.addEventListener('currentIndexChanged', (index) => {
});
```
*/
export class QComboBox extends NodeWidget<QComboBoxSignals> {
native: NativeElement;
constructor();

View File

@ -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
```
*/

View File

@ -31,7 +31,6 @@ dateTimeEdit.setDate(date);
dateTimeEdit.setTime(time);
```
*/
export class QDateTimeEdit extends QAbstractSpinBox<QDateTimeEditSignals> {
native: NativeElement;
calendar?: QCalendarWidget;

View File

@ -19,7 +19,6 @@ const { QDial } = require("@nodegui/nodegui");
const dial = new QDial();
```
*/
export class QDial extends QAbstractSlider<QDialSignals> {
native: NativeElement;
constructor();

View File

@ -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) {

View File

@ -28,7 +28,6 @@ layout.addWidget(label2);
```
*/
export class QGridLayout extends NodeLayout<QGridLayoutSignals> {
native: NativeElement;
constructor();

View File

@ -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();

View File

@ -24,7 +24,6 @@ label.setText("Hello");
```
*/
export class QLabel extends NodeWidget<QLabelSignals> {
native: NativeElement;
private _pixmap?: QPixmap;

View File

@ -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;

View File

@ -19,7 +19,6 @@ const lineEdit = new QLineEdit();
```
*/
export class QLineEdit extends NodeWidget<QLineEditSignals> {
native: NativeElement;
constructor();

View File

@ -32,7 +32,6 @@ for (let i = 0; i < 30; i++) {
}
```
*/
export class QListWidget extends QAbstractItemView<QListWidgetSignals> {
native: NativeElement;
items: Set<NativeElement | Component>;

View File

@ -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;

View File

@ -17,7 +17,6 @@ const { QMenu } = require("@nodegui/nodegui");
const menu = new QMenu();
```
*/
export class QMenu extends NodeWidget<QMenuSignals> {
native: NativeElement;
actions: Set<QAction>;

View File

@ -22,7 +22,6 @@ win.show();
global.win = win;
```
*/
export class QMenuBar extends NodeWidget<QMenuBarSignals> {
native: NativeElement;
constructor();

View File

@ -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();

View File

@ -31,7 +31,6 @@ const { QPlainTextEdit } = require("@nodegui/nodegui");
const plainTextEdit = new QPlainTextEdit();
```
*/
export class QPlainTextEdit extends QAbstractScrollArea<QPlainTextEditSignals> {
native: NativeElement;
placeholderText?: string;

View File

@ -19,7 +19,6 @@ const { QProgressBar } = require("@nodegui/nodegui");
const progressBar = new QProgressBar();
```
*/
export class QProgressBar extends NodeWidget<QProgressBarSignals> {
native: NativeElement;
constructor();

View File

@ -21,7 +21,6 @@ const button = new QPushButton();
button.setText("Hello");
```
*/
export class QPushButton extends QAbstractButton<QPushButtonSignals> {
native: NativeElement;
constructor();

View File

@ -22,7 +22,6 @@ radioButton.setText("Hello");
```
*/
export class QRadioButton extends QAbstractButton<QRadioButtonSignals> {
native: NativeElement;
constructor();

View File

@ -26,7 +26,6 @@ imageLabel.setPixmap(pixmap);
scrollArea.setWidget(imageLabel);
```
*/
export class QScrollArea extends QAbstractScrollArea<QScrollAreaSignals> {
native: NativeElement;
contentWidget?: NodeWidget<any> | null;

View File

@ -29,7 +29,6 @@ global.win = win;
global.shortcut = shortcut;
```
*/
export class QShortcut extends NodeObject<QShortcutSignals> {
native: NativeElement;
constructor(parent: NodeWidget<any>) {

View File

@ -18,7 +18,6 @@ const { QSpinBox } = require("@nodegui/nodegui");
const spinBox = new QSpinBox();
```
*/
export class QSpinBox extends NodeWidget<QSpinBoxSignals> {
native: NativeElement;
constructor();

View File

@ -43,7 +43,6 @@ win.show();
```
*/
export class QStackedWidget extends NodeWidget<QStackedWidgetSignals> {
native: NativeElement;
constructor();

View File

@ -27,7 +27,6 @@ tray.show();
global.tray = tray; // prevents garbage collection of tray
```
*/
export class QSystemTrayIcon extends NodeObject<QSystemTrayIconSignals> {
native: NativeElement;
contextMenu?: QMenu;

View File

@ -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>[];

View File

@ -36,7 +36,6 @@ win.show();
```
*/
export class QTableWidget extends QAbstractScrollArea<QTableWidgetSignals> {
native: NativeElement;
items: Set<NativeElement | Component>;

View File

@ -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
```
*/

View File

@ -42,7 +42,6 @@ win.show();
(global as any).win = win;
```
*/
export class QTreeWidget extends QAbstractScrollArea<QTreeWidgetSignals> {
native: NativeElement;
topLevelItems: Set<QTreeWidgetItem>;

View File

@ -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
```

View File

@ -35,7 +35,8 @@ win.setCentralWidget(groupBox);
win.resize(400, 400);
win.show();
(global as any).win = win;```
(global as any).win = win;
```
## Hierarchy

View File

@ -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
```