2 A candidate replacement for Pspp's sheet
3 Copyright (C) 2016 John Darrington
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #include "psppire-var-sheet-header.h"
24 #include "efficient-sheet/jmd-axis-model.h"
25 #include "efficient-sheet/jmd-datum.h"
29 gni (GListModel *list)
35 git (GListModel *list)
37 return JMD_TYPE_DATUM;
41 gi (GListModel *list, guint position)
43 JmdDatum *gd = JMD_DATUM (g_object_new (JMD_TYPE_DATUM, NULL));
48 gd->text = g_strdup ("Name");
51 gd->text = g_strdup ("Type");
54 gd->text = g_strdup ("Width");
57 gd->text = g_strdup ("Decimal");
60 gd->text = g_strdup ("Label");
63 gd->text = g_strdup ("Value Labels");
66 gd->text = g_strdup ("Missing Values");
69 gd->text = g_strdup ("Columns");
72 gd->text = g_strdup ("Align");
75 gd->text = g_strdup ("Measure");
78 gd->text = g_strdup ("Role");
81 // g_assert_not_reached ();
82 g_print ("Bug: Request for item %d", position);
91 psppire_init_iface (GListModelInterface *iface)
93 iface->get_n_items = gni;
95 iface->get_item_type = git;
99 G_DEFINE_TYPE_WITH_CODE (PsppireVarSheetHeader, psppire_var_sheet_header,
101 G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, psppire_init_iface));
104 psppire_var_sheet_header_init (PsppireVarSheetHeader *d)
111 psppire_var_sheet_header_class_init (PsppireVarSheetHeaderClass *dc)