Exemplo n.º 1
0
 def __init__(self, name, query_decorator, parent):
     QtGui.QGroupBox.__init__(self, unicode(name), parent)
     layout = QtGui.QVBoxLayout()
     self.date_editor = DateEditor(parent=self, nullable=True)
     self.date_editor.set_value(datetime.date.today())
     self.query_decorator = query_decorator
     layout.addWidget(self.date_editor)
     self.setLayout(layout)
     self.date_editor.editingFinished.connect(self.emit_filter_changed)
Exemplo n.º 2
0
 def __init__( self, filter_data, parent ):
     super( DateFilterWidget, self ).__init__( unicode( filter_data.name ), parent )
     layout = QtGui.QVBoxLayout()
     layout.setSpacing( 2 )
     self.date_editor = DateEditor(parent=self, nullable=True)
     self.date_editor.set_value( filter_data.default )
     for option in filter_data.options:
         self.query_decorator = option.decorator
     layout.addWidget( self.date_editor )
     self.setLayout( layout )
     self.date_editor.editingFinished.connect( self.emit_filter_changed )
Exemplo n.º 3
0
 
 def __init__(self, name, query_decorator, parent):
     QtGui.QGroupBox.__init__(self, unicode(name), parent)
     layout = QtGui.QVBoxLayout()
     self.date_editor = DateEditor(parent=self, nullable=True)
     self.date_editor.set_value(datetime.date.today())
     self.query_decorator = query_decorator
     layout.addWidget(self.date_editor)
     self.setLayout(layout)
Exemplo n.º 4
0
 def __init__( self, filter_data, parent ):
     super( DateFilterWidget, self ).__init__( unicode( filter_data.name ), parent )
     layout = QtGui.QVBoxLayout()
     layout.setSpacing( 2 )
     self.date_editor = DateEditor(parent=self, nullable=True)
     self.date_editor.set_value( filter_data.default )
     for option in filter_data.options:
         self.query_decorator = option.decorator
     layout.addWidget( self.date_editor )
     self.setLayout( layout )
     self.date_editor.editingFinished.connect( self.emit_filter_changed )
Exemplo n.º 5
0
        
class DateFilterWidget(QtGui.QGroupBox):
    """Filter widget based on a DateEditor"""
  
    filter_changed_signal = QtCore.pyqtSignal()
    
    def __init__(self, name, query_decorator, parent):
        QtGui.QGroupBox.__init__(self, unicode(name), parent)
        layout = QtGui.QVBoxLayout()
        self.date_editor = DateEditor(parent=self, nullable=True)
        self.date_editor.set_value(datetime.date.today())
        self.query_decorator = query_decorator
        layout.addWidget(self.date_editor)
        self.setLayout(layout)
        self.date_editor.editingFinished.connect(self.emit_filter_changed)
            
    @QtCore.pyqtSlot()
    def emit_filter_changed(self):
        self.filter_changed_signal.emit()
        
    def decorate_query(self, query):
Exemplo n.º 6
0
class DateFilterWidget(QtGui.QGroupBox):
    """Filter widget based on a DateEditor"""

    filter_changed_signal = QtCore.pyqtSignal()

    def __init__(self, name, query_decorator, parent):
        QtGui.QGroupBox.__init__(self, unicode(name), parent)
        layout = QtGui.QVBoxLayout()
        self.date_editor = DateEditor(parent=self, nullable=True)
        self.date_editor.set_value(datetime.date.today())
        self.query_decorator = query_decorator
        layout.addWidget(self.date_editor)
        self.setLayout(layout)
        self.date_editor.editingFinished.connect(self.emit_filter_changed)

    @QtCore.pyqtSlot()
    def emit_filter_changed(self):
        self.filter_changed_signal.emit()

    def decorate_query(self, query):
        return self.query_decorator(query, self.date_editor.get_value())
Exemplo n.º 7
0
class DateFilterWidget( QtGui.QGroupBox ):
    """Filter widget based on a DateEditor"""
  
    filter_changed_signal = QtCore.pyqtSignal()
    
    def __init__( self, filter_data, parent ):
        super( DateFilterWidget, self ).__init__( unicode( filter_data.name ), parent )
        layout = QtGui.QVBoxLayout()
        layout.setSpacing( 2 )
        self.date_editor = DateEditor(parent=self, nullable=True)
        self.date_editor.set_value( filter_data.default )
        for option in filter_data.options:
            self.query_decorator = option.decorator
        layout.addWidget( self.date_editor )
        self.setLayout( layout )
        self.date_editor.editingFinished.connect( self.emit_filter_changed )
            
    @QtCore.pyqtSlot()
    def emit_filter_changed(self):
        self.filter_changed_signal.emit()
        
    def decorate_query(self, query):
        return self.query_decorator(query, self.date_editor.get_value())
Exemplo n.º 8
0
class DateFilterWidget( QtGui.QGroupBox ):
    """Filter widget based on a DateEditor"""
  
    filter_changed_signal = QtCore.pyqtSignal()
    
    def __init__( self, filter_data, parent ):
        super( DateFilterWidget, self ).__init__( unicode( filter_data.name ), parent )
        layout = QtGui.QVBoxLayout()
        layout.setSpacing( 2 )
        self.date_editor = DateEditor(parent=self, nullable=True)
        self.date_editor.set_value( filter_data.default )
        for option in filter_data.options:
            self.query_decorator = option.decorator
        layout.addWidget( self.date_editor )
        self.setLayout( layout )
        self.date_editor.editingFinished.connect( self.emit_filter_changed )
            
    @QtCore.pyqtSlot()
    def emit_filter_changed(self):
        self.filter_changed_signal.emit()
        
    def decorate_query(self, query):
        return self.query_decorator(query, self.date_editor.get_value())