Skip to content

Commit

Permalink
Change play sound
Browse files Browse the repository at this point in the history
  • Loading branch information
HamsteL committed Jun 11, 2019
1 parent 4604e05 commit 6abfcf1
Show file tree
Hide file tree
Showing 16 changed files with 9 additions and 11 deletions.
Binary file modified Application/Recognizer/__pycache__/check_internet.cpython-36.pyc
100755 → 100644
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Application/__pycache__/functional_design.cpython-36.pyc
Binary file not shown.
Binary file modified Application/__pycache__/generated_design.cpython-36.pyc
Binary file not shown.
Binary file modified Application/__pycache__/history.cpython-36.pyc
Binary file not shown.
Binary file modified Application/__pycache__/mini_app.cpython-36.pyc
Binary file not shown.
Binary file modified Application/__pycache__/mini_app_gen_design.cpython-36.pyc
Binary file not shown.
Binary file modified Application/__pycache__/modules.cpython-36.pyc
Binary file not shown.
Binary file modified Application/__pycache__/settingsEva.cpython-36.pyc
Binary file not shown.
10 changes: 2 additions & 8 deletions Application/functional_design.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import signal
import os
import pygame
from wave import open as waveOpen
from ossaudiodev import open as ossOpen
import subprocess

from PyQt5 import QtWidgets
from PyQt5.QtCore import QSize
from PyQt5.QtWidgets import QHBoxLayout, QWidget, QLabel, QPushButton, QListWidgetItem, QGridLayout, QTableWidget, \
QVBoxLayout
from lxml import etree, objectify
Expand Down Expand Up @@ -176,10 +173,7 @@ def play_sound(self):
sounds = []
for appt in root.getchildren():
sounds.append(appt.getchildren()[0])
pygame.init()
pygame.mixer.music.load(str(sounds[rowId + 1]))
pygame.mixer.music.play()

subprocess.Popen(["aplay",str(sounds[rowId + 1])])
"""Module page events"""

def init_modules_table(self):
Expand Down
2 changes: 1 addition & 1 deletion Application/generated_design.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.setWindowModality(QtCore.Qt.NonModal)
MainWindow.resize(699, 542)
MainWindow.setMinimumSize(QtCore.QSize(750, 542))
MainWindow.setMinimumSize(QtCore.QSize(850, 542))
MainWindow.setStyleSheet("background-color: rgb(65,105,225)")
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
Expand Down
2 changes: 1 addition & 1 deletion Modules/FireFox/moveLeft.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
def moveLeft():
os.popen('wmctrl -a Mozilla')
time.sleep(0.1)
pgui.hotkey('ctrl', 'pagedown')
pgui.hotkey('ctrl', 'pageup')


if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion Modules/FireFox/moveRight.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
def moveRight():
os.popen('wmctrl -a Mozilla')
time.sleep(0.1)
pgui.hotkey('ctrl', 'pageup')
pgui.hotkey('ctrl', 'pagedown')


if __name__ == '__main__':
Expand Down
4 changes: 4 additions & 0 deletions Modules/OS/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
"path": "changeWindow.py",
"Параметры": "-"
},
"Изменить активное окно": {
"path": "changeWindow.py",
"Параметры": "-"
},
"Создать директорию": {
"path": "createDir.py",
"Параметры": "имя директории"
Expand Down

0 comments on commit 6abfcf1

Please sign in to comment.