ge150-linux 0.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ge150/__init__.py +6 -0
- ge150/__main__.py +7 -0
- ge150/cli.py +257 -0
- ge150/cli_ai.py +71 -0
- ge150/cli_edit.py +457 -0
- ge150/cli_hw.py +66 -0
- ge150/cli_settings.py +120 -0
- ge150/cli_t3k.py +104 -0
- ge150/data/__init__.py +0 -0
- ge150/data/chevron-down.svg +1 -0
- ge150/data/effects.json +195 -0
- ge150/data/ge150.svg +22 -0
- ge150/data/gear.json +147 -0
- ge150/formats/__init__.py +1 -0
- ge150/formats/amp_nr.py +70 -0
- ge150/formats/mbf.py +185 -0
- ge150/formats/mo_json.py +157 -0
- ge150/formats/wav_ir.py +160 -0
- ge150/mcp_server/__init__.py +1 -0
- ge150/mcp_server/bridge.py +187 -0
- ge150/mcp_server/install.py +40 -0
- ge150/mcp_server/server.py +245 -0
- ge150/mcp_server/tools.py +494 -0
- ge150/model/__init__.py +1 -0
- ge150/model/catalog.py +118 -0
- ge150/model/device_state.py +214 -0
- ge150/model/gear.py +107 -0
- ge150/model/preset.py +158 -0
- ge150/model/settings.py +145 -0
- ge150/protocol/__init__.py +1 -0
- ge150/protocol/crc.py +28 -0
- ge150/protocol/framing.py +154 -0
- ge150/protocol/messages.py +262 -0
- ge150/protocol/opcodes.py +121 -0
- ge150/protocol/session.py +323 -0
- ge150/services/__init__.py +1 -0
- ge150/services/ai_permissions.py +76 -0
- ge150/services/auto_backup.py +63 -0
- ge150/services/backup.py +111 -0
- ge150/services/bulk_edit.py +276 -0
- ge150/services/chat_history.py +147 -0
- ge150/services/editor.py +303 -0
- ge150/services/guitars.py +255 -0
- ge150/services/hw_check.py +329 -0
- ge150/services/reader.py +126 -0
- ge150/services/tone3000.py +474 -0
- ge150/services/tone_agent.py +246 -0
- ge150/services/tone_ai.py +467 -0
- ge150/sim/__init__.py +1 -0
- ge150/sim/fake_device.py +250 -0
- ge150/sim/sim_transport.py +63 -0
- ge150/ui/__init__.py +1 -0
- ge150/ui/ab_compare.py +105 -0
- ge150/ui/about_dialog.py +246 -0
- ge150/ui/ai_chat.py +682 -0
- ge150/ui/ai_host.py +104 -0
- ge150/ui/ai_options.py +136 -0
- ge150/ui/ai_panel.py +23 -0
- ge150/ui/ai_permissions_dialog.py +161 -0
- ge150/ui/amp_art.py +549 -0
- ge150/ui/app.py +76 -0
- ge150/ui/art_spec.py +298 -0
- ge150/ui/assistant_page.py +360 -0
- ge150/ui/bridge.py +34 -0
- ge150/ui/bulk_form.py +416 -0
- ge150/ui/bulk_review.py +352 -0
- ge150/ui/chain_view.py +474 -0
- ge150/ui/chat_history.py +222 -0
- ge150/ui/dialogs.py +221 -0
- ge150/ui/gear_art.py +515 -0
- ge150/ui/gear_view.py +134 -0
- ge150/ui/guitar_dialog.py +397 -0
- ge150/ui/icons.py +63 -0
- ge150/ui/knob.py +211 -0
- ge150/ui/main_window.py +537 -0
- ge150/ui/markdown.py +55 -0
- ge150/ui/mic_view.py +392 -0
- ge150/ui/model_gallery.py +199 -0
- ge150/ui/module_editor.py +303 -0
- ge150/ui/preset_list.py +133 -0
- ge150/ui/settings_dialog.py +149 -0
- ge150/ui/theme.py +319 -0
- ge150/ui/tone3000_loader.py +102 -0
- ge150/ui/tone3000_page.py +325 -0
- ge150/ui/tone_detail.py +151 -0
- ge150/ui/worker.py +84 -0
- ge150/ui/working.py +117 -0
- ge150/usb/__init__.py +19 -0
- ge150/usb/device_ids.py +28 -0
- ge150/usb/hidraw_transport.py +122 -0
- ge150/usb/transport.py +33 -0
- ge150/usb/usb_transport.py +83 -0
- ge150_linux-0.3.0.dist-info/METADATA +252 -0
- ge150_linux-0.3.0.dist-info/RECORD +98 -0
- ge150_linux-0.3.0.dist-info/WHEEL +5 -0
- ge150_linux-0.3.0.dist-info/entry_points.txt +4 -0
- ge150_linux-0.3.0.dist-info/licenses/LICENSE +21 -0
- ge150_linux-0.3.0.dist-info/top_level.txt +1 -0
ge150/ui/theme.py
ADDED
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
"""Dark theme: Fusion style, palette and stylesheet."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
from PySide6.QtGui import QColor, QPalette
|
|
8
|
+
from PySide6.QtWidgets import QApplication
|
|
9
|
+
|
|
10
|
+
ACCENT = "#ff8a1f"
|
|
11
|
+
BG = "#15181d"
|
|
12
|
+
PANEL = "#1d2127"
|
|
13
|
+
RAISED = "#262b33"
|
|
14
|
+
BORDER = "#323843"
|
|
15
|
+
TEXT = "#e9edf2"
|
|
16
|
+
MUTED = "#8b95a3"
|
|
17
|
+
#: Down arrow of the combo boxes (QSS only takes an image file).
|
|
18
|
+
CHEVRON = str(Path(__file__).resolve().parent.parent / "data" / "chevron-down.svg").replace(
|
|
19
|
+
"\\", "/")
|
|
20
|
+
|
|
21
|
+
STYLE = f"""
|
|
22
|
+
QMainWindow, QDialog {{ background: {BG}; }}
|
|
23
|
+
QWidget {{ color: {TEXT}; font-size: 13px; }}
|
|
24
|
+
QMenuBar {{ background: {BG}; }}
|
|
25
|
+
QMenuBar::item:selected, QMenu::item:selected {{ background: {RAISED}; }}
|
|
26
|
+
QMenu {{ background: {PANEL}; border: 1px solid {BORDER}; }}
|
|
27
|
+
QStatusBar {{ background: {BG}; color: {MUTED}; }}
|
|
28
|
+
QSplitter::handle {{ background: {BG}; }}
|
|
29
|
+
|
|
30
|
+
QFrame#headerBar {{ background: {PANEL}; border-bottom: 1px solid {BORDER}; }}
|
|
31
|
+
QLabel#presetNumber {{
|
|
32
|
+
font-size: 28px; font-weight: 800; color: {ACCENT}; min-width: 64px;
|
|
33
|
+
}}
|
|
34
|
+
QLabel#presetName {{ font-size: 24px; font-weight: 700; }}
|
|
35
|
+
QLabel#dirtyBadge {{
|
|
36
|
+
background: #5a3a12; color: #ffcf99; border-radius: 9px; padding: 2px 10px;
|
|
37
|
+
font-size: 11px; font-weight: 700;
|
|
38
|
+
}}
|
|
39
|
+
QPushButton#saveButton {{
|
|
40
|
+
background: {ACCENT}; color: #1a1208; font-weight: 800; border: none;
|
|
41
|
+
border-radius: 8px; padding: 8px 18px;
|
|
42
|
+
}}
|
|
43
|
+
QPushButton#saveButton:disabled {{ background: {RAISED}; color: {MUTED}; }}
|
|
44
|
+
QPushButton#discardButton {{
|
|
45
|
+
background: {RAISED}; color: {TEXT}; font-weight: 700; border: 1px solid {BORDER};
|
|
46
|
+
border-radius: 8px; padding: 8px 14px;
|
|
47
|
+
}}
|
|
48
|
+
QPushButton#discardButton:hover {{ border-color: #8a5a2e; }}
|
|
49
|
+
|
|
50
|
+
QPushButton#aiButton {{
|
|
51
|
+
background: {RAISED}; color: {TEXT}; font-weight: 700; border: 1px solid {ACCENT};
|
|
52
|
+
border-radius: 8px; padding: 8px 14px;
|
|
53
|
+
}}
|
|
54
|
+
QPushButton#aiButton:hover {{ background: #2d2620; }}
|
|
55
|
+
QPushButton#aiButton:checked {{ background: #3a2a1a; }}
|
|
56
|
+
QPushButton#aiButton:disabled {{ color: {MUTED}; border-color: #8a5a2e; }}
|
|
57
|
+
QFrame#composer {{
|
|
58
|
+
background: {PANEL}; border: 1px solid {BORDER}; border-radius: 12px;
|
|
59
|
+
}}
|
|
60
|
+
QFrame#composer[focused="true"] {{ border-color: {ACCENT}; }}
|
|
61
|
+
QPlainTextEdit#aiPrompt {{ background: transparent; border: none; padding: 2px; }}
|
|
62
|
+
QPushButton#contextChip {{
|
|
63
|
+
background: {RAISED}; color: {TEXT}; border: 1px solid {BORDER}; border-radius: 6px;
|
|
64
|
+
padding: 4px 8px; font-size: 12px; text-align: left;
|
|
65
|
+
}}
|
|
66
|
+
QPushButton#contextChip:!checked {{
|
|
67
|
+
background: transparent; color: {MUTED}; border-style: dashed;
|
|
68
|
+
}}
|
|
69
|
+
QPushButton#contextChip:hover {{ border-color: {ACCENT}; }}
|
|
70
|
+
QToolButton#guitarChip {{
|
|
71
|
+
background: transparent; color: {MUTED}; border: 1px dashed {BORDER}; border-radius: 6px;
|
|
72
|
+
padding: 4px 8px; font-size: 12px;
|
|
73
|
+
}}
|
|
74
|
+
QToolButton#guitarChip[on="true"] {{ background: {RAISED}; color: {TEXT}; border-style: solid; }}
|
|
75
|
+
QToolButton#guitarChip:hover {{ border-color: {ACCENT}; }}
|
|
76
|
+
QToolButton#guitarChip::menu-indicator {{ image: none; width: 0; }}
|
|
77
|
+
QToolButton#pill {{
|
|
78
|
+
background: transparent; color: {MUTED}; border: 1px solid {BORDER}; border-radius: 11px;
|
|
79
|
+
padding: 2px 9px; font-size: 12px; min-height: 18px;
|
|
80
|
+
}}
|
|
81
|
+
QToolButton#pill:hover, QToolButton#pill:open {{
|
|
82
|
+
color: {TEXT}; border-color: #8a5a2e; background: #2a2119;
|
|
83
|
+
}}
|
|
84
|
+
QToolButton#pill::menu-indicator {{ image: none; width: 0; }}
|
|
85
|
+
QToolButton#pill:disabled {{ color: #4d5562; }}
|
|
86
|
+
QToolButton#pill:checked {{ color: {TEXT}; border-color: #8a5a2e; }}
|
|
87
|
+
QMenu#pillMenu {{ padding: 4px; border-top: 2px solid {ACCENT}; border-radius: 8px; }}
|
|
88
|
+
QMenu#pillMenu::item {{ padding: 5px 22px 5px 10px; border-radius: 5px; }}
|
|
89
|
+
QToolButton#sendButton {{
|
|
90
|
+
background: {ACCENT}; color: #1b1205; border: none; border-radius: 14px;
|
|
91
|
+
min-width: 28px; max-width: 28px; min-height: 28px; max-height: 28px;
|
|
92
|
+
font-size: 15px; font-weight: 800;
|
|
93
|
+
}}
|
|
94
|
+
QToolButton#sendButton:hover {{ background: #ffa04d; }}
|
|
95
|
+
QToolButton#sendButton:disabled {{ background: {RAISED}; color: {MUTED}; }}
|
|
96
|
+
QToolButton#sendButton[busy="true"] {{
|
|
97
|
+
background: #3a2a1a; color: {ACCENT}; border: 2px solid {ACCENT}; font-size: 11px;
|
|
98
|
+
}}
|
|
99
|
+
QFrame#soundCompare {{ background: {PANEL}; border: 1px solid {BORDER}; border-radius: 10px; }}
|
|
100
|
+
QPushButton#abButton {{
|
|
101
|
+
background: transparent; color: {MUTED}; border: 1px solid {BORDER}; border-radius: 8px;
|
|
102
|
+
padding: 6px 10px; font-weight: 700;
|
|
103
|
+
}}
|
|
104
|
+
QPushButton#abButton:hover {{ color: {TEXT}; border-color: #8a5a2e; }}
|
|
105
|
+
QPushButton#abButton:checked {{ background: {ACCENT}; color: #1b1205; border-color: {ACCENT}; }}
|
|
106
|
+
QDockWidget#aiPanel {{ color: {MUTED}; font-weight: 700; }}
|
|
107
|
+
QDockWidget#aiPanel::title {{ background: {BG}; padding: 8px 10px; }}
|
|
108
|
+
QTextBrowser#aiChat {{ background: {PANEL}; border: none; border-radius: 10px; padding: 8px; }}
|
|
109
|
+
QTabWidget#mainTabs::pane {{ border: none; }}
|
|
110
|
+
QTabWidget#mainTabs > QTabBar {{ background: {BG}; }}
|
|
111
|
+
QTabWidget#mainTabs > QTabBar::tab {{
|
|
112
|
+
background: transparent; color: {MUTED}; font-weight: 700; padding: 10px 22px;
|
|
113
|
+
border: none; border-bottom: 2px solid transparent;
|
|
114
|
+
}}
|
|
115
|
+
QTabWidget#mainTabs > QTabBar::tab:selected {{ color: {TEXT}; border-bottom-color: {ACCENT}; }}
|
|
116
|
+
QTabWidget#mainTabs > QTabBar::tab:hover {{ color: {TEXT}; }}
|
|
117
|
+
QLabel#toneImage {{ background: {BG}; border-radius: 10px; color: {MUTED}; }}
|
|
118
|
+
QLabel#licenceChip {{
|
|
119
|
+
background: {RAISED}; color: {TEXT}; border-radius: 9px; padding: 2px 10px; font-weight: 700;
|
|
120
|
+
}}
|
|
121
|
+
QScrollArea#toneDescription, QScrollArea#toneDescription > QWidget > QWidget {{
|
|
122
|
+
background: transparent;
|
|
123
|
+
}}
|
|
124
|
+
QLabel#sectionTitle {{ font-size: 15px; font-weight: 700; }}
|
|
125
|
+
QListWidget#irSlots {{ background: {BG}; border: none; border-radius: 8px; }}
|
|
126
|
+
QListWidget#irSlots::item {{ padding: 8px; border-bottom: 1px solid {PANEL}; }}
|
|
127
|
+
QListWidget#irSlots::item:selected {{ background: #3a2a1a; color: {TEXT}; }}
|
|
128
|
+
QFrame#modulePage {{ background: {PANEL}; border-radius: 14px; }}
|
|
129
|
+
QLabel#moduleTitle {{ font-size: 22px; font-weight: 800; letter-spacing: 1px; }}
|
|
130
|
+
QLabel#basedOn {{ color: {MUTED}; font-size: 12px; }}
|
|
131
|
+
QLabel#note, QLabel#paramName {{ color: {MUTED}; font-size: 11px; }}
|
|
132
|
+
QPushButton#bigPower {{
|
|
133
|
+
border-radius: 15px; padding: 6px; font-weight: 800; border: 2px solid {BORDER};
|
|
134
|
+
background: {RAISED}; color: {MUTED};
|
|
135
|
+
}}
|
|
136
|
+
QPushButton#bigPower:checked {{ background: #1f7a3a; border-color: #2fb35a; color: white; }}
|
|
137
|
+
QComboBox {{
|
|
138
|
+
background: {RAISED}; border: 1px solid {BORDER}; border-radius: 8px; padding: 6px 10px;
|
|
139
|
+
}}
|
|
140
|
+
QListWidget#modelGallery {{ background: {BG}; border-radius: 12px; padding: 6px; }}
|
|
141
|
+
QListWidget#modelGallery::item {{
|
|
142
|
+
color: {MUTED}; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 4px;
|
|
143
|
+
border: 2px solid transparent;
|
|
144
|
+
}}
|
|
145
|
+
QListWidget#modelGallery::item:hover {{ background: {RAISED}; color: {TEXT}; }}
|
|
146
|
+
QListWidget#modelGallery::item:selected {{
|
|
147
|
+
background: #2d2620; border-color: {ACCENT}; color: {TEXT};
|
|
148
|
+
}}
|
|
149
|
+
QComboBox QAbstractItemView {{
|
|
150
|
+
background: {PANEL}; border: 1px solid {BORDER}; selection-background-color: {ACCENT};
|
|
151
|
+
selection-color: #1a1208;
|
|
152
|
+
}}
|
|
153
|
+
|
|
154
|
+
QFrame#chainBar {{ background: {PANEL}; border-top: 1px solid {BORDER}; }}
|
|
155
|
+
QFrame#chainBar QLabel#note {{ padding-top: 2px; }}
|
|
156
|
+
QFrame#moduleTile {{
|
|
157
|
+
background: {RAISED}; border: 2px solid transparent; border-radius: 12px;
|
|
158
|
+
}}
|
|
159
|
+
QFrame#moduleTile[hover="true"] {{ border-color: #8a5a2e; background: #2b2722; }}
|
|
160
|
+
QFrame#moduleTile[selected="true"] {{ border-color: {ACCENT}; background: #2d2620; }}
|
|
161
|
+
QLabel#tileName {{ font-weight: 800; color: {MUTED}; font-size: 11px; letter-spacing: 1px; }}
|
|
162
|
+
QFrame#moduleTile[on="true"] QLabel#tileName {{ color: {TEXT}; }}
|
|
163
|
+
QLabel#jackLabel {{ color: {MUTED}; font-size: 10px; font-weight: 800; letter-spacing: 1px; }}
|
|
164
|
+
QLabel#modelLabel {{ font-size: 11px; }}
|
|
165
|
+
QLabel#modelLabel:disabled {{ color: {MUTED}; }}
|
|
166
|
+
QPushButton#power {{
|
|
167
|
+
border-radius: 12px; border: 1px solid {BORDER}; background: {PANEL}; color: {MUTED};
|
|
168
|
+
font-weight: 800;
|
|
169
|
+
}}
|
|
170
|
+
QPushButton#power:checked {{ background: #1f7a3a; border-color: #2fb35a; color: white; }}
|
|
171
|
+
|
|
172
|
+
QLineEdit, QPlainTextEdit#guitarField {{
|
|
173
|
+
background: {RAISED}; border: 1px solid {BORDER}; border-radius: 8px; padding: 6px 10px;
|
|
174
|
+
}}
|
|
175
|
+
QPlainTextEdit#guitarField {{ padding: 2px 6px; }}
|
|
176
|
+
QScrollArea#guitarForm, QWidget#guitarFormBody {{ background: {PANEL}; border-radius: 10px; }}
|
|
177
|
+
QLabel#fieldLabel {{ color: {MUTED}; padding-top: 6px; }}
|
|
178
|
+
QLabel#sectionTitle {{ color: {MUTED}; font-size: 11px; font-weight: 700; padding-top: 4px; }}
|
|
179
|
+
QFrame#sidePanel {{ background: {PANEL}; border-radius: 12px; }}
|
|
180
|
+
QFrame#previewBar {{
|
|
181
|
+
background: #2a2119; border: 1px solid #8a5a2e; border-radius: 8px;
|
|
182
|
+
}}
|
|
183
|
+
QLabel#previewLabel {{ color: {TEXT}; font-size: 12px; }}
|
|
184
|
+
QToolButton#iconButton {{
|
|
185
|
+
background: transparent; border: none; border-radius: 6px; padding: 5px;
|
|
186
|
+
}}
|
|
187
|
+
QToolButton#iconButton:hover, QToolButton#iconButton:checked {{ background: {RAISED}; }}
|
|
188
|
+
QScrollArea#historyScroll, QWidget#historyBody {{ background: transparent; }}
|
|
189
|
+
QFrame#historyEntry {{ border-radius: 8px; border-left: 2px solid transparent; }}
|
|
190
|
+
QFrame#historyEntry:hover {{ background: {RAISED}; }}
|
|
191
|
+
QFrame#historyEntry[current="true"] {{ border-left: 2px solid {ACCENT}; }}
|
|
192
|
+
QLabel#historyTitle {{ font-weight: 600; }}
|
|
193
|
+
QLabel#historyMeta {{ color: {MUTED}; font-size: 11px; }}
|
|
194
|
+
QLabel#agentBadge {{
|
|
195
|
+
border-radius: 11px; font-size: 11px; font-weight: 800; color: #1a1208; background: #d97757;
|
|
196
|
+
}}
|
|
197
|
+
QLabel#agentBadge[agent="codex"] {{ background: {TEXT}; }}
|
|
198
|
+
QLabel#cardTitle {{ font-size: 14px; font-weight: 800; }}
|
|
199
|
+
QLabel#permGroup {{ color: {MUTED}; font-size: 10px; font-weight: 800; letter-spacing: 1px; }}
|
|
200
|
+
QFrame#permRow {{ background: {PANEL}; border: 1px solid {BORDER}; border-radius: 8px; }}
|
|
201
|
+
QLabel#permLabel {{ font-weight: 700; }}
|
|
202
|
+
QLabel#aboutTitle {{ font-size: 22px; font-weight: 800; }}
|
|
203
|
+
QLabel#stepTitle {{
|
|
204
|
+
color: {MUTED}; font-size: 11px; font-weight: 700; padding-top: 8px; letter-spacing: 0.5px;
|
|
205
|
+
}}
|
|
206
|
+
QLabel#countBadge {{
|
|
207
|
+
color: {MUTED}; background: {RAISED}; border-radius: 9px; padding: 2px 9px; font-size: 11px;
|
|
208
|
+
font-weight: 700;
|
|
209
|
+
}}
|
|
210
|
+
QLabel#countBadge[on="true"] {{ color: #1a1208; background: {ACCENT}; }}
|
|
211
|
+
QLabel#summaryBox {{
|
|
212
|
+
background: {BG}; border: 1px dashed {BORDER}; border-radius: 8px; padding: 10px 12px;
|
|
213
|
+
color: {TEXT};
|
|
214
|
+
}}
|
|
215
|
+
QLabel#emptyState {{ color: {MUTED}; padding: 24px; font-size: 12px; }}
|
|
216
|
+
QPushButton#linkButton {{
|
|
217
|
+
background: transparent; border: none; color: {ACCENT}; padding: 2px 0; font-size: 12px;
|
|
218
|
+
font-weight: 600;
|
|
219
|
+
}}
|
|
220
|
+
QPushButton#linkButton:hover {{ color: #ffb066; }}
|
|
221
|
+
QPushButton#linkButton:disabled {{ color: {MUTED}; }}
|
|
222
|
+
QFrame#modeSwitch {{ background: {PANEL}; border-radius: 10px; }}
|
|
223
|
+
QPushButton#modeTab {{
|
|
224
|
+
background: transparent; border: none; border-radius: 8px; padding: 7px 12px; color: {MUTED};
|
|
225
|
+
font-weight: 700;
|
|
226
|
+
}}
|
|
227
|
+
QPushButton#modeTab:hover {{ color: {TEXT}; }}
|
|
228
|
+
QPushButton#modeTab:checked {{ background: {RAISED}; color: {TEXT}; }}
|
|
229
|
+
QPushButton#segment {{
|
|
230
|
+
background: {RAISED}; border: 1px solid {BORDER}; border-radius: 7px; padding: 6px 10px;
|
|
231
|
+
color: {MUTED}; font-weight: 700; font-size: 12px;
|
|
232
|
+
}}
|
|
233
|
+
QPushButton#segment:hover {{ color: {TEXT}; border-color: #8a5a2e; }}
|
|
234
|
+
QPushButton#segment:checked {{ background: #3a2a1a; border-color: {ACCENT}; color: {ACCENT}; }}
|
|
235
|
+
QWidget#assistantPage QComboBox {{ padding: 6px 28px 6px 10px; }}
|
|
236
|
+
QWidget#assistantPage QComboBox:hover {{ border-color: #8a5a2e; }}
|
|
237
|
+
QWidget#assistantPage QComboBox:disabled {{ color: {MUTED}; }}
|
|
238
|
+
QWidget#assistantPage QComboBox::drop-down {{
|
|
239
|
+
subcontrol-origin: padding; subcontrol-position: center right; width: 24px; border: none;
|
|
240
|
+
}}
|
|
241
|
+
QWidget#assistantPage QComboBox::down-arrow {{ image: url({CHEVRON}); width: 12px; height: 12px; }}
|
|
242
|
+
QWidget#assistantPage QDoubleSpinBox {{
|
|
243
|
+
background: {RAISED}; border: 1px solid {BORDER}; border-radius: 8px; padding: 6px 10px;
|
|
244
|
+
}}
|
|
245
|
+
QWidget#assistantPage QDoubleSpinBox QLineEdit {{
|
|
246
|
+
background: transparent; border: none; padding: 0;
|
|
247
|
+
}}
|
|
248
|
+
QWidget#assistantPage QDoubleSpinBox::up-button,
|
|
249
|
+
QWidget#assistantPage QDoubleSpinBox::down-button {{
|
|
250
|
+
width: 0px; border: none; subcontrol-origin: border; /* else the text box is 1 px wide */
|
|
251
|
+
}}
|
|
252
|
+
QWidget#assistantPage QSlider::groove:horizontal {{
|
|
253
|
+
height: 4px; background: {BORDER}; border-radius: 2px;
|
|
254
|
+
}}
|
|
255
|
+
QWidget#assistantPage QSlider::sub-page:horizontal {{ background: {ACCENT}; border-radius: 2px; }}
|
|
256
|
+
QWidget#assistantPage QSlider::handle:horizontal {{
|
|
257
|
+
background: {TEXT}; border: 2px solid {ACCENT}; width: 12px; height: 12px;
|
|
258
|
+
margin: -6px 0; border-radius: 8px;
|
|
259
|
+
}}
|
|
260
|
+
QListWidget#presetChecks, QTreeWidget#bulkTree {{
|
|
261
|
+
background: {BG}; border: 1px solid {BORDER}; border-radius: 8px; padding: 4px;
|
|
262
|
+
}}
|
|
263
|
+
QTreeWidget#bulkTree::item {{ padding: 3px 2px; }}
|
|
264
|
+
QTreeWidget#bulkTree QHeaderView::section {{
|
|
265
|
+
background: {BG}; color: {MUTED}; border: none; border-bottom: 1px solid {BORDER};
|
|
266
|
+
padding: 4px 6px; font-size: 11px; font-weight: 700;
|
|
267
|
+
}}
|
|
268
|
+
QLabel#guitarPicture {{
|
|
269
|
+
background: {PANEL}; border-radius: 12px; color: {MUTED}; padding: 8px;
|
|
270
|
+
}}
|
|
271
|
+
QLabel#evidenceTag {{ font-size: 11px; font-weight: 700; border-radius: 9px; padding: 3px 0; }}
|
|
272
|
+
QLabel#evidenceTag[level="oficial"] {{ background: #173d26; color: #6fdc95; }}
|
|
273
|
+
QLabel#evidenceTag[level="verificado"] {{ background: #16324a; color: #7fc4ff; }}
|
|
274
|
+
QLabel#evidenceTag[level="deducido"] {{ background: #3d3216; color: #f0c860; }}
|
|
275
|
+
QLabel#evidenceTag[level="probable"] {{ background: #43221a; color: #ff9b7a; }}
|
|
276
|
+
QLineEdit:focus, QPlainTextEdit#guitarField:focus {{ border-color: {ACCENT}; }}
|
|
277
|
+
QListWidget {{
|
|
278
|
+
background: {PANEL}; border: none; border-radius: 10px; padding: 4px; outline: none;
|
|
279
|
+
}}
|
|
280
|
+
QListWidget::item {{ padding: 5px 8px; border-radius: 6px; }}
|
|
281
|
+
QListWidget::item:selected {{ background: {ACCENT}; color: #1a1208; }}
|
|
282
|
+
QListWidget::item:hover:!selected {{ background: {RAISED}; }}
|
|
283
|
+
QGroupBox {{
|
|
284
|
+
border: 1px solid {BORDER}; border-radius: 10px; margin-top: 14px; padding-top: 8px;
|
|
285
|
+
}}
|
|
286
|
+
QGroupBox::title {{ subcontrol-origin: margin; left: 10px; color: {MUTED}; }}
|
|
287
|
+
QPushButton {{
|
|
288
|
+
background: {RAISED}; border: 1px solid {BORDER}; border-radius: 8px; padding: 6px 12px;
|
|
289
|
+
}}
|
|
290
|
+
QPushButton:hover {{ border-color: {ACCENT}; }}
|
|
291
|
+
QSpinBox, QDoubleSpinBox {{
|
|
292
|
+
background: {RAISED}; border: 1px solid {BORDER}; border-radius: 6px; padding: 4px;
|
|
293
|
+
}}
|
|
294
|
+
QProgressBar {{ background: {RAISED}; border: none; border-radius: 4px; height: 8px; }}
|
|
295
|
+
QProgressBar::chunk {{ background: {ACCENT}; border-radius: 4px; }}
|
|
296
|
+
QScrollBar:vertical {{ background: transparent; width: 10px; }}
|
|
297
|
+
QScrollBar::handle:vertical {{ background: {BORDER}; border-radius: 5px; min-height: 30px; }}
|
|
298
|
+
QScrollBar::add-line, QScrollBar::sub-line {{ height: 0; }}
|
|
299
|
+
"""
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
def apply_theme(app: QApplication) -> None:
|
|
303
|
+
app.setStyle("Fusion")
|
|
304
|
+
palette = QPalette()
|
|
305
|
+
roles = {
|
|
306
|
+
QPalette.ColorRole.Window: BG, QPalette.ColorRole.WindowText: TEXT,
|
|
307
|
+
QPalette.ColorRole.Base: PANEL, QPalette.ColorRole.AlternateBase: RAISED,
|
|
308
|
+
QPalette.ColorRole.Text: TEXT, QPalette.ColorRole.Button: RAISED,
|
|
309
|
+
QPalette.ColorRole.ButtonText: TEXT, QPalette.ColorRole.Highlight: ACCENT,
|
|
310
|
+
QPalette.ColorRole.HighlightedText: "#1a1208", QPalette.ColorRole.ToolTipBase: PANEL,
|
|
311
|
+
QPalette.ColorRole.ToolTipText: TEXT, QPalette.ColorRole.PlaceholderText: MUTED,
|
|
312
|
+
QPalette.ColorRole.Mid: BORDER,
|
|
313
|
+
}
|
|
314
|
+
for role, colour in roles.items():
|
|
315
|
+
palette.setColor(role, QColor(colour))
|
|
316
|
+
palette.setColor(QPalette.ColorGroup.Disabled, QPalette.ColorRole.Text, QColor(MUTED))
|
|
317
|
+
palette.setColor(QPalette.ColorGroup.Disabled, QPalette.ColorRole.ButtonText, QColor(MUTED))
|
|
318
|
+
app.setPalette(palette)
|
|
319
|
+
app.setStyleSheet(STYLE)
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"""Bring a TONE3000 IR into a user IR slot (TONE3000 tab and user IR dialog).
|
|
2
|
+
|
|
3
|
+
Downloads run off the GUI thread; storing asks the user, with the author and licence in
|
|
4
|
+
view, and then goes through the pedal's runner.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import threading
|
|
10
|
+
from collections.abc import Callable
|
|
11
|
+
from typing import Any
|
|
12
|
+
|
|
13
|
+
from PySide6.QtCore import QObject, Signal
|
|
14
|
+
from PySide6.QtWidgets import QInputDialog, QMessageBox, QWidget
|
|
15
|
+
|
|
16
|
+
from ge150.formats import wav_ir
|
|
17
|
+
from ge150.protocol import messages as msg
|
|
18
|
+
from ge150.protocol.opcodes import Op
|
|
19
|
+
from ge150.services.editor import Editor
|
|
20
|
+
from ge150.services.tone3000 import Download, IrSources, Tone3000Client
|
|
21
|
+
from ge150.ui.worker import TaskRunner
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Tone3000Loader(QObject):
|
|
25
|
+
#: slot index (0-based) once stored.
|
|
26
|
+
stored = Signal(int)
|
|
27
|
+
failed = Signal(str)
|
|
28
|
+
status = Signal(str)
|
|
29
|
+
_done = Signal(object, str, int) # result, error, slot
|
|
30
|
+
|
|
31
|
+
def __init__(self, editor: Editor, runner: TaskRunner, parent: QWidget) -> None:
|
|
32
|
+
super().__init__(parent)
|
|
33
|
+
self.editor, self.runner, self.window = editor, runner, parent
|
|
34
|
+
self.sources = IrSources()
|
|
35
|
+
self.client = Tone3000Client()
|
|
36
|
+
self._done.connect(self._ready)
|
|
37
|
+
|
|
38
|
+
def ensure_key(self) -> bool:
|
|
39
|
+
if self.client.creds.client_id:
|
|
40
|
+
return True
|
|
41
|
+
key, ok = QInputDialog.getText(
|
|
42
|
+
self.window, "TONE3000", "Clave publicable (Publishable Key, t3k_pub_…) de los "
|
|
43
|
+
"ajustes de API de tu cuenta de TONE3000:")
|
|
44
|
+
if not ok or not key.strip():
|
|
45
|
+
return False
|
|
46
|
+
self.client.set_client_id(key)
|
|
47
|
+
return True
|
|
48
|
+
|
|
49
|
+
def background(self, fn: Callable[[], Any], slot: int = -1) -> None:
|
|
50
|
+
"""Run ``fn`` off the GUI thread (not on the pedal runner: it may take minutes)."""
|
|
51
|
+
|
|
52
|
+
def work() -> None:
|
|
53
|
+
try:
|
|
54
|
+
result, error = fn(), ""
|
|
55
|
+
except Exception as exc: # shown to the user
|
|
56
|
+
result, error = None, str(exc)
|
|
57
|
+
self._done.emit(result, error, slot)
|
|
58
|
+
|
|
59
|
+
threading.Thread(target=work, name="ge150-tone3000", daemon=True).start()
|
|
60
|
+
|
|
61
|
+
def add(self, tone_id: int, model_id: int | None, slot: int) -> None:
|
|
62
|
+
"""Download a tone chosen in the app and store it in ``slot`` (after confirming)."""
|
|
63
|
+
self.status.emit("Descargando la IR…")
|
|
64
|
+
self.background(lambda: self.client.download(tone_id, model_id), slot)
|
|
65
|
+
|
|
66
|
+
def pick(self, slot: int) -> None:
|
|
67
|
+
if not self.ensure_key():
|
|
68
|
+
return
|
|
69
|
+
self.status.emit("Elige una IR en TONE3000 (se abrió el navegador)…")
|
|
70
|
+
self.background(lambda: self.client.download(self.client.select_tone()), slot)
|
|
71
|
+
|
|
72
|
+
def _ready(self, result: object, error: str, slot: int) -> None:
|
|
73
|
+
self.status.emit("")
|
|
74
|
+
if error and slot >= -2: # -3: optional background refresh, silent
|
|
75
|
+
self.failed.emit(f"TONE3000: {error}")
|
|
76
|
+
elif isinstance(result, Download):
|
|
77
|
+
self._store(result, slot)
|
|
78
|
+
|
|
79
|
+
def _store(self, download: Download, slot: int) -> None:
|
|
80
|
+
try:
|
|
81
|
+
payload = wav_ir.load_ir_file(download.path)
|
|
82
|
+
except (OSError, wav_ir.WavError) as exc:
|
|
83
|
+
self.failed.emit(str(exc))
|
|
84
|
+
return
|
|
85
|
+
tone = download.tone
|
|
86
|
+
names = self.editor.state.user_names
|
|
87
|
+
old = names.ir[slot] if names else "?"
|
|
88
|
+
answer = QMessageBox.question(
|
|
89
|
+
self.window, "Confirmar",
|
|
90
|
+
f"¿Cargar «{tone.title} / {download.model.name}» en la ranura IR {slot + 1} "
|
|
91
|
+
f"(CAB {27 + slot})?\nReemplaza «{old}».\n\nAutor: {tone.author}\n"
|
|
92
|
+
f"Licencia: {tone.license}\n{tone.page_url}")
|
|
93
|
+
if answer != QMessageBox.StandardButton.Yes:
|
|
94
|
+
return
|
|
95
|
+
name = tone.title[: msg.USER_NAME_LEN]
|
|
96
|
+
|
|
97
|
+
def done(_: object) -> None:
|
|
98
|
+
self.sources.record(slot + 1, download, name)
|
|
99
|
+
self.stored.emit(slot)
|
|
100
|
+
|
|
101
|
+
self.runner.run(lambda: self.editor.upload_user_slot(Op.USER_IR, slot, name, payload),
|
|
102
|
+
done, self.failed.emit)
|