
Public Member Functions | |
| def | __init__ |
| def | reload |
| def | invalidate_sort |
| def | clear_indexes |
| def | clear |
| def | update_colors |
| def | album_count_changed |
| def | apply_filter |
| def | queryset |
| def | fill |
| def | register_item |
| def | count_albums |
| def | register_album |
| def | register_if_matches |
| def | get_row_colors |
Public Attributes | |
| view | |
| loaded | |
Static Public Attributes | |
| int | nb_col = 5 |
| list | header = [_("Series"),_("Volume"),_("Name"),_("Author"),_("Drawer")] |
| filter = None | |
| raw_filter = None | |
| string | album_related = "" |
Private Member Functions | |
| def | __fill |
| def | _create_entry |
| def py::gui::models::flat_catalog::__init__ | ( | self, | ||
| view | ||||
| ) |
| def py::gui::models::flat_catalog::reload | ( | self | ) |
| def py::gui::models::flat_catalog::invalidate_sort | ( | self | ) |
| def py::gui::models::flat_catalog::clear_indexes | ( | self | ) |
Reimplemented in py::gui::models::flat_library, and py::gui::models::series.
00222 : 00223 UserDict.clear(self) 00224 self['by-album'] = {} 00225 self['by-series'] = {} 00226 def clear( self ) :
| def py::gui::models::flat_catalog::clear | ( | self | ) |
| def py::gui::models::flat_catalog::update_colors | ( | self | ) |
Reimplemented in py::gui::models::series.
00232 : 00233 for idx in self['by-album'] : 00234 for item in self['by-album'][idx] : 00235 item.setup_color() 00236 def album_count_changed( self ) :
| def py::gui::models::flat_catalog::album_count_changed | ( | self | ) |
| def py::gui::models::flat_catalog::__fill | ( | self | ) | [private] |
| def py::gui::models::flat_catalog::apply_filter | ( | self, | ||
| filter | ||||
| ) |
| def py::gui::models::flat_catalog::queryset | ( | self | ) |
00256 : 00257 q = self._queryset() 00258 if self.filter : 00259 args = [] 00260 for w in self.filter : 00261 k1 = {self.album_related+"matching__contains":"%s"%w} 00262 k2 = {self.album_related+"series__matching__contains":"%s"%w} 00263 args.append(Q(**k1) | Q(**k2)) 00264 q = q.filter(*args) 00265 if isinstance(q, QuerySet) : 00266 q = q.select_related() 00267 return q 00268 def fill( self ) :
| def py::gui::models::flat_catalog::fill | ( | self | ) |
Reimplemented in py::gui::models::flat_library, and py::gui::models::series.
00269 : 00270 for album in self.queryset() : 00271 self.register_album(album) 00272 def register_item( self, album, item ) :
| def py::gui::models::flat_catalog::register_item | ( | self, | ||
| album, | ||||
| item | ||||
| ) |
Reimplemented in py::gui::models::flat_library.
00273 : 00274 if album.qoid not in self['by-album'] : 00275 self['by-album'][album.qoid] = set() 00276 self['by-album'][album.qoid].add(item) 00277 if album.series.qoid not in self['by-series'] : 00278 self['by-series'][album.series.qoid] = set() 00279 self['by-series'][album.series.qoid].add(item) 00280 return item 00281 def count_albums( self ) :
| def py::gui::models::flat_catalog::count_albums | ( | self | ) |
| def py::gui::models::flat_catalog::register_album | ( | self, | ||
| album | ||||
| ) |
| def py::gui::models::flat_catalog::_create_entry | ( | self, | ||
| album | ||||
| ) | [private] |
Reimplemented in py::gui::models::flat_library, and py::gui::models::series.
00291 : 00292 self.register_album(album) 00293 self.album_count_changed() 00294 def register_if_matches( self, album ) :
| def py::gui::models::flat_catalog::register_if_matches | ( | self, | ||
| album | ||||
| ) |
| def py::gui::models::flat_catalog::get_row_colors | ( | self, | ||
| row, | ||||
exclude_role = None | ||||
| ) |
00299 : 00300 if not exclude_role : 00301 exclude_role = [] 00302 if libraries[qodb.cte.main_library_id].has_album(row.album) : 00303 return qocfg.get_color("library%d"%qodb.cte.main_library_id) 00304 elif "nextout" not in exclude_role and row.album.is_nextout() : 00305 return qocfg.get_color("not_published") 00306 elif libraries[qodb.cte.shopping_list_id].has_album(row.album) : 00307 return qocfg.get_color("library%d"%qodb.cte.shopping_list_id) 00308 elif libraries[qodb.cte.main_library_id].has_series(row.album.series) : 00309 if libraries[qodb.cte.main_library_id].has_series_completed(row.album.series) : 00310 return qocfg.get_color("completed_series") 00311 else : 00312 return qocfg.get_color("series") 00313 return None, None 00314 00315 class flat_nextout( flat_catalog ) :
int py::gui::models::flat_catalog::nb_col = 5 [static] |
Reimplemented in py::gui::models::series.
list py::gui::models::flat_catalog::header = [_("Series"),_("Volume"),_("Name"),_("Author"),_("Drawer")] [static] |
Reimplemented in py::gui::models::series.
py::gui::models::flat_catalog::filter = None [static] |
py::gui::models::flat_catalog::raw_filter = None [static] |
string py::gui::models::flat_catalog::album_related = "" [static] |
Reimplemented in py::gui::models::flat_library.
1.5.3