UI Components
karcytics_sdk.plugin.components
Semantic UI components for Karcytics SDK.
Provides pre-styled button and component classes that respect the active theme and maintain visual consistency across all plugins.
AcademyButton
Bases: BioButton
Drop-in "🎓 Cyto Academy" button for a plugin's own toolbar.
Before the isolated-plugin migration, the Hub injected an identically
accent-styled button into every in-process analysis panel's toolbar
(the old AnalysisToolBar.btn_academy) and wired it straight to the
Hub's own AcademyManager. Each module now runs in its own process with
its own separate AcademyManager (runtime_services.tutorial_manager)
that the Hub can no longer reach into, so a plugin wanting this entry
point back in its own toolbar (not just the isolated window's Help
menu) adds this button itself and hands it whatever widget hosts it.
panel only needs to resolve .window() at click time — via
academy_driver.open_academy(), the same shared entry point the
isolated window's Help > Academy menu action uses — so this works
whether or not panel is already parented into a window when the
button is constructed.
Source code in src/karcytics_sdk/plugin/components.py
BioButton
Bases: QPushButton
Base unified button class.
Variants: 'primary', 'secondary', 'danger'.
Source code in src/karcytics_sdk/plugin/components.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | |
BioCancelButton
Bases: SecondaryButton
Pre-configured action button for cancelling tasks.
Source code in src/karcytics_sdk/plugin/components.py
BioCaptionLabel
Bases: QLabel
For educational text or hints.
Source code in src/karcytics_sdk/plugin/components.py
BioComboBox
Bases: QComboBox
Standardized combo box.
Source code in src/karcytics_sdk/plugin/components.py
BioDoubleSpinBox
Bases: QDoubleSpinBox
Standardized floating point input.
Source code in src/karcytics_sdk/plugin/components.py
BioFooter
Bases: QWidget
Standardized footer matching Karcytics core status bar.
Source code in src/karcytics_sdk/plugin/components.py
BioHelpButton
Bases: QPushButton
Small help (?) button that shows a rich popup dialog on click.
Source code in src/karcytics_sdk/plugin/components.py
setHelpText(text, title='')
Set the detailed help text and optional title for the popup.
setToolTip(text)
Override to use the click popup instead of the native hover tooltip for backwards compatibility.
BioLineEdit
Bases: QLineEdit
Standardized text input.
Source code in src/karcytics_sdk/plugin/components.py
BioListWidget
Bases: QListWidget
Standardized list widget.
Source code in src/karcytics_sdk/plugin/components.py
BioMenu
Bases: QMenu
Standardized themed context menu.
Source code in src/karcytics_sdk/plugin/components.py
BioProgressDialog
Bases: QProgressDialog
Standardized progress dialog.
Source code in src/karcytics_sdk/plugin/components.py
BioRunButton
Bases: PrimaryButton
Pre-configured action button for starting tasks.
Source code in src/karcytics_sdk/plugin/components.py
BioScrollArea
Bases: QScrollArea
Standardized scroll area with transparent background.
Source code in src/karcytics_sdk/plugin/components.py
BioSpinBox
Bases: QSpinBox
Standardized numeric input.
Source code in src/karcytics_sdk/plugin/components.py
BioSplitter
Bases: QSplitter
Standardized splitter.
Source code in src/karcytics_sdk/plugin/components.py
BioStatusLabel
Bases: QLabel
Standardized italicized status text.
Source code in src/karcytics_sdk/plugin/components.py
BioTableWidget
Bases: QTableWidget
Standardized table widget.
Source code in src/karcytics_sdk/plugin/components.py
BioToggleButton
Bases: QPushButton
A button that handles active/inactive state natively.
Source code in src/karcytics_sdk/plugin/components.py
DangerButton
Bases: BioButton
Destructive action button for delete/remove operations (backwards compatible).
Source code in src/karcytics_sdk/plugin/components.py
HeaderLabel
Bases: QLabel
Standardized H1 header label.
Source code in src/karcytics_sdk/plugin/components.py
ModuleCard
Bases: QFrame
Standardized, interactive card for lists and grids.
Source code in src/karcytics_sdk/plugin/components.py
PrimaryButton
Bases: BioButton
Primary action button using accent color (backwards compatible).
Source code in src/karcytics_sdk/plugin/components.py
SecondaryButton
Bases: BioButton
Secondary/outline button for non-critical actions (backwards compatible).
Source code in src/karcytics_sdk/plugin/components.py
SubtitleLabel
Bases: QLabel
Standardized subtitle/secondary header label.
Source code in src/karcytics_sdk/plugin/components.py
WorkspaceSaveButton
Bases: QToolButton
Smart split-button for saving workflows, defaulting to Update or Save New depending on state.
Source code in src/karcytics_sdk/plugin/components.py
899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 | |
set_workflow_active(active)
apply_component_style(widget, component_type)
Helper function to dynamically apply theme CSS without requiring a subclass.
apply_global_sdk_styles()
Inject QToolTip styling globally and configure the QApplication palette for dark mode.
No-ops (see the isinstance(app, QApplication) guard below) if called
before a QApplication exists — which it reliably is the first time
this runs: importing this module eagerly runs this function once at
import time (see the bottom of this module), and for an isolated
plugin that import happens via ui_daemon.py's
from karcytics_sdk.plugin import run_ui_daemon, well before
ui_daemon_runtime.run() ever constructs a QApplication. Nothing
calls this again afterward on its own — theme_changed only fires on
an actual user theme switch, not at startup — which left native,
app-level-only-stylable popups (QToolTip, a plain QComboBox's
dropdown) rendering with Qt's unstyled default palette for the entire
session unless the user happened to switch themes. run() calls this
again explicitly right after constructing its QApplication to close
that gap.
Source code in src/karcytics_sdk/plugin/components.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | |