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
Commits
a4692df2
Commit
a4692df2
authored
5 years ago
by
morkolai
Browse files
Options
Downloads
Patches
Plain Diff
#21 Lagt til statusbar og forklaringer
parent
20b0b03d
No related branches found
Branches containing commit
No related tags found
1 merge request
!4
Keybindings og statusbar
Pipeline
#70954
failed
5 years ago
Stage: lint
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
soitool/main_window.py
+30
-7
30 additions, 7 deletions
soitool/main_window.py
with
30 additions
and
7 deletions
soitool/main_window.py
+
30
−
7
View file @
a4692df2
...
...
@@ -14,54 +14,77 @@ class MainWindow(QMainWindow):
super
().
__init__
()
self
.
setGeometry
(
100
,
100
,
800
,
800
)
self
.
setWindowTitle
(
"
SOI-tool
"
)
self
.
statusBar
()
# flytt ut til egen funksjon, for setup av menubar
menu
=
self
.
menuBar
()
file_menu
=
menu
.
addMenu
(
"
SOI
"
)
codebook
=
menu
.
addMenu
(
"
Kodebok
"
)
h
j
elp
=
menu
.
addMenu
(
"
Hjelp
"
)
help
_menu
=
menu
.
addMenu
(
"
Hjelp
"
)
# Hadde egentlig help her, men "klagegutten" klagde på det
# New SOI
new_SOI
=
QAction
(
"
Ny SOI
"
,
self
)
new_SOI
.
setShortcut
(
"
Ctrl+n
"
)
new_SOI
.
setStatusTip
(
"
Oprett en ny SOI
"
)
file_menu
.
addAction
(
new_SOI
)
# new_SOI.triggered.connect(self.<nySOI>)
# Open file
open_file
=
QAction
(
"
Åpne
"
,
self
)
open_file
.
setShortcut
(
"
Ctrl+o
"
)
open_file
.
setStatusTip
(
"
Åpne en SOI fra fil
"
)
file_menu
.
addAction
(
open_file
)
# Open file from DB
open_file_db
=
QAction
(
"
Åpne fra DB
"
,
self
)
open_file_db
.
setShortcut
(
"
Ctrl+d
"
)
open_file_db
.
setStatusTip
(
"
Åpne en SOI fra databasen
"
)
file_menu
.
addAction
(
open_file_db
)
# Preview SOI
preview_SOI
=
QAction
(
"
Forhåndsvis
"
)
preview_SOI
.
setShortcut
(
"
Ctrl+p
"
)
preview_SOI
.
setStatusTip
(
"
Forhåndsvis SOI som PDF
"
)
file_menu
.
addAction
(
preview_SOI
)
# Save to DB
save_SOI
=
QAction
(
"
Lagre i DB
"
,
self
)
save_SOI
.
setShortcut
(
"
Ctrl+s
"
)
save_SOI
.
setStatusTip
(
"
Lagre SOI i databasen
"
)
file_menu
.
addAction
(
save_SOI
)
# Export
export
=
QAction
(
"
Eksporter
"
,
self
)
export
.
setShortcut
(
"
Ctrl+e
"
)
export
.
setStatusTip
(
"
Eksporter SOI til annet filformat
"
)
file_menu
.
addAction
(
export
)
# New Module
new_module
=
QAction
(
"
Ny modul
"
,
self
)
new_module
.
setShortcut
(
"
Ctrl+m
"
)
codebook
.
addAction
(
"
Liten Kodebok
"
)
codebook
.
addAction
(
"
Stor Kodebok
"
)
hjelp
.
addAction
(
"
Hurtigtaster
"
)
hjelp
.
addAction
(
"
Enkel bruk
"
)
new_module
.
setStatusTip
(
"
Legg til en ny modul
"
)
# Small codebook
small_codebook
=
QAction
(
"
Liten kodebok
"
,
self
)
small_codebook
.
setStatusTip
(
"
Vi liten kodebok
"
)
codebook
.
addAction
(
small_codebook
)
# Big codebook
big_codebook
=
QAction
(
"
Stor kodebok
"
,
self
)
big_codebook
.
setStatusTip
(
"
Vis stor kodebok
"
)
codebook
.
addAction
(
big_codebook
)
# Hot keys
hotkeys
=
QAction
(
"
Hurtigtaster
"
,
self
)
hotkeys
.
setStatusTip
(
"
Vis oversikt over hurtigtaster
"
)
help_menu
.
addAction
(
hotkeys
)
# Easy use
easy_use
=
QAction
(
"
Enkel bruk
"
,
self
)
easy_use
.
setStatusTip
(
"
Vis enkel bruk av programvaren
"
)
help_menu
.
addAction
(
easy_use
)
# Legger til MainWidget som en tab, kanskje flytt ut til egen funksjon
tabs
=
QTabWidget
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment