![]() |
![]() |
![]() |
Rhythmbox Development Reference Manual | ![]() |
---|---|---|---|---|
rhythmdb-property-modelrhythmdb-property-model — tree model grouping entries from a query model by property values |
RhythmDBPropertyModel; RhythmDBPropertyModelClass; enum RhythmDBPropertyModelColumn; RhythmDBPropertyModel* rhythmdb_property_model_new (RhythmDB *db, RhythmDBPropType propid); gboolean rhythmdb_property_model_iter_from_string (RhythmDBPropertyModel *model, const char *name, GtkTreeIter *iter); void rhythmdb_property_model_enable_drag (RhythmDBPropertyModel *model, GtkTreeView *view);
"db" RhythmDB* : Read / Write / Construct Only "prop" gint : Read / Write / Construct Only "query-model" RhythmDBQueryModel* : Read / Write
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.
typedef struct { GObjectClass parent; void (*pre_row_deletion) (RhythmDBPropertyModel *model); } RhythmDBPropertyModelClass;
typedef enum { RHYTHMDB_PROPERTY_MODEL_COLUMN_TITLE, RHYTHMDB_PROPERTY_MODEL_COLUMN_PRIORITY, RHYTHMDB_PROPERTY_MODEL_COLUMN_NUMBER, RHYTHMDB_PROPERTY_MODEL_COLUMN_LAST, } RhythmDBPropertyModelColumn;
RhythmDBPropertyModel* rhythmdb_property_model_new (RhythmDB *db, RhythmDBPropType propid);
Creates a new property model for the specified property ID.
|
the RhythmDB object |
|
the property to index |
Returns : |
the new RhythmDBPropertyModel |
gboolean rhythmdb_property_model_iter_from_string (RhythmDBPropertyModel *model, const char *name, GtkTreeIter *iter);
Locates the row in the model for a property value.
|
the RhythmDBPropertyModel |
|
the property value to find |
|
a GtkTreeIter to point to the row |
Returns : |
TRUE if the value was found. |
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.
|
the RhythmDBPropertyModel. |
|
the GtkTreeView from which to enable drag and drop |
"db"
property"db" RhythmDB* : Read / Write / Construct Only
The RhythmDB object the model is associated with.
"prop"
property"prop" gint : Read / Write / Construct Only
The property that this property model indexes.
Allowed values: [0,54]
Default value: 0
"pre-row-deletion"
signalvoid user_function (RhythmDBPropertyModel *model, gpointer user_data) : Run Last
Emitted just before a row is deleted from the model.
|
the RhythmDBPropertyModel |
|
user data set when the signal handler was connected. |