Skip to content
Snippets Groups Projects
Commit b1aba303 authored by Anders H. Rebner's avatar Anders H. Rebner
Browse files

Flyttet HEADLINE_FONT til module_base

parent 9883d442
No related branches found
No related tags found
1 merge request!50#86 Modul: Autentiseringstavle
Pipeline #77878 passed
......@@ -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)):
......
"""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):
......
......@@ -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(HEADER_FONT)
item.setFont(HEADLINE_FONT)
self.setItem(0, column, item)
def add_column(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment