Koo::Dialogs::FullTextSearchDialog::SearchView Class Reference

The SearchView class provides a view for a list of custom widgets. More...

List of all members.

Public Member Functions

def setModelItemMap
 Map the label or widget of each item with the corresponding column of the model.
def setItemUi
 Sets the .ui file that will be used to represent each item int the list.
def createItemWidget
 You may inherit this class and reimplement this function if your items, aren't created from ui files or the file is not composed only of simple labels.
def fillItemWidget
 Reimplement this function if you don't use the map to automatically fill the item widget.

Detailed Description

The SearchView class provides a view for a list of custom widgets.

SearchView, simplifies the task of creating a list-like view for a model in which the items of the list are custom widgets. Even more, SearchView allows to trivially use a '.ui' to be used as items, where you only need to map model indexes into .ui widget names.

Definition at line 53 of file FullTextSearchDialog.py.


Member Function Documentation

def Koo::Dialogs::FullTextSearchDialog::SearchView::createItemWidget (   self,
  parent 
)

You may inherit this class and reimplement this function if your items, aren't created from ui files or the file is not composed only of simple labels.

Definition at line 92 of file FullTextSearchDialog.py.

def Koo::Dialogs::FullTextSearchDialog::SearchView::fillItemWidget (   self,
  item 
)

Reimplement this function if you don't use the map to automatically fill the item widget.

Note that the index of the model is inside 'item.index'.

Definition at line 98 of file FullTextSearchDialog.py.

def Koo::Dialogs::FullTextSearchDialog::SearchView::setItemUi (   self,
  uiFile 
)

Sets the .ui file that will be used to represent each item int the list.

The .ui file should contain QLabels which will be mapped using setModelItemMap().

Definition at line 86 of file FullTextSearchDialog.py.

def Koo::Dialogs::FullTextSearchDialog::SearchView::setModelItemMap (   self,
  map 
)

Map the label or widget of each item with the corresponding column of the model.

Example of a valid map:

  map = [ ('uiModel', 3), ('uiName', 4), ('uiHeadline', 5), ('uiRanking', 6) ]
  uiItems.setModelItemMap( map )

Definition at line 78 of file FullTextSearchDialog.py.


The documentation for this class was generated from the following file:
Generated by Doxygen