2021-01-10 19:12:08 +00:00
|
|
|
use gtk::prelude::*;
|
|
|
|
|
|
|
|
#[derive(Clone)]
|
2021-03-27 12:14:02 +00:00
|
|
|
pub struct GuiProgressDialog {
|
2021-01-25 17:23:42 +00:00
|
|
|
pub window_progress: gtk::Window,
|
2021-01-10 19:12:08 +00:00
|
|
|
|
|
|
|
pub progress_bar_current_stage: gtk::ProgressBar,
|
|
|
|
pub progress_bar_all_stages: gtk::ProgressBar,
|
|
|
|
|
|
|
|
pub label_stage: gtk::Label,
|
|
|
|
|
|
|
|
pub grid_progress_stages: gtk::Grid,
|
|
|
|
|
|
|
|
pub button_stop_in_dialog: gtk::Button,
|
|
|
|
}
|
|
|
|
|
2021-03-27 12:14:02 +00:00
|
|
|
impl GuiProgressDialog {
|
2021-01-10 19:12:08 +00:00
|
|
|
pub fn create_from_builder(builder: >k::Builder) -> Self {
|
2021-06-25 16:07:13 +00:00
|
|
|
let window_progress: gtk::Window = builder.object("window_progress").unwrap();
|
2021-01-10 19:12:08 +00:00
|
|
|
|
2021-06-25 16:07:13 +00:00
|
|
|
let progress_bar_current_stage: gtk::ProgressBar = builder.object("progress_bar_current_stage").unwrap();
|
|
|
|
let progress_bar_all_stages: gtk::ProgressBar = builder.object("progress_bar_all_stages").unwrap();
|
2021-01-10 19:12:08 +00:00
|
|
|
|
2021-06-25 16:07:13 +00:00
|
|
|
let label_stage: gtk::Label = builder.object("label_stage").unwrap();
|
2021-01-10 19:12:08 +00:00
|
|
|
|
2021-06-25 16:07:13 +00:00
|
|
|
let grid_progress_stages: gtk::Grid = builder.object("grid_progress_stages").unwrap();
|
2021-01-10 19:12:08 +00:00
|
|
|
|
2021-06-25 16:07:13 +00:00
|
|
|
let button_stop_in_dialog: gtk::Button = builder.object("button_stop_in_dialog").unwrap();
|
2021-01-10 19:12:08 +00:00
|
|
|
|
|
|
|
Self {
|
2021-01-25 17:23:42 +00:00
|
|
|
window_progress,
|
2021-01-10 19:12:08 +00:00
|
|
|
progress_bar_current_stage,
|
|
|
|
progress_bar_all_stages,
|
|
|
|
label_stage,
|
|
|
|
grid_progress_stages,
|
|
|
|
button_stop_in_dialog,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|