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
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)
Target layout
The line is split into two equal halves using a
QHBoxLayoutwith aQSplitteror equal stretch factors, so both sides resize proportionally with the window.Changes required
src/inputwidgets/mainwindowinputqso.h/.cppQLineEdit *commentLineEditQCheckBox *keepCommentCheckBox(carries over the "Keep this data for next QSO" behaviour fromMainWindowInputComment)QString getComment()andvoid setComment(const QString &)methodsbool getKeepComment()andvoid setKeepComment(bool)methodsgetQSOData(QSO)andsetQSOData(const QSO &)to include the comment fieldclear()to clear/keep the comment field according tokeepCommentCheckBoxcreateUI()to place the comment field on the right half of the Name & Power linesrc/inputwidgets/mainwindowinputcomment.h/.cppMainWindowInputQSOCMakeLists.txtsrc/mainwindow.h/.cppMainWindowInputComment *commentTabWidgetmemberdxUpLeftTab(or wherever the tab widget is built)commentTabWidget->getComment()/setData()/getKeep()/setKeep()/clear()with the equivalent calls onQSOTabWidget#includeformainwindowinputcomment.hBehaviour preservation
getComment()/setData()MainWindowInputQSOkeepCommentCheckBoxadded to QSO tab next tocommentLineEditclear(full)respects the keep flagMainWindowInputQSO::clear()extended to handle comment the same waygetQSOData()/setQSOData()include commentMainWindowInputQSOFiles affected
src/inputwidgets/mainwindowinputqso.h— new field, methods, layout changesrc/inputwidgets/mainwindowinputqso.cpp— implementationsrc/inputwidgets/mainwindowinputcomment.h— deletedsrc/inputwidgets/mainwindowinputcomment.cpp— deletedsrc/mainwindow.h— removecommentTabWidgetmembersrc/mainwindow.cpp— migrate all comment references toQSOTabWidgetCMakeLists.txt— removemainwindowinputcommentfrom sources