From 17002cbbe1da85776f7ab037e67b4c032d206289 Mon Sep 17 00:00:00 2001 From: Michael Wiebusch Date: Thu, 15 Jan 2015 14:28:52 +0100 Subject: [PATCH] cleaned up, hover boxes to the settings dialog --- user_interface/pmt_ro.pl | 1 + user_interface/settings_subs.pm | 26 +++++++++++++++++++++----- user_interface/table_control.pm | 19 +++++++++++++++++++ 3 files changed, 41 insertions(+), 5 deletions(-) diff --git a/user_interface/pmt_ro.pl b/user_interface/pmt_ro.pl index b536b09..e4b1791 100755 --- a/user_interface/pmt_ro.pl +++ b/user_interface/pmt_ro.pl @@ -24,6 +24,7 @@ my $dispatch_table = { load_settings => 1, save_settings => 1, reset_settings => 1, + settings_form => 1, zero_calib => 1, signal_thresh => 1, veto_thresh => 1, diff --git a/user_interface/settings_subs.pm b/user_interface/settings_subs.pm index a547c52..89f6108 100644 --- a/user_interface/settings_subs.pm +++ b/user_interface/settings_subs.pm @@ -37,6 +37,7 @@ sub reset_settings { sub settings_form { my $self=shift; my $settings = $self->load_settings(); + my $settings_desc = $self->{settings_desc}; printHeader('text/html'); @@ -45,28 +46,43 @@ sub settings_form { .hidden { visibility:collapse } + +span.dropt {border-bottom: thin dotted; background: #ffeedd;} +span.dropt:hover {text-decoration: none; background: #ffffff; z-index: 6; } +span.dropt span {position: absolute; left: -9999px; + margin: 20px 0 0 0px; padding: 3px 3px 3px 3px; + border-style:solid; border-color:black; border-width:1px; z-index: 6;} +span.dropt:hover span {left: 2%; background: #ffffff;} +span.dropt span {position: absolute; left: -9999px; + margin: 4px 0 0 0px; padding: 3px 3px 3px 3px; + border-style:solid; border-color:black; border-width:1px;} +span.dropt:hover span {margin: 20px 0 0 170px; background: #ffffff; z-index:6;} + -
+
'; for my $key ( sort(keys %$settings) ) { my $value = $settings->{$key}; - print ""; + print ""; print ""; } print ' - -
$key :
$key :"; + + print "".$settings_desc->{$key}."
+ + +
'; - return 1; + return " "; } diff --git a/user_interface/table_control.pm b/user_interface/table_control.pm index d950095..8a151be 100644 --- a/user_interface/table_control.pm +++ b/user_interface/table_control.pm @@ -54,6 +54,25 @@ sub new { }; + + $self->{settings_desc} = { + tty => "The address of the serial device (COMPORT) of the linear table", + baudrate => "Baudrate (bits/second) setting of the serial device (tty) of the linear table", + approx_speed => "Approximate speed of the linear table in mm/sec. Value is used to estimate timeouts", + size_x => "Length/travel of the linear table x axis in mm", + size_y => "Length/travel of the linear table y axis in mm", + table_precision => "Precision of the linear table in mm/step", + + sample_rect_x1 => "x start coordinate of sample area in mm", + sample_rect_x2 => "x end coordinate of sample area in mm", + sample_rect_y1 => "y start coordinate of sample area in mm", + sample_rect_y2 => "y end coordinate of sample area in mm", + sample_step_size => "The step size/width for the scan pattern in mm", + sample_aperture_dia => "Estimate of the radiation aperture in mm", + + scan_pattern_svg_file => "Filename for the visualization (svg image) of the scan pattern", + scan_pattern_style => "Defines the scan modus, available options are 'linebyline' and 'meander'" + }; $self->{has_run} = {}; # remember which subs already have run -- 2.43.0