mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #288
This commit is contained in:
parent
4b822e533c
commit
b96b811fde
@ -149,8 +149,8 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="metadata_page" >
|
<widget class="QWidget" name="metadata_page" >
|
||||||
<layout class="QGridLayout" >
|
<layout class="QHBoxLayout" >
|
||||||
<item rowspan="2" row="0" column="0" >
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_4" >
|
<widget class="QGroupBox" name="groupBox_4" >
|
||||||
<property name="title" >
|
<property name="title" >
|
||||||
<string>Book Cover</string>
|
<string>Book Cover</string>
|
||||||
@ -159,19 +159,7 @@
|
|||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QHBoxLayout" >
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="cover" >
|
<widget class="ImageView" name="cover" >
|
||||||
<property name="sizePolicy" >
|
|
||||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize" >
|
|
||||||
<size>
|
|
||||||
<width>250</width>
|
|
||||||
<height>180</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
@ -266,201 +254,217 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1" >
|
<item>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QVBoxLayout" >
|
||||||
<item row="0" column="0" >
|
<item>
|
||||||
<widget class="QLabel" name="label" >
|
<layout class="QGridLayout" >
|
||||||
<property name="text" >
|
<item row="0" column="0" >
|
||||||
<string>&Title: </string>
|
<widget class="QLabel" name="label" >
|
||||||
</property>
|
<property name="text" >
|
||||||
<property name="alignment" >
|
<string>&Title: </string>
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
</property>
|
||||||
</property>
|
<property name="alignment" >
|
||||||
<property name="buddy" >
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
<cstring>gui_title</cstring>
|
</property>
|
||||||
</property>
|
<property name="buddy" >
|
||||||
</widget>
|
<cstring>gui_title</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" >
|
||||||
|
<widget class="QLineEdit" name="gui_title" >
|
||||||
|
<property name="toolTip" >
|
||||||
|
<string>Change the title of this book</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" >
|
||||||
|
<widget class="QLabel" name="label_2" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>&Author(s): </string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment" >
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="buddy" >
|
||||||
|
<cstring>gui_author</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" >
|
||||||
|
<widget class="QLineEdit" name="gui_author" >
|
||||||
|
<property name="sizePolicy" >
|
||||||
|
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||||
|
<horstretch>1</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip" >
|
||||||
|
<string>Change the author(s) of this book. Multiple authors should be separated by a comma</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" >
|
||||||
|
<widget class="QLabel" name="label_6" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Author So&rt:</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment" >
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="buddy" >
|
||||||
|
<cstring>gui_author_sort</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1" >
|
||||||
|
<widget class="QLineEdit" name="gui_author_sort" >
|
||||||
|
<property name="sizePolicy" >
|
||||||
|
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip" >
|
||||||
|
<string>Change the author(s) of this book. Multiple authors should be separated by a comma</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" >
|
||||||
|
<widget class="QLabel" name="label_3" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>&Publisher: </string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment" >
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="buddy" >
|
||||||
|
<cstring>gui_publisher</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1" >
|
||||||
|
<widget class="QLineEdit" name="gui_publisher" >
|
||||||
|
<property name="toolTip" >
|
||||||
|
<string>Change the publisher of this book</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0" >
|
||||||
|
<widget class="QLabel" name="label_4" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Ta&gs: </string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment" >
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="buddy" >
|
||||||
|
<cstring>tags</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1" >
|
||||||
|
<widget class="QLineEdit" name="tags" >
|
||||||
|
<property name="toolTip" >
|
||||||
|
<string>Tags categorize the book. This is particularly useful while searching. <br><br>They can be any words or phrases, separated by commas.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0" >
|
||||||
|
<widget class="QLabel" name="label_7" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>&Series:</string>
|
||||||
|
</property>
|
||||||
|
<property name="textFormat" >
|
||||||
|
<enum>Qt::PlainText</enum>
|
||||||
|
</property>
|
||||||
|
<property name="alignment" >
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="buddy" >
|
||||||
|
<cstring>series</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1" >
|
||||||
|
<widget class="QComboBox" name="series" >
|
||||||
|
<property name="sizePolicy" >
|
||||||
|
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
|
||||||
|
<horstretch>10</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip" >
|
||||||
|
<string>List of known series. You can add new series.</string>
|
||||||
|
</property>
|
||||||
|
<property name="whatsThis" >
|
||||||
|
<string>List of known series. You can add new series.</string>
|
||||||
|
</property>
|
||||||
|
<property name="editable" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="insertPolicy" >
|
||||||
|
<enum>QComboBox::InsertAlphabetically</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeAdjustPolicy" >
|
||||||
|
<enum>QComboBox::AdjustToContents</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1" >
|
||||||
|
<widget class="QSpinBox" name="series_index" >
|
||||||
|
<property name="toolTip" >
|
||||||
|
<string>Series index.</string>
|
||||||
|
</property>
|
||||||
|
<property name="whatsThis" >
|
||||||
|
<string>Series index.</string>
|
||||||
|
</property>
|
||||||
|
<property name="prefix" >
|
||||||
|
<string>Book </string>
|
||||||
|
</property>
|
||||||
|
<property name="minimum" >
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum" >
|
||||||
|
<number>10000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1" >
|
<item>
|
||||||
<widget class="QLineEdit" name="gui_title" >
|
<widget class="QGroupBox" name="groupBox_2" >
|
||||||
<property name="toolTip" >
|
|
||||||
<string>Change the title of this book</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" >
|
|
||||||
<widget class="QLabel" name="label_2" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>&Author(s): </string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment" >
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="buddy" >
|
|
||||||
<cstring>gui_author</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1" >
|
|
||||||
<widget class="QLineEdit" name="gui_author" >
|
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
<sizepolicy vsizetype="Minimum" hsizetype="Minimum" >
|
||||||
<horstretch>1</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip" >
|
|
||||||
<string>Change the author(s) of this book. Multiple authors should be separated by a comma</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0" >
|
|
||||||
<widget class="QLabel" name="label_6" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Author So&rt:</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment" >
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="buddy" >
|
|
||||||
<cstring>gui_author_sort</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1" >
|
|
||||||
<widget class="QLineEdit" name="gui_author_sort" >
|
|
||||||
<property name="sizePolicy" >
|
|
||||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip" >
|
<property name="maximumSize" >
|
||||||
<string>Change the author(s) of this book. Multiple authors should be separated by a comma</string>
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>110</height>
|
||||||
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="title" >
|
||||||
</item>
|
<string>Comments</string>
|
||||||
<item row="3" column="0" >
|
|
||||||
<widget class="QLabel" name="label_3" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>&Publisher: </string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment" >
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="buddy" >
|
|
||||||
<cstring>gui_publisher</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1" >
|
|
||||||
<widget class="QLineEdit" name="gui_publisher" >
|
|
||||||
<property name="toolTip" >
|
|
||||||
<string>Change the publisher of this book</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0" >
|
|
||||||
<widget class="QLabel" name="label_4" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Ta&gs: </string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment" >
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="buddy" >
|
|
||||||
<cstring>tags</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1" >
|
|
||||||
<widget class="QLineEdit" name="tags" >
|
|
||||||
<property name="toolTip" >
|
|
||||||
<string>Tags categorize the book. This is particularly useful while searching. <br><br>They can be any words or phrases, separated by commas.</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0" >
|
|
||||||
<widget class="QLabel" name="label_7" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>&Series:</string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat" >
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
<property name="alignment" >
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="buddy" >
|
|
||||||
<cstring>series</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1" >
|
|
||||||
<widget class="QComboBox" name="series" >
|
|
||||||
<property name="sizePolicy" >
|
|
||||||
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
|
|
||||||
<horstretch>10</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip" >
|
|
||||||
<string>List of known series. You can add new series.</string>
|
|
||||||
</property>
|
|
||||||
<property name="whatsThis" >
|
|
||||||
<string>List of known series. You can add new series.</string>
|
|
||||||
</property>
|
|
||||||
<property name="editable" >
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="insertPolicy" >
|
|
||||||
<enum>QComboBox::InsertAlphabetically</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeAdjustPolicy" >
|
|
||||||
<enum>QComboBox::AdjustToContents</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="1" >
|
|
||||||
<widget class="QSpinBox" name="series_index" >
|
|
||||||
<property name="toolTip" >
|
|
||||||
<string>Series index.</string>
|
|
||||||
</property>
|
|
||||||
<property name="whatsThis" >
|
|
||||||
<string>Series index.</string>
|
|
||||||
</property>
|
|
||||||
<property name="prefix" >
|
|
||||||
<string>Book </string>
|
|
||||||
</property>
|
|
||||||
<property name="minimum" >
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum" >
|
|
||||||
<number>10000</number>
|
|
||||||
</property>
|
</property>
|
||||||
|
<layout class="QGridLayout" >
|
||||||
|
<item row="0" column="0" >
|
||||||
|
<widget class="QTextEdit" name="gui_comment" >
|
||||||
|
<property name="maximumSize" >
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>60</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item rowspan="2" row="1" column="1" >
|
|
||||||
<widget class="QGroupBox" name="groupBox_2" >
|
|
||||||
<property name="title" >
|
|
||||||
<string>Comments</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" >
|
|
||||||
<item row="0" column="0" >
|
|
||||||
<widget class="QTextEdit" name="gui_comment" >
|
|
||||||
<property name="maximumSize" >
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>60</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="lookandfeel_page" >
|
<widget class="QWidget" name="lookandfeel_page" >
|
||||||
@ -816,6 +820,19 @@
|
|||||||
<widget class="QWidget" name="page_5" />
|
<widget class="QWidget" name="page_5" />
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="0" >
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation" >
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" >
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -875,6 +892,13 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>ImageView</class>
|
||||||
|
<extends>QLabel</extends>
|
||||||
|
<header>widgets.h</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../images.qrc" />
|
<include location="../images.qrc" />
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -396,12 +396,6 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize" >
|
|
||||||
<size>
|
|
||||||
<width>250</width>
|
|
||||||
<height>180</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
@ -45,6 +45,7 @@ def build_forms(forms):
|
|||||||
dat = buf.getvalue()
|
dat = buf.getvalue()
|
||||||
dat = dat.replace('import images_rc', 'from libprs500.gui2 import images_rc')
|
dat = dat.replace('import images_rc', 'from libprs500.gui2 import images_rc')
|
||||||
dat = dat.replace('from library import', 'from libprs500.gui2.library import')
|
dat = dat.replace('from library import', 'from libprs500.gui2.library import')
|
||||||
|
dat = dat.replace('from widgets import', 'from libprs500.gui2.widgets import')
|
||||||
dat = re.compile(r'QtGui.QApplication.translate\(.+?,\s+"(.+?)(?<!\\)",.+?\)', re.DOTALL).sub(r'_("\1")', dat)
|
dat = re.compile(r'QtGui.QApplication.translate\(.+?,\s+"(.+?)(?<!\\)",.+?\)', re.DOTALL).sub(r'_("\1")', dat)
|
||||||
open(compiled_form, 'wb').write(dat)
|
open(compiled_form, 'wb').write(dat)
|
||||||
|
|
||||||
|
@ -30,9 +30,15 @@ class BookInfoDisplay(QFrame):
|
|||||||
Qt.IgnoreAspectRatio,
|
Qt.IgnoreAspectRatio,
|
||||||
Qt.SmoothTransformation)
|
Qt.SmoothTransformation)
|
||||||
self.setPixmap(self.default_pixmap)
|
self.setPixmap(self.default_pixmap)
|
||||||
self.setMaximumSize(QSize(self.WIDTH, self.HEIGHT))
|
self.setMaximumHeight(self.HEIGHT)
|
||||||
|
self.setMaximumWidth(self.WIDTH)
|
||||||
self.setScaledContents(True)
|
self.setScaledContents(True)
|
||||||
|
|
||||||
|
def setPixmap(self, pixmap):
|
||||||
|
QLabel.setPixmap(self, pixmap)
|
||||||
|
aspect_ratio = pixmap.width()/float(pixmap.height())
|
||||||
|
self.setMaximumWidth(int(aspect_ratio*self.HEIGHT))
|
||||||
|
|
||||||
def sizeHint(self):
|
def sizeHint(self):
|
||||||
return QSize(self.__class__.WIDTH, self.__class__.HEIGHT)
|
return QSize(self.__class__.WIDTH, self.__class__.HEIGHT)
|
||||||
|
|
||||||
|
@ -15,11 +15,18 @@
|
|||||||
'''
|
'''
|
||||||
Miscellanous widgets used in the GUI
|
Miscellanous widgets used in the GUI
|
||||||
'''
|
'''
|
||||||
from PyQt4.QtGui import QListView, QIcon, QFont
|
from PyQt4.QtGui import QListView, QIcon, QFont, QLabel
|
||||||
from PyQt4.QtCore import QAbstractListModel, QVariant, Qt, QSize, SIGNAL, QObject
|
from PyQt4.QtCore import QAbstractListModel, QVariant, Qt, QSize, SIGNAL, QObject
|
||||||
|
|
||||||
from libprs500.gui2 import human_readable, NONE
|
from libprs500.gui2 import human_readable, NONE
|
||||||
|
|
||||||
|
class ImageView(QLabel):
|
||||||
|
|
||||||
|
def setPixmap(self, pixmap):
|
||||||
|
QLabel.setPixmap(self, pixmap)
|
||||||
|
self.setMaximumWidth(pixmap.width())
|
||||||
|
self.setMaximumHeight(pixmap.height())
|
||||||
|
|
||||||
class LocationModel(QAbstractListModel):
|
class LocationModel(QAbstractListModel):
|
||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
QAbstractListModel.__init__(self, parent)
|
QAbstractListModel.__init__(self, parent)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user