Create connections
This commit is contained in:
parent
ab5c7efce8
commit
eb29237f24
|
@ -8,10 +8,17 @@ export component MainWindow inherits Window {
|
||||||
in-out property main_tab_vram_bg <=> main_tab.vram_bg;
|
in-out property main_tab_vram_bg <=> main_tab.vram_bg;
|
||||||
in-out property main_tab_vram_file_list <=> main_tab.vram_files;
|
in-out property main_tab_vram_file_list <=> main_tab.vram_files;
|
||||||
in-out property main_tab_vram_images <=> main_tab.vram_images;
|
in-out property main_tab_vram_images <=> main_tab.vram_images;
|
||||||
|
|
||||||
callback main_tab_remove_file_clicked <=> main_tab.remove_file_clicked;
|
callback main_tab_remove_file_clicked <=> main_tab.remove_file_clicked;
|
||||||
callback move_vram_image <=> main_tab.move_vram_image;
|
callback move_vram_image <=> main_tab.move_vram_image;
|
||||||
|
|
||||||
|
// Project widget values
|
||||||
|
in-out property project_widget-open_project_path <=> file_tab.project_widget-open_project_path;
|
||||||
|
in-out property project_widget-save_project_path <=> file_tab.project_widget-save_project_path;
|
||||||
|
callback project_widget-load_project_clicked <=> file_tab.project_widget-load_project_clicked;
|
||||||
|
callback project_widget-save_project_clicked <=> file_tab.project_widget-save_project_clicked;
|
||||||
|
callback project_widget-browse_open_project_clicked <=> file_tab.project_widget-browse_open_project_clicked;
|
||||||
|
callback project_widget-browse_save_project_clicked <=> file_tab.project_widget-browse_save_project_clicked;
|
||||||
|
|
||||||
// Convert Image values
|
// Convert Image values
|
||||||
in-out property file_tab-encoding_options <=> file_tab.conv-encoding_options;
|
in-out property file_tab-encoding_options <=> file_tab.conv-encoding_options;
|
||||||
in-out property file_tab-browse_path <=> file_tab.conv-image_path;
|
in-out property file_tab-browse_path <=> file_tab.conv-image_path;
|
||||||
|
|
|
@ -6,6 +6,14 @@ export enum State {
|
||||||
}
|
}
|
||||||
|
|
||||||
component ProjectWidget inherits Rectangle {
|
component ProjectWidget inherits Rectangle {
|
||||||
|
in-out property <string> open_project_path;
|
||||||
|
in-out property <string> save_project_path;
|
||||||
|
|
||||||
|
callback load_project_clicked();
|
||||||
|
callback save_project_clicked();
|
||||||
|
callback browse_open_project_clicked();
|
||||||
|
callback browse_save_project_clicked();
|
||||||
|
|
||||||
background: #D0D0D0;
|
background: #D0D0D0;
|
||||||
|
|
||||||
VerticalLayout {
|
VerticalLayout {
|
||||||
|
@ -22,15 +30,22 @@ component ProjectWidget inherits Rectangle {
|
||||||
alignment: start;
|
alignment: start;
|
||||||
LineEdit {
|
LineEdit {
|
||||||
width: 300pt;
|
width: 300pt;
|
||||||
|
text: root.open_project_path;
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
text: "Browse";
|
text: "Browse";
|
||||||
|
clicked => {
|
||||||
|
root.browse_open_project_clicked();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
HorizontalLayout {
|
HorizontalLayout {
|
||||||
alignment: start;
|
alignment: start;
|
||||||
Button {
|
Button {
|
||||||
text: "Load";
|
text: "Load";
|
||||||
|
clicked => {
|
||||||
|
root.load_project_clicked();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,9 +62,13 @@ component ProjectWidget inherits Rectangle {
|
||||||
alignment: start;
|
alignment: start;
|
||||||
LineEdit {
|
LineEdit {
|
||||||
width: 300pt;
|
width: 300pt;
|
||||||
|
text: root.save_project_path;
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
text: "Browse";
|
text: "Browse";
|
||||||
|
clicked => {
|
||||||
|
root.browse_save_project_clicked();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CheckBox {
|
CheckBox {
|
||||||
|
@ -59,6 +78,9 @@ component ProjectWidget inherits Rectangle {
|
||||||
alignment: start;
|
alignment: start;
|
||||||
Button {
|
Button {
|
||||||
text: "Save";
|
text: "Save";
|
||||||
|
clicked => {
|
||||||
|
root.save_project_clicked();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -256,6 +278,16 @@ component ConvertImageWidget inherits Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
export component FileTab inherits Rectangle {
|
export component FileTab inherits Rectangle {
|
||||||
|
in-out property <State> state;
|
||||||
|
// For project widget
|
||||||
|
in-out property <string> project_widget-open_project_path;
|
||||||
|
in-out property <string> project_widget-save_project_path;
|
||||||
|
callback project_widget-load_project_clicked();
|
||||||
|
callback project_widget-save_project_clicked();
|
||||||
|
callback project_widget-browse_open_project_clicked();
|
||||||
|
callback project_widget-browse_save_project_clicked();
|
||||||
|
|
||||||
|
// For image conversion widget
|
||||||
in-out property <[string]> conv-encoding_options;
|
in-out property <[string]> conv-encoding_options;
|
||||||
in-out property <string> conv-image_path;
|
in-out property <string> conv-image_path;
|
||||||
in-out property <string> conv-image_name;
|
in-out property <string> conv-image_name;
|
||||||
|
@ -268,12 +300,12 @@ export component FileTab inherits Rectangle {
|
||||||
in-out property <string> conv-selected_encoding;
|
in-out property <string> conv-selected_encoding;
|
||||||
in-out property <bool> conv-palette_enable;
|
in-out property <bool> conv-palette_enable;
|
||||||
in-out property <bool> conv-enable_view;
|
in-out property <bool> conv-enable_view;
|
||||||
|
|
||||||
in-out property <State> state;
|
|
||||||
callback conv-image_update_palette_size(int, int);
|
callback conv-image_update_palette_size(int, int);
|
||||||
callback conv-image_browse_clicked;
|
callback conv-image_browse_clicked;
|
||||||
callback conv-image_add_clicked;
|
callback conv-image_add_clicked;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
x: 0px;
|
x: 0px;
|
||||||
y: 0px;
|
y: 0px;
|
||||||
|
|
||||||
|
@ -302,6 +334,24 @@ export component FileTab inherits Rectangle {
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
alignment: start;
|
alignment: start;
|
||||||
if root.state == State.Project : ProjectWidget {
|
if root.state == State.Project : ProjectWidget {
|
||||||
|
open_project_path <=> root.project_widget-open_project_path;
|
||||||
|
save_project_path <=> root.project_widget-save_project_path;
|
||||||
|
|
||||||
|
load_project_clicked() => {
|
||||||
|
root.project_widget-load_project_clicked();
|
||||||
|
}
|
||||||
|
|
||||||
|
save_project_clicked() => {
|
||||||
|
root.project_widget-save_project_clicked();
|
||||||
|
}
|
||||||
|
|
||||||
|
browse_open_project_clicked() => {
|
||||||
|
root.project_widget-browse_open_project_clicked();
|
||||||
|
}
|
||||||
|
|
||||||
|
browse_save_project_clicked() => {
|
||||||
|
root.project_widget-save_project_clicked();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if root.state == State.ConvertImage : ConvertImageWidget {
|
if root.state == State.ConvertImage : ConvertImageWidget {
|
||||||
|
|
Loading…
Reference in New Issue