Files
metabuilder/qml/components/lab/CDateTimePicker.qml
T
git c406b8df96 refactor: Reorganize FakeMUI by implementation type
Move FakeMUI content to appropriate root-level folders by implementation:

**React Components → components/fakemui/**
- 537 components (inputs, surfaces, layout, data-display, feedback,
  navigation, utils, atoms, lab, x, email, workflows)
- 416 SVG icons
- Full barrel exports in components/fakemui/index.ts

**QML Components → qml/**
- 104 Material Design 3 components (11 categories)
- 7 hybrid application views
- 8 desktop widgets
- qmldir module registration

**Python Bindings → python/fakemui/**
- 15 PyQt6 modules (120+ components)
- Full Python package structure with pyproject.toml

**SCSS/Styles → fakemui/** (renamed purpose)
- scss/ - Material Design 3 stylesheets
- styles/ - Component SCSS modules
- src/utils/ - Accessibility utilities
- index.ts now re-exports from components/fakemui/

This separation allows:
- React: import { Button } from '@metabuilder/components/fakemui'
- QML: import QmlComponents 1.0
- Python: from fakemui import Button, Card
- Backward compat: import { Button } from '@metabuilder/fakemui'

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 12:59:24 +00:00

67 lines
2.0 KiB
QML

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
Item {
id: dateTimePicker
property date value: new Date()
property string label: ""
property bool disabled: false
signal dateTimeChanged(date newDateTime)
implicitWidth: datePickerItem.implicitWidth + timePickerItem.implicitWidth + 16
implicitHeight: contentColumn.implicitHeight
ColumnLayout {
id: contentColumn
anchors.fill: parent
spacing: 4
// Label
Text {
visible: dateTimePicker.label
text: dateTimePicker.label
font.pixelSize: 12
color: "#666666"
}
RowLayout {
Layout.fillWidth: true
spacing: 8
CDatePicker {
id: datePickerItem
value: dateTimePicker.value
disabled: dateTimePicker.disabled
onDateChanged: function(newDate) {
if (newDate && !isNaN(newDate.getTime())) {
var current = dateTimePicker.value
newDate.setHours(current.getHours(), current.getMinutes())
dateTimePicker.value = newDate
dateTimeChanged(newDate)
}
}
}
CTimePicker {
id: timePickerItem
value: dateTimePicker.value
disabled: dateTimePicker.disabled
onTimeChanged: function(newTime) {
if (newTime && !isNaN(newTime.getTime())) {
var current = dateTimePicker.value
var newDate = new Date(current)
newDate.setHours(newTime.getHours(), newTime.getMinutes())
dateTimePicker.value = newDate
dateTimeChanged(newDate)
}
}
}
}
}
}