[go: up one dir, main page]

Menu

[0a098c]: / gui / ScanDialog.h  Maximize  Restore  History

Download this file

123 lines (106 with data), 2.8 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
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/* -*- 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;
// Original ScanList
const ScanList &sc0;
//Internal ScanList
ScanList scl;
// Current ScanPoint
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