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
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()
47 class CrystalModelColumns
: public Gtk::TreeModel::ColumnRecord
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
;
70 class AxeModelColumns
: public Gtk::TreeModel::ColumnRecord
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
;
91 class PseudoAxeModelColumns
: public Gtk::TreeModel::ColumnRecord
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
);
114 class ParameterModelColumns
: public Gtk::TreeModel::ColumnRecord
117 Gtk::TreeModelColumn
<HklParameter
*> parameter
;
118 Gtk::TreeModelColumn
<Glib::ustring
> name
;
119 Gtk::TreeModelColumn
<double> value
;
121 ParameterModelColumns()
123 this->add(parameter
);
129 class SolutionModelColumns
: public Gtk::TreeModel::ColumnRecord
132 Gtk::TreeModelColumn
<gint
> index
;
133 Gtk::TreeModelColumn
<HklGeometryListItem
*> item
;
134 std::vector
<Gtk::TreeModelColumn
<gdouble
> > axes
;
136 SolutionModelColumns(HklGeometry
*geometry
)
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
153 Gtk::TreeModelColumn
<Glib::ustring
> name
;
154 Gtk::TreeModelColumn
<gint
> type
;
156 DiffractometerModelColumns(void)
163 #endif // GTKMM_MODEL_COLUMNS_H