File: blengthplotpage.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 (38 lines) | stat: -rw-r--r-- 1,104 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
#ifndef GUI_QUALITY__BLENGTHPLOTPAGE_H
#define GUI_QUALITY__BLENGTHPLOTPAGE_H

#include <gtkmm/togglebutton.h>

#include "twodimensionalplotpage.h"

#include "../structures/msmetadata.h"

#include "controllers/blengthpagecontroller.h"

class BLengthPlotPage final : public TwoDimensionalPlotPage {
 public:
  explicit BLengthPlotPage(BLengthPageController* controller)
      : TwoDimensionalPlotPage(controller),
        _controller(controller),
        _includeAutoCorrelationsButton("Auto-correlations") {}

 protected:
  void addCustomPlotButtons(Gtk::Box& container) override {
    _includeAutoCorrelationsButton.signal_clicked().connect(
        sigc::mem_fun(*this, &BLengthPlotPage::onAutoCorrelationsClicked));
    container.append(_includeAutoCorrelationsButton);
    _includeAutoCorrelationsButton.show();
  }

 private:
  void onAutoCorrelationsClicked() {
    _controller->SetIncludeAutoCorrelations(
        _includeAutoCorrelationsButton.get_active());
    _controller->UpdatePlot();
  }

  BLengthPageController* _controller;
  Gtk::ToggleButton _includeAutoCorrelationsButton;
};

#endif