mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-01 16:17:25 +00:00
35 lines
948 B
Text
35 lines
948 B
Text
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
|
|
|
import { Slider, GroupBox, HorizontalBox, VerticalBox } from "std-widgets.slint";
|
|
|
|
export MainWindow := Window {
|
|
title: "SixtyFPS Plotter Integration Example";
|
|
preferred-width: 800px;
|
|
preferred-height: 600px;
|
|
|
|
callback render_plot(float) -> image;
|
|
|
|
VerticalBox {
|
|
Text {
|
|
font-size: 20px;
|
|
text: "2D Gaussian PDF";
|
|
horizontal-alignment: center;
|
|
}
|
|
Image {
|
|
source: root.render_plot(pitch-slider.value);
|
|
}
|
|
HorizontalBox {
|
|
Text {
|
|
text: "Pitch:";
|
|
font-weight: 600;
|
|
vertical-alignment: center;
|
|
}
|
|
pitch-slider := Slider {
|
|
minimum: 0;
|
|
maximum: 180;
|
|
value: 42;
|
|
}
|
|
}
|
|
}
|
|
}
|