mirror of
https://github.com/rbreu/beeref.git
synced 2026-03-11 08:54:28 +00:00
Add About dialog
This commit is contained in:
parent
a6ad6b47fe
commit
34f25d3fb6
5 changed files with 20 additions and 1 deletions
|
|
@ -203,6 +203,11 @@ actions = [
|
|||
'shortcuts': ['F1', 'Ctrl+H'],
|
||||
'callback': 'on_action_help',
|
||||
},
|
||||
{
|
||||
'id': 'about',
|
||||
'text': '&About',
|
||||
'callback': 'on_action_about',
|
||||
},
|
||||
{
|
||||
'id': 'debuglog',
|
||||
'text': 'Show &Debug Log',
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ menu_structure = [
|
|||
'menu': '&Help',
|
||||
'items': [
|
||||
'help',
|
||||
'about',
|
||||
'debuglog',
|
||||
],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description=f'{constants.APPNAME} referance image viewer')
|
||||
description=f'{constants.APPNAME_FULL} {constants.VERSION}')
|
||||
parser.add_argument(
|
||||
'filename',
|
||||
nargs='?',
|
||||
|
|
|
|||
|
|
@ -14,4 +14,7 @@
|
|||
# along with BeeRef. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
APPNAME = 'BeeRef'
|
||||
APPNAME_FULL = f'{APPNAME} Reference Image Viewer'
|
||||
VERSION = '0.1'
|
||||
WEBSITE = 'https://github.com/rbreu/beeref'
|
||||
COPYRIGHT = 'Copyright © 2021 Rebecca Breu'
|
||||
|
|
|
|||
|
|
@ -334,6 +334,16 @@ class BeeGraphicsView(QtWidgets.QGraphicsView, ActionsMixin):
|
|||
def on_action_help(self):
|
||||
gui.HelpDialog(self)
|
||||
|
||||
def on_action_about(self):
|
||||
QtWidgets.QMessageBox.about(
|
||||
self,
|
||||
f'About {constants.APPNAME}',
|
||||
(f'<h2>{constants.APPNAME} {constants.VERSION}</h2>'
|
||||
f'<p>{constants.APPNAME_FULL}</p>'
|
||||
f'<p>{constants.COPYRIGHT}</p>'
|
||||
f'<p><a href="{constants.WEBSITE}">'
|
||||
f'Visit the {constants.APPNAME} website</a></p>'))
|
||||
|
||||
def on_action_debuglog(self):
|
||||
gui.DebugLogDialog(self)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue