Add image preview
This commit is contained in:
@@ -15,6 +15,7 @@ export component MainWindow inherits Window {
|
||||
// Convert Image values
|
||||
in-out property file_tab_browse_path <=> file_tab.conv_image_path;
|
||||
in-out property file_tab_image_data <=> file_tab.conv_image_data;
|
||||
in-out property file_tab_image_name <=> file_tab.conv_image_name;
|
||||
callback file_tab_browse_convert_image <=> file_tab.conv_image_browse_clicked;
|
||||
|
||||
title: "TIM Tool 0.1.0";
|
||||
|
@@ -14,6 +14,7 @@ component ProjectWidget inherits Rectangle {
|
||||
component ConvertImageWidget inherits Rectangle {
|
||||
in-out property <string> image_path;
|
||||
in-out property <image> image_data;
|
||||
in-out property <string> image_name;
|
||||
|
||||
callback browse_clicked();
|
||||
|
||||
@@ -48,7 +49,7 @@ component ConvertImageWidget inherits Rectangle {
|
||||
title: "Loaded image";
|
||||
VerticalLayout {
|
||||
alignment: start;
|
||||
padding: 4px;
|
||||
padding: 4px;
|
||||
HorizontalLayout {
|
||||
alignment: center;
|
||||
Rectangle {
|
||||
@@ -65,16 +66,20 @@ component ConvertImageWidget inherits Rectangle {
|
||||
}
|
||||
HorizontalLayout {
|
||||
alignment: start;
|
||||
padding: 4px;
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
Text {
|
||||
text: "Name: ";
|
||||
}
|
||||
}
|
||||
LineEdit {}
|
||||
LineEdit {
|
||||
text: root.image_name;
|
||||
}
|
||||
}
|
||||
HorizontalLayout {
|
||||
alignment: start;
|
||||
padding: 4px;
|
||||
Button {
|
||||
text: "Add Image";
|
||||
enabled: false;
|
||||
@@ -88,6 +93,7 @@ component ConvertImageWidget inherits Rectangle {
|
||||
export component FileTab inherits Rectangle {
|
||||
in-out property <string> conv_image_path;
|
||||
in-out property <image> conv_image_data;
|
||||
in-out property <string> conv_image_name;
|
||||
in-out property <State> state;
|
||||
callback conv_image_browse_clicked;
|
||||
|
||||
@@ -123,6 +129,7 @@ export component FileTab inherits Rectangle {
|
||||
if root.state == State.ConvertImage : ConvertImageWidget {
|
||||
image_path <=> root.conv_image_path;
|
||||
image_data <=> root.conv_image_data;
|
||||
image_name <=> root.conv_image_name;
|
||||
browse_clicked => {
|
||||
root.conv_image_browse_clicked();
|
||||
}
|
||||
|
Reference in New Issue
Block a user