blob: f0ea7c5d3d4afa2103894339c8310a8b49262c02 [file] [log] [blame]
Stepan Salenikovich9816a942015-04-22 17:49:16 -04001/*
Stepan Salenikovichbe87d2c2016-01-25 14:14:34 -05002 * Copyright (C) 2015-2016 Savoir-faire Linux Inc.
Stepan Salenikovich9816a942015-04-22 17:49:16 -04003 * Author: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
4 *
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.
9 *
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.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Stepan Salenikovich9816a942015-04-22 17:49:16 -040018 */
19
20#ifndef _MODELS_H
21#define _MODELS_H
22
23#include <gtk/gtk.h>
Stepan Salenikovich7a1e71c2015-05-07 11:14:48 -040024#include <QtCore/QMetaObject>
Stepan Salenikovich9816a942015-04-22 17:49:16 -040025
26class QModelIndex;
Stepan Salenikovich7a1e71c2015-05-07 11:14:48 -040027class QAbstractItemModel;
28class QItemSelectionModel;
Stepan Salenikovich9816a942015-04-22 17:49:16 -040029
30QModelIndex
31get_index_from_selection(GtkTreeSelection *selection);
32
Stepan Salenikovich7a1e71c2015-05-07 11:14:48 -040033QModelIndex
34gtk_combo_box_get_index(GtkComboBox *box);
35
36void
37gtk_combo_box_set_active_index(GtkComboBox *box, const QModelIndex& idx);
38
39QMetaObject::Connection
40gtk_combo_box_set_qmodel(GtkComboBox *box, QAbstractItemModel *qmodel, QItemSelectionModel *selection_model);
41
Stepan Salenikovichbe87d2c2016-01-25 14:14:34 -050042#endif /* _MODELS_H */