+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():
|
def get_zone_session():
|
||||||
if TESTING_ENABLED:
|
if TESTING_ENABLED:
|
||||||
session = [
|
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},
|
'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': 'B'*20, 'damage': 5435.02, 'time_in_combat': 12.0, 'dps': 12},
|
||||||
{'player': 'C', 'damage': 23.02, 'time_in_combat': 12.0, 'dps': 13},
|
{'player': 'C'*20, 'damage': 23.02, 'time_in_combat': 12.0, 'dps': 13},
|
||||||
{'player': 'D', 'damage': 0, 'time_in_combat': 12.0, 'dps': 0}
|
{'player': 'D'*20, 'damage': 0, 'time_in_combat': 12.0, 'dps': 0}
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
session = libmeter.get_zone_session()
|
session = libmeter.get_zone_session()
|
||||||
|
|||||||
+6
-3
@@ -13,9 +13,9 @@ from PySide2.QtWidgets import QComboBox
|
|||||||
import clipboard
|
import clipboard
|
||||||
|
|
||||||
from table import Table
|
from table import Table
|
||||||
|
import about
|
||||||
import engine
|
import engine
|
||||||
|
|
||||||
|
|
||||||
class Mode:
|
class Mode:
|
||||||
CURRENT_ZONE = 'Statistics: Current zone'
|
CURRENT_ZONE = 'Statistics: Current zone'
|
||||||
OVERALL = 'Statistics: Overall'
|
OVERALL = 'Statistics: Overall'
|
||||||
@@ -28,22 +28,26 @@ class BottomButtons(QWidget):
|
|||||||
self.mode = mode
|
self.mode = mode
|
||||||
self.table = table
|
self.table = table
|
||||||
self.layout = QHBoxLayout()
|
self.layout = QHBoxLayout()
|
||||||
|
self.about = about.About()
|
||||||
|
|
||||||
self.copy_button = QPushButton("&Copy", self)
|
self.copy_button = QPushButton("&Copy", self)
|
||||||
self.reset_button = QPushButton("&Reset", self)
|
self.reset_button = QPushButton("&Reset", self)
|
||||||
self.close_button = QPushButton("&Close", self)
|
self.close_button = QPushButton("&Close", self)
|
||||||
|
self.about_button = QPushButton("&About", self)
|
||||||
self.layout.addWidget(self.copy_button)
|
self.layout.addWidget(self.copy_button)
|
||||||
self.layout.addWidget(self.reset_button)
|
self.layout.addWidget(self.reset_button)
|
||||||
|
self.layout.addWidget(self.about_button)
|
||||||
self.layout.addWidget(self.close_button)
|
self.layout.addWidget(self.close_button)
|
||||||
self.setLayout(self.layout)
|
self.setLayout(self.layout)
|
||||||
|
|
||||||
self.copy_button.clicked.connect(self.copy)
|
self.copy_button.clicked.connect(self.copy)
|
||||||
self.reset_button.clicked.connect(self.reset)
|
self.reset_button.clicked.connect(self.reset)
|
||||||
self.close_button.clicked.connect(self.close)
|
self.close_button.clicked.connect(self.close)
|
||||||
|
self.about_button.clicked.connect(self.about.show)
|
||||||
|
|
||||||
self.copy_button.setObjectName('BottomButtons')
|
self.copy_button.setObjectName('BottomButtons')
|
||||||
self.reset_button.setObjectName('BottomButtons')
|
self.reset_button.setObjectName('BottomButtons')
|
||||||
|
self.about_button.setObjectName('BottomButtons')
|
||||||
self.close_button.setObjectName('BottomButtons')
|
self.close_button.setObjectName('BottomButtons')
|
||||||
|
|
||||||
def copy(self):
|
def copy(self):
|
||||||
@@ -66,7 +70,6 @@ class BottomButtons(QWidget):
|
|||||||
def close(self):
|
def close(self):
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
|
||||||
class ModeWidget(QComboBox):
|
class ModeWidget(QComboBox):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
QComboBox.__init__(self)
|
QComboBox.__init__(self)
|
||||||
|
|||||||
+1
-1
@@ -44,7 +44,7 @@ if __name__ == "__main__":
|
|||||||
msg.setIcon(QMessageBox.Warning)
|
msg.setIcon(QMessageBox.Warning)
|
||||||
msg.setWindowTitle("Update available!")
|
msg.setWindowTitle("Update available!")
|
||||||
msg.setText("Another version of app is avaliable.")
|
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))
|
current_version, latest_version, latest_url))
|
||||||
msg.setStandardButtons(QMessageBox.Ok)
|
msg.setStandardButtons(QMessageBox.Ok)
|
||||||
msg.show()
|
msg.show()
|
||||||
|
|||||||
@@ -10,4 +10,7 @@ style = """
|
|||||||
QListView {
|
QListView {
|
||||||
min-height: 100px;
|
min-height: 100px;
|
||||||
}
|
}
|
||||||
|
QPushButton {
|
||||||
|
max-width: 60px;
|
||||||
|
}
|
||||||
""" % (font_size)
|
""" % (font_size)
|
||||||
|
|||||||
Reference in New Issue
Block a user