MorphoGraphX
EditMarkersDlg.hpp
1 //
2 // This file is part of MorphoGraphX - http://www.MorphoGraphX.org
3 // Copyright (C) 2012-2015 Richard S. Smith and collaborators.
4 //
5 // If you use MorphoGraphX in your work, please cite:
6 // http://dx.doi.org/10.7554/eLife.05864
7 //
8 // MorphoGraphX is free software, and is licensed under under the terms of the
9 // GNU General (GPL) Public License version 2.0, http://www.gnu.org/licenses.
10 //
11 #ifndef EDITMARKERSDLG_HPP
12 #define EDITMARKERSDLG_HPP
13 
14 #include <Config.hpp>
15 
16 #include <TransferFunction.hpp>
17 #include <TransferMarkers.hpp>
18 
19 #include <QDialog>
20 #include <vector>
21 
22 #include <ui_EditMarkersDlg.h>
23 
24 namespace mgx { namespace gui
25 {
26 class mgx_EXPORT EditMarkersDlg : public QDialog {
27  Q_OBJECT
28 public:
30  typedef TransferFunction::value_list value_list;
32  EditMarkersDlg(const TransferFunction& fct, QWidget* parent = 0, Qt::WindowFlags f = 0);
33 
34  TransferFunction getFunction() const {
35  return function;
36  }
37 
38  value_list pointList() const;
39 
40 public slots:
41  void on_addMarker_clicked();
42  void on_removeMarker_clicked();
43  void on_rgbaMode_toggled(bool on);
44  void on_hsvaMode_toggled(bool on);
45  void spreadMarkers();
46 
47 protected:
48  TransferFunction function;
49  Ui::EditMarkersDlg ui;
50  TransferMarkerModel* model;
51  MarkerColorDelegate* delegate;
52  QPushButton* spread_button;
53 };
54 } // namespace gui // namespace gui
55 } // namespace mgx // namespace mgx
56 #endif
Definition: TransferMarkers.hpp:48
Definition: EditMarkersDlg.hpp:26
Definition: TransferMarkers.hpp:34
std::vector< std::pair< double, Colorf > > value_list
Type of a list of value/colors.
Definition: TransferFunction.hpp:53
This namespace contains all the API of MorphoGraphX.
Definition: Assert.hpp:26
Interpolation
Type of interpolation.
Definition: TransferFunction.hpp:38
Class defining a transfer function as linear interpolation between set values.
Definition: TransferFunction.hpp:33