File: complexplaneplotwindow.h

package info (click to toggle)
aoflagger 3.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,476 kB
  • sloc: cpp: 51,868; python: 152; sh: 25; makefile: 17
file content (74 lines) | stat: -rw-r--r-- 2,193 bytes parent folder | download | duplicates (3)
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
#ifndef COMPLEXPLANEPLOTWINDOW_H
#define COMPLEXPLANEPLOTWINDOW_H

#include <vector>

#include <gtkmm/box.h>
#include <gtkmm/button.h>
#include <gtkmm/buttonbox.h>
#include <gtkmm/checkbutton.h>
#include <gtkmm/frame.h>
#include <gtkmm/label.h>
#include <gtkmm/radiobutton.h>
#include <gtkmm/scale.h>
#include <gtkmm/window.h>

class ComplexPlanePlotWindow : public Gtk::Window {
	public:
		ComplexPlanePlotWindow(class RFIGuiWindow &rfiGuiWindow, class PlotManager &plotManager);
		~ComplexPlanePlotWindow();
	private:
		size_t XStart() const throw() { return (size_t) _xPositionScale.get_value(); }
		size_t XLength() const throw() { return (size_t) _lengthScale.get_value(); }

		size_t YStart() const throw() { return (size_t) _yPositionScale.get_value(); }
		size_t YLength() const throw() { return (size_t) _ySumLengthScale.get_value(); }

		void onPlotPressed();
		void onTimeStartChanged() {
			if(XStart() + XLength() > _xMax)
				_lengthScale.set_value(_xMax - XStart());
			else
				setDetailsLabel();
		}
		void onTimeDurationChanged() {
			if(XStart() + XLength() > _xMax)
				_xPositionScale.set_value(_xMax - XLength());
			else
				setDetailsLabel();
		}
		void onFreqChanged() {
			if(YStart() + YLength() > _yMax)
				_ySumLengthScale.set_value(_yMax - YStart());
			else
				setDetailsLabel();
		}
		void onFreqSizeChanged() {
			if(YStart() + YLength() > _yMax)
				_yPositionScale.set_value(_yMax - YLength());
			else
				setDetailsLabel();
		}
		void setDetailsLabel();

		class RFIGuiWindow &_rfiGuiWindow;
		class PlotManager &_plotManager;
		Gtk::Frame _detailsFrame;
		Gtk::VBox _mainBox, _detailsBox;
		Gtk::Label
			_detailsLabel,
			_xPositionLabel, _yPositionLabel,
			_lengthLabel, _ySumLengthLabel;
		Gtk::Scale
			_xPositionScale, _yPositionScale, 
			_lengthScale, _ySumLengthScale;
		Gtk::RadioButton _realVersusImaginaryButton, _timeVersusRealButton;
		Gtk::CheckButton _allValuesButton, _unmaskedValuesButton, _maskedValuesButton, _fittedValuesButton, _individualSampleFitButton, _fringeFitButton, _dynamicFringeFitButton;

		Gtk::Button _plotButton;
		Gtk::ButtonBox _buttonBox;
		std::vector<double> _observationTimes;
		size_t _xMax, _yMax;
};

#endif