[qcineoob] thumbnails resize, showThumbnailCheck state saved in config
This commit is contained in:
parent
d6a0291deb
commit
971ea3346a
5 changed files with 9 additions and 4 deletions
|
|
@ -72,6 +72,9 @@ class MainWindow(QtMainWindow):
|
||||||
|
|
||||||
count = self.config.get('settings', 'maxresultsnumber')
|
count = self.config.get('settings', 'maxresultsnumber')
|
||||||
self.ui.countSpin.setValue(int(count))
|
self.ui.countSpin.setValue(int(count))
|
||||||
|
showT = self.config.get('settings', 'showthumbnails')
|
||||||
|
print showT
|
||||||
|
self.ui.showTCheck.setChecked(showT == '1')
|
||||||
|
|
||||||
self.connect(self.ui.actionBackends, SIGNAL("triggered()"), self.backendsConfig)
|
self.connect(self.ui.actionBackends, SIGNAL("triggered()"), self.backendsConfig)
|
||||||
self.connect(self.ui.actionQuit, SIGNAL("triggered()"), self.close)
|
self.connect(self.ui.actionQuit, SIGNAL("triggered()"), self.close)
|
||||||
|
|
@ -443,6 +446,7 @@ class MainWindow(QtMainWindow):
|
||||||
self.ui.backendEdit.currentIndex()).toString()))
|
self.ui.backendEdit.currentIndex()).toString()))
|
||||||
self.saveSearchHistory()
|
self.saveSearchHistory()
|
||||||
self.config.set('settings', 'maxresultsnumber', self.ui.countSpin.value())
|
self.config.set('settings', 'maxresultsnumber', self.ui.countSpin.value())
|
||||||
|
self.config.set('settings', 'showthumbnails', '1' if self.ui.showTCheck.isChecked() else '0')
|
||||||
|
|
||||||
self.config.save()
|
self.config.save()
|
||||||
ev.accept()
|
ev.accept()
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ class MiniMovie(QFrame):
|
||||||
if not empty(self.movie.thumbnail_url):
|
if not empty(self.movie.thumbnail_url):
|
||||||
data = urllib.urlopen(self.movie.thumbnail_url).read()
|
data = urllib.urlopen(self.movie.thumbnail_url).read()
|
||||||
img = QImage.fromData(data)
|
img = QImage.fromData(data)
|
||||||
self.ui.imageLabel.setPixmap(QPixmap.fromImage(img))
|
self.ui.imageLabel.setPixmap(QPixmap.fromImage(img).scaledToHeight(100,Qt.SmoothTransformation))
|
||||||
|
|
||||||
def enterEvent(self, event):
|
def enterEvent(self, event):
|
||||||
self.setFrameShadow(self.Sunken)
|
self.setFrameShadow(self.Sunken)
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ class MiniPerson(QFrame):
|
||||||
if not empty(self.person.thumbnail_url):
|
if not empty(self.person.thumbnail_url):
|
||||||
data = urllib.urlopen(self.person.thumbnail_url).read()
|
data = urllib.urlopen(self.person.thumbnail_url).read()
|
||||||
img = QImage.fromData(data)
|
img = QImage.fromData(data)
|
||||||
self.ui.imageLabel.setPixmap(QPixmap.fromImage(img))
|
self.ui.imageLabel.setPixmap(QPixmap.fromImage(img).scaledToHeight(100,Qt.SmoothTransformation))
|
||||||
|
|
||||||
def enterEvent(self, event):
|
def enterEvent(self, event):
|
||||||
self.setFrameShadow(self.Sunken)
|
self.setFrameShadow(self.Sunken)
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,8 @@ class QCineoob(QtApplication):
|
||||||
SHORT_DESCRIPTION = "search movies, people, torrent and subtitles"
|
SHORT_DESCRIPTION = "search movies, people, torrent and subtitles"
|
||||||
CAPS = ICapCinema, ICapTorrent, ICapSubtitle
|
CAPS = ICapCinema, ICapTorrent, ICapSubtitle
|
||||||
CONFIG = {'settings': {'backend': '',
|
CONFIG = {'settings': {'backend': '',
|
||||||
'maxresultsnumber': '10'
|
'maxresultsnumber': '10',
|
||||||
|
'showthumbnails': '0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="showTCheck">
|
<widget class="QCheckBox" name="showTCheck">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>may slow search process</p></body></html></string>
|
<string><html><head/><body><p>might slow search process</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Show thumbnails</string>
|
<string>Show thumbnails</string>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue