py::gui::models::album_item Class Reference

Inheritance diagram for py::gui::models::album_item:

Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def setup
def update_album_status
def setup_color

Public Attributes

 model
 has_custom_colors
 album

Static Public Attributes

list default_colors = []


Member Function Documentation

def py::gui::models::album_item::__init__ (   self,
  model,
  parent,
  obj 
)

00161                                                  :
00162                 QTreeWidgetItem.__init__(self,parent)
00163                 self.model = model
00164                 self.has_custom_colors = False
00165                 self.setup(obj)
00166 
        def setup( self, album ) :

def py::gui::models::album_item::setup (   self,
  album 
)

Reimplemented in py::gui::models::albumcopy_item, py::gui::models::series_item, and py::gui::models::series_album_item.

00167                                  :
00168                 self.album = album
00169                 self.setText(0, self.album.series.name)
00170                 self.setText(1, str(self.album.volume or ""))
00171                 self.setText(2, self.album.name)
00172                 self.setText(3, self.album.authors_str)
00173                 self.setText(4, self.album.drawers_str)
00174                 if not album_item.default_colors :
00175                         album_item.default_colors.append(self.backgroundColor(0))
00176                         album_item.default_colors.append(self.textColor(0))
00177                 self.setup_color()
00178         
        def update_album_status( self, album ) :

def py::gui::models::album_item::update_album_status (   self,
  album 
)

Reimplemented in py::gui::models::series_album_item.

00179                                                :
00180                 self.album = album
00181                 self.setup_color()
00182 
        def setup_color( self ) :

def py::gui::models::album_item::setup_color (   self  ) 

00183                                 :
00184                 bg, fg = self.model.get_row_colors(self)
00185                 if bg is None :
00186                         if self.has_custom_colors :
00187                                 self.has_custom_colors = False
00188                                 for i in range(0,self.model.nb_col) :
00189                                         self.setBackgroundColor(i,self.default_colors[0])
00190                                         self.setTextColor(i,self.default_colors[1])
00191                 else :
00192                         self.has_custom_colors = True
00193                         for i in range(0,self.model.nb_col) :
00194                                 self.setBackgroundColor(i,QColor(bg))
00195                                 self.setTextColor(i,QColor(fg))
00196 
00197 
00198 
class flat_catalog( UserDict ) :


Member Data Documentation

list py::gui::models::album_item::default_colors = [] [static]

py::gui::models::album_item::model

py::gui::models::album_item::has_custom_colors

py::gui::models::album_item::album

Reimplemented in py::gui::models::series_album_item.


The documentation for this class was generated from the following file:
Generated on Tue Oct 9 20:40:27 2007 for Qomics by  doxygen 1.5.3