File: plotpropertieswindow.h

package info (click to toggle)
aoflagger 3.4.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,960 kB
  • sloc: cpp: 83,076; python: 10,187; sh: 260; makefile: 178
file content (93 lines) | stat: -rw-r--r-- 2,416 bytes parent folder | download | duplicates (2)
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
#ifndef PLOTPROPERTIESWINDOW_H
#define PLOTPROPERTIESWINDOW_H

#include <string>

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

#include <functional>

class XYPlot;

class PlotPropertiesWindow : public Gtk::Window {
 public:
  PlotPropertiesWindow(XYPlot& plot, const std::string& title);
  ~PlotPropertiesWindow() {}

  std::function<void()> OnChangesApplied;

 private:
  void onApplyClicked();
  void onCloseClicked();
  void onExportClicked();

  void onVRangeChanged() {
    _vRangeMinEntry.set_sensitive(_specifiedVRangeButton.get_active());
    _vRangeMaxEntry.set_sensitive(_specifiedVRangeButton.get_active());
  }

  void onHRangeChanged() {
    _hRangeMinEntry.set_sensitive(!_automaticHRangeButton.get_active());
    _hRangeMaxEntry.set_sensitive(!_automaticHRangeButton.get_active());
  }

  void initVRangeWidgets();
  void initHRangeWidgets();
  void initOptionsWidgets();
  void initAxesDescriptionWidgets();

  void updateHMinMaxEntries();
  void updateVMinMaxEntries();

  XYPlot& _plot;

  Gtk::ButtonBox _bottomButtonBox;
  Gtk::VBox _topVBox;
  Gtk::HBox _framesHBox;
  Gtk::VBox _framesRightVBox;

  Gtk::Entry _titleEntry;

  Gtk::Button _applyButton, _exportButton, _closeButton;

  Gtk::Frame _vRangeFrame;
  Gtk::VBox _vRangeBox;
  Gtk::RadioButton _minMaxVRangeButton, _winsorizedVRangeButton,
      _specifiedVRangeButton;
  Gtk::Label _vRangeMinLabel, _vRangeMaxLabel;
  Gtk::Entry _vRangeMinEntry, _vRangeMaxEntry;

  Gtk::Frame _hRangeFrame;
  Gtk::VBox _hRangeBox;
  Gtk::CheckButton _automaticHRangeButton;
  Gtk::Label _hRangeMinLabel, _hRangeMaxLabel;
  Gtk::Entry _hRangeMinEntry, _hRangeMaxEntry;

  Gtk::Frame _xOptionsFrame;
  Gtk::VBox _xOptionsBox;
  Gtk::CheckButton _xLogScaleButton;

  Gtk::Frame _yOptionsFrame;
  Gtk::VBox _yOptionsBox;
  Gtk::RadioButton _yNormalOptionsButton, _yLogScaleButton,
      _yZeroSymmetricButton;

  Gtk::Frame _axesDescriptionFrame;
  Gtk::VBox _axesDescriptionBox;
  Gtk::CheckButton _hAxisDescriptionButton, _vAxisDescriptionButton;
  Gtk::Entry _hAxisDescriptionEntry, _vAxisDescriptionEntry;

  Gtk::CheckButton _showAxes, _showAxisDescriptionsButton;
};

#endif  // PLOTPROPERTIESWINDOW_H