File: twodimensionalplotpage.h

package info (click to toggle)
aoflagger 3.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,688 kB
  • sloc: cpp: 83,116; python: 10,187; sh: 260; makefile: 178
file content (80 lines) | stat: -rw-r--r-- 2,233 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
80
#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/toggletoolbutton.h>
#include <gtkmm/toolbutton.h>
#include <gtkmm/separatortoolitem.h>

#include <set>
#include <vector>

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

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

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

  void Redraw();

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

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

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

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

  AOQPlotPageController* _controller;

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

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

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

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

  Gtk::ToggleToolButton _logarithmicButton, _zeroAxisButton;
  Gtk::ToolButton _plotPropertiesButton, _dataExportButton;

  PlotWidget _plotWidget;

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

  bool _customButtonsCreated;
};

#endif