UNPKG

@dark-engine/platform-desktop

Version:

Dark renderer to desktop platforms like Windows, Linux, macOS via Nodegui and Qt

28 lines (27 loc) 913 B
import { type QIcon, type QVariant, type QComboBoxSignals, type QSize, QComboBox } from '@nodegui/nodegui'; import { type ComponentFactory, type Ref } from '@dark-engine/core'; import type { WidgetProps, WithStandardProps } from '../shared'; export type ComboBoxProps = WithStandardProps< { ref?: Ref<ComboBoxRef>; items: Array<ComboBoxItem>; currentIndex: number; iconSize?: QSize; editable?: boolean; maxCount?: number; maxVisibleItems?: number; } & WidgetProps >; export type ComboBoxRef = QDarkComboBox; export type ComboBoxSignals = QComboBoxSignals; export type ComboBoxItem = { text: string; icon?: QIcon; userData?: QVariant; }; declare const ComboBox: ComponentFactory<ComboBoxProps>; declare class QDarkComboBox extends QComboBox { setItems(items: Array<ComboBoxItem>): void; setCurrentIndex(value: number): Promise<void>; } export { ComboBox, QDarkComboBox };