-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
200 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import os | ||
from PySide import QtGui, QtCore | ||
from btl import __version__ | ||
from .util import load_ui | ||
|
||
__dir__ = os.path.dirname(__file__) | ||
ui_path = os.path.join(__dir__, "about.ui") | ||
|
||
class AboutDialog(QtGui.QWidget): | ||
def __init__(self, parent=None): | ||
super().__init__(parent) | ||
self.form = load_ui(ui_path) | ||
self.form.buttonBox.clicked.connect(self.form.reject) | ||
self.form.labelVersion.setText(__version__) | ||
|
||
def exec(self): | ||
return self.form.exec() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>AboutDialog</class> | ||
<widget class="QDialog" name="AboutDialog"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>500</width> | ||
<height>200</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>About</string> | ||
</property> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<property name="spacing"> | ||
<number>12</number> | ||
</property> | ||
<item> | ||
<widget class="QLabel" name="aboutLabel"> | ||
<property name="font"> | ||
<font> | ||
<pointsize>14</pointsize> | ||
</font> | ||
</property> | ||
<property name="text"> | ||
<string>Better Tool Library</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1"> | ||
<item row="1" column="1"> | ||
<widget class="QLabel" name="labelVersion"> | ||
<property name="focusPolicy"> | ||
<enum>Qt::TabFocus</enum> | ||
</property> | ||
<property name="text"> | ||
<string/> | ||
</property> | ||
<property name="textInteractionFlags"> | ||
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="2" column="0"> | ||
<widget class="QLabel" name="label_2"> | ||
<property name="text"> | ||
<string>Homepage:</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="1" column="0"> | ||
<widget class="QLabel" name="label"> | ||
<property name="text"> | ||
<string>Version:</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="2" column="1"> | ||
<widget class="QLabel" name="label_3"> | ||
<property name="focusPolicy"> | ||
<enum>Qt::TabFocus</enum> | ||
</property> | ||
<property name="text"> | ||
<string notr="true"><a href="https://github.com/knipknap/better-tool-library">https://github.com/knipknap/better-tool-library</a></string> | ||
</property> | ||
<property name="textFormat"> | ||
<enum>Qt::RichText</enum> | ||
</property> | ||
<property name="openExternalLinks"> | ||
<bool>true</bool> | ||
</property> | ||
<property name="textInteractionFlags"> | ||
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse</set> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
<item> | ||
<spacer name="verticalSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Vertical</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>20</width> | ||
<height>40</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<widget class="QDialogButtonBox" name="buttonBox"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="standardButtons"> | ||
<set>QDialogButtonBox::Close</set> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections/> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters