Example #1
0
    def keyPressEvent(self, e):
        """
		Handle key presses
		
		Arguments:
		e -- a QKeyEvent
		"""

        if e.key() == Qt.Key_Return:
            self.qnotero.search(setFocus=False)
            return
        if e.key() == Qt.Key_Down:
            if self.needUpdate:
                self.qnotero.search(setFocus=True)
            elif self.qnotero.ui.listWidgetResults.count() > 0:
                self.qnotero.ui.listWidgetResults.setFocus()
            self.qnotero.ui.listWidgetResults.setCurrentItem( \
             self.qnotero.ui.listWidgetResults.item(0))
            return

        QLineEdit.keyPressEvent(self, e)
        self.timer.stop()
        self.timer = QTimer(self)
        self.timer.setSingleShot(True)
        self.timer.setInterval(getConfig("autoFire"))
        self.timer.timeout.connect(self.search)
        self.timer.start()
Example #2
0
	def keyPressEvent(self, e):
	
		"""
		Handle key presses
		
		Arguments:
		e -- a QKeyEvent
		"""
	
		if e.key() == Qt.Key_Return:
			self.qnotero.search(setFocus=False)
			return
		if e.key() == Qt.Key_Down:
			if self.needUpdate:
				self.qnotero.search(setFocus=True)								
			elif self.qnotero.ui.listWidgetResults.count() > 0:
				self.qnotero.ui.listWidgetResults.setFocus()
			self.qnotero.ui.listWidgetResults.setCurrentItem( \
				self.qnotero.ui.listWidgetResults.item(0))
			return
		
		QLineEdit.keyPressEvent(self, e)		
		self.timer.stop()
		self.timer = QTimer(self)
		self.timer.setSingleShot(True)
		self.timer.setInterval(getConfig("autoFire"))
		self.timer.timeout.connect(self.search)
		self.timer.start()
Example #3
0
    def __init__(self, qnotero):
        """
		Constructor
		
		Arguments:
		qnotero -- a Qnotero instance
		"""

        QLineEdit.__init__(self, qnotero)
        self.qnotero = qnotero
        self.timer = QTimer(self)
        self.needUpdate = True
        self.textChanged.connect(self._textChanged)
Example #4
0
	def __init__(self, qnotero):
	
		"""
		Constructor
		
		Arguments:
		qnotero -- a Qnotero instance
		"""		
	
		QLineEdit.__init__(self, qnotero)
		self.qnotero = qnotero
		self.timer = QTimer(self)
		self.needUpdate = True		
		self.textChanged.connect(self._textChanged)