about dialog
This commit is contained in:
50
aboutdialog.py
Normal file
50
aboutdialog.py
Normal file
@@ -0,0 +1,50 @@
|
||||
from PyQt6.QtCore import Qt
|
||||
from PyQt6.QtGui import QFont
|
||||
from PyQt6.QtWidgets import *
|
||||
|
||||
|
||||
class AboutDialog(QDialog):
|
||||
"""Dialog for showing info about TortoiseHg"""
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super(AboutDialog, self).__init__(parent)
|
||||
self.setWindowTitle(self.tr("About"))
|
||||
self.setModal(True)
|
||||
|
||||
self.layout = QVBoxLayout(self)
|
||||
heading_app_name = QLabel("RavenLog")
|
||||
heading_app_name.setFont(QFont("default", 25))
|
||||
self.layout.addWidget(heading_app_name)
|
||||
|
||||
tabs = QTabWidget()
|
||||
tabs.addTab(self._about(), self.tr("About"))
|
||||
tabs.addTab(self._license(), self.tr("License"))
|
||||
|
||||
self.layout.addWidget(tabs)
|
||||
|
||||
def _about(self) -> QWidget:
|
||||
result = QWidget()
|
||||
result.layout = QVBoxLayout(result)
|
||||
|
||||
download_url_lbl = QLabel()
|
||||
download_url_lbl.setMouseTracking(True)
|
||||
download_url_lbl.setAlignment(Qt.AlignmentFlag.AlignLeft)
|
||||
download_url_lbl.setTextInteractionFlags(Qt.TextInteractionFlag.LinksAccessibleByMouse)
|
||||
download_url_lbl.setOpenExternalLinks(True)
|
||||
download_url_lbl.setText('<a href=%s>%s</a>' %
|
||||
('https://opentext.com/',
|
||||
self.tr("License: GNU Lesser General Public License v3")))
|
||||
result.layout.addWidget(QLabel(self.tr("Log file viewer")))
|
||||
result.layout.addWidget(QLabel(self.tr("(c) 2021 Open Text Corporation")))
|
||||
result.layout.addWidget(QLabel(self.tr("Log file viewer")))
|
||||
result.layout.addWidget(download_url_lbl)
|
||||
return result
|
||||
|
||||
def _license(self) -> QWidget:
|
||||
result = QWidget()
|
||||
result.layout = QVBoxLayout(result)
|
||||
|
||||
result.layout.addWidget(QLabel(self.tr("* Qt 6.2.0 (LGPLv3)")))
|
||||
result.layout.addWidget(QLabel(self.tr("* watchdog 2.16 (Apache)")))
|
||||
|
||||
return result
|
||||
Reference in New Issue
Block a user