improve combo box model utility functions

- remove filtering of disabled items to simplify code (this can be
  (done via a QSortFilterProxy model if needed)
- add a more generic version of the helper function which doesn't
  force a text renderer

Change-Id: Ic916f7e60f83331a3753b45f56fee1cb38e80858
Reviewed-by: Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
diff --git a/src/utils/models.h b/src/utils/models.h
index f0ea7c5..09dd692 100644
--- a/src/utils/models.h
+++ b/src/utils/models.h
@@ -36,7 +36,24 @@
 void
 gtk_combo_box_set_active_index(GtkComboBox *box, const QModelIndex& idx);
 
+/**
+ * Helper method to automatically place the qmodel into the combobox and sync it with the
+ * selection model (if given). Returns the connection to the QItemSelectionModel::currentChanged
+ * signal of the given selection model.
+ * This function doesn't set any GtkCellRenderer for the combo box, so nothing will be displayed
+ * by default. If you simply want to display the Qt::DisplayRole of the model as text, you should
+ * use gtk_combo_box_set_qmodel_text()
+ */
 QMetaObject::Connection
 gtk_combo_box_set_qmodel(GtkComboBox *box, QAbstractItemModel *qmodel, QItemSelectionModel *selection_model);
 
+/**
+ * Like gtk_combo_box_set_qmodel, but sets a GtkCellRendererText for the combo box which will
+ * display the Qt::DisplayRole as simple text. This function is a usefull default for most
+ * combo boxes. If you want to customize the GtkCellRenderer of your combo box, you should usefull
+ * gtk_combo_box_set_qmodel()
+ */
+QMetaObject::Connection
+gtk_combo_box_set_qmodel_text(GtkComboBox *box, QAbstractItemModel *qmodel, QItemSelectionModel *selection_model);
+
 #endif /* _MODELS_H */