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
b1aba303
Commit
b1aba303
authored
4 years ago
by
Anders H. Rebner
Browse files
Options
Downloads
Patches
Plain Diff
Flyttet HEADLINE_FONT til module_base
parent
9883d442
No related branches found
Branches containing commit
No related tags found
1 merge request
!50
#86 Modul: Autentiseringstavle
Pipeline
#77878
passed
4 years ago
Stage: lint
Stage: test
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
soitool/modules/module_authentification_board.py
+1
-4
1 addition, 4 deletions
soitool/modules/module_authentification_board.py
soitool/modules/module_base.py
+7
-0
7 additions, 0 deletions
soitool/modules/module_base.py
soitool/modules/module_table.py
+2
-6
2 additions, 6 deletions
soitool/modules/module_table.py
with
10 additions
and
10 deletions
soitool/modules/module_authentification_board.py
+
1
−
4
View file @
b1aba303
...
...
@@ -8,6 +8,7 @@ from soitool.modules.module_base import (
ModuleBase
,
get_table_size
,
resize_table
,
HEADLINE_FONT
,
)
START_NO_OF_AUTHENTICATION_CODES
=
10
...
...
@@ -20,10 +21,6 @@ SEPARATE_INTERVAL = 5 # Adds space between sets of characters, 0 => no spaces
# If code is 1234567 and interval is 2, code will be 123 45 67
HEADLINE_TEXT
=
"
Autentifiseringstavle
"
HEADLINE_FONT
=
QtGui
.
QFont
()
HEADLINE_FONT
.
setFamily
(
"
Arial
"
)
HEADLINE_FONT
.
setPointSize
(
12
)
HEADLINE_FONT
.
setWeight
(
100
)
class
Meta
(
type
(
ModuleBase
),
type
(
QTableWidget
)):
...
...
This diff is collapsed.
Click to expand it.
soitool/modules/module_base.py
+
7
−
0
View file @
b1aba303
"""
Base/interface of each module.
"""
from
abc
import
ABC
from
PySide2
import
QtGui
# Font for module headline
HEADLINE_FONT
=
QtGui
.
QFont
()
HEADLINE_FONT
.
setFamily
(
"
Arial
"
)
HEADLINE_FONT
.
setPointSize
(
12
)
HEADLINE_FONT
.
setWeight
(
100
)
class
ModuleBase
(
ABC
):
...
...
This diff is collapsed.
Click to expand it.
soitool/modules/module_table.py
+
2
−
6
View file @
b1aba303
...
...
@@ -5,13 +5,9 @@ from soitool.modules.module_base import (
ModuleBase
,
resize_table
,
get_table_size
,
HEADLINE_FONT
,
)
HEADER_FONT
=
QtGui
.
QFont
()
HEADER_FONT
.
setFamily
(
"
Arial
"
)
HEADER_FONT
.
setPointSize
(
12
)
HEADER_FONT
.
setWeight
(
100
)
START_ROWS
=
2
START_COLUMNS
=
2
...
...
@@ -126,7 +122,7 @@ class TableModule(ModuleBase, QTableWidget, metaclass=Meta):
"""
item
=
QTableWidgetItem
(
text
)
item
.
setBackground
(
QtGui
.
QBrush
(
QtGui
.
QColor
(
220
,
220
,
220
)))
item
.
setFont
(
HEADE
R
_FONT
)
item
.
setFont
(
HEAD
LIN
E_FONT
)
self
.
setItem
(
0
,
column
,
item
)
def
add_column
(
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