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
69a77b19
Commit
69a77b19
authored
5 years ago
by
morkolai
Browse files
Options
Downloads
Patches
Plain Diff
#20,21 Fikset linting
parent
a4692df2
No related branches found
No related tags found
1 merge request
!4
Keybindings og statusbar
Pipeline
#70960
passed
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
+16
-17
16 additions, 17 deletions
soitool/main_window.py
with
16 additions
and
17 deletions
soitool/main_window.py
+
16
−
17
View file @
69a77b19
...
@@ -2,15 +2,15 @@
...
@@ -2,15 +2,15 @@
import
sys
import
sys
import
os
import
os
from
PySide2.QtWidgets
import
QTabWidget
,
QWidget
,
QMainWindow
,
\
from
PySide2.QtWidgets
import
QTabWidget
,
QWidget
,
QMainWindow
,
\
QApplication
,
QHBoxLayout
,
QVBoxLayout
,
QPushButton
,
QTreeWidget
,
\
QApplication
,
QHBoxLayout
,
QVBoxLayout
,
QPushButton
,
QTreeWidget
,
\
QLabel
,
QAction
QLabel
,
QAction
from
PySide2
import
QtGui
from
PySide2
import
QtGui
class
MainWindow
(
QMainWindow
):
class
MainWindow
(
QMainWindow
):
"""
MainWindow, skallet til hele applikasjonen.
"""
"""
MainWindow, skallet til hele applikasjonen.
"""
def
__init__
(
self
):
def
__init__
(
self
):
# pylint: disable = R0914, R0915
super
().
__init__
()
super
().
__init__
()
self
.
setGeometry
(
100
,
100
,
800
,
800
)
self
.
setGeometry
(
100
,
100
,
800
,
800
)
self
.
setWindowTitle
(
"
SOI-tool
"
)
self
.
setWindowTitle
(
"
SOI-tool
"
)
...
@@ -24,12 +24,11 @@ class MainWindow(QMainWindow):
...
@@ -24,12 +24,11 @@ class MainWindow(QMainWindow):
# Hadde egentlig help her, men "klagegutten" klagde på det
# Hadde egentlig help her, men "klagegutten" klagde på det
# New SOI
# New SOI
new_SOI
=
QAction
(
"
Ny SOI
"
,
self
)
new_soi
=
QAction
(
"
Ny SOI
"
,
self
)
new_SOI
.
setShortcut
(
"
Ctrl+n
"
)
new_soi
.
setShortcut
(
"
Ctrl+n
"
)
new_SOI
.
setStatusTip
(
"
Oprett en ny SOI
"
)
new_soi
.
setStatusTip
(
"
Oprett en ny SOI
"
)
file_menu
.
addAction
(
new_SOI
)
file_menu
.
addAction
(
new_soi
)
# new_soi.triggered.connect(self.<nySOI>)
# new_SOI.triggered.connect(self.<nySOI>)
# Open file
# Open file
open_file
=
QAction
(
"
Åpne
"
,
self
)
open_file
=
QAction
(
"
Åpne
"
,
self
)
...
@@ -44,16 +43,16 @@ class MainWindow(QMainWindow):
...
@@ -44,16 +43,16 @@ class MainWindow(QMainWindow):
file_menu
.
addAction
(
open_file_db
)
file_menu
.
addAction
(
open_file_db
)
# Preview SOI
# Preview SOI
preview_
SOI
=
QAction
(
"
Forhåndsvis
"
)
preview_
soi
=
QAction
(
"
Forhåndsvis
"
)
preview_
SOI
.
setShortcut
(
"
Ctrl+p
"
)
preview_
soi
.
setShortcut
(
"
Ctrl+p
"
)
preview_
SOI
.
setStatusTip
(
"
Forhåndsvis SOI som PDF
"
)
preview_
soi
.
setStatusTip
(
"
Forhåndsvis SOI som PDF
"
)
file_menu
.
addAction
(
preview_
SOI
)
file_menu
.
addAction
(
preview_
soi
)
# Save to DB
# Save to DB
save_
SOI
=
QAction
(
"
Lagre i DB
"
,
self
)
save_
soi
=
QAction
(
"
Lagre i DB
"
,
self
)
save_
SOI
.
setShortcut
(
"
Ctrl+s
"
)
save_
soi
.
setShortcut
(
"
Ctrl+s
"
)
save_
SOI
.
setStatusTip
(
"
Lagre SOI i databasen
"
)
save_
soi
.
setStatusTip
(
"
Lagre SOI i databasen
"
)
file_menu
.
addAction
(
save_
SOI
)
file_menu
.
addAction
(
save_
soi
)
# Export
# Export
export
=
QAction
(
"
Eksporter
"
,
self
)
export
=
QAction
(
"
Eksporter
"
,
self
)
...
...
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