Skip to content

Commit

Permalink
Missing Password display and signal on video finish
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarohurtadobo committed Jun 12, 2018
1 parent 3affba5 commit 68e9fd9
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 21 deletions.
Binary file added imagenes/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imagenes/logoWeb.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imagenes/logoWeb2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 15 additions & 21 deletions video.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,17 @@ def initUI(self):
self.labelIdentificado.setFont(QtGui.QFont('SansSerif', 24))

# Parte visual
self.media1 = Phonon.MediaSource('./videos/ea.mp4')
self.video1 = Phonon.VideoPlayer(self)
self.video1.load(self.media1)
self.media0 = Phonon.MediaSource('./imagenes/logoWeb.png')
self.media1 = Phonon.MediaSource('./videos/1.avi')
self.video = Phonon.VideoPlayer(self)
self.video.load(self.media1)

self.media2 = Phonon.MediaSource('./videos/or.avi')
self.video2 = Phonon.VideoPlayer(self)
self.video2.load(self.media2)

self.media2 = Phonon.MediaSource('./videos/2.avi')

self.fechaYHora = QtGui.QLabel('Fecha')
self.estadoAlarma = QtGui.QLabel('Alarma Activada')
self.fechaYHora.setGeometry(25, 25, 250, 250)
self.pixmapAct = QtGui.QPixmap('./imagenes/alarmaActivada.png')
self.pixmapDeact = QtGui.QPixmap('./imagenes/alarmaDesactivada.png')
self.pixmapLogo = QtGui.QPixmap('./imagenes/logoWeb.png')
self.imagen.setPixmap(self.pixmapAct)


Expand All @@ -99,13 +95,13 @@ def initUI(self):

# Layouts:
self.layoutVideo1 = QtGui.QVBoxLayout()
self.layoutVideo2 = QtGui.QVBoxLayout()

self.layoutVideo1.addWidget(self.video1)
self.layoutVideo2.addWidget(self.video2)

self.layoutVideo1.addWidget(self.video)
#self.layoutVideo1.setAlignment(self.imagen, QtCore.Qt.AlignHCenter)

self.setLayout(self.layoutVideo1)
self.video.load(self.media0)
self.video.play()
self.setMinimumHeight(450)

self.setGeometry(300, 300, 300, 150)
Expand Down Expand Up @@ -133,17 +129,17 @@ def _mostrarVideo1(self):
"""
Despliega el video 1
"""
self.setLayout(self.layoutVideo1)
self.removeLayout(self.layoutVideo1)
self.video1.play()
print('reproduciendo video 1')
self.video.load(self.media1)
self.video.play()

def _mostrarVideo2(self):
"""
Despliega el video 2
"""
self.setLayout(self.layoutVideo2)
self.removeLayout(self.layoutVideo2)
self.video2.play()
print('reproduciendo video 2')
self.video.load(self.media2)
self.video.play()

class ThreadClass(QtCore.QThread):
"""
Expand All @@ -161,7 +157,6 @@ def __init__(self,fila,parent = None):
for password in readData.split('\n'):
if len(password)>4:
self.passwords.append(password)
print(self.passwords)

def run(self):
"""
Expand All @@ -175,7 +170,6 @@ def run(self):
else:
self.emit(QtCore.SIGNAL('MOSTRAR_VIDEO_2'))


if __name__ == '__main__':
"""
Este pequeno script demostrativo muestra que la interfaz puede ser creada sin interferir con el programa principal
Expand Down
Binary file added videos/1.avi
Binary file not shown.
Binary file added videos/2.avi
Binary file not shown.
Binary file removed videos/ea.mp4
Binary file not shown.
Binary file removed videos/or.avi
Binary file not shown.

0 comments on commit 68e9fd9

Please sign in to comment.