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
c208dfc1
Commit
c208dfc1
authored
5 years ago
by
Anders H. Rebner
Browse files
Options
Downloads
Patches
Plain Diff
#95 PredefinedCodesSetup arver fra AcceptRejectDialog
parent
2ce02336
No related branches found
No related tags found
1 merge request
!74
#95 Forhåndsavtalte koder
Pipeline
#83393
passed
5 years ago
Stage: lint
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
soitool/modules/module_predefined_codes.py
+6
-15
6 additions, 15 deletions
soitool/modules/module_predefined_codes.py
with
6 additions
and
15 deletions
soitool/modules/module_predefined_codes.py
+
6
−
15
View file @
c208dfc1
...
@@ -14,12 +14,12 @@ from PySide2.QtWidgets import (
...
@@ -14,12 +14,12 @@ from PySide2.QtWidgets import (
QListWidgetItem
,
QListWidgetItem
,
QAbstractItemView
,
QAbstractItemView
,
QFormLayout
,
QFormLayout
,
QPushButton
,
QSpinBox
,
QSpinBox
,
)
)
from
PySide2
import
QtGui
from
PySide2
import
QtGui
from
PySide2.QtCore
import
Qt
from
PySide2.QtCore
import
Qt
from
soitool.modules.module_base
import
ModuleBase
,
HEADLINE_FONT
,
resize_table
from
soitool.modules.module_base
import
ModuleBase
,
HEADLINE_FONT
,
resize_table
from
soitool.accept_reject_dialog
import
AcceptRejectDialog
ALPHABET
=
string
.
ascii_uppercase
ALPHABET
=
string
.
ascii_uppercase
HEADLINE
=
"
FORHÅNDSAVTALTE KODER
"
HEADLINE
=
"
FORHÅNDSAVTALTE KODER
"
...
@@ -406,7 +406,7 @@ class PredefinedCodesModule(ModuleBase, QWidget, metaclass=Meta):
...
@@ -406,7 +406,7 @@ class PredefinedCodesModule(ModuleBase, QWidget, metaclass=Meta):
# Modify dialog
# Modify dialog
dialog
.
edit_column_height
.
setMinimum
(
self
.
minimum_column_height
)
dialog
.
edit_column_height
.
setMinimum
(
self
.
minimum_column_height
)
dialog
.
edit_column_height
.
setValue
(
self
.
maximum_column_height
)
dialog
.
edit_column_height
.
setValue
(
self
.
maximum_column_height
)
dialog
.
button_
create
.
setText
(
"
Oppdater
"
)
dialog
.
button_
ok
.
setText
(
"
Oppdater
"
)
dialog
.
button_cancel
.
show
()
dialog
.
button_cancel
.
show
()
dialog_code
=
dialog
.
exec_
()
dialog_code
=
dialog
.
exec_
()
...
@@ -508,7 +508,7 @@ class PredefinedCodesTable(QTableWidget):
...
@@ -508,7 +508,7 @@ class PredefinedCodesTable(QTableWidget):
self
.
setItem
(
i
,
0
,
item_code
)
self
.
setItem
(
i
,
0
,
item_code
)
class
PredefinedCodesSettings
(
Q
Dialog
):
class
PredefinedCodesSettings
(
AcceptReject
Dialog
):
"""
Dialog for setup and adjustment of PredefinedCodesModule.
"""
Dialog for setup and adjustment of PredefinedCodesModule.
Parameters
Parameters
...
@@ -569,11 +569,8 @@ class PredefinedCodesSettings(QDialog):
...
@@ -569,11 +569,8 @@ class PredefinedCodesSettings(QDialog):
item
.
setFlags
(
item
.
flags
()
^
Qt
.
ItemIsEditable
)
item
.
setFlags
(
item
.
flags
()
^
Qt
.
ItemIsEditable
)
self
.
list_category_order
.
insertItem
(
i
,
item
)
self
.
list_category_order
.
insertItem
(
i
,
item
)
# Buttons for accept and reject
self
.
button_ok
.
setText
(
"
Opprett
"
)
self
.
button_create
=
QPushButton
(
"
Opprett
"
)
self
.
button_create
.
clicked
.
connect
(
self
.
accept
)
self
.
button_cancel
=
QPushButton
(
"
Avbryt
"
)
self
.
button_cancel
.
clicked
.
connect
(
self
.
reject
)
# Hide cancel-button, it is only used when modifying an existing
# Hide cancel-button, it is only used when modifying an existing
# PredefinedCodesModule
# PredefinedCodesModule
self
.
button_cancel
.
hide
()
self
.
button_cancel
.
hide
()
...
@@ -597,14 +594,8 @@ class PredefinedCodesSettings(QDialog):
...
@@ -597,14 +594,8 @@ class PredefinedCodesSettings(QDialog):
self
.
label_category_order
,
self
.
list_category_order
self
.
label_category_order
,
self
.
list_category_order
)
)
# Layout for buttons
self
.
button_layout
=
QHBoxLayout
()
self
.
button_layout
.
addWidget
(
self
.
button_create
)
self
.
button_layout
.
addWidget
(
self
.
button_cancel
)
# Main layout
# Main layout
self
.
main_layout
=
QVBoxLayout
()
self
.
main_layout
=
QVBoxLayout
()
self
.
main_layout
.
addLayout
(
self
.
form_layout
)
self
.
main_layout
.
addLayout
(
self
.
form_layout
)
self
.
main_layout
.
addLayout
(
self
.
button_layout
)
self
.
set
Layout
(
self
.
main_layout
)
self
.
layout_content
.
add
Layout
(
self
.
main_layout
)
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