Top |
RhythmDBPropertyModelRhythmDBPropertyModel — tree model grouping entries from a query model by property values |
Properties
RhythmDB * | db | Read / Write / Construct Only |
gint | prop | Read / Write / Construct Only |
RhythmDBQueryModel * | query-model | Read / Write |
Types and Values
struct | RhythmDBPropertyModel |
struct | RhythmDBPropertyModelClass |
enum | RhythmDBPropertyModelColumn |
Description
A RhythmDBPropertyModel groups the entries in a RhythmDBQueryModel by the value of a property. For example, a RhythmDBPropertyModel using the RHYTHMDB_PROP_ARTIST property can be used as the model for a GtkTreeView that will list the artists present in the query model.
The album/artist/genre browsers displayed in the library and other sources are populated using a RhythmDBPropertyModel for each property.
Functions
rhythmdb_property_model_new ()
RhythmDBPropertyModel * rhythmdb_property_model_new (RhythmDB *db
,RhythmDBPropType propid
);
Creates a new property model for the specified property ID.
rhythmdb_property_model_iter_from_string ()
gboolean rhythmdb_property_model_iter_from_string (RhythmDBPropertyModel *model
,const char *name
,GtkTreeIter *iter
);
Locates the row in the model for a property value.
rhythmdb_property_model_enable_drag ()
void rhythmdb_property_model_enable_drag (RhythmDBPropertyModel *model
,GtkTreeView *view
);
Enables drag and drop from a specified GtkTreeView that is backed by the RhythmDBPropertyModel. Drag targets are determined by the indexed property.
Types and Values
struct RhythmDBPropertyModelClass
struct RhythmDBPropertyModelClass { GObjectClass parent; void (*pre_row_deletion) (RhythmDBPropertyModel *model); };
Property Details
The “db”
property
“db” RhythmDB *
The RhythmDB object the model is associated with.
Flags: Read / Write / Construct Only
The “prop”
property
“prop” gint
The property that this property model indexes.
Flags: Read / Write / Construct Only
Allowed values: [0,75]
Default value: 0
The “query-model”
property
“query-model” RhythmDBQueryModel *
The query model that this property model indexes.
Flags: Read / Write
Signal Details
The “pre-row-deletion”
signal
void user_function (RhythmDBPropertyModel *model, gpointer user_data)
Emitted just before a row is deleted from the model.
Flags: Run Last