def buscarDevices(self): LecturaController.iniciarDevice(self)
def __init__(self): super(MainWindow, self).__init__() self.ui=Ui_MainWindow() # Inicializar Ventana self.escanear_slot = self.escanear self.exportar_slot = self.exportar self.cambiarTab_slot = self.cambiarTab self.correlativo_changed_slot = self.correlativoChanged self.buscar_slot = self.buscarDevices self.config_slot = self.configDialog self.filtrar_slot = self.filtrar self.deshacer_slot = self.deshacer self.rehacer_slot = self.rehacer self.respaldar_slot = self.backup self.restaurar_slot = self.restaurarDB self.filtrarFecha_slot = self.filtrarFecha self.dispositivoChange_slot = self.cambiarDispositivo self.documentoCambiarTab_slot = self.resetFiltro self.empresas = [["Todas", ""]] self.fechas = [["Todo", None, None]] self.ui.setupUi(self) self.setWindowFlags(QtCore.Qt.FramelessWindowHint ) self.setAttribute(QtCore.Qt.WA_TranslucentBackground) self.ui.tableWidget_Compras.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) self.ui.tableWidget_Compras.customContextMenuRequested.connect(self.clicked) self.ui.tableWidget_Ventas.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) self.ui.tableWidget_Ventas.customContextMenuRequested.connect(self.clicked) self.inicializarDatos(self.ui.tableWidget_Compras) self.inicializarDatos(self.ui.tableWidget_Ventas) self.updateEmpresas() self.ui.maximize_btn.mouseReleaseEvent = self.maximizar self.ui.resize_btn.mouseReleaseEvent = self.restaurar self.ui.labelClose.mousePressEvent = self.cerrar self.ui.labelMinimize.mouseReleaseEvent = self.minimizar self.moving = False self.ui.frame.mousePressEvent = self._mousePressEvent self.ui.frame.mouseMoveEvent = self._mouseMoveEvent self.ui.frame.mouseReleaseEvent = self._mouseReleaseEvent self.ui.tabWidget_4.tabBar().mousePressEvent = self._mousePressEvent self.ui.tabWidget_4.tabBar().mouseMoveEvent = self._mouseMoveEvent self.ui.resize_btn.hide() self.ui.rehacerToolButton.setEnabled(False) self.ui.deshacerToolButton.setEnabled(False) rx = QtCore.QRegExp("^[1-9][0-9]*|^$") qr = QtGui.QRegExpValidator(rx) self.ui.codigoLineEdit.setValidator( qr ) self.ui.centroLineEdit.setValidator( qr ) # Loading Spinner movie = QtGui.QMovie(":/newPrefix/loading.gif") self.ui.label_5.setMovie(movie) movie.start() self.ui.label_5.setLayout(QtGui.QHBoxLayout()) self.ui.label_5.layout().addWidget(QtGui.QLabel('')) LecturaController.iniciarDevice(self) self.show()