Skip to content

Move Comment field from its own tab into the QSO tab #1020

Description

@ea4k

Summary

The Comment field currently lives in its own tab (MainWindowInputComment), which costs the user a tab click for something that is entered on almost every QSO. Move it into the QSO tab (MainWindowInputQSO), sharing the existing Name & Power line — Name+Power on the left half, Comment on the right half.

Current layout (QSO tab, Name & Power line)

[ Name  ] [___nameLineEdit___] [ Power ] [rxPowerSpinBox]

Target layout

[ Name  ] [___nameLineEdit___] [ Power ] [rxPowerSpinBox] │ [ Comment ] [_________commentLineEdit_________]

The line is split into two equal halves using a QHBoxLayout with a QSplitter or equal stretch factors, so both sides resize proportionally with the window.

Changes required

src/inputwidgets/mainwindowinputqso.h/.cpp

  • Add QLineEdit *commentLineEdit
  • Add QCheckBox *keepCommentCheckBox (carries over the "Keep this data for next QSO" behaviour from MainWindowInputComment)
  • Add QString getComment() and void setComment(const QString &) methods
  • Add bool getKeepComment() and void setKeepComment(bool) methods
  • Update getQSOData(QSO) and setQSOData(const QSO &) to include the comment field
  • Update clear() to clear/keep the comment field according to keepCommentCheckBox
  • Update createUI() to place the comment field on the right half of the Name & Power line

src/inputwidgets/mainwindowinputcomment.h/.cpp

  • Remove the class entirely once all callers are migrated to MainWindowInputQSO
  • Delete both files and remove from CMakeLists.txt

src/mainwindow.h/.cpp

  • Remove MainWindowInputComment *commentTabWidget member
  • Remove the Comment tab from dxUpLeftTab (or wherever the tab widget is built)
  • Replace all calls to commentTabWidget->getComment() / setData() / getKeep() / setKeep() / clear() with the equivalent calls on QSOTabWidget
  • Remove the #include for mainwindowinputcomment.h

Behaviour preservation

Existing behaviour How it is preserved
getComment() / setData() Moved to MainWindowInputQSO
Keep this data for next QSO checkbox keepCommentCheckBox added to QSO tab next to commentLineEdit
clear(full) respects the keep flag MainWindowInputQSO::clear() extended to handle comment the same way
getQSOData() / setQSOData() include comment Extended in MainWindowInputQSO

Files affected

  • src/inputwidgets/mainwindowinputqso.h — new field, methods, layout change
  • src/inputwidgets/mainwindowinputqso.cpp — implementation
  • src/inputwidgets/mainwindowinputcomment.h — deleted
  • src/inputwidgets/mainwindowinputcomment.cpp — deleted
  • src/mainwindow.h — remove commentTabWidget member
  • src/mainwindow.cpp — migrate all comment references to QSOTabWidget
  • CMakeLists.txt — remove mainwindowinputcomment from sources

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions