Compare commits

...

37 Commits

Author SHA1 Message Date
Martin Kudlacek
07844a1dd3 Pushing to version 1.2 2025-12-08 14:05:45 +01:00
Martin Kudlacek
890b8a9ea0 Merge branch 'dev' 2025-12-08 14:04:30 +01:00
Martin Kudlacek
2e9c246b40 Fixed validation of float input
Some checks failed
Build Detektor binarie / build_macos (push) Has been cancelled
2025-12-08 14:04:11 +01:00
Martin Kudlacek
59ffe8e2a0 WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 45s
2025-11-14 12:56:46 +01:00
Martin Kudlacek
1d2227e06b WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 39s
2025-11-14 12:53:50 +01:00
Martin Kudlacek
9bd4efca5f WIP
All checks were successful
Build Detektor binarie / build_macos (push) Successful in 41s
2025-11-14 12:50:48 +01:00
Martin Kudlacek
53f92991ce WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 58s
2025-11-14 12:44:23 +01:00
Martin Kudlacek
f983266bb8 WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 10s
2025-11-14 12:42:59 +01:00
Martin Kudlacek
cbed8274b6 WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 12s
2025-11-14 12:35:05 +01:00
Martin Kudlacek
4598b04e6f WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 12s
2025-11-14 12:28:10 +01:00
Martin Kudlacek
afa96cc9c6 WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 1m19s
2025-11-14 12:24:34 +01:00
Martin Kudlacek
e4ed02519c WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 1m0s
2025-11-14 12:21:51 +01:00
Martin Kudlacek
d3e0c540ab WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 47s
2025-11-14 12:19:10 +01:00
Martin Kudlacek
966bc9e868 WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 44s
2025-11-14 12:16:09 +01:00
Martin Kudlacek
3dccbad5e6 WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 13s
2025-11-14 12:15:29 +01:00
Martin Kudlacek
f3b75c05fa WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 2s
2025-11-14 12:14:46 +01:00
Martin Kudlacek
a0221fa9d8 WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 10s
2025-11-14 12:14:03 +01:00
Martin Kudlacek
9826635a80 WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 45s
2025-11-14 11:57:02 +01:00
Martin Kudlacek
f67e647581 WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 33s
2025-11-14 11:55:45 +01:00
Martin Kudlacek
51d801a1d1 WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 3s
2025-11-14 11:52:30 +01:00
Martin Kudlacek
836320899d WIP
Some checks failed
Build Detektor binarie / build_macos (push) Has been cancelled
2025-11-14 11:51:43 +01:00
Martin Kudlacek
796c5a072f WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 58s
2025-11-14 11:33:32 +01:00
Martin Kudlacek
d53f59f44f WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 8s
2025-11-14 11:17:17 +01:00
Martin Kudlacek
515bc06071 WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 8s
2025-11-14 11:15:26 +01:00
Martin Kudlacek
4327549833 WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 59s
2025-11-14 11:13:16 +01:00
Martin Kudlacek
a88a3316ce WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 3s
2025-11-14 11:08:19 +01:00
Martin Kudlacek
e8daed091a WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 2s
2025-11-14 11:07:27 +01:00
Martin Kudlacek
b3a7e07b0c WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 1s
2025-11-14 11:05:16 +01:00
Martin Kudlacek
be3d5eb83c WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 1s
2025-11-14 11:04:52 +01:00
Martin Kudlacek
824d3818fa WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 1s
2025-11-14 11:04:24 +01:00
Martin Kudlacek
989062e5c3 WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 6s
2025-11-14 11:03:38 +01:00
Martin Kudlacek
14ac2dc17c WIP 2025-11-14 11:02:52 +01:00
Martin Kudlacek
2de7c32731 WIP
Some checks failed
Build Detektor binarie / build_macos (push) Failing after 1s
2025-11-14 11:01:19 +01:00
Martin Kudlacek
328948eb7c WIP 2025-11-14 11:00:04 +01:00
Martin Kudlacek
2cca6b3107 WIP
All checks were successful
Build Detektor binarie / build_macos (push) Successful in 1s
2025-11-14 10:52:01 +01:00
Martin Kudlacek
e47bedb902 WIP
All checks were successful
Build Detektor binarie / build_macos (push) Successful in 1s
2025-11-14 10:51:21 +01:00
Martin Kudlacek
b5243ce205 WIP
All checks were successful
Build Detektor binarie / build_macos (push) Successful in 2s
2025-11-14 10:48:07 +01:00
5 changed files with 87 additions and 10 deletions

View File

@@ -0,0 +1,30 @@
name: Build Detektor binarie
on:
push:
branches: [ dev ]
jobs:
build_macos:
runs-on: macos
# alpine doesn't have prebuilt wheels
container: python:3.13-slim
steps:
- name: Checkout
run: |
apt update -y
apt install -y --no-install-recommends git
git clone ${{ gitea.server_url }}/${{ gitea.repository }} .
git checkout ${{ gitea.ref_name }}
- name: Install deps
run: |
python -m venv venv
. venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
pip list
- name: Build binary
run: python -m PyInstaller build-config/macos_build.spec

2
README.md Normal file
View File

@@ -0,0 +1,2 @@
# Detektor
bla bla bla

View File

@@ -1,4 +1,4 @@
PyQt6==6.8.0
PyQt6==6.8.*
pyinstaller==6.11.1
wheel==0.45.1
pyqtgraph==0.13.7
@@ -7,4 +7,4 @@ dbfread==2.0.7
openpyxl==3.1.5
xlsxwriter==3.2.2
PyOpenGL==3.1.9
PyOpenGL_accelerate==3.1.9
#PyOpenGL_accelerate==3.1.9

View File

@@ -71,8 +71,9 @@ class ChannelCalibrationDialog(QDialog):
channel_layout.addWidget(RoundedColorRectangleWidget(ch.color))
from PyQt6.QtCore import QLocale
float_validator = CustomDoubleValidator()
# float_validator.setLocale("C")
float_validator.setLocale(QLocale(QLocale.Language.C))
# Přičíst input
add_layout = QVBoxLayout()
@@ -138,8 +139,15 @@ class ChannelCalibrationDialog(QDialog):
# get the current channel object of the current (duplicated dataset)
channel = DetektorContainer().get().get_channel_by_uuid(channel_id)
offset = float(self.add_input.text())
multiple = float(self.multiply_input.text())
try:
# validate inputs
offset = float(self.add_input.text().replace(',', '.'))
multiple = float(self.multiply_input.text().replace(',', '.'))
except ValueError:
WrongDataDialog()
return
logging.debug(f'Calibrating channel {channel.name} +{offset} x{multiple}')
if self._only_region:
@@ -178,12 +186,37 @@ class MissingChannelDialog(QDialog):
self.setWindowTitle("Vyberte kanál")
self.setModal(True) # Set the dialog as modal (blocks main window)
self.resize(300, 150)
self.resize(400, 75)
# Main layout
main_layout = QVBoxLayout()
self.setLayout(main_layout)
main_layout.addWidget(QLabel("Vyberte kanál, na kterém chcete provést kalibraci"))
label = QLabel("Vyberte kanál, na kterém chcete provést kalibraci")
label.setAlignment(Qt.AlignmentFlag.AlignCenter)
main_layout.addWidget(label)
cancel_button = QPushButton("OK")
cancel_button.clicked.connect(self.close)
main_layout.addWidget(cancel_button)
# Show the dialog
self.exec()
class WrongDataDialog(QDialog):
def __init__(self):
super().__init__()
self.setWindowTitle("Špatná data")
self.setModal(True) # Set the dialog as modal (blocks main window)
self.resize(400, 75)
# Main layout
main_layout = QVBoxLayout()
self.setLayout(main_layout)
label = QLabel("Zadaná data nejsou platná čísla.")
label.setAlignment(Qt.AlignmentFlag.AlignCenter)
main_layout.addWidget(label)
cancel_button = QPushButton("OK")
cancel_button.clicked.connect(self.close)
@@ -193,6 +226,18 @@ class MissingChannelDialog(QDialog):
self.exec()
class CustomDoubleValidator(QDoubleValidator):
def validate(self, input_str, pos):
input_str = input_str.replace(',', '.') # Replace ',' with '.'
return super().validate(input_str, pos)
# Accept both comma and dot as decimal separator for validation
if ',' in input_str:
# Allow comma as intermediate state so user can type it
test_str = input_str.replace(',', '.')
state, _, _ = super().validate(test_str, pos)
if state == QDoubleValidator.State.Acceptable:
return (QDoubleValidator.State.Intermediate, input_str, pos)
return (QDoubleValidator.State.Intermediate, input_str, pos)
return super().validate(input_str, pos)
def fixup(self, input_str):
# Actually replace comma with dot in the QLineEdit
return input_str.replace(',', '.')

View File

@@ -1,5 +1,5 @@
APP_NAME='Detektor'
APP_VERSION='1.1'
APP_VERSION='1.2'
# Names used by generate_data()
# no importance when opening file