|
| 1 | +import { QDial } from '@nodegui/nodegui'; |
| 2 | +import { NgComponent } from './component'; |
| 3 | +import { RendererStyleFlags2 } from '@angular/core'; |
| 4 | + |
| 5 | +export class NgDial extends QDial implements NgComponent { |
| 6 | + public static nodeName = 'dial'; |
| 7 | + public parent: any; |
| 8 | + |
| 9 | + public appendChild(newChild: any): void { |
| 10 | + console.warn('dial do not have append child'); |
| 11 | + } |
| 12 | + |
| 13 | + public insertBefore(newChild: any, refChild: any) {} |
| 14 | + |
| 15 | + public setNgAttribute( |
| 16 | + name: string, |
| 17 | + value: string, |
| 18 | + namespace?: string | null |
| 19 | + ): void {} |
| 20 | + |
| 21 | + public setProperty(name: string, value: boolean | number): void { |
| 22 | + switch (name) { |
| 23 | + case 'enabled': |
| 24 | + this.setEnabled(value as boolean); |
| 25 | + break; |
| 26 | + case 'notchesVisible': |
| 27 | + this.setNotchesVisible(value as boolean); |
| 28 | + break; |
| 29 | + case 'wrapping': |
| 30 | + this.setWrapping(value as boolean); |
| 31 | + break; |
| 32 | + case 'notchTarget': |
| 33 | + this.setNotchTarget(value as number); |
| 34 | + break; |
| 35 | + default: |
| 36 | + break; |
| 37 | + } |
| 38 | + } |
| 39 | + |
| 40 | + public setStyle( |
| 41 | + style: string, |
| 42 | + value: any, |
| 43 | + flags?: RendererStyleFlags2 |
| 44 | + ): void { |
| 45 | + this.setInlineStyle(`${style}:${value}`); |
| 46 | + } |
| 47 | + |
| 48 | + public setValue(value: any): void {} |
| 49 | + |
| 50 | + removeAttribute(name: string, namespace?: string): void { |
| 51 | + throw new Error('Method not implemented.'); |
| 52 | + } |
| 53 | + removeChild(oldChild: any): void { |
| 54 | + throw new Error('Method not implemented.'); |
| 55 | + } |
| 56 | + removeClass(name: string): void { |
| 57 | + throw new Error('Method not implemented.'); |
| 58 | + } |
| 59 | + removeStyle(style: string, flags?: RendererStyleFlags2): void { |
| 60 | + throw new Error('Method not implemented.'); |
| 61 | + } |
| 62 | +} |
0 commit comments