rename HklPseudoAxisEngine -> HklEngine
[hkl.git] / gui / hkl-gui-modelcolumns.h
blob01e156db024f12b11b9e20e56c34dca491d8bb97
1 /* This file is part of the hkl library.
3 * The hkl library is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
8 * The hkl library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with the hkl library. If not, see <http://www.gnu.org/licenses/>.
16 * Copyright (C) 2003-2010 Synchrotron SOLEIL
17 * L'Orme des Merisiers Saint-Aubin
18 * BP 48 91192 GIF-sur-YVETTE CEDEX
20 * Authors: Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>
22 #ifndef GTKMM_MODEL_COLUMNS_H
23 #define GTKMM_MODEL_COLUMNS_H
25 #include <gtkmm/treemodelcolumn.h>
26 #include "hkl/hkl-geometry.h"
28 class ReflectionModelColumns : public Gtk::TreeModel::ColumnRecord
30 public:
31 Gtk::TreeModelColumn<unsigned int> index;
32 Gtk::TreeModelColumn<double> h;
33 Gtk::TreeModelColumn<double> k;
34 Gtk::TreeModelColumn<double> l;
35 Gtk::TreeModelColumn<bool> flag;
37 ReflectionModelColumns()
39 this->add(index);
40 this->add(h);
41 this->add(k);
42 this->add(l);
43 this->add(flag);
47 class CrystalModelColumns : public Gtk::TreeModel::ColumnRecord
49 public:
50 Gtk::TreeModelColumn<Glib::ustring> name;
51 Gtk::TreeModelColumn<double> a;
52 Gtk::TreeModelColumn<double> b;
53 Gtk::TreeModelColumn<double> c;
54 Gtk::TreeModelColumn<double> alpha;
55 Gtk::TreeModelColumn<double> beta;
56 Gtk::TreeModelColumn<double> gamma;
58 CrystalModelColumns()
60 this->add(name);
61 this->add(a);
62 this->add(b);
63 this->add(c);
64 this->add(alpha);
65 this->add(beta);
66 this->add(gamma);
70 class AxeModelColumns : public Gtk::TreeModel::ColumnRecord
72 public:
73 Gtk::TreeModelColumn<HklAxis *> axis;
74 Gtk::TreeModelColumn<Glib::ustring> name;
75 Gtk::TreeModelColumn<double> read;
76 Gtk::TreeModelColumn<double> write;
77 Gtk::TreeModelColumn<double> min;
78 Gtk::TreeModelColumn<double> max;
80 AxeModelColumns()
82 add(axis);
83 add(name);
84 add(read);
85 add(write);
86 add(min);
87 add(max);
91 class PseudoAxeModelColumns : public Gtk::TreeModel::ColumnRecord
93 public:
94 Gtk::TreeModelColumn<HklParameter *> parameter;
95 Gtk::TreeModelColumn<Glib::ustring> name;
96 Gtk::TreeModelColumn<double> read;
97 Gtk::TreeModelColumn<double> write;
98 Gtk::TreeModelColumn<double> min;
99 Gtk::TreeModelColumn<double> max;
100 Gtk::TreeModelColumn<HklEngine *> engine;
102 PseudoAxeModelColumns()
104 this->add(parameter);
105 this->add(name);
106 this->add(read);
107 this->add(write);
108 this->add(min);
109 this->add(max);
110 this->add(engine);
114 class ParameterModelColumns : public Gtk::TreeModel::ColumnRecord
116 public:
117 Gtk::TreeModelColumn<HklParameter *> parameter;
118 Gtk::TreeModelColumn<Glib::ustring> name;
119 Gtk::TreeModelColumn<double> value;
121 ParameterModelColumns()
123 this->add(parameter);
124 this->add(name);
125 this->add(value);
129 class SolutionModelColumns : public Gtk::TreeModel::ColumnRecord
131 public:
132 Gtk::TreeModelColumn<gint> index;
133 Gtk::TreeModelColumn<HklGeometryListItem *> item;
134 std::vector<Gtk::TreeModelColumn<gdouble> > axes;
136 SolutionModelColumns(HklGeometry *geometry)
138 size_t i;
140 this->add(this->index);
141 this->add(this->item);
143 for(i=0; i<geometry->len; ++i){
144 this->axes.push_back(Gtk::TreeModelColumn<gdouble>());
145 this->add(this->axes[i]);
150 class DiffractometerModelColumns : public Gtk::TreeModel::ColumnRecord
152 public:
153 Gtk::TreeModelColumn<Glib::ustring> name;
154 Gtk::TreeModelColumn<gint> type;
156 DiffractometerModelColumns(void)
158 this->add(name);
159 this->add(type);
163 #endif // GTKMM_MODEL_COLUMNS_H