[go: up one dir, main page]

Menu

[e59016]: / gui / ScanDialog.h  Maximize  Restore  History

Download this file

77 lines (63 with data), 2.6 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/* -*- mode: c++ -*- */
#ifndef __ScanDialog_h__
#define __ScanDialog_h__
#include <string>
#include <gui/GladeApp.h>
#include <daq/ScanPoint.h>
class ScanDialog : public GladeApp {
private:
bool do_scan;
bool do_burst;
double _delay;
double _rate;
bool _time;
int nevts;
const ScanList &sc0;
ScanList scl;
ScanPoint sc;
GtkTreeIter *current;
static void on_OK(GtkWidget *w, ScanDialog *sc);
static void on_Cancel(GtkWidget *w, ScanDialog *sc);
static void on_Help(GtkWidget *w, ScanDialog *sc);
static void on_SaveScan(GtkWidget *w, ScanDialog *sc);
static void on_AddScan(GtkWidget *w, ScanDialog *sc);
static void on_DeleteScan(GtkWidget *w, ScanDialog *sc);
static void on_Delete(GtkWidget *w, ScanDialog *sc);
static void on_Add(GtkWidget *w, ScanDialog *sc);
static void on_Up(GtkWidget *w, ScanDialog *sc);
static void on_Down(GtkWidget *w, ScanDialog *sc);
static void on_doScan(GtkWidget *w, ScanDialog *sc);
static void on_ScanType(GtkTreeSelection *ts, ScanDialog *sc);
static void on_ScanChanged(GtkWidget *w, ScanDialog *sc);
static void on_Select(GtkTreeSelection *ts, ScanDialog *sc);
static void on_toggleBurst(GtkWidget *w, ScanDialog *sc);
static void on_toggleTime(GtkWidget *w, ScanDialog *sc);
static void on_Delay(GtkWidget *w, ScanDialog *sc);
static void on_Rate(GtkWidget *w, ScanDialog *sc);
void updateScanList(const char *which=0);
gchar *get_scan_name();
gboolean findTest(GtkTreeModel **m, GtkTreeIter *it, int *tp);
void moveRow(gboolean up);
public:
ScanDialog(int n, const ScanList &s);
void auto_connect();
void user_init();
void process_text(const std::string &s, GtkWidget *w);
void set_values(int npts, double stp, double frm, double to);
void get_values(int &npts, double &stp, double &frm, double &to);
void copy_scan_list( ScanList &l ) { l = scl; }
void copy_scan_point( ScanPoint &s ) { s = sc; }
bool scan() { return do_scan; }
void scan(bool x) { do_scan=x; }
void set_scan_point( const std::string &s);
int get_nevts() const { return nevts; }
bool burst() const { return do_burst; }
void burst(bool x) { do_burst=x; }
bool is_time() const { return _time; }
void is_time(bool x) { _time = x; }
double delay() const { return _delay; }
void delay(double x) { _delay=x; }
double rate() const { return _rate; }
void rate(double x) { _rate=x; }
};
#endif