File: twodimensionalplotpage.h

package info (click to toggle)
aoflagger 3.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,000 kB
  • sloc: cpp: 67,891; python: 497; sh: 242; makefile: 22
file content (79 lines) | stat: -rw-r--r-- 2,166 bytes parent folder | download
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
#ifndef GUI_QUALITY__2DPLOTPAGE_H
#define GUI_QUALITY__2DPLOTPAGE_H

#include <memory>

#include "controllers/aoqplotpagecontroller.h"

#include "../quality/qualitytablesformatter.h"

#include "../plot/plotwidget.h"
#include "../plot/xyplot.h"

#include "plotsheet.h"

#include <gtkmm/box.h>
#include <gtkmm/button.h>
#include <gtkmm/togglebutton.h>
#include <gtkmm/separator.h>

#include <set>
#include <vector>

class TwoDimensionalPlotPage : public PlotSheet {
 public:
  explicit TwoDimensionalPlotPage(AOQPlotPageController* _controller);
  virtual ~TwoDimensionalPlotPage();

  void InitializeToolbar(Gtk::Box& toolbar) override final;

  std::vector<QualityTablesFormatter::StatisticKind> GetSelectedKinds() const;
  std::set<AOQPlotPageController::SelectedPol> GetSelectedPolarizations() const;
  std::set<AOQPlotPageController::PhaseType> GetSelectedPhases() const;

  void Redraw();

 protected:
  virtual void addCustomPlotButtons(Gtk::Box& container) {}

 private:
  void updatePlotConfig();
  void updateDataWindow();

  void initStatisticKindButtons(Gtk::Box& toolbar);
  void initPolarizationButtons(Gtk::Box& toolbar);
  void initPhaseButtons(Gtk::Box& toolbar);
  void initPlotButtons(Gtk::Box& toolbar);

  void onLogarithmicClicked() {
    _zeroAxisButton.set_sensitive(!_logarithmicButton.get_active());
    updatePlotConfig();
  }
  void onPlotPropertiesClicked();
  void onDataExportClicked();

  AOQPlotPageController* _controller;

  Gtk::Separator _separator1, _separator2, _separator3, _separator4;

  Gtk::ToggleButton _countButton, _meanButton, _stdDevButton, _varianceButton,
      _dCountButton, _dMeanButton, _dStdDevButton, _rfiPercentageButton;

  Gtk::ToggleButton _polPPButton, _polPQButton, _polQPButton, _polQQButton,
      _polIButton;

  Gtk::ToggleButton _amplitudeButton, _phaseButton, _realButton,
      _imaginaryButton;

  Gtk::ToggleButton _logarithmicButton, _zeroAxisButton;
  Gtk::Button _plotPropertiesButton, _dataExportButton;

  PlotWidget _plotWidget;

  std::unique_ptr<class PlotPropertiesWindow> _plotPropertiesWindow;
  std::unique_ptr<class DataWindow> _dataWindow;

  bool _customButtonsCreated;
};

#endif