Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ set(CONTESTPROGRAMM_UI_SOURCES
src/ui/MultiplierWindow.cpp
src/ui/RotorWidget.h
src/ui/RotorWidget.cpp
src/ui/RotorRowWidget.cpp
src/ui/CwMacroPanel.h
src/ui/CwMacroPanel.cpp
src/ui/EdiExportDialog.h
Expand Down
16 changes: 16 additions & 0 deletions TESTLISTE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,22 @@ bewusst aufgeschoben.

## Claude (gebaut, aber noch nicht am echten Gerät geprüft)

- [ ] **Panels einzeln in Longpath (2026-11-04, #72 + oe5sos/Longpath#386).**
Longpath › Tools › Contest logbook panels: ein Panel anhaken, es
muss als eigenes Fenster neben dem Longpath-Hauptfenster erscheinen,
OHNE dass das Logbuch-Hauptfenster aufgeht; ✕ am Panel dockt es
zurück (unsichtbar, weil das Logbuch zu ist); danach Tools ›
Contest Logbook öffnen: dasselbe Logbuch, das Panel wieder drin.
Zu sehen ist vor allem, was der offscreen-Prüfstand nicht kann: ob
macOS ein Werkzeugfenster zeigt, dessen Elternfenster verborgen
ist, und ob das Panel beim Minimieren von Longpath mit ins Dock geht.
Prüfstände: `test_einbettung::panelsLassenSichVonAussenAbloesen`,
Longpath `tst_contestfenster::einPanelOhneLogbuchFenster`.
Dazu (f432e0a): die Panels dort sind eckig und ohne Systemrahmen,
↙ in der Kopfzeile dockt zurück, Zug an der Kopfzeile und Anfasser
rechts unten müssen gehen; das Panel „Rotoren" muss sich bis auf
EINEN Rotor Breite ziehen lassen (dann untereinander), und die
Gradzahlen bleiben am kleineren Zifferblatt lesbar.
- [ ] **Wasserfall gegen das echte Longpath — Ursache gefunden, am
Gerät noch nicht nachgefahren.** Gefahren am 2026-11-02: Longpath
protokolliert „Spektrum abonniert rx 0, 718 Punkte" und sendet
Expand Down
102 changes: 74 additions & 28 deletions src/ui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
#include "ui/SideAreaWidget.h"
#include "ui/ProfileRail.h"
#include "ui/RateMeterWidget.h"
#include "ui/RotorRowWidget.h"
#include "ui/RotorWidget.h"
#include "ui/ScoreboardDialog.h"
#include "ui/SkedPanel.h"
Expand Down Expand Up @@ -717,13 +718,12 @@ MainWindow::MainWindow(AppController& appController, QWidget* parent)
// below) reads as one instrument *group*, not a doubled header; the
// dockable-panel system tolerates the rotor slots appearing/
// disappearing at runtime the same way the old fixed layout did,
// since applyRotorSlot() below still only ever touches m_rotorLayout,
// since applyRotorSlot() below still only ever touches m_rotorRow,
// never this panel's own container.
m_rotorRow = new QWidget(this);
m_rotorLayout = new QHBoxLayout(m_rotorRow);
m_rotorLayout->setContentsMargins(0, 0, 0, 0);
m_rotorLayout->setSpacing(10);
m_rotorLayout->addStretch();
// RotorRowWidget statt QHBoxLayout (2026-11-04): die Zeile kann so
// schmal werden wie EIN Rotor, dann stehen sie untereinander. Siehe
// RotorRowWidget.h fuer den Betreiberwunsch dahinter.
m_rotorRow = new RotorRowWidget(this);
// y=632: below the merged Log panel's own bottom edge (64+560=624)
// plus an 8px gap.
// Height 370 (was 272, originally 236): RotorWidget::minimumSizeHint()
Expand Down Expand Up @@ -754,7 +754,7 @@ MainWindow::MainWindow(AppController& appController, QWidget* parent)
// kReadoutMinWidth -- the three big AKTUELL/ZIEL/ENTFERNUNG numbers
// measure ~90px each at kFontDisplay and were overlapping at the old
// 220px). With both rotor slots enabled (the default), two widgets
// at 300px plus m_rotorLayout's 10px spacing need >=610px, which the
// at 300px plus the rotor row's 10px spacing need >=610px, which the
// old 300px-wide row/708 x-offset could never have fit even before
// this pass (a pre-existing mismatch this pass's own live-app
// verification screenshot exposed). Moved to x=0 (rather than
Expand Down Expand Up @@ -1920,19 +1920,10 @@ MainWindow::MainWindow(AppController& appController, QWidget* parent)
// why that panel stays on its independent checkbox).
windowMenu->addSeparator();
auto* panelsMenu = windowMenu->addMenu(QStringLiteral("&Panels"));
struct PanelMenuEntry { QString id; QString label; };
static const QVector<PanelMenuEntry> kPanelMenuEntries = {
{QStringLiteral("unifiedlog"), QStringLiteral("Log")},
{QStringLiteral("rotorrow"), QStringLiteral("Rotoren")},
{QStringLiteral("map"), QStringLiteral("Karte / Verbindungen")},
{QStringLiteral("suggestion"), QStringLiteral("Nächstes Ziel")},
{QStringLiteral("ratemeter"), QStringLiteral("Rate")},
{QStringLiteral("checkpartial"), QStringLiteral("Check")},
{QStringLiteral("bandmap"), QStringLiteral("Bandmap")},
{QStringLiteral("skeds"), QStringLiteral("Skeds")},
{QStringLiteral("chat"), QStringLiteral("Chat")},
{QStringLiteral("wasserfall"), QStringLiteral("Wasserfall")},
};
// Die Tabelle liegt seit 2026-11-04 in panelEintraege(): Longpath
// holt sich dort dieselbe Liste (siehe MainWindow.h).
using PanelMenuEntry = MainWindow::PanelEintrag;
static const QList<PanelMenuEntry> kPanelMenuEntries = MainWindow::panelEintraege();
// Panels als eigene Fenster ablösen -- Martin, 2026-09-28: "schön
// wäre es, ein windows zu haben, wo ich alle windows auch aber auch
// rausziehen kann um platz zu sparen. das haben wir bei longpath
Expand All @@ -1941,7 +1932,7 @@ MainWindow::MainWindow(AppController& appController, QWidget* parent)
auto* ablösenMenu = windowMenu->addMenu(QStringLiteral("Als eigenes &Fenster"));
ablösenMenu->setObjectName(QStringLiteral("floatPanelsMenu"));
for (const PanelMenuEntry& entry : kPanelMenuEntries) {
QAction* action = ablösenMenu->addAction(entry.label);
QAction* action = ablösenMenu->addAction(entry.titel);
action->setObjectName(QStringLiteral("float_%1").arg(entry.id));
action->setCheckable(true);
connect(action, &QAction::toggled, this, [this, id = entry.id](bool floating) {
Expand Down Expand Up @@ -1978,10 +1969,10 @@ MainWindow::MainWindow(AppController& appController, QWidget* parent)
auto* seitenbereichMenu = windowMenu->addMenu(QStringLiteral("In den &Seitenbereich"));
seitenbereichMenu->setObjectName(QStringLiteral("sideAreaMenu"));
for (const PanelMenuEntry& entry : kPanelMenuEntries) {
QAction* action = seitenbereichMenu->addAction(entry.label);
QAction* action = seitenbereichMenu->addAction(entry.titel);
action->setObjectName(QStringLiteral("side_%1").arg(entry.id));
action->setCheckable(true);
connect(action, &QAction::toggled, this, [this, id = entry.id, label = entry.label](bool hinein) {
connect(action, &QAction::toggled, this, [this, id = entry.id, label = entry.titel](bool hinein) {
if (hinein) {
putPanelIntoSideArea(id, label);
} else {
Expand Down Expand Up @@ -2014,7 +2005,7 @@ MainWindow::MainWindow(AppController& appController, QWidget* parent)

auto panelActions = std::make_shared<QVector<QPair<QString, QAction*>>>();
for (const PanelMenuEntry& entry : versteckbar) {
QAction* action = panelsMenu->addAction(entry.label);
QAction* action = panelsMenu->addAction(entry.titel);
action->setObjectName(QStringLiteral("panelAction_%1").arg(entry.id));
action->setCheckable(true);
connect(action, &QAction::toggled, this, [this, id = entry.id](bool visible) {
Expand Down Expand Up @@ -2640,7 +2631,7 @@ void MainWindow::applyFixedAntennaSettings()
const ContestSettings settings = m_appController.settings();
if (!settings.fixedAntennaEnabled) {
if (m_fixedAntennaWidget) {
m_rotorLayout->removeWidget(m_fixedAntennaWidget);
m_rotorRow->entfernen(m_fixedAntennaWidget);
delete m_fixedAntennaWidget;
m_fixedAntennaWidget = nullptr;
}
Expand All @@ -2660,7 +2651,7 @@ void MainWindow::applyFixedAntennaSettings()
if (m_rotor2Widget) {
++index;
}
m_rotorLayout->insertWidget(index, m_fixedAntennaWidget);
m_rotorRow->einfuegen(index, m_fixedAntennaWidget);
// Der Anzeigestil gilt fuer alle Instrumente gemeinsam, also
// auch hier -- dieselbe Runde wie bei den drehbaren.
connect(m_fixedAntennaWidget, &RotorWidget::dialStyleRequested, m_fixedAntennaWidget,
Expand Down Expand Up @@ -2785,7 +2776,7 @@ void MainWindow::applyRotorSlot(bool enabled, const QString& label, RotctldClien
if (enabled) {
if (!widget) {
widget = new RotorWidget(label, m_rotorRow);
m_rotorLayout->insertWidget(insertIndex, widget);
m_rotorRow->einfuegen(insertIndex, widget);
// `widget` as the connect() context means both connections
// auto-disconnect the moment the widget is destroyed below
// (the disabled-slot path) -- no dangling-pointer risk in
Expand Down Expand Up @@ -2941,7 +2932,7 @@ void MainWindow::applyRotorSlot(bool enabled, const QString& label, RotctldClien
pushRotorHeadingToMap(client, true, widget->azimuthDeg(), label);
}
} else if (widget) {
m_rotorLayout->removeWidget(widget);
m_rotorRow->entfernen(widget);
widget->hide();
widget->deleteLater();
widget = nullptr;
Expand Down Expand Up @@ -3032,6 +3023,61 @@ QStringList MainWindow::panelIdsForTest() const
return m_panelLayoutManager ? m_panelLayoutManager->panelIds() : QStringList();
}

// ── Panels von aussen (2026-11-04, fuer Longpath) ───────────────────

QList<MainWindow::PanelEintrag> MainWindow::panelEintraege()
{
// Dieselbe Reihenfolge wie im Menue "Fenster > Panels" -- der
// Betreiber soll in Longpath dieselbe Liste sehen wie hier.
static const QList<PanelEintrag> eintraege = {
{QStringLiteral("unifiedlog"), QStringLiteral("Log")},
{QStringLiteral("rotorrow"), QStringLiteral("Rotoren")},
{QStringLiteral("map"), QStringLiteral("Karte / Verbindungen")},
{QStringLiteral("suggestion"), QStringLiteral("Nächstes Ziel")},
{QStringLiteral("ratemeter"), QStringLiteral("Rate")},
{QStringLiteral("checkpartial"), QStringLiteral("Check")},
{QStringLiteral("bandmap"), QStringLiteral("Bandmap")},
{QStringLiteral("skeds"), QStringLiteral("Skeds")},
{QStringLiteral("chat"), QStringLiteral("Chat")},
{QStringLiteral("wasserfall"), QStringLiteral("Wasserfall")},
};
return eintraege;
}

bool MainWindow::istPanelSchwebend(const QString& id) const
{
return m_panelLayoutManager && m_panelLayoutManager->isPanelFloating(id);
}

void MainWindow::setzePanelSchwebend(const QString& id, bool schwebend)
{
if (!m_panelLayoutManager) { return; }
PanelContainerWidget* panel = m_panelLayoutManager->panel(id);
if (!panel) { return; }
if (schwebend) {
// Aus dem Seitenbereich holen: dort ist es eine Seite, kein
// Fenster, und setPanelFloating() faende es nicht in der Flaeche.
takePanelOutOfSideArea(id);
m_panelLayoutManager->setPanelFloating(id, true);
// Ein nie gezeigtes Hauptfenster hat keine ausgelegte Flaeche:
// das Panel kaeme mit der Groesse 0x0 daher. Dann die Groesse
// des Entwurfs, mindestens etwas Greifbares.
if (panel->width() < 160 || panel->height() < 120) {
QSize groesse = m_panelLayoutManager->defaultGeometryFor(id).size();
if (groesse.isEmpty()) { groesse = panel->sizeHint(); }
panel->resize(groesse.expandedTo(QSize(320, 240)));
}
if (!panel->isVisible()) { panel->show(); }
} else {
m_panelLayoutManager->setPanelFloating(id, false);
}
}

QWidget* MainWindow::panelFenster(const QString& id) const
{
return m_panelLayoutManager ? m_panelLayoutManager->panel(id) : nullptr;
}

QRect MainWindow::defaultGeometryForTest(const QString& id) const
{
return m_panelLayoutManager ? m_panelLayoutManager->defaultGeometryFor(id) : QRect();
Expand Down
28 changes: 25 additions & 3 deletions src/ui/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,27 @@ class MainWindow : public QMainWindow {
/// Panel dazu. Fuer tests/test_jedes_panel_ausblendbar.cpp.
QStringList panelIdsForTest() const;
class PanelContainerWidget* panelForTest(const QString& id) const;

// ── Panels von aussen (2026-11-04, fuer Longpath) ───────────────
//
// Betreiber: "jedes panel vom contestprogramm sollte in longpath
// eigens hinzuzufuegen sein, das waere die beste version." Longpath
// bettet dieses Fenster ein (siehe README "Als Fenster in Longpath")
// und will jedes Panel EINZELN als eigenes Fenster holen -- auch
// ohne dieses Hauptfenster zu zeigen. Dieselbe Liste und derselbe
// Weg wie das Menue "Fenster > Als eigenes Fenster" hier; nur nach
// aussen gereicht, damit Longpath keine Panel-Kennung raten muss.
struct PanelEintrag { QString id; QString titel; };
static QList<PanelEintrag> panelEintraege();
bool istPanelSchwebend(const QString& id) const;
// Loest das Panel als eigenes Fenster (Qt::Tool-Kind dieses
// Fensters) oder holt es zurueck in die Flaeche. Ein Panel im
// Seitenbereich wird vorher herausgeholt. Ist dieses Hauptfenster
// noch nie gezeigt worden, hat das Panel keine Groesse aus der
// Flaeche -- dann bekommt es die des Entwurfs.
void setzePanelSchwebend(const QString& id, bool schwebend);
// Das Panel als Fenster (oder nullptr, wenn es die Kennung nicht gibt).
QWidget* panelFenster(const QString& id) const;
class SideAreaWidget* sideAreaForTest() const { return m_sideArea; }
void applyWaterfallVisibilityForTest() { applyWaterfallVisibility(); }
void putPanelIntoSideAreaForTest(const QString& id);
Expand Down Expand Up @@ -424,7 +445,7 @@ private slots:
// "/CHAT ..." ahead of the LOGIN handshake).
void syncOn4kstRoomForCurrentBand();

// Creates `*widget` (inserted into m_rotorLayout at `insertIndex`,
// Creates `*widget` (inserted into m_rotorRow at `insertIndex`,
// wired to `client`'s azimuthChanged/stateChanged) if `enabled` and
// it does not exist yet; updates its label in place if it already
// exists; tears it down (removed from the layout, hidden, then
Expand Down Expand Up @@ -623,8 +644,9 @@ private slots:
// shown by the Startcheck until the rotor connects.
QString m_rotctldError1;
QString m_rotctldError2;
QWidget* m_rotorRow = nullptr;
QHBoxLayout* m_rotorLayout = nullptr;
// Seit 2026-11-04 eine RotorRowWidget (nebeneinander oder
// untereinander, je nach Platz) statt QWidget + QHBoxLayout.
class RotorRowWidget* m_rotorRow = nullptr;
RotorWidget* m_rotor1Widget = nullptr;
RotorWidget* m_rotor2Widget = nullptr;
// Die feste Antenne (ContestSettings::fixedAntennaEnabled): dasselbe
Expand Down
15 changes: 12 additions & 3 deletions src/ui/MapWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1963,12 +1963,20 @@ void MapWidget::drawNumbersColumn(QPainter& painter, const QRectF& column) const
// anderes Instrument, er ist dasselbe, blasser.
const QColor nadel = live ? QColor(Style::kAmberText()) : QColor(Style::kAmberDim());

// Mittig in der Spalte, Ueberschrift und Scheibe (Betreiber
// 2026-11-04: "bei karte und verbindungen sollten die rotoren
// eher mittig sein, sonst sieht es eigenartig aus"). Vorher
// sass die Scheibe am linken Rand der Spalte, die Legende
// darunter auch -- und rechts blieb Luft.
const double spaltenMitte = column.left() + column.width() / 2.0;
painter.setFont(Style::capsFont(font(), Style::kFontCaption));
painter.setPen(QColor(Style::kTextTertiary()));
painter.drawText(QPointF(x, y + 9.0), QStringLiteral("ROTOR %1").arg(i + 1));
painter.drawText(QRectF(column.left(), y, column.width(), 16.0),
Qt::AlignHCenter | Qt::AlignVCenter,
QStringLiteral("ROTOR %1").arg(i + 1));
y += 16.0;

const QPointF mitte(x + radius + 4.0, y + radius);
const QPointF mitte(spaltenMitte, y + radius);
m_rotorDialRect[i] = QRectF(mitte.x() - radius, mitte.y() - radius, durchmesser, durchmesser);

// ── Entwurf A ────────────────────────────────────────
Expand Down Expand Up @@ -2090,7 +2098,8 @@ void MapWidget::drawNumbersColumn(QPainter& painter, const QRectF& column) const
if (m_rotorDialsBackward) {
painter.setFont(Style::monoFont(font(), Style::kFontCaption));
painter.setPen(QColor(Style::kTextTertiary()));
painter.drawText(QPointF(x, y + 11.0),
painter.drawText(QRectF(column.left(), y, column.width(), 16.0),
Qt::AlignHCenter | Qt::AlignVCenter,
QStringLiteral("zurück %1°").arg(wrap360(az + 180.0), 0, 'f', 0));
y += 16.0;
}
Expand Down
Loading
Loading