mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 07:47:34 +00:00
Spreadsheet: Add an export wizard, and support for custom CSV exports
Fixes #4269.
This commit is contained in:
parent
bba3a7a2cb
commit
9b68f91c0b
6 changed files with 614 additions and 28 deletions
164
Userland/Applications/Spreadsheet/csv_export.gml
Normal file
164
Userland/Applications/Spreadsheet/csv_export.gml
Normal file
|
@ -0,0 +1,164 @@
|
|||
@GUI::Widget {
|
||||
layout: @GUI::VerticalBoxLayout {
|
||||
margins: [20, 20, 20, 20]
|
||||
}
|
||||
|
||||
@GUI::HorizontalSplitter {
|
||||
@GUI::Widget {
|
||||
name: "csv_options"
|
||||
|
||||
layout: @GUI::VerticalBoxLayout {
|
||||
}
|
||||
|
||||
@GUI::Widget {
|
||||
layout: @GUI::HorizontalBoxLayout {
|
||||
}
|
||||
|
||||
@GUI::GroupBox {
|
||||
title: "Delimiter"
|
||||
|
||||
layout: @GUI::VerticalBoxLayout {
|
||||
// FIXME: This is working around the fact that group boxes don't allocate space for their title and border!
|
||||
margins: [10, 20, 10, 10]
|
||||
}
|
||||
|
||||
@GUI::RadioButton {
|
||||
name: "delimiter_comma_radio"
|
||||
text: "Comma"
|
||||
autosize: true
|
||||
}
|
||||
|
||||
@GUI::RadioButton {
|
||||
name: "delimiter_semicolon_radio"
|
||||
text: "Semicolon"
|
||||
autosize: true
|
||||
}
|
||||
|
||||
@GUI::RadioButton {
|
||||
name: "delimiter_tab_radio"
|
||||
text: "Tab"
|
||||
autosize: true
|
||||
}
|
||||
|
||||
@GUI::RadioButton {
|
||||
name: "delimiter_space_radio"
|
||||
text: "Space"
|
||||
autosize: true
|
||||
}
|
||||
|
||||
@GUI::Widget {
|
||||
fixed_height: 25
|
||||
|
||||
layout: @GUI::HorizontalBoxLayout {
|
||||
}
|
||||
|
||||
@GUI::RadioButton {
|
||||
name: "delimiter_other_radio"
|
||||
text: "Other: "
|
||||
autosize: true
|
||||
}
|
||||
|
||||
@GUI::TextBox {
|
||||
name: "delimiter_other_text_box"
|
||||
text: ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@GUI::GroupBox {
|
||||
title: "Quote"
|
||||
|
||||
layout: @GUI::VerticalBoxLayout {
|
||||
// FIXME: This is working around the fact that group boxes don't allocate space for their title and border!
|
||||
margins: [10, 20, 10, 10]
|
||||
}
|
||||
|
||||
@GUI::RadioButton {
|
||||
name: "quote_single_radio"
|
||||
text: "Single Quotes"
|
||||
autosize: true
|
||||
}
|
||||
|
||||
@GUI::RadioButton {
|
||||
name: "quote_double_radio"
|
||||
text: "Double Quotes"
|
||||
autosize: true
|
||||
}
|
||||
|
||||
@GUI::Widget {
|
||||
fixed_height: 25
|
||||
|
||||
layout: @GUI::HorizontalBoxLayout {
|
||||
}
|
||||
|
||||
@GUI::RadioButton {
|
||||
name: "quote_other_radio"
|
||||
text: "Other: "
|
||||
autosize: true
|
||||
}
|
||||
|
||||
@GUI::TextBox {
|
||||
name: "quote_other_text_box"
|
||||
text: ""
|
||||
}
|
||||
}
|
||||
|
||||
@GUI::Widget {
|
||||
}
|
||||
|
||||
@GUI::Widget {
|
||||
fixed_height: 25
|
||||
|
||||
layout: @GUI::HorizontalBoxLayout {
|
||||
}
|
||||
|
||||
@GUI::Label {
|
||||
text: "Escape by "
|
||||
autosize: true
|
||||
}
|
||||
|
||||
@GUI::ComboBox {
|
||||
name: "quote_escape_combo_box"
|
||||
model_only: true
|
||||
}
|
||||
}
|
||||
|
||||
@GUI::Widget {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@GUI::Widget {
|
||||
fixed_height: 25
|
||||
|
||||
layout: @GUI::HorizontalBoxLayout {
|
||||
}
|
||||
|
||||
@GUI::CheckBox {
|
||||
name: "export_header_check_box"
|
||||
text: "Export with headers"
|
||||
}
|
||||
|
||||
@GUI::CheckBox {
|
||||
name: "quote_all_fields_check_box"
|
||||
text: "Quote all fields"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@GUI::GroupBox {
|
||||
title: "Data Preview"
|
||||
fixed_width: 150
|
||||
|
||||
layout: @GUI::VerticalBoxLayout {
|
||||
// FIXME: This is working around the fact that group boxes don't allocate space for their title and border!
|
||||
margins: [10, 20, 10, 10]
|
||||
}
|
||||
|
||||
@GUI::TextEditor {
|
||||
name: "data_preview_text_editor"
|
||||
mode: "ReadOnly"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue