some commits
This commit is contained in:
parent
fab65c66e5
commit
d0890c417f
|
|
@ -796,9 +796,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.3.9"
|
||||
version = "1.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6"
|
||||
checksum = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
|
|
@ -808,9 +808,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.6.18"
|
||||
version = "0.6.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8"
|
||||
checksum = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
|
|
@ -934,6 +934,7 @@ dependencies = [
|
|||
"libmath",
|
||||
"png",
|
||||
"rand 0.8.0",
|
||||
"regex",
|
||||
"serialport",
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -15,3 +15,4 @@ glib = "0.10.3"
|
|||
png = "0.16.8"
|
||||
cairo-rs = { version = "0.9.1", features = ["png"] }
|
||||
rand = "0.8.0"
|
||||
regex = "1.4.2"
|
||||
|
|
|
|||
116
src/graph.rs
116
src/graph.rs
|
|
@ -2,14 +2,16 @@ use gtk::prelude::*;
|
|||
use gtk::DrawingArea;
|
||||
|
||||
use std::rc::Rc;
|
||||
use std::cell::RefCell;
|
||||
|
||||
pub struct Graph {
|
||||
area: DrawingArea,
|
||||
scale_x_start: f64,
|
||||
scale_x_end: f64,
|
||||
scale_y_start: f64,
|
||||
scale_y_end: f64,
|
||||
lines: Vec<Line>
|
||||
pub area: DrawingArea,
|
||||
pub scale_x_start: f64,
|
||||
pub scale_x_size: f64,
|
||||
pub scale_y_start: f64,
|
||||
pub scale_y_size: f64,
|
||||
pub draw_patch: bool,
|
||||
pub lines: Vec<Line>
|
||||
}
|
||||
|
||||
pub struct Line {
|
||||
|
|
@ -29,22 +31,24 @@ impl Line {
|
|||
impl Graph {
|
||||
pub fn new(area: DrawingArea,
|
||||
scale_x_start: f64,
|
||||
scale_x_end: f64,
|
||||
scale_x_size: f64,
|
||||
scale_y_start: f64,
|
||||
scale_y_end: f64,
|
||||
lines: Vec<Line>) -> Rc<Self> {
|
||||
scale_y_size: f64,
|
||||
draw_patch: bool,
|
||||
lines: Vec<Line>) -> Rc<RefCell<Self>> {
|
||||
|
||||
let graph = Rc::new(Graph {
|
||||
let graph = Rc::new(RefCell::new(Graph {
|
||||
area,
|
||||
scale_x_start,
|
||||
scale_x_end,
|
||||
scale_x_size,
|
||||
scale_y_start,
|
||||
scale_y_end,
|
||||
scale_y_size,
|
||||
draw_patch,
|
||||
lines
|
||||
});
|
||||
}));
|
||||
|
||||
let graph_tmp = Rc::clone(&graph);
|
||||
graph.area.connect_draw(move |area,ctx| {
|
||||
graph.borrow().area.connect_draw(move |area,ctx| {
|
||||
Graph::draw(area, ctx, &graph_tmp);
|
||||
Inhibit(false)
|
||||
});
|
||||
|
|
@ -54,7 +58,7 @@ impl Graph {
|
|||
|
||||
fn draw(area: >k::DrawingArea,
|
||||
ctx: &cairo::Context,
|
||||
graph: &Rc<Graph>) {
|
||||
graph: &Rc<RefCell<Graph>>) {
|
||||
|
||||
ctx.set_source_rgb(0.1, 0.5, 0.5);
|
||||
ctx.paint();
|
||||
|
|
@ -62,6 +66,9 @@ impl Graph {
|
|||
let width = area.get_allocated_width() as f64;
|
||||
let height = area.get_allocated_height() as f64;
|
||||
|
||||
graph.borrow_mut().adjust_scale_automatic_y();
|
||||
graph.borrow_mut().adjust_scale_automatic_x();
|
||||
|
||||
Graph::draw_boxes(ctx, width, height, 40.0, 20.0, 5.0, 0.3);
|
||||
Graph::draw_boxes(ctx, width, height, 40.0, 20.0, 50.0, 0.1);
|
||||
|
||||
|
|
@ -70,36 +77,51 @@ impl Graph {
|
|||
let v_bars = math::round::ceil(width/cell_size, 0) as i32;
|
||||
let h_bars= math::round::ceil(height/cell_size, 0) as i32;
|
||||
|
||||
let h_scale = (graph.scale_x_end - graph.scale_x_start)/(v_bars - 1) as f64; // ms
|
||||
let h_scale = (graph.borrow().scale_x_size)/(v_bars - 1) as f64; // ms
|
||||
let v_scale = (graph.borrow().scale_y_size)/(h_bars - 1) as f64; // ms
|
||||
|
||||
ctx.set_line_width(2.0);
|
||||
ctx.set_line_cap(cairo::LineCap::Round);
|
||||
let draw_patch = graph.borrow().draw_patch;
|
||||
for line in graph.borrow().lines.iter() {
|
||||
for p in line.points.iter().enumerate() {
|
||||
let xp = if p.0 < line.points.len() - 1 {
|
||||
line.points[p.0 + 1]
|
||||
} else {
|
||||
line.points[p.0]
|
||||
};
|
||||
ctx.set_source_rgb(line.color.0, line.color.1, line.color.2);
|
||||
ctx.move_to(((cell_size as f64)*(xp.0 - graph.borrow().scale_x_start))/h_scale + 40.0, height - ((cell_size as f64)*(xp.1 - graph.borrow().scale_y_start))/v_scale - 20.0);
|
||||
ctx.line_to(((cell_size as f64)*(p.1.0 - graph.borrow().scale_x_start))/h_scale + 40.0, height - ((cell_size as f64)*(p.1.1 - graph.borrow().scale_y_start))/v_scale - 20.0);
|
||||
ctx.stroke();
|
||||
|
||||
if draw_patch {
|
||||
ctx.set_source_rgb(0.0, 0.0, 1.0);
|
||||
ctx.arc(((cell_size as f64)*(p.1.0 - graph.borrow().scale_x_start))/h_scale + 40.0, height - ((cell_size as f64)*(p.1.1 - graph.borrow().scale_y_start))/v_scale - 20.0, 5.0, 0.0, std::f64::consts::PI * 2.0);
|
||||
ctx.stroke();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ctx.set_source_rgb(0.1, 0.4, 0.4);
|
||||
ctx.rectangle(0.0, 0.0, 40.0, height);
|
||||
ctx.rectangle(0.0, height - 20.0, width, 20.0);
|
||||
ctx.fill();
|
||||
|
||||
ctx.set_source_rgb(1.0, 1.0, 1.0);
|
||||
for x in 0..v_bars {
|
||||
let text = math::round::floor(x as f64 * h_scale + graph.scale_x_start, 1).to_string();
|
||||
let text = math::round::floor(x as f64 * h_scale + graph.borrow().scale_x_start, 1).to_string();
|
||||
let f = ctx.text_extents(&text);
|
||||
ctx.move_to(40.0 + x as f64 * cell_size - f.width, height - 10.0);
|
||||
ctx.show_text(&text);
|
||||
}
|
||||
|
||||
let v_scale = (graph.scale_y_end - graph.scale_y_start)/(h_bars - 1) as f64; // ms
|
||||
|
||||
for y in (0..h_bars).rev() {
|
||||
let text = math::round::floor(y as f64 * v_scale + graph.scale_y_start, 1).to_string();
|
||||
let text = math::round::floor(y as f64 * v_scale + graph.borrow().scale_y_start, 1).to_string();
|
||||
let f = ctx.text_extents(&text);
|
||||
ctx.move_to(40.0 - f.width, height - y as f64 * cell_size - f.height - 15.0);
|
||||
ctx.show_text(&text);
|
||||
}
|
||||
|
||||
ctx.set_line_width(2.0);
|
||||
ctx.set_line_cap(cairo::LineCap::Round);
|
||||
for line in graph.lines.iter() {
|
||||
ctx.set_source_rgb(line.color.0, line.color.1, line.color.2);
|
||||
for p in line.points.iter().skip(1).enumerate() {
|
||||
let xp = line.points[p.0];
|
||||
ctx.move_to(((cell_size as f64)*(xp.0 - graph.scale_x_start))/h_scale + 40.0, height - ((cell_size as f64)*(xp.1 - graph.scale_y_start))/v_scale - 20.0);
|
||||
ctx.line_to(((cell_size as f64)*(p.1.0 - graph.scale_x_start))/h_scale + 40.0, height - ((cell_size as f64)*(p.1.1 - graph.scale_y_start))/v_scale - 20.0);
|
||||
}
|
||||
ctx.stroke();
|
||||
}
|
||||
}
|
||||
|
||||
fn draw_boxes(ctx: &cairo::Context, area_width: f64, area_height: f64, src_x: f64, src_y: f64, cell_size: f64, color: f64) {
|
||||
|
|
@ -117,4 +139,34 @@ impl Graph {
|
|||
}
|
||||
ctx.stroke();
|
||||
}
|
||||
|
||||
pub fn adjust_scale_automatic_y(&mut self) {
|
||||
|
||||
let mut mx:Option<f64> = None;
|
||||
let mut mi:Option<f64> = None;
|
||||
|
||||
for line in self.lines.iter() {
|
||||
if let None = mx {
|
||||
mx = Some(line.points[0].0);
|
||||
}
|
||||
|
||||
if let None = mi {
|
||||
mi = Some(line.points[0].0);
|
||||
}
|
||||
|
||||
for (_,y) in line.points.iter().skip(1) {
|
||||
mx = Some(f64::max(mx.unwrap(), *y));
|
||||
mi = Some(f64::min(mi.unwrap(), *y));
|
||||
}
|
||||
}
|
||||
|
||||
let spread = (mx.unwrap() - mi.unwrap()).abs();
|
||||
|
||||
self.scale_y_start = mi.unwrap() - spread * 0.1;
|
||||
self.scale_y_size = spread * 1.2;
|
||||
}
|
||||
|
||||
pub fn adjust_scale_automatic_x(&mut self) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
110
src/lib.rs
110
src/lib.rs
|
|
@ -4,6 +4,7 @@ use gtk::prelude::*;
|
|||
use graph::{Graph, Line};
|
||||
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::rc::Rc;
|
||||
|
||||
use std::io::prelude::*;
|
||||
use std::io::BufReader;
|
||||
|
|
@ -41,19 +42,71 @@ pub fn build_ui(app: >k::Application, config: Arc::<Mutex::<Config>>) {
|
|||
let bar = builder.get_object::<gtk::Statusbar>("status_bar").expect("Resource file missing!");
|
||||
let log_area = builder.get_object::<gtk::TextView>("log_area").expect("Resource file missing!");
|
||||
|
||||
let _ = Graph::new(
|
||||
let graph = Graph::new(
|
||||
builder.get_object::<gtk::DrawingArea>("draw_area").expect("Resource file missing!"),
|
||||
0.0, 100.0,
|
||||
0.0, 100.0,
|
||||
true,
|
||||
vec![
|
||||
Line::new(1.0,1.0,1.0,vec![(10.0,10.0),(20.0,20.0)]),
|
||||
Line::new(1.0,0.0,1.0,vec![(15.0,15.0),(50.0,25.0)]),
|
||||
Line::new(1.0,0.0,0.0,vec![(50.0,10.0),(70.0,60.0)])
|
||||
Line::new(1.0,1.0,0.0,vec![(10.0,10.0),(20.0,20.0),(30.0,25.0), (40.0, 50.0),(50.0,25.0)]),
|
||||
Line::new(1.0,0.0,0.0,vec![(50.0,10.0),(70.0,60.0)]),
|
||||
Line::new(0.0,1.0,0.0,vec![(50.0,50.0)])
|
||||
]
|
||||
);
|
||||
|
||||
win.show_all();
|
||||
|
||||
// pankti
|
||||
let pankti = builder.get_object::<gtk::SpinButton>("pankti").expect("Resource file missing!");
|
||||
|
||||
let tmp_graph = Rc::clone(&graph);
|
||||
pankti.connect_value_changed(move |btn| {
|
||||
tmp_graph.borrow_mut().scale_x_size = btn.get_value();
|
||||
tmp_graph.borrow().area.queue_draw();
|
||||
});
|
||||
|
||||
// stambh_1
|
||||
let stambh_1 = builder.get_object::<gtk::Entry>("stambh_1").expect("Resource file missing!");
|
||||
|
||||
let tmp_bar = bar.clone();
|
||||
let tmp_graph = Rc::clone(&graph);
|
||||
stambh_1.connect_changed(move |entry| {
|
||||
let val = entry.get_text().parse::<f64>().unwrap_or(0.0);
|
||||
let purana_y_start = tmp_graph.borrow().scale_y_start;
|
||||
let y_size = tmp_graph.borrow().scale_y_size;
|
||||
tmp_graph.borrow_mut().scale_y_start = val;
|
||||
tmp_graph.borrow_mut().scale_y_size = y_size + (purana_y_start - val);
|
||||
tmp_graph.borrow().area.queue_draw();
|
||||
});
|
||||
|
||||
// stambh_2
|
||||
let stambh_2 = builder.get_object::<gtk::Entry>("stambh_2").expect("Resource file missing!");
|
||||
|
||||
let tmp_graph = Rc::clone(&graph);
|
||||
stambh_2.connect_changed(move |entry| {
|
||||
let val = entry.get_text().parse::<f64>().unwrap_or(0.0);
|
||||
let y_start = tmp_graph.borrow().scale_y_start;
|
||||
tmp_graph.borrow_mut().scale_y_size = (val - y_start).abs();
|
||||
tmp_graph.borrow().area.queue_draw();
|
||||
});
|
||||
|
||||
// nimna_stambh
|
||||
let nimna_stambh = builder.get_object::<gtk::CheckButton>("nimna_stambh").expect("Resource file missing!");
|
||||
|
||||
nimna_stambh.connect_clicked(move |btn| {
|
||||
stambh_1.set_sensitive(btn.get_active());
|
||||
stambh_2.set_sensitive(btn.get_active());
|
||||
});
|
||||
|
||||
// draw_patches
|
||||
let draw_patches = builder.get_object::<gtk::CheckButton>("draw_patches").expect("Resource file missing!");
|
||||
|
||||
let tmp_graph = Rc::clone(&graph);
|
||||
draw_patches.connect_clicked(move |btn| {
|
||||
tmp_graph.borrow_mut().draw_patch = btn.get_active();
|
||||
tmp_graph.borrow().area.queue_draw();
|
||||
});
|
||||
|
||||
// Bondrate
|
||||
let bondrate = builder.get_object::<gtk::ComboBoxText>("bondrate").expect("Resource file missing!");
|
||||
|
||||
|
|
@ -107,7 +160,16 @@ pub fn build_ui(app: >k::Application, config: Arc::<Mutex::<Config>>) {
|
|||
}
|
||||
});
|
||||
|
||||
//jagrit_btn
|
||||
// clear_graph
|
||||
let clear_graph = builder.get_object::<gtk::ToolButton>("clear_graph").expect("Resource file missing!");
|
||||
|
||||
let tmp_graph = Rc::clone(&graph);
|
||||
clear_graph.connect_clicked(move |_ | {
|
||||
tmp_graph.borrow_mut().lines.clear();
|
||||
tmp_graph.borrow().area.queue_draw();
|
||||
});
|
||||
|
||||
// jagrit_btn
|
||||
let jagrit_btn = builder.get_object::<gtk::ToolButton>("jagrit_btn").expect("Resource file missing!");
|
||||
|
||||
let tmp_bar = bar.clone();
|
||||
|
|
@ -161,7 +223,7 @@ pub fn build_ui(app: >k::Application, config: Arc::<Mutex::<Config>>) {
|
|||
|
||||
let tmp_bar = bar.clone();
|
||||
let tmp_config = Arc::clone(&config);
|
||||
send_btn.connect_activate(move |_| {
|
||||
send_btn.connect_clicked(move |_| {
|
||||
send_text(&tmp_config, &send_entry, &tmp_bar);
|
||||
});
|
||||
|
||||
|
|
@ -230,23 +292,39 @@ pub fn build_ui(app: >k::Application, config: Arc::<Mutex::<Config>>) {
|
|||
}
|
||||
glib::Continue(true)
|
||||
});
|
||||
|
||||
|
||||
// let (sender, receiver) = glib::MainContext::channel(glib::PRIORITY_DEFAULT);
|
||||
// glib::timeout_add(100, move || {
|
||||
// sender.send(()).unwrap();
|
||||
// glib::Continue(true)
|
||||
// });
|
||||
|
||||
// let tmp_graph = Rc::clone(&graph);
|
||||
// receiver.attach(None, move |_| {
|
||||
// tmp_graph.borrow_mut().scale_x_start += 1.0;
|
||||
// tmp_graph.borrow().area.queue_draw();
|
||||
// glib::Continue(true)
|
||||
// });
|
||||
}
|
||||
|
||||
fn send_text(config: &Arc<Mutex<Config>>, entry: >k::Entry, bar: >k::Statusbar) {
|
||||
match config.lock() {
|
||||
Ok(config) => {
|
||||
let mut p = match serialport::new(&config.port, config.bondrate).open() {
|
||||
Ok(p) => p,
|
||||
Err(_) => {
|
||||
bar.push(1, "Failed to change port!");
|
||||
return;
|
||||
}
|
||||
};
|
||||
if let Status::JAGRIT = config.status {
|
||||
let mut p = match serialport::new(&config.port, config.bondrate).open() {
|
||||
Ok(p) => p,
|
||||
Err(_) => {
|
||||
bar.push(1, "Failed to change port!");
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
unsafe {
|
||||
p.write_all(entry.get_text().to_string().as_bytes_mut()).unwrap();
|
||||
unsafe {
|
||||
p.write_all(entry.get_text().to_string().as_bytes_mut()).unwrap();
|
||||
}
|
||||
entry.set_text("");
|
||||
}
|
||||
entry.set_text("");
|
||||
}, Err(_) => {
|
||||
bar.push(1, "Failed to change port!");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
|
||||
#[test]
|
||||
fn start() {
|
||||
|
||||
let a = [0,1,2,3,4,5,6,7,8,9];
|
||||
for x in a.iter().skip(1) {
|
||||
println!("{}", x);
|
||||
}
|
||||
}
|
||||
|
|
@ -2,11 +2,18 @@
|
|||
<!-- Generated with glade 3.38.2 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<object class="GtkImage" id="image1">
|
||||
<object class="GtkImage" id="document_save">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="icon-name">document-save</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="pankti_adjustment">
|
||||
<property name="lower">5</property>
|
||||
<property name="upper">500</property>
|
||||
<property name="value">100</property>
|
||||
<property name="step-increment">0.5</property>
|
||||
<property name="page-increment">10</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="send_image">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
|
|
@ -41,7 +48,7 @@
|
|||
<property name="label">Save Log</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="image">image1</property>
|
||||
<property name="image">document_save</property>
|
||||
<property name="use-stock">False</property>
|
||||
</object>
|
||||
</child>
|
||||
|
|
@ -185,13 +192,242 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<child>
|
||||
<object class="GtkDrawingArea" id="draw_area">
|
||||
<object class="GtkBox">
|
||||
<property name="width-request">500</property>
|
||||
<property name="height-request">450</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkToolbar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="clear_graph">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Clear</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton">
|
||||
<property name="label" translatable="yes">Timeframe</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="draw_patches">
|
||||
<property name="label" translatable="yes">Patches</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="active">True</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="xpad">4</property>
|
||||
<property name="label" translatable="yes">Pankti</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="pankti">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="adjustment">pankti_adjustment</property>
|
||||
<property name="digits">1</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkDrawingArea" id="draw_area">
|
||||
<property name="width-request">500</property>
|
||||
<property name="height-request">450</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolbar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="nimna_stambh">
|
||||
<property name="label" translatable="yes">nimna</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="xpad">4</property>
|
||||
<property name="label" translatable="yes">S tambh 1 </property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="is-important">True</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="stambh_1">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="width-chars">8</property>
|
||||
<property name="text" translatable="yes">0</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="xpad">4</property>
|
||||
<property name="label" translatable="yes">Stambh 2 </property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="is-important">True</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="stambh_2">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="width-chars">8</property>
|
||||
<property name="text" translatable="yes">100</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="resize">True</property>
|
||||
|
|
@ -305,7 +541,7 @@
|
|||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="resize">True</property>
|
||||
<property name="resize">False</property>
|
||||
<property name="shrink">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
|
|
|||
|
|
@ -2,11 +2,18 @@
|
|||
<!-- Generated with glade 3.38.2 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<object class="GtkImage" id="image1">
|
||||
<object class="GtkImage" id="document_save">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="icon-name">document-save</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="pankti_adjustment">
|
||||
<property name="lower">5</property>
|
||||
<property name="upper">500</property>
|
||||
<property name="value">100</property>
|
||||
<property name="step-increment">0.5</property>
|
||||
<property name="page-increment">10</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="send_image">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
|
|
@ -41,7 +48,7 @@
|
|||
<property name="label">Save Log</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="image">image1</property>
|
||||
<property name="image">document_save</property>
|
||||
<property name="use-stock">False</property>
|
||||
</object>
|
||||
</child>
|
||||
|
|
@ -185,13 +192,242 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<child>
|
||||
<object class="GtkDrawingArea" id="draw_area">
|
||||
<object class="GtkBox">
|
||||
<property name="width-request">500</property>
|
||||
<property name="height-request">450</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkToolbar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="clear_graph">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Clear</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton">
|
||||
<property name="label" translatable="yes">Timeframe</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="draw_patches">
|
||||
<property name="label" translatable="yes">Patches</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="active">True</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="xpad">4</property>
|
||||
<property name="label" translatable="yes">Pankti</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="pankti">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="adjustment">pankti_adjustment</property>
|
||||
<property name="digits">1</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkDrawingArea" id="draw_area">
|
||||
<property name="width-request">500</property>
|
||||
<property name="height-request">450</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolbar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="nimna_stambh">
|
||||
<property name="label" translatable="yes">nimna</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="xpad">4</property>
|
||||
<property name="label" translatable="yes">S tambh 1 </property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="is-important">True</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="stambh_1">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="width-chars">8</property>
|
||||
<property name="text" translatable="yes">0</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="xpad">4</property>
|
||||
<property name="label" translatable="yes">Stambh 2 </property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="is-important">True</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="stambh_2">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="width-chars">8</property>
|
||||
<property name="text" translatable="yes">100</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="resize">True</property>
|
||||
|
|
@ -305,7 +541,7 @@
|
|||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="resize">True</property>
|
||||
<property name="resize">False</property>
|
||||
<property name="shrink">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
|
|
|||
Loading…
Reference in New Issue