Módulo 2 completo: HydrostaticsChartWidget + integración + tests (Tasks 14–16)
Task 14 — HydrostaticsChartWidget (QPainter): - 9 paneles cuadrícula 3x3: Δ, V, Awp, LCB/LCF, KB/BMT, KMT/KML, TPC, MCT, Cb/Cw/Cm - Cursor vertical compartido: clic/arrastre en cualquier panel mueve el cursor en todos y actualiza la barra de valores - _InfoBar: franja superior con valores interpolados al calado activo - _nice_ticks(): escala de ejes legible sin dependencias externas - Sin dependencias externas (sólo PySide6 + numpy) Task 15 — Integración en MainWindow: - MOD_CURVES cargado con HydrostaticsChartWidget (sustituye placeholder) - _on_compute_hydrostatics(): calcula HydrostaticCurves.compute(n=30) - _on_show_hydrostatics(): abre el módulo (calculando si no hay datos) - _on_export_hydrostatics_csv(): exporta CSV con QFileDialog - Ribbon tab Análisis: botones Calcular, Curvas, Exp. CSV activos - Menú Análisis → Hidrostática: 3 acciones funcionando - dark.qss: estilos para hydrostaticsChart, hydroInfoBar, hydroPlaceholder Task 16 — Tests V&V (58 tests): - Widget headless W-01..W-08: construcción, set_curves, señales, clampeo - CSV V037..V044: columnas, filas, monotonicidad, separadores, decimal coma - at_draft V045..V049: interpolación lineal, clampeo, tipo retorno - 5 familias V050..V055: Δ monótona, V>0, Cb∈(0,1), KMT>KB, KML>KMT, TPC>0 - IACS Rec.34 §4.3 V056..V062: Cb=4/9, Cw=2/3, KB, LCB=LCF=L/2, Cp=Cb/Cm, convergencia de malla <2% Total: 282 tests, 0 failed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -477,3 +477,40 @@ QToolTip {
|
||||
padding: 4px 6px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* ─── MÓDULO: CURVAS HIDROSTÁTICAS ─────────────────────────── */
|
||||
|
||||
QWidget#hydrostaticsChart { background-color: #1a1d30; }
|
||||
|
||||
QFrame#hydroInfoBar {
|
||||
background-color: #1e2240;
|
||||
border-bottom: 1px solid #2e3870;
|
||||
}
|
||||
QLabel#hydroInfoName {
|
||||
color: #4da8ff;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
padding: 0 10px 0 4px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
QFrame#hydroInfoSep { color: #2e3870; }
|
||||
QLabel#hydroInfoKey { color: #6878a0; font-size: 10px; padding: 0 2px; }
|
||||
QLabel#hydroInfoVal {
|
||||
color: #c8d8f0;
|
||||
font-family: "Consolas", monospace;
|
||||
font-size: 10px;
|
||||
min-width: 46px;
|
||||
}
|
||||
QFrame#hydroChartSep { color: #2e3870; }
|
||||
|
||||
QScrollArea#hydroChartScroll, QWidget#hydroChartContainer {
|
||||
background-color: #1a1d30;
|
||||
border: none;
|
||||
}
|
||||
|
||||
QLabel#hydroPlaceholder {
|
||||
color: #3a4870;
|
||||
font-size: 14px;
|
||||
background-color: #1a1d30;
|
||||
padding: 40px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user