Re: TreeModelFilter as LIST_ONLY
- From: José Alburquerque <jaalburquerque cox net>
- To: Jorge Cardona <jorgeecardona gmail com>, gtkmm-list <gtkmm-list gnome org>
- Subject: Re: TreeModelFilter as LIST_ONLY
- Date: Wed, 22 Oct 2008 23:43:47 -0400
Jorge Cardona said the following:
2008/10/22 José Alburquerque <jaalburquerque cox net>:
Jorge Cardona said the following:
Hi, recently i ask something about to set the model of a iconview from
a treemodelfilter with a filter and a path that only has 1 depth
children, so it look like a list, but iconview complain for the
LIST_ONLY flag, how can i create a new treemodelfilter class but that
return a LIST_ONLY flag and define a filter that only show the
children with no childrens.
I need some help on this, i was trying to solve it myself, but i need
more experience on c++ and gtk.
The problem is that a Gtk::TreeModelFilter only "wraps over" the actual
Gtk::TreeModel, but it is still only the underlying Gtk::TreeModel
underneath. Getting the flags of the Gtk::TreeModelFilter is equivalent to
getting the flags of the underlying Gtk::TreeModel.
A Gtk::TreeStore's rows can have children and is therefore not usable by a
Gtk::IconView. You really need to use a Gtk::ListStore with the
Gtk::IconView.
Yes, I know that, but i don't want to duplicate data, and i need to
store all my data on an treestore, it should be easy to create a
filter that let show only the elements with no children, with that a
treemodelfilter works like it has a liststore as model, but it is also
needed the LIST_ONLY flag for the iconview.
I was thinking in create a new class that inherits from a
Gtk::TreeModelFilter, but i can't override the get_flags method
I see. I'm not sure what your results would be and I wont tell you that
I know exactly what you need to do to achieve this, but I think you
should look into Gtk::TreeModel from which Gtk::TreeModelFilter derives
and see if you can achieve what your trying to do that way.
--
José Alburquerque
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]