Show
Ignore:
Timestamp:
03/13/10 12:31:24 (6 months ago)
Author:
erikj
Message:

prepare expanded search and sorting of query proxy models

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/camelot/view/controls/tableview.py

    r1184 r1186  
    127127            self.number_of_rows = None 
    128128        layout.addLayout( widget_layout ) 
    129         self._expanded_search = QtGui.QLabel('Expanded') 
     129        self._expanded_search = QtGui.QWidget() 
    130130        self._expanded_search.hide() 
    131131        layout.addWidget(self._expanded_search) 
     
    133133        self.setSizePolicy( QSizePolicy.Minimum, QSizePolicy.Fixed ) 
    134134        self.setNumberOfRows( 0 ) 
    135      
     135        post( admin.get_columns, self._fill_expanded_search_options ) 
     136     
     137    def _fill_expanded_search_options(self, columns): 
     138        layout = QtGui.QHBoxLayout() 
     139        for field, attributes in columns: 
     140            if 'operators' in attributes: 
     141                widget = QtGui.QLabel(field) 
     142                layout.addWidget( widget ) 
     143        self._expanded_search.setLayout( layout ) 
     144         
     145         
    136146    def expand_search_options(self): 
    137147        if self._expanded_search.isHidden():