Re orders and marks things which have been implemented in react aswell

This commit is contained in:
Atul R 2019-09-01 00:20:19 +02:00
parent 09f4d17dfa
commit 7c086fb9c7
4 changed files with 56 additions and 39 deletions

View File

@ -1,14 +1,20 @@
// enums
// Enums:
export * from "./lib/QtEnums";
// Gui:
export { QApplication } from "./lib/QtGui/QApplication";
export { QWidget, QWidgetEvents } from "./lib/QtWidgets/QWidget";
export { QPixmap } from "./lib/QtGui/QPixmap";
export { QIcon } from "./lib/QtGui/QIcon";
export { QCursor } from "./lib/QtGui/QCursor";
// Events: Maybe a separate module ?
export { QKeyEvent } from "./lib/QtGui/QEvent/QKeyEvent";
export { NativeEvent } from "./lib/core/EventWidget";
// Abstract:
export { NodeWidget } from "./lib/QtWidgets/QWidget";
export { NodeLayout } from "./lib/QtWidgets/QLayout";
export { QAbstractScrollArea } from "./lib/QtWidgets/QAbstractScrollArea";
export { QAbstractSlider } from "./lib/QtWidgets/QAbstractSlider";
// Widgets:
export { QWidget, QWidgetEvents } from "./lib/QtWidgets/QWidget";
export { QCheckBox, QCheckBoxEvents } from "./lib/QtWidgets/QCheckBox";
export { QLabel, QLabelEvents } from "./lib/QtWidgets/QLabel";
export { QDial, QDialEvents } from "./lib/QtWidgets/QDial";
@ -26,7 +32,5 @@ export { QScrollArea, QScrollAreaEvents } from "./lib/QtWidgets/QScrollArea";
// Layouts:
export { QGridLayout } from "./lib/QtWidgets/QGridLayout";
export { FlexLayout } from "./lib/core/FlexLayout";
// Events : Maybe a separate module ?
export { QKeyEvent } from "./lib/QtGui/QEvent/QKeyEvent";
export { NativeEvent } from "./lib/core/EventWidget";
// Others:
export { StyleSheet } from "./lib/core/Style/StyleSheet";

View File

@ -1,4 +1,4 @@
import { NodeWidget, QWidget } from "../QWidget";
import { NodeWidget } from "../QWidget";
import { Orientation } from "../../QtEnums";
export abstract class QAbstractSlider extends NodeWidget {
@ -8,23 +8,22 @@ export abstract class QAbstractSlider extends NodeWidget {
setMaximum(maximum: number) {
this.native.setMaximum(maximum);
}
setMinimum(minimum: number) {
this.native.setMinimum(minimum);
}
setValue(value: number) {
this.native.setValue(value);
}
setOrientation(orientation: Orientation) {
this.native.setOrientation(orientation);
}
maximum(): number {
return this.native.maximum();
}
setMinimum(minimum: number) {
this.native.setMinimum(minimum);
}
minimum(): number {
return this.native.minimum();
}
setValue(value: number) {
this.native.setValue(value);
}
value(): number {
return this.native.value();
}
setOrientation(orientation: Orientation) {
this.native.setOrientation(orientation);
}
}

View File

@ -26,28 +26,34 @@ export class QDial extends QAbstractSlider {
this.parent = parent;
// bind member functions
this.setNotchesVisible.bind(this);
this.notchesVisible.bind(this);
this.setWrapping.bind(this);
this.wrapping.bind(this);
this.setNotchTarget.bind(this);
this.notchTarget.bind(this);
this.notchesVisible.bind(this);
this.wrapping.bind(this);
}
setNotchesVisible(visible: boolean) {
// react:✓
this.native.setNotchesVisible(visible);
}
notchesVisible(): boolean {
// react:✓
return this.native.notchesVisible();
}
setWrapping(on: boolean) {
// react:✓
this.native.setWrapping(on);
}
wrapping(): boolean {
// react:✓
return this.native.wrapping();
}
setNotchTarget(target: number) {
// react:✓
this.native.setNotchTarget(target);
}
notchTarget(): number {
// react:✓
return this.native.notchTarget();
}
notchesVisible(): boolean {
return this.native.notchesVisible();
}
wrapping(): boolean {
return this.native.wrapping();
}
}

View File

@ -23,41 +23,49 @@ export class QSpinBox extends NodeWidget {
this.native = native;
// bind member functions
this.setPrefix.bind(this);
this.setSingleStep.bind(this);
this.setSuffix.bind(this);
this.setRange.bind(this);
this.setValue.bind(this);
this.cleanText.bind(this);
this.setSingleStep.bind(this);
this.setRange.bind(this);
this.maximum.bind(this);
this.minimum.bind(this);
this.setValue.bind(this);
this.value.bind(this);
}
setPrefix(prefix: string) {
this.native.setPrefix(`${prefix}`);
}
setSingleStep(val: number) {
this.native.setSingleStep(val);
// react:✓
this.native.setPrefix(prefix);
}
setSuffix(suffix: string) {
this.native.setSuffix(`${suffix}`);
}
setRange(minimum: number, maximum: number) {
this.native.setRange(minimum, maximum);
}
setValue(val: number) {
this.native.setValue(val);
// react:✓
this.native.setSuffix(suffix);
}
cleanText(): string {
// react:✓
return this.native.cleanText();
}
setSingleStep(val: number) {
// react:✓
this.native.setSingleStep(val);
}
setRange(minimum: number, maximum: number) {
// react:✓
this.native.setRange(minimum, maximum);
}
maximum(): number {
// react:✓
return this.native.maximum();
}
minimum(): number {
// react:✓
return this.native.minimum();
}
setValue(val: number) {
// react:✓
this.native.setValue(val);
}
value(): number {
// react:✓
return this.native.value();
}
}