![]() |
![]() |
![]() |
RhythmCat Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces |
#include <rc-ui-listmodel.h> enum RCUiCatalogColumns; struct RCUiCatalogStore; struct RCUiCatalogStoreClass; enum RCUiPlaylistColumns; struct RCUiPlaylistStore; struct RCUiPlaylistStoreClass; RCLibDbCatalogIter * rc_ui_list_model_get_catalog_by_model (GtkTreeModel *model
); GtkTreeModel * rc_ui_list_model_get_catalog_store (); GtkTreeModel * rc_ui_list_model_get_playlist_store (GtkTreeIter *iter
); const gchar * rc_ui_list_model_get_playlist_title_format (); void rc_ui_list_model_set_playlist_title_format (const gchar *format
);
RCUiCatalogStore implements GtkTreeModel.
RCUiPlaylistStore implements GtkTreeModel.
This module provides 2 classes: RCUiCatalogStore and RCUiPlaylistStore, which implements interface GtkTreeModel. They can be used by GtkTreeView for showing and operating the data inside. RCUiCatalogStore contains the catalog list, and RCUiPlaylistStore contains the playlist.
typedef enum { RC_UI_CATALOG_COLUMN_TYPE, RC_UI_CATALOG_COLUMN_STATE, RC_UI_CATALOG_COLUMN_NAME, RC_UI_CATALOG_COLUMN_PLAYING_FLAG, RC_UI_CATALOG_COLUMN_LAST } RCUiCatalogColumns;
The enum type for the columns in the catalog store.
struct RCUiCatalogStore;
The data structure used for RCUiCatalogStore class.
typedef enum { RC_UI_PLAYLIST_COLUMN_TYPE, RC_UI_PLAYLIST_COLUMN_STATE, RC_UI_PLAYLIST_COLUMN_FTITLE, RC_UI_PLAYLIST_COLUMN_TITLE, RC_UI_PLAYLIST_COLUMN_ARTIST, RC_UI_PLAYLIST_COLUMN_ALBUM, RC_UI_PLAYLIST_COLUMN_FTYPE, RC_UI_PLAYLIST_COLUMN_GENRE, RC_UI_PLAYLIST_COLUMN_LENGTH, RC_UI_PLAYLIST_COLUMN_TRACK, RC_UI_PLAYLIST_COLUMN_RATING, RC_UI_PLAYLIST_COLUMN_YEAR, RC_UI_PLAYLIST_COLUMN_PLAYING_FLAG, RC_UI_PLAYLIST_COLUMN_LAST } RCUiPlaylistColumns;
The enum type for the columns in the playlist store.
the type column | |
the state column | |
the title column | |
the real title column | |
the artist column | |
the album column | |
the file type (format) column | |
the genre column | |
the time length column | |
the track number column | |
the rating column | |
the year column | |
the playing flag column | |
the last column, do not use it |
struct RCUiPlaylistStore;
The data structure used for RCUiPlaylistStore class.
RCLibDbCatalogIter * rc_ui_list_model_get_catalog_by_model
(GtkTreeModel *model
);
Get the catalog iter by given playlist store model.
|
the playlist store model |
Returns : |
(skip): The catalog iter. [transfer none] |
GtkTreeModel * rc_ui_list_model_get_catalog_store ();
Get the catalog store. If the catalog store is not initialize, it will be intialized first.
Returns : |
The catalog store. [transfer none] |
GtkTreeModel * rc_ui_list_model_get_playlist_store (GtkTreeIter *iter
);
Get the playlist store by the iter in the catalog. If the store is not initialized, it will be initialzed first.
|
the iter for the playlist in the catalog |
Returns : |
The playlist store, NULL if the iter is invalid. [transfer none] |
const gchar * rc_ui_list_model_get_playlist_title_format ();
Get the format string of the title column in the playlist.
Returns : |
The format string, do not free or modify it. |
void rc_ui_list_model_set_playlist_title_format
(const gchar *format
);
Set the format string of the title column in the playlist, using %TITLE as title string, %ARTIST as artist string, %ALBUM as album string. Notice that %TITLE should be always included in the string.
|
the format string |