Update UI again
This commit is contained in:
parent
c237a9af45
commit
d72d8bd84a
|
@ -14,6 +14,7 @@ export component MainWindow inherits Window {
|
||||||
|
|
||||||
// Convert Image values
|
// Convert Image values
|
||||||
in-out property file_tab_browse_path <=> file_tab.conv_image_path;
|
in-out property file_tab_browse_path <=> file_tab.conv_image_path;
|
||||||
|
in-out property file_tab_image_data <=> file_tab.conv_image_data;
|
||||||
callback file_tab_browse_convert_image <=> file_tab.conv_image_browse_clicked;
|
callback file_tab_browse_convert_image <=> file_tab.conv_image_browse_clicked;
|
||||||
|
|
||||||
title: "TIM Tool 0.1.0";
|
title: "TIM Tool 0.1.0";
|
||||||
|
|
|
@ -12,37 +12,73 @@ component ProjectWidget inherits Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
component ConvertImageWidget inherits Rectangle {
|
component ConvertImageWidget inherits Rectangle {
|
||||||
in-out property <string> path;
|
in-out property <string> image_path;
|
||||||
|
in-out property <image> image_data;
|
||||||
|
|
||||||
callback browse_clicked();
|
callback browse_clicked();
|
||||||
|
|
||||||
background: #D0D0D0;
|
background: #D0D0D0;
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
GroupBox {
|
VerticalLayout {
|
||||||
title: "Open project";
|
alignment: start;
|
||||||
x: 4px;
|
GroupBox {
|
||||||
y: 4px;
|
title: "Add image file";
|
||||||
|
VerticalLayout {
|
||||||
VerticalLayout {
|
|
||||||
alignment: start;
|
|
||||||
Text {
|
|
||||||
text: "Select project file to open with TIM Tool";
|
|
||||||
}
|
|
||||||
LineEdit {
|
|
||||||
width: 200%;
|
|
||||||
text: path;
|
|
||||||
}
|
|
||||||
HorizontalLayout {
|
|
||||||
alignment: start;
|
alignment: start;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
Button {
|
Text {
|
||||||
text: "Browse";
|
text: "Select image file to convert to be used with TIM Tool";
|
||||||
clicked => {browse_clicked();}
|
|
||||||
}
|
}
|
||||||
Button {
|
HorizontalLayout {
|
||||||
text: "Convert";
|
alignment: start;
|
||||||
|
padding: 4px;
|
||||||
|
LineEdit {
|
||||||
|
width: 300pt;
|
||||||
|
text: image_path;
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
text: "Browse";
|
||||||
|
clicked => {browse_clicked();}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GroupBox {
|
||||||
|
title: "Loaded image";
|
||||||
|
VerticalLayout {
|
||||||
|
alignment: start;
|
||||||
|
padding: 4px;
|
||||||
|
HorizontalLayout {
|
||||||
|
alignment: center;
|
||||||
|
Rectangle {
|
||||||
|
width: 256px;
|
||||||
|
height: 256px;
|
||||||
|
background: #000000;
|
||||||
|
Image {
|
||||||
|
width: 256px;
|
||||||
|
height: 256px;
|
||||||
|
source: root.image_data;
|
||||||
|
image-fit: contain;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
HorizontalLayout {
|
||||||
|
alignment: start;
|
||||||
|
VerticalLayout {
|
||||||
|
alignment: center;
|
||||||
|
Text {
|
||||||
|
text: "Name: ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LineEdit {}
|
||||||
|
}
|
||||||
|
HorizontalLayout {
|
||||||
|
alignment: start;
|
||||||
|
Button {
|
||||||
|
text: "Add Image";
|
||||||
|
enabled: false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,6 +87,7 @@ component ConvertImageWidget inherits Rectangle {
|
||||||
|
|
||||||
export component FileTab inherits Rectangle {
|
export component FileTab inherits Rectangle {
|
||||||
in-out property <string> conv_image_path;
|
in-out property <string> conv_image_path;
|
||||||
|
in-out property <image> conv_image_data;
|
||||||
in-out property <State> state;
|
in-out property <State> state;
|
||||||
callback conv_image_browse_clicked;
|
callback conv_image_browse_clicked;
|
||||||
|
|
||||||
|
@ -84,12 +121,12 @@ export component FileTab inherits Rectangle {
|
||||||
if root.state == State.Project : ProjectWidget {
|
if root.state == State.Project : ProjectWidget {
|
||||||
}
|
}
|
||||||
if root.state == State.ConvertImage : ConvertImageWidget {
|
if root.state == State.ConvertImage : ConvertImageWidget {
|
||||||
path <=> root.conv_image_path;
|
image_path <=> root.conv_image_path;
|
||||||
|
image_data <=> root.conv_image_data;
|
||||||
browse_clicked => {
|
browse_clicked => {
|
||||||
root.conv_image_browse_clicked();
|
root.conv_image_browse_clicked();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue