Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B-ASIC - Better ASIC Toolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computer Engineering
B-ASIC - Better ASIC Toolbox
Merge requests
!182
About window
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
About window
about_window
into
master
Overview
0
Commits
4
Pipelines
2
Changes
1
Merged
Petter Källström
requested to merge
about_window
into
master
2 years ago
Overview
0
Commits
4
Pipelines
2
Changes
1
Expand
0
0
Merge request reports
Viewing commit
dc7d216b
Prev
Next
Show latest version
1 file
+
64
−
21
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
dc7d216b
Changed layout. Still need to solve e.g. Version
· dc7d216b
Petter Källström
authored
2 years ago
b_asic/GUI/about_window.py
+
64
−
21
Options
import
sys
# ONLY FOR DEBUG
from
qtpy.QtCore
import
Qt
from
qtpy.QtGui
import
QPixmap
from
qtpy.QtWidgets
import
QApplication
# ONLY FOR DEBUG
from
qtpy.QtWidgets
import
(
QDialog
,
QFrame
,
QHBoxLayout
,
QLabel
,
QPushButton
,
QScrollArea
,
QVBoxLayout
,
)
@@ -120,34 +125,58 @@ class AboutWindow(QDialog):
self
.
add_information_to_layout
()
def
add_information_to_layout
(
self
):
information_layout
=
QVBoxLayout
()
title_label
=
QLabel
(
"
B-ASIC / Better ASIC Toolbox
"
)
subtitle_label
=
QLabel
(
"
Construct, simulate and analyze components of an ASIC.
"
# |1 Title |2 |
# | License | Logo | <- layout12
# | Version | |
# ----------------------
# |3 links |4 OK | <- layout34
version_str
=
"
Magic
"
label1
=
QLabel
(
"
# B-ASIC / Better ASIC Toolbox
\n
*Construct, simulate and analyze
"
"
components of an ASIC.*
\n\n
B-ASIC is an open source tool using
"
"
the B-ASIC library to construct, simulate and analyze
"
"
ASICs.
\n\n
B-ASIC is developed under the MIT-license and any
"
"
extension to the program should follow that same license.
\n\n
To
"
"
read more about how the GUI works please refer to the FAQ under
"
f
"
'
Help
'
.
\n\n
*Version:
{
version_str
}
*
"
)
label1
.
setTextFormat
(
Qt
.
MarkdownText
)
label1
.
setWordWrap
(
True
)
frame
=
QFrame
()
frame
.
setFrameShape
(
QFrame
.
HLine
)
frame
.
setFrameShadow
(
QFrame
.
Sunken
)
self
.
dialog_layout
.
addWidget
(
frame
)
self
.
logo2
=
QLabel
(
self
)
self
.
logo2
.
setPixmap
(
QPixmap
(
"
../../small_logo.png
"
).
scaledToWidth
(
100
)
)
self
.
logo2
.
setFixedWidth
(
100
)
about_label
=
QLabel
(
"
B-ASIC is an open source tool using the B-ASIC library to
"
"
construct, simulate and analyze ASICs.
\n
"
"
B-ASIC is developed under the MIT-license and any extension to
"
"
the program should follow that same license.
\n
"
"
To read more about how the GUI works please refer to the FAQ
"
"
under
'
Help
'
.
"
label3
=
QLabel
(
"""
See our <a href=
"
https://gitlab.liu.se/da/B-ASIC/
"
>git page</a>
"""
)
label3
.
setOpenExternalLinks
(
True
)
information_layout
.
addWidget
(
title_label
)
information_layout
.
addWidget
(
subtitle_label
)
button4
=
QPushButton
()
button4
.
setText
(
"
OK
"
)
button4
.
setFixedWidth
(
80
)
button4
.
clicked
.
connect
(
self
.
close
)
self
.
dialog_layout
.
addLayout
(
information_layout
)
self
.
dialog_layout
.
addWidget
(
frame
)
layout12
=
QHBoxLayout
()
layout34
=
QHBoxLayout
()
layout12
.
addWidget
(
label1
)
layout12
.
addWidget
(
self
.
logo2
)
self
.
dialog_layout
.
addWidget
(
about_label
)
layout34
.
addWidget
(
label3
)
layout34
.
addWidget
(
button4
)
hline
=
QFrame
()
hline
.
setFrameShape
(
QFrame
.
HLine
)
hline
.
setFrameShadow
(
QFrame
.
Sunken
)
self
.
dialog_layout
.
addLayout
(
layout12
)
self
.
dialog_layout
.
addWidget
(
hline
)
self
.
dialog_layout
.
addLayout
(
layout34
)
class
FaqWindow
(
QDialog
):
@@ -183,3 +212,17 @@ class FaqWindow(QDialog):
question_layout
.
addLayout
(
answer_layout
)
self
.
dialog_layout
.
addLayout
(
question_layout
)
# ONLY FOR DEBUG below
def
start_about_window
():
app
=
QApplication
(
sys
.
argv
)
window
=
AboutWindow
(
QDialog
)
window
.
show
()
sys
.
exit
(
app
.
exec_
())
if
__name__
==
"
__main__
"
:
start_about_window
()
Loading