58 lines
1.5 KiB
Text
58 lines
1.5 KiB
Text
import { VerticalBox, Palette, TabWidget, HorizontalBox, Button } from "std-widgets.slint";
|
|
|
|
export global UploadPageInterface {
|
|
in-out property <bool> prev_button_enabled: false;
|
|
in-out property <bool> next_button_enabled: true;
|
|
|
|
pure callback paginate_tabs(int) -> int;
|
|
}
|
|
|
|
export component UploadPage inherits VerticalBox {
|
|
Rectangle {
|
|
border-width: 1px;
|
|
border-radius: 4px;
|
|
border-color: Palette.border;
|
|
background: Palette.alternate-background;
|
|
VerticalLayout {
|
|
property <int> current_tab: UploadPageInterface.paginate_tabs(tabs.current-index);
|
|
tabs := TabWidget {
|
|
Tab {
|
|
title: "Parser";
|
|
Text {
|
|
text: "Parser Settings here";
|
|
}
|
|
}
|
|
Tab {
|
|
title: "Metadata";
|
|
Text {
|
|
text: "Metadata manipulation here";
|
|
}
|
|
}
|
|
Tab {
|
|
title: "Upload";
|
|
Text {
|
|
text: "Upload Stuff here";
|
|
}
|
|
}
|
|
}
|
|
HorizontalBox {
|
|
previous := Button {
|
|
text: "Previous";
|
|
enabled: UploadPageInterface.prev_button_enabled;
|
|
clicked => {tabs.current-index -= 1}
|
|
}
|
|
Text {
|
|
text: "\{current_tab + 1}/3";
|
|
vertical-alignment: center;
|
|
horizontal-alignment: center;
|
|
}
|
|
next := Button {
|
|
text: "Next";
|
|
enabled: UploadPageInterface.next_button_enabled;
|
|
clicked => {tabs.current-index += 1}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
} |