UltraScan III
us_fds_filemanager.h
Go to the documentation of this file.
1 #ifndef US_FDS_FILEMANAGER_H
2 #define US_FDS_FILEMANAGER_H
3 
4 #include <QtGui>
5 #include "qwt_plot_marker.h"
6 #include "us_extern.h"
7 #include "us_widgets.h"
8 #include "us_help.h"
9 #include "us_plot.h"
10 
11 struct ScanInfo
12 {
15  double omega_s, seconds;
16  bool include;
17  QVector <double> x, y;
18 };
19 
21 {
22  QString name;
23  int index;
24 };
25 
27 {
28  Q_OBJECT
29 
30  public:
32 
33  private:
34  QProgressBar *progress;
35  QStringList files;
36  QString source_dir;
37  QString undo_triple;
38  QString prefix;
39  QVector < ScanInfo > scaninfo;
40  QList < int > scanindex; // contains the index to the scaninfo object that corresponds to each scan
41  QList < int > tmp_scanindex; // copy of plotindex to be used for undo
42  QList < TripleIndex > tripleCounts;
48  int from, to;
49 
51  QString workingDir;
52  QwtPlot *data_plot;
54 
55  QLabel *lbl_rpms;
56  QLabel *lbl_triple;
57  QLabel *lbl_gains;
58  QLabel *lbl_progress;
59  QLabel *lbl_from;
60  QLabel *lbl_to;
61  QLabel *lbl_scans;
62  QLabel *lbl_prefix;
63 
64  QLineEdit *le_info;
65  QLineEdit *le_directory;
66  QLineEdit *le_scans;
67 
68  QComboBox *cb_triple;
69  QComboBox *cb_rpms;
70  QComboBox *cb_gains;
71 
72  QPushButton *pb_write;
73  QPushButton *pb_exclude;
74  QPushButton *pb_undo;
75  QPushButton *pb_delete_all;
76  QPushButton *pb_delete_triple;
77  QPushButton *pb_save_first;
78  QPushButton *pb_save_last;
79  QPushButton *pb_save_first_and_last;
80 
81  QwtCounter *ct_to;
82  QwtCounter *ct_from;
83  QwtCounter *ct_prefix;
84 
85 private slots:
86  void load ( void );
87  void select_triple ( int );
88  void select_rpm ( int );
89  void select_gain ( int );
90  void focus_from ( double );
91  void focus_to ( double );
92  void update_prefix ( double );
93  void focus ( int, int );
94  void reset ( void );
95  void write ( void );
96  void undo ( void );
97  void exclude_scans ( void );
98  void delete_all ( void );
99  void delete_triple ( void );
100  void save_first ( void );
101  void save_last ( void );
102  void save_first_and_last ( void );
103  void plot_scans ( void );
104  void parse_files ( void );
105  void activate_undo ( void );
106  void activate_undo ( QString );
107  void help ( void )
108  { showHelp.show_help( "manual/us_fds_filemanager.html" ); };
109 };
110 #endif