aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authortassaron2022-04-29 21:15:17 -0400
committertassaron2022-04-29 21:15:17 -0400
commitc2c3f0aa5adf3127b84b3d50da9e1aa655c8a824 (patch)
treeaa4593c53378e376e849799ee7cea23707aff4ec /src/components
parent6f7b3b5f7cb72d09b2b86bd58b2e526515739590 (diff)
remove extra window properties from window objects
instead of windows with properties which are windows, windows now have the UI added directly to them using an argument of `uic.loadUi` Also, DPI scaling moved to MainWindow __init__
Diffstat (limited to 'src/components')
-rw-r--r--src/components/spectrum.py6
-rw-r--r--src/components/video.py4
-rw-r--r--src/components/waveform.py6
3 files changed, 8 insertions, 8 deletions
diff --git a/src/components/spectrum.py b/src/components/spectrum.py
index d1f8fb6..91f2afb 100644
--- a/src/components/spectrum.py
+++ b/src/components/spectrum.py
@@ -30,9 +30,9 @@ class Component(Component):
self.previewSize = (214, 120)
self.previewPipe = None
- if hasattr(self.parent, 'window'):
+ if hasattr(self.parent, 'lineEdit_audioFile'):
# update preview when audio file changes (if genericPreview is off)
- self.parent.window.lineEdit_audioFile.textChanged.connect(
+ self.parent.lineEdit_audioFile.textChanged.connect(
self.update
)
@@ -123,7 +123,7 @@ class Component(Component):
genericPreview = self.settings.value("pref_genericPreview")
startPt = 0
if not genericPreview:
- inputFile = self.parent.window.lineEdit_audioFile.text()
+ inputFile = self.parent.lineEdit_audioFile.text()
if not inputFile or not os.path.exists(inputFile):
return
duration = getAudioDuration(inputFile)
diff --git a/src/components/video.py b/src/components/video.py
index 070940d..9fffc26 100644
--- a/src/components/video.py
+++ b/src/components/video.py
@@ -63,8 +63,8 @@ class Component(Component):
def properties(self):
props = []
- if hasattr(self.parent, 'window'):
- outputFile = self.parent.window.lineEdit_outputFile.text()
+ if hasattr(self.parent, 'lineEdit_outputFile'):
+ outputFile = self.parent.lineEdit_outputFile.text()
else:
outputFile = str(self.parent.args.output)
diff --git a/src/components/waveform.py b/src/components/waveform.py
index 1a6035f..227f711 100644
--- a/src/components/waveform.py
+++ b/src/components/waveform.py
@@ -27,8 +27,8 @@ class Component(Component):
self.page.lineEdit_color.setText('255,255,255')
- if hasattr(self.parent, 'window'):
- self.parent.window.lineEdit_audioFile.textChanged.connect(
+ if hasattr(self.parent, 'lineEdit_audioFile'):
+ self.parent.lineEdit_audioFile.textChanged.connect(
self.update
)
@@ -82,7 +82,7 @@ class Component(Component):
genericPreview = self.settings.value("pref_genericPreview")
startPt = 0
if not genericPreview:
- inputFile = self.parent.window.lineEdit_audioFile.text()
+ inputFile = self.parent.lineEdit_audioFile.text()
if not inputFile or not os.path.exists(inputFile):
return
duration = getAudioDuration(inputFile)