feat(imports): update imports
This commit is contained in:
parent
34d2af08c6
commit
fcc2567aa2
|
@ -1,5 +1,3 @@
|
|||
use gtk4 as gtk;
|
||||
|
||||
use crate::{
|
||||
model::{models::*, Result},
|
||||
model_utils::hamming_code_seven_four::*,
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
use gtk4 as gtk;
|
||||
|
||||
use bitvec::{order::Lsb0, view::AsBits};
|
||||
use gtk::{prelude::*, *};
|
||||
use std::ops::Deref;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use gio::glib::Object;
|
||||
use gtk4 as gtk;
|
||||
|
||||
use std::str::FromStr;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use gtk4 as gtk;
|
||||
#![windows_subsystem = "windows"]
|
||||
|
||||
extern crate gio;
|
||||
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
pub mod builder_traits;
|
||||
pub mod models;
|
||||
|
||||
use crate::gtk::glib;
|
||||
|
||||
use glib::Object;
|
||||
use gtk::glib::{Object, wrapper};
|
||||
|
||||
pub type Result<T> = core::result::Result<T, Error>;
|
||||
pub type Error = std::boxed::Box<dyn std::error::Error>;
|
||||
|
||||
glib::wrapper! {
|
||||
wrapper! {
|
||||
pub struct Frequency(ObjectSubclass<models::Frequency>);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
use std::cell::Cell;
|
||||
|
||||
use crate::gtk;
|
||||
|
||||
use gtk::{
|
||||
glib::{self, Properties},
|
||||
prelude::*,
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
use adw::HeaderBar;
|
||||
use gio::{glib::Variant, SimpleAction};
|
||||
use gtk4 as gtk;
|
||||
|
||||
use gtk::{
|
||||
prelude::{BoxExt, GtkWindowExt},
|
||||
AboutDialog, Box, Image, Label, Orientation, ScrolledWindow, Window,
|
||||
AboutDialog, Box, Image, Label, Orientation, ScrolledWindow, Window, License, NaturalWrapMode, PolicyType
|
||||
};
|
||||
|
||||
use std::path::Path;
|
||||
|
@ -24,7 +23,7 @@ pub fn open_about_dialogue(_action: &SimpleAction, _var: Option<&Variant>) {
|
|||
.authors(vec!["Сагиев А.Д.", "Ефимов И.П."])
|
||||
.version("1.0-beta")
|
||||
.program_name("Прикладная теория информаций")
|
||||
.license_type(gtk4::License::Apache20)
|
||||
.license_type(License::Apache20)
|
||||
.logo(&logo)
|
||||
.website("https://gitea.doryan04.ru/doryan/AIT")
|
||||
.build()
|
||||
|
@ -44,7 +43,7 @@ pub fn open_help_dialogue(_action: &SimpleAction, _var: Option<&Variant>) {
|
|||
.width_request(400)
|
||||
.max_width_chars(50)
|
||||
.single_line_mode(false)
|
||||
.natural_wrap_mode(gtk4::NaturalWrapMode::Word)
|
||||
.natural_wrap_mode(NaturalWrapMode::Word)
|
||||
.label(crate::view::resources::HELP)
|
||||
.build();
|
||||
|
||||
|
@ -52,7 +51,7 @@ pub fn open_help_dialogue(_action: &SimpleAction, _var: Option<&Variant>) {
|
|||
|
||||
let scrollable = ScrolledWindow::builder()
|
||||
.child(&help)
|
||||
.hscrollbar_policy(gtk4::PolicyType::Never)
|
||||
.hscrollbar_policy(PolicyType::Never)
|
||||
.build();
|
||||
|
||||
let custom_header = HeaderBar::new();
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
use gtk4 as gtk;
|
||||
use gio::glib::clone;
|
||||
|
||||
use std::{collections::VecDeque, sync::LazyLock};
|
||||
|
||||
use gtk::{
|
||||
builders::{BoxBuilder, ButtonBuilder, LabelBuilder},
|
||||
prelude::{BoxExt, ButtonExt, ObjectExt, WidgetExt},
|
||||
Box, Button, Label, Revealer, RevealerTransitionType,
|
||||
Box, Button, Label, Revealer, RevealerTransitionType
|
||||
};
|
||||
|
||||
use crate::model::builder_traits::Product;
|
||||
|
@ -94,20 +94,20 @@ impl InfoBarBuilder {
|
|||
|
||||
info_bar_box.append(&info_bar_label);
|
||||
info_bar_box.append(&info_bar_close_btn);
|
||||
info_bar_box.set_widget_name("info_bar");
|
||||
|
||||
let info_bar: &Revealer = &INFO_BAR_INSTANCE.instance;
|
||||
|
||||
info_bar.set_transition_type(RevealerTransitionType::SlideUp);
|
||||
info_bar.set_transition_duration(200);
|
||||
|
||||
info_bar.set_child(Some(&info_bar_box));
|
||||
info_bar.set_widget_name("infobar");
|
||||
info_bar.set_css_classes(&[".warning"]);
|
||||
|
||||
let info_bar_to_close = info_bar.clone();
|
||||
|
||||
info_bar_close_btn.connect_clicked(move |_| {
|
||||
info_bar_to_close.set_reveal_child(false);
|
||||
});
|
||||
info_bar_close_btn.connect_clicked(clone!(
|
||||
#[strong]
|
||||
info_bar,
|
||||
move |_| info_bar.set_reveal_child(false)
|
||||
));
|
||||
|
||||
&INFO_BAR_INSTANCE
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
use gtk4 as gtk;
|
||||
|
||||
use crate::{model::builder_traits::*, view::properties::*};
|
||||
use gtk::{prelude::*, *};
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
use std::fmt::{Debug, Display};
|
||||
|
||||
use gtk4 as gtk;
|
||||
|
||||
use gio::{
|
||||
glib::Variant, prelude::ActionMapExtManual, ActionEntry, Menu, SimpleAction, SimpleActionGroup,
|
||||
};
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
use gtk4 as gtk;
|
||||
|
||||
use super::builder_traits::*;
|
||||
use gtk::{Box, Label, Notebook};
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
use gtk4 as gtk;
|
||||
|
||||
use crate::{
|
||||
model::builder_traits::Product,
|
||||
view::{
|
||||
|
|
|
@ -19,8 +19,6 @@ use gtk::{
|
|||
Align, *,
|
||||
};
|
||||
|
||||
use gtk4 as gtk;
|
||||
|
||||
pub fn signal_reducing_page(wrapper: &Box) {
|
||||
let values = Rc::new(Cell::new(SignalReduce::default()));
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
use gtk4 as gtk;
|
||||
|
||||
use gtk::builders::*;
|
||||
use gtk::Align;
|
||||
|
||||
|
|
Loading…
Reference in New Issue