Skip to content

Commit 72df413

Browse files
committed
enh: program_ID in tsv
1 parent 1f01b18 commit 72df413

3 files changed

Lines changed: 15 additions & 7 deletions

File tree

docs/output_format.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ Columns
5757
* - ``electrode_model``
5858
- string
5959
- Name of the electrode model selected (e.g. ``SenSight B33015``).
60-
* - ``group_ID``
60+
* - ``program_ID``
6161
- string
62-
- Stimulation group label (e.g. ``A``, ``B``).
62+
- Stimulation program label (e.g. ``A``, ``B``, ``None``).
6363
* - ``scale_name``
6464
- string
6565
- Name of the clinical scale recorded in this row (may be empty if

src/clinical_dbs_annotator/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@
6060
"time",
6161
"timezone",
6262
"block_id",
63-
"program_ID",
6463
"session_ID",
6564
"is_initial",
6665
"scale_name",
6766
"scale_value",
6867
"electrode_model",
68+
"program_ID",
6969
"left_stim_freq",
7070
"left_anode",
7171
"left_cathode",

src/clinical_dbs_annotator/views/step3_view.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"""
77

88
from PySide6.QtCore import Qt
9-
from PySide6.QtGui import QDoubleValidator, QIcon, QIntValidator
9+
from PySide6.QtGui import QDoubleValidator, QIcon, QIntValidator, QPixmap
1010
from PySide6.QtWidgets import (
1111
QComboBox,
1212
QDialog,
@@ -93,15 +93,23 @@ def get_header_title(self) -> str:
9393

9494
def _create_settings_icon(self) -> QIcon:
9595
"""Create an SVG gear icon coloured to match the current theme."""
96-
# Get theme-appropriate icon color
97-
fill_color = "#f59e0b" # Default amber color for dark theme
96+
# Get theme-appropriate icon color from theme definitions
97+
fill_color = self._get_theme_icon_color()
9898

9999
svg = f"""
100100
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
101101
<path d="M12 15.5A3.5 3.5 0 0 1 8.5 12A3.5 3.5 0 0 1 12 8.5a3.5 3.5 0 0 1 3.5 3.5a3.5 3.5 0 0 1-3.5 3.5m7.43-2.53c.04-.32.07-.64.07-.97c0-.33-.03-.66-.07-1l2.11-1.63c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.39-1.06-.73-1.69-.98l-.37-2.65A.506.506 0 0 0 14 2h-4c-.25 0-.46.18-.5.42l-.37 2.65c-.63.25-1.17.59-1.69.98l-2.49-1c-.22-.08-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64L4.57 11c-.04.34-.07.67-.07 1c0 .33.03.65.07.97l-2.11 1.66c-.19.15-.25.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1.01c.52.4 1.06.74 1.69.99l.37 2.65c.04.24.25.42.5.42h4c.25 0 .46-.18.5-.42l.37-2.65c.63-.26 1.17-.59 1.69-.99l2.49 1.01c.22.08.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.66Z" fill="{fill_color}"/>
102102
</svg>
103103
"""
104-
return QIcon(svg)
104+
pixmap = QPixmap()
105+
pixmap.loadFromData(bytes(svg, encoding="utf-8"), "SVG")
106+
return QIcon(pixmap)
107+
108+
def _get_theme_icon_color(self) -> str:
109+
"""Get icon color from QSS theme file (Icon: #xxxxxx in Base Colors comment)."""
110+
from ..utils.theme_manager import get_theme_manager
111+
112+
return get_theme_manager().get_theme_color("Icon")
105113

106114
def _setup_ui(self) -> None:
107115
"""Set up the UI layout."""

0 commit comments

Comments
 (0)