+About
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
from PySide2.QtWidgets import QMessageBox
|
||||
|
||||
|
||||
text = """
|
||||
This software is free to use and delivered to you with a lot on fun :)
|
||||
|
||||
If somebody ask you how to get it, just tell him/her to google 'albion online stats github'
|
||||
|
||||
Feel free to donate me with some in-game silver or support me on patronite.
|
||||
|
||||
Quick contact - catch me on discord JaWiktor#1717
|
||||
|
||||
See you in game, WedrowyczJakub
|
||||
"""
|
||||
|
||||
class About(QMessageBox):
|
||||
def __init__(self):
|
||||
QMessageBox.__init__(self)
|
||||
self.setIcon(QMessageBox.Information)
|
||||
self.setWindowTitle("Albion online stats")
|
||||
self.setText(text)
|
||||
self.setInformativeText('<a href="{}"> Report Bug/Feature request </a> | <a href="{}"> Contribute </a> | <a href="{}"> Download </a> | <a href="{}"> Donate </a>'.format(
|
||||
"https://github.com/mazurwiktor/albion-online-stats/issues/new/choose",
|
||||
"https://github.com/mazurwiktor/albion-online-stats",
|
||||
"https://github.com/mazurwiktor/albion-online-stats/releases/latest",
|
||||
"https://www.patreon.com/wiktormazur",
|
||||
))
|
||||
self.setStandardButtons(QMessageBox.Ok)
|
||||
|
||||
|
||||
+4
-4
@@ -53,11 +53,11 @@ def with_precentage(session):
|
||||
def get_zone_session():
|
||||
if TESTING_ENABLED:
|
||||
session = [
|
||||
{'player': 'A', 'damage': 1234.02,
|
||||
{'player': 'A'*20, 'damage': 1234.02,
|
||||
'time_in_combat': 12.0, 'dps': 12.4234, 'fame': 20.0, 'fame_per_minute': 30},
|
||||
{'player': 'B', 'damage': 5435.02, 'time_in_combat': 12.0, 'dps': 12},
|
||||
{'player': 'C', 'damage': 23.02, 'time_in_combat': 12.0, 'dps': 13},
|
||||
{'player': 'D', 'damage': 0, 'time_in_combat': 12.0, 'dps': 0}
|
||||
{'player': 'B'*20, 'damage': 5435.02, 'time_in_combat': 12.0, 'dps': 12},
|
||||
{'player': 'C'*20, 'damage': 23.02, 'time_in_combat': 12.0, 'dps': 13},
|
||||
{'player': 'D'*20, 'damage': 0, 'time_in_combat': 12.0, 'dps': 0}
|
||||
]
|
||||
else:
|
||||
session = libmeter.get_zone_session()
|
||||
|
||||
+6
-3
@@ -13,9 +13,9 @@ from PySide2.QtWidgets import QComboBox
|
||||
import clipboard
|
||||
|
||||
from table import Table
|
||||
import about
|
||||
import engine
|
||||
|
||||
|
||||
class Mode:
|
||||
CURRENT_ZONE = 'Statistics: Current zone'
|
||||
OVERALL = 'Statistics: Overall'
|
||||
@@ -28,22 +28,26 @@ class BottomButtons(QWidget):
|
||||
self.mode = mode
|
||||
self.table = table
|
||||
self.layout = QHBoxLayout()
|
||||
self.about = about.About()
|
||||
|
||||
self.copy_button = QPushButton("&Copy", self)
|
||||
self.reset_button = QPushButton("&Reset", self)
|
||||
self.close_button = QPushButton("&Close", self)
|
||||
|
||||
self.about_button = QPushButton("&About", self)
|
||||
self.layout.addWidget(self.copy_button)
|
||||
self.layout.addWidget(self.reset_button)
|
||||
self.layout.addWidget(self.about_button)
|
||||
self.layout.addWidget(self.close_button)
|
||||
self.setLayout(self.layout)
|
||||
|
||||
self.copy_button.clicked.connect(self.copy)
|
||||
self.reset_button.clicked.connect(self.reset)
|
||||
self.close_button.clicked.connect(self.close)
|
||||
self.about_button.clicked.connect(self.about.show)
|
||||
|
||||
self.copy_button.setObjectName('BottomButtons')
|
||||
self.reset_button.setObjectName('BottomButtons')
|
||||
self.about_button.setObjectName('BottomButtons')
|
||||
self.close_button.setObjectName('BottomButtons')
|
||||
|
||||
def copy(self):
|
||||
@@ -66,7 +70,6 @@ class BottomButtons(QWidget):
|
||||
def close(self):
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
class ModeWidget(QComboBox):
|
||||
def __init__(self):
|
||||
QComboBox.__init__(self)
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ if __name__ == "__main__":
|
||||
msg.setIcon(QMessageBox.Warning)
|
||||
msg.setWindowTitle("Update available!")
|
||||
msg.setText("Another version of app is avaliable.")
|
||||
msg.setInformativeText("You are using app in version {}, new version {} available <a href='{}'>here</a><".format(
|
||||
msg.setInformativeText("You are using app in version {}, new version {} available <a href='{}'>here</a>".format(
|
||||
current_version, latest_version, latest_url))
|
||||
msg.setStandardButtons(QMessageBox.Ok)
|
||||
msg.show()
|
||||
|
||||
@@ -10,4 +10,7 @@ style = """
|
||||
QListView {
|
||||
min-height: 100px;
|
||||
}
|
||||
QPushButton {
|
||||
max-width: 60px;
|
||||
}
|
||||
""" % (font_size)
|
||||
|
||||
Reference in New Issue
Block a user