diff --git a/logqso.cpp b/logqso.cpp index 99d13ce..2ee27e3 100644 --- a/logqso.cpp +++ b/logqso.cpp @@ -12,6 +12,7 @@ #include "Configuration.hpp" #include "Bands.hpp" #include "MaidenheadLocatorValidator.hpp" +#include "DriftingDateTime.h" #include "ui_logqso.h" #include "moc_logqso.cpp" @@ -33,6 +34,14 @@ LogQSO::~LogQSO () { } +void LogQSO::on_start_now_button_pressed(){ + ui->start_date_time->setDateTime(DriftingDateTime::currentDateTimeUtc()); +} + +void LogQSO::on_end_now_button_pressed(){ + ui->end_date_time->setDateTime(DriftingDateTime::currentDateTimeUtc()); +} + void LogQSO::loadSettings () { m_settings->beginGroup ("LogQSO"); diff --git a/logqso.h b/logqso.h index 2defb70..716e043 100644 --- a/logqso.h +++ b/logqso.h @@ -49,6 +49,10 @@ signals: protected: void hideEvent (QHideEvent *); +private slots: + void on_start_now_button_pressed(); + void on_end_now_button_pressed(); + private: void loadSettings (); void storeSettings () const; diff --git a/logqso.ui b/logqso.ui index 4be53da..4c4bc40 100644 --- a/logqso.ui +++ b/logqso.ui @@ -7,7 +7,7 @@ 0 0 600 - 535 + 450 @@ -18,403 +18,487 @@ - 600 + 300 0 - - - QFormLayout::AllNonFixedFieldsGrow + + + QFrame::NoFrame - - 6 + + QFrame::Plain - - 6 + + 0 - - - - - 10 - + + true + + + + + 0 + 0 + 582 + 401 + + + + + 0 - - Operator Callsign: - - - - - - - - 300 - 16777215 - - - - - - - - - 10 - - - - Mode: - - - Qt::AlignCenter - - - - - - - - 70 - 16777215 - - - - true - - - - - - - - 10 - - - - Start: - - - Qt::AlignCenter - - - - - 0 0 - - - - Now - - - - - - - - 0 - 0 - - - - yyyy-MM-dd HH:mm:ss - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - 10 - - - - End: - - - Qt::AlignCenter - - - - - - + 0 - - - - Now + + + + QFormLayout::AllNonFixedFieldsGrow - - - - - - - 0 - 0 - + + 6 - - yyyy-MM-dd HH:mm:ss + + 6 - - - - - - Qt::Horizontal + + 6 - - - 40 - 20 - - - + + + + + 10 + + + + Operator Callsign: + + + + + + + + 300 + 16777215 + + + + + + + + + 10 + + + + Contact Callsign: + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + 300 + 16777215 + + + + + + + + + 10 + + + + Start: + + + Qt::AlignCenter + + + + + + + 0 + + + 0 + + + + + Now + + + + + + + + 0 + 0 + + + + yyyy-MM-dd HH:mm:ss + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + 10 + + + + End: + + + Qt::AlignCenter + + + + + + + 0 + + + + + Now + + + + + + + + 0 + 0 + + + + yyyy-MM-dd HH:mm:ss + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + 10 + + + + Mode: + + + Qt::AlignCenter + + + + + + + + 70 + 16777215 + + + + true + + + + + + + + 10 + + + + Band: + + + Qt::AlignCenter + + + + + + + + 50 + 16777215 + + + + + + + + 0 + + + 0 + + + + + + 10 + + + + Signal Report: + + + Qt::AlignCenter + + + + + + + + + 0 + + + + + + 10 + + + + Sent: + + + Qt::AlignCenter + + + + + + + + 75 + 16777215 + + + + Qt::AlignCenter + + + + + + + + 75 + 16777215 + + + + Qt::AlignCenter + + + + + + + + 10 + + + + Received: + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 20 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + 10 + + + + Grid: + + + Qt::AlignCenter + + + + + + + + 70 + 16777215 + + + + + + + + true + + + + 10 + + + + Name: + + + Qt::AlignCenter + + + + + + + true + + + + 300 + 16777215 + + + + + + + + true + + + + 10 + + + + Comments: + + + + + + + true + + + + + + + Retain Comments + + + + - - - - - - 10 - - - - Callsign: - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 300 - 16777215 - - - - - - - - - 10 - - - - Band: - - - Qt::AlignCenter - - - - - - - - 50 - 16777215 - - - - - - - - - 10 - - - - Signal Report Sent: - - - Qt::AlignCenter - - - - - - - - 50 - 16777215 - - - - - - - - - 10 - - - - Signal Report Rcvd: - - - Qt::AlignCenter - - - - - - - - 50 - 16777215 - - - - - - - - - 10 - - - - Grid: - - - Qt::AlignCenter - - - - - - - - 70 - 16777215 - - - - - - - - true - - - - 10 - - - - Name: - - - Qt::AlignCenter - - - - - - - true - - - - 300 - 16777215 - - - - - - - - true - - - - 10 - - - - Comments: - - - - - - - true - - - - - - - Retain Comments - - - - - - - Qt::Vertical - - - - 20 - 20 - - - - - - - - - - Qt::Vertical - - - - 0 - 0 - - - + + @@ -430,12 +514,12 @@ loggedOperator - mode - start_date_time - pushButton - end_date_time - pushButton_2 call + start_date_time + start_now_button + end_date_time + end_now_button + mode band sent rcvd @@ -443,6 +527,7 @@ name comments cbComments + scrollArea