From 8e5148e87cb66581809d17d45f7b089dc97811f5 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sun, 28 Apr 2013 18:58:03 +0000 Subject: [PATCH] Save and restore geometry of the "LogQSO" dialog. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3238 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- logqso.cpp | 6 ++++++ logqso.h | 1 + mainwindow.cpp | 6 +++++- mainwindow.h | 2 ++ wsjtx.iss | 2 +- wsjtx.pro | 3 +-- 6 files changed, 16 insertions(+), 4 deletions(-) diff --git a/logqso.cpp b/logqso.cpp index 78d3605be..1705f91c0 100644 --- a/logqso.cpp +++ b/logqso.cpp @@ -127,3 +127,9 @@ void LogQSO::accept() emit(acceptQSO(true)); QDialog::accept(); } + +void LogQSO::reject() +{ + emit(acceptQSO(false)); + QDialog::reject(); +} diff --git a/logqso.h b/logqso.h index 50b6a960a..a7ea6b4fe 100644 --- a/logqso.h +++ b/logqso.h @@ -27,6 +27,7 @@ public: public slots: void accept(); + void reject(); signals: void acceptQSO(bool accepted); diff --git a/mainwindow.cpp b/mainwindow.cpp index e9900ffd0..7a32fdaba 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -22,6 +22,7 @@ double dFreq[]={0.136,0.4742,1.838,3.578,5.357,7.078,10.130,14.078, 18.104,21.078,24.918,28.078,50.293,70.091,144.489,432.178}; WideGraph* g_pWideGraph = NULL; +LogQSO* logDlg = NULL; Rig* rig = NULL; QString rev="$Rev$"; @@ -177,6 +178,7 @@ MainWindow::MainWindow(QSharedMemory *shdmem, QWidget *parent) : m_bRigOpen=false; m_secBandChanged=0; m_bMultipleOK=false; + m_bLogGeom=false; decodeBusy(false); ui->xThermo->setFillBrush(Qt::green); @@ -2208,17 +2210,19 @@ void MainWindow::on_logQSOButton_clicked() //Log QSO button dateTimeQSO = QDateTime::currentDateTimeUtc(); QString date=dateTimeQSO.toString("yyyyMMdd"); - LogQSO* logDlg; logDlg = new LogQSO(0); logDlg->initLogQSO(m_hisCall,m_hisGrid,m_mode,m_rptSent,m_rptRcvd,date, m_qsoStart,m_qsoStop,m_dialFreq,m_myCall,m_myGrid, m_noSuffix,m_toRTTY,m_dBtoComments); connect(logDlg, SIGNAL(acceptQSO(bool)),this,SLOT(acceptQSO2(bool))); + if(m_bLogGeom) logDlg->setGeometry(m_logQSOgeom); logDlg->show(); } void MainWindow::acceptQSO2(bool accepted) { + m_logQSOgeom=logDlg->geometry(); + m_bLogGeom=true; QString date=dateTimeQSO.toString("yyyyMMdd"); QFile f("wsjtx.log"); if(!f.open(QIODevice::Text | QIODevice::Append)) { diff --git a/mainwindow.h b/mainwindow.h index 469d54bf0..40cb24aa5 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -253,12 +253,14 @@ private: bool m_bMultipleOK; bool m_bDTRoff; bool m_pttData; + bool m_bLogGeom; char m_decoded[80]; float m_pctZap; QRect m_wideGraphGeom; + QRect m_logQSOgeom; QLabel* lab1; // labels in status bar QLabel* lab2; diff --git a/wsjtx.iss b/wsjtx.iss index dc750ddd4..dd60e0866 100644 --- a/wsjtx.iss +++ b/wsjtx.iss @@ -1,6 +1,6 @@ [Setup] AppName=wsjtx -AppVerName=wsjtx Version 0.95 r3229 +AppVerName=wsjtx Version 0.95 r3236 AppCopyright=Copyright (C) 2001-2013 by Joe Taylor, K1JT DefaultDirName=c:\wsjtx DefaultGroupName=wsjtx diff --git a/wsjtx.pro b/wsjtx.pro index 99cbbce30..486bcd792 100644 --- a/wsjtx.pro +++ b/wsjtx.pro @@ -43,8 +43,7 @@ SOURCES += killbyname.cpp HEADERS += mainwindow.h plotter.h soundin.h soundout.h \ about.h devsetup.h widegraph.h getfile.h \ commons.h sleep.h displaytext.h logqso.h \ - psk_reporter.h \ - rigclass.h + psk_reporter.h rigclass.h DEFINES += __cplusplus