Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
soitool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bachelor-paa-bittet
soitool
Merge requests
!47
#84 Hurtigtaster og enkelbruk dialoger
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
#84 Hurtigtaster og enkelbruk dialoger
help_button_dialog
into
master
Overview
4
Commits
6
Pipelines
6
Changes
3
All threads resolved!
Hide all comments
Merged
Petter Sagvold
requested to merge
help_button_dialog
into
master
5 years ago
Overview
4
Commits
6
Pipelines
6
Changes
3
All threads resolved!
Hide all comments
Expand
0
0
Merge request reports
Compare
master
version 5
211e2ecb
5 years ago
version 4
f5de1597
5 years ago
version 3
839b572b
5 years ago
version 2
3fe440ae
5 years ago
version 1
f9729890
5 years ago
master (base)
and
latest version
latest version
400cba02
6 commits,
5 years ago
version 5
211e2ecb
5 commits,
5 years ago
version 4
f5de1597
4 commits,
5 years ago
version 3
839b572b
3 commits,
5 years ago
version 2
3fe440ae
2 commits,
5 years ago
version 1
f9729890
1 commit,
5 years ago
3 files
+
121
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
soitool/help_actions.py
0 → 100644
+
94
−
0
Options
"""
Includes two help-popups.
Has two dialogs that appear when actions from help are triggered.
"""
from
PySide2.QtWidgets
import
(
QDialog
,
QLabel
,
QPushButton
,
QVBoxLayout
,
QHBoxLayout
,
QFormLayout
,
)
from
PySide2.QtCore
import
Qt
class
ShortcutsHelpDialog
(
QDialog
):
"""
The dialog for hotkeys.
This class contains the information for the shortcuts/hotkeys that
can be used in the application
"""
def
__init__
(
self
):
# pylint: disable = R0915
super
().
__init__
()
self
.
resize
(
300
,
300
)
self
.
setWindowFlag
(
Qt
.
WindowContextHelpButtonHint
,
False
)
self
.
layout
=
QVBoxLayout
()
self
.
layout_label
=
QFormLayout
()
self
.
layout_button
=
QHBoxLayout
()
self
.
button_ok
=
QPushButton
(
"
Ok
"
)
self
.
button_ok
.
clicked
.
connect
(
self
.
close
)
self
.
layout_label
.
addRow
(
QLabel
(
"
Opprett en ny SOI:
"
),
QLabel
(
"
Ctrl + N
"
)
)
self
.
layout_label
.
addRow
(
QLabel
(
"
Åpne SOI fra fil:
"
),
QLabel
(
"
Ctrl + O
"
)
)
self
.
layout_label
.
addRow
(
QLabel
(
"
Åpne SOI fra database:
"
),
QLabel
(
"
Ctrl + D
"
)
)
self
.
layout_label
.
addRow
(
QLabel
(
"
Forhåndsvis SOI:
"
),
QLabel
(
"
Ctrl + P
"
)
)
self
.
layout_label
.
addRow
(
QLabel
(
"
Lagre i database:
"
),
QLabel
(
"
Ctrl + S
"
)
)
self
.
layout_label
.
addRow
(
QLabel
(
"
Eksporter komprimert SOI:
"
),
QLabel
(
"
Ctrl + E
"
)
)
self
.
layout_label
.
addRow
(
QLabel
(
"
Legg til ny modul:
"
),
QLabel
(
"
Ctrl + M
"
)
)
self
.
layout_label
.
addRow
(
QLabel
(
"
Endre oppsett SOI:
"
),
QLabel
(
"
Ctrl + I
"
)
)
self
.
layout_button
.
addWidget
(
self
.
button_ok
,
alignment
=
Qt
.
AlignRight
)
self
.
layout
.
addLayout
(
self
.
layout_label
)
self
.
layout
.
addLayout
(
self
.
layout_button
)
self
.
setLayout
(
self
.
layout
)
class
BasicUsageHelpDialog
(
QDialog
):
"""
The dialog for easy use.
This class contains text that explains the user how to use the application.
"""
def
__init__
(
self
):
# pylint: disable = R0915
super
().
__init__
()
self
.
resize
(
300
,
300
)
self
.
setWindowFlag
(
Qt
.
WindowContextHelpButtonHint
,
False
)
self
.
text
=
QLabel
(
"""
Her skal det være mye tekst og bilder om hvordan
applikasjonen brukes
"""
)
self
.
layout
=
QVBoxLayout
()
self
.
layout_text
=
QVBoxLayout
()
self
.
layout_button
=
QHBoxLayout
()
self
.
button_ok
=
QPushButton
(
"
Ok
"
)
self
.
button_ok
.
clicked
.
connect
(
self
.
close
)
self
.
layout_text
.
addWidget
(
self
.
text
)
self
.
layout_button
.
addWidget
(
self
.
button_ok
,
alignment
=
Qt
.
AlignRight
)
self
.
layout
.
addLayout
(
self
.
layout_text
)
self
.
layout
.
addLayout
(
self
.
layout_button
)
self
.
setLayout
(
self
.
layout
)
Loading