Better missing database management

This commit is contained in:
alessandro90
2018-10-06 15:40:58 +02:00
parent 4a68fc0384
commit dfd8c4ac0e
3 changed files with 34 additions and 28 deletions

View File

@@ -75,7 +75,7 @@ class AudioPlayer(object):
def set_audio_player(self, fname = ""): def set_audio_player(self, fname = ""):
self.__first_call = True self.__first_call = True
self.__reset_audio_widget() self.__reset_audio_widget()
full_name = os.path.join('Data', 'Audio_wav', fname + '.wav') full_name = os.path.join('Data', 'Audio', fname + '.wav')
if os.path.exists(full_name): if os.path.exists(full_name):
self.__play.setEnabled(True) self.__play.setEnabled(True)
self.__audio_file = full_name self.__audio_file = full_name

View File

@@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1169</width> <width>1337</width>
<height>626</height> <height>641</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@@ -261,6 +261,12 @@ border-radius: 5px;</string>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>200</width>
<height>400</height>
</size>
</property>
<property name="layoutDirection"> <property name="layoutDirection">
<enum>Qt::LeftToRight</enum> <enum>Qt::LeftToRight</enum>
</property> </property>
@@ -1920,7 +1926,7 @@ QTabBar::tab:!selected {
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>170</width> <width>300</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@@ -1955,7 +1961,7 @@ QLabel, QPushButton, QSlider {
<item> <item>
<widget class="QWidget" name="audio_widget" native="true"> <widget class="QWidget" name="audio_widget" native="true">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@@ -2020,8 +2026,8 @@ QPushButton:disabled {
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>41</width> <width>60</width>
<height>41</height> <height>60</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
@@ -2045,8 +2051,8 @@ QPushButton:disabled {
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>41</width> <width>60</width>
<height>41</height> <height>60</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
@@ -2070,8 +2076,8 @@ QPushButton:disabled {
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>41</width> <width>60</width>
<height>41</height> <height>60</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
@@ -2151,15 +2157,15 @@ QSlider::handle:horizontal {
<item> <item>
<widget class="QLabel" name="spectrogram"> <widget class="QLabel" name="spectrogram">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>153</width> <width>250</width>
<height>350</height> <height>400</height>
</size> </size>
</property> </property>
<property name="toolTip"> <property name="toolTip">
@@ -2189,7 +2195,7 @@ QSlider::handle:horizontal {
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1169</width> <width>1337</width>
<height>21</height> <height>21</height>
</rect> </rect>
</property> </property>