diff options
| author | tassaron | 2017-07-20 20:31:38 -0400 |
|---|---|---|
| committer | tassaron | 2017-07-20 20:31:38 -0400 |
| commit | f454814867443ceeeca2a3a2c2a676947184503c (patch) | |
| tree | be0ed824fd6218038041d5af48d273498cab87e1 /src/components/sound.py | |
| parent | b1713d38fa91e39f142b0c234b6405229aa149e1 (diff) | |
ffmpeg functions moved to toolkit, component format simplified
component methods are auto-decorated & settings are now class variables
Diffstat (limited to 'src/components/sound.py')
| -rw-r--r-- | src/components/sound.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/components/sound.py b/src/components/sound.py index 5b06405..677a22f 100644 --- a/src/components/sound.py +++ b/src/components/sound.py @@ -1,14 +1,14 @@ from PyQt5 import QtGui, QtCore, QtWidgets import os +from core import Core from component import Component from toolkit.frame import BlankFrame class Component(Component): - '''Sound''' - - modified = QtCore.pyqtSignal(int, dict) + name = 'Sound' + version = '1.0.0' def widget(self, parent): self.parent = parent @@ -32,8 +32,8 @@ class Component(Component): super().update() def previewRender(self, previewWorker): - width = int(previewWorker.core.settings.value('outputWidth')) - height = int(previewWorker.core.settings.value('outputHeight')) + width = int(self.settings.value('outputWidth')) + height = int(self.settings.value('outputHeight')) return BlankFrame(width, height) def preFrameRender(self, **kwargs): @@ -67,7 +67,7 @@ class Component(Component): sndDir = self.settings.value("componentDir", os.path.expanduser("~")) filename, _ = QtWidgets.QFileDialog.getOpenFileName( self.page, "Choose Sound", sndDir, - "Audio Files (%s)" % " ".join(self.core.audioFormats)) + "Audio Files (%s)" % " ".join(Core.audioFormats)) if filename: self.settings.setValue("componentDir", os.path.dirname(filename)) self.page.lineEdit_sound.setText(filename) @@ -101,7 +101,7 @@ class Component(Component): key, arg = arg.split('=', 1) if key == 'path': if '*%s' % os.path.splitext(arg)[1] \ - not in self.core.audioFormats: + not in Core.audioFormats: print("Not a supported audio format") quit(1) self.page.lineEdit_sound.setText(arg) |
