[qcineoob] cosmetics
This commit is contained in:
parent
1432ce1ce0
commit
7245db30cd
2 changed files with 86 additions and 24 deletions
|
|
@ -52,7 +52,7 @@ class MainWindow(QtMainWindow):
|
|||
|
||||
self.history = {'last_action':None,'action_list':[]}
|
||||
self.connect(self.ui.backButton, SIGNAL("clicked()"), self.doBack)
|
||||
self.ui.backButton.setDisabled(True)
|
||||
self.ui.backButton.hide()
|
||||
|
||||
self.connect(self.ui.searchEdit, SIGNAL("returnPressed()"), self.search)
|
||||
self.connect(self.ui.typeCombo, SIGNAL("returnPressed()"), self.search)
|
||||
|
|
@ -70,6 +70,7 @@ class MainWindow(QtMainWindow):
|
|||
for lang in langs:
|
||||
self.ui.langCombo.addItem(lang)
|
||||
self.ui.langCombo.hide()
|
||||
self.ui.langLabel.hide()
|
||||
|
||||
def backendsConfig(self):
|
||||
bckndcfg = BackendCfg(self.weboob, (ICapCinema,ICapTorrent,ICapSubtitle,), self)
|
||||
|
|
@ -93,15 +94,17 @@ class MainWindow(QtMainWindow):
|
|||
def typeComboChanged(self,value):
|
||||
if unicode(value) == 'subtitle':
|
||||
self.ui.langCombo.show()
|
||||
self.ui.langLabel.show()
|
||||
else:
|
||||
self.ui.langCombo.hide()
|
||||
self.ui.langLabel.hide()
|
||||
|
||||
def doAction(self, description, fun, args):
|
||||
self.ui.currentActionLabel.setText(description)
|
||||
if self.history['last_action'] != None:
|
||||
self.history['action_list'].append(self.history['last_action'])
|
||||
self.ui.backButton.setToolTip(self.history['last_action']['description'])
|
||||
self.ui.backButton.setDisabled(False)
|
||||
self.ui.backButton.show()
|
||||
self.history['last_action'] = {'function':fun,'args':args,'description':description}
|
||||
return fun(*args)
|
||||
|
||||
|
|
@ -111,7 +114,7 @@ class MainWindow(QtMainWindow):
|
|||
self.ui.currentActionLabel.setText(todo['description'])
|
||||
self.history['last_action'] = todo
|
||||
if len(self.history['action_list']) == 0:
|
||||
self.ui.backButton.setDisabled(True)
|
||||
self.ui.backButton.hide()
|
||||
else:
|
||||
self.ui.backButton.setToolTip(self.history['action_list'][-1]['description'])
|
||||
return todo['function'](*todo['args'])
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@
|
|||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_2">
|
||||
<property name="frameShape">
|
||||
|
|
@ -64,42 +67,98 @@
|
|||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="langLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>language</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="langCombo"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="backendEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="backButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>back</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="currentActionLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="backButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><<back</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="currentActionLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
|
@ -117,7 +176,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>708</width>
|
||||
<height>293</height>
|
||||
<height>292</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2"/>
|
||||
|
|
@ -138,7 +197,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>78</width>
|
||||
<width>63</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue