![]() |
![]() |
![]() |
Rhythmbox Development Reference Manual | ![]() |
---|---|---|---|---|
RBQueryCreator; RBQueryCreatorClass; GtkWidget* rb_query_creator_new (RhythmDB *db); GtkWidget* rb_query_creator_new_from_query (RhythmDB *db, GPtrArray *query, RhythmDBQueryModelLimitType limit_type, GValueArray *limit_value, const char *sort_column, gint sort_direction); GPtrArray* rb_query_creator_get_query (RBQueryCreator *creator); void rb_query_creator_get_limit (RBQueryCreator *creator, RhythmDBQueryModelLimitType *type, GValueArray **limit); void rb_query_creator_get_sort_order (RBQueryCreator *creator, const char **sort_key, gint *sort_direction);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkWindow +----GtkDialog +----RBQueryCreator
"creating" gboolean : Read / Write / Construct Only "db" RhythmDB* : Read / Write / Construct Only
The query creator is used to create and edit automatic playlists. It is only capable of constructing queries that consist of a flat list of criteria. It cannot nested criteria or represent full boolean logic expressions.
In addition to query criteria, the query creator also allows the user to specify limits on the size of the result set, in terms of the number of entries, the total duration, or the total file size; and also the order in which the results are to be sorted.
The structure of the query creator is defined in the glade file create-playlist.xml.
GtkWidget* rb_query_creator_new (RhythmDB *db);
|
the RhythmDB instance |
Returns : |
new query creator widget |
GtkWidget* rb_query_creator_new_from_query (RhythmDB *db, GPtrArray *query, RhythmDBQueryModelLimitType limit_type, GValueArray *limit_value, const char *sort_column, gint sort_direction);
Constructs a new query creator with an existing query and limit and sort settings.
|
the RhythmDB instance |
|
an existing query to start from |
|
the type of result set limit |
|
the result set limit value |
|
the column on which to sort query results |
|
the direction in which to sort query results |
Returns : |
new query creator widget |
GPtrArray* rb_query_creator_get_query (RBQueryCreator *creator);
Constructs a database query that represents the criteria in the query creator.
|
RBQueryCreator instance |
Returns : |
database query array |
void rb_query_creator_get_limit (RBQueryCreator *creator, RhythmDBQueryModelLimitType *type, GValueArray **limit);
Retrieves the limit type and value from the query creator. The limit value is returned as the first element in a GValueArray.
|
RBQueryCreator instance |
|
used to return the limit type |
|
used to return the limit value |
void rb_query_creator_get_sort_order (RBQueryCreator *creator, const char **sort_key, gint *sort_direction);
Retrieves the sort settings from the query creator. The sort direction is returned as a GtkSortType value.
|
RBQueryCreator instance |
|
returns the sort key name |
|
returns the sort direction |