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
This commit is contained in:
Joe Taylor 2013-04-28 18:58:03 +00:00
parent 5c7a80565b
commit c1995c44ff
6 changed files with 16 additions and 4 deletions

View File

@ -127,3 +127,9 @@ void LogQSO::accept()
emit(acceptQSO(true)); emit(acceptQSO(true));
QDialog::accept(); QDialog::accept();
} }
void LogQSO::reject()
{
emit(acceptQSO(false));
QDialog::reject();
}

View File

@ -27,6 +27,7 @@ public:
public slots: public slots:
void accept(); void accept();
void reject();
signals: signals:
void acceptQSO(bool accepted); void acceptQSO(bool accepted);

View File

@ -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}; 18.104,21.078,24.918,28.078,50.293,70.091,144.489,432.178};
WideGraph* g_pWideGraph = NULL; WideGraph* g_pWideGraph = NULL;
LogQSO* logDlg = NULL;
Rig* rig = NULL; Rig* rig = NULL;
QString rev="$Rev$"; QString rev="$Rev$";
@ -177,6 +178,7 @@ MainWindow::MainWindow(QSharedMemory *shdmem, QWidget *parent) :
m_bRigOpen=false; m_bRigOpen=false;
m_secBandChanged=0; m_secBandChanged=0;
m_bMultipleOK=false; m_bMultipleOK=false;
m_bLogGeom=false;
decodeBusy(false); decodeBusy(false);
ui->xThermo->setFillBrush(Qt::green); ui->xThermo->setFillBrush(Qt::green);
@ -2208,17 +2210,19 @@ void MainWindow::on_logQSOButton_clicked() //Log QSO button
dateTimeQSO = QDateTime::currentDateTimeUtc(); dateTimeQSO = QDateTime::currentDateTimeUtc();
QString date=dateTimeQSO.toString("yyyyMMdd"); QString date=dateTimeQSO.toString("yyyyMMdd");
LogQSO* logDlg;
logDlg = new LogQSO(0); logDlg = new LogQSO(0);
logDlg->initLogQSO(m_hisCall,m_hisGrid,m_mode,m_rptSent,m_rptRcvd,date, logDlg->initLogQSO(m_hisCall,m_hisGrid,m_mode,m_rptSent,m_rptRcvd,date,
m_qsoStart,m_qsoStop,m_dialFreq,m_myCall,m_myGrid, m_qsoStart,m_qsoStop,m_dialFreq,m_myCall,m_myGrid,
m_noSuffix,m_toRTTY,m_dBtoComments); m_noSuffix,m_toRTTY,m_dBtoComments);
connect(logDlg, SIGNAL(acceptQSO(bool)),this,SLOT(acceptQSO2(bool))); connect(logDlg, SIGNAL(acceptQSO(bool)),this,SLOT(acceptQSO2(bool)));
if(m_bLogGeom) logDlg->setGeometry(m_logQSOgeom);
logDlg->show(); logDlg->show();
} }
void MainWindow::acceptQSO2(bool accepted) void MainWindow::acceptQSO2(bool accepted)
{ {
m_logQSOgeom=logDlg->geometry();
m_bLogGeom=true;
QString date=dateTimeQSO.toString("yyyyMMdd"); QString date=dateTimeQSO.toString("yyyyMMdd");
QFile f("wsjtx.log"); QFile f("wsjtx.log");
if(!f.open(QIODevice::Text | QIODevice::Append)) { if(!f.open(QIODevice::Text | QIODevice::Append)) {

View File

@ -253,12 +253,14 @@ private:
bool m_bMultipleOK; bool m_bMultipleOK;
bool m_bDTRoff; bool m_bDTRoff;
bool m_pttData; bool m_pttData;
bool m_bLogGeom;
char m_decoded[80]; char m_decoded[80];
float m_pctZap; float m_pctZap;
QRect m_wideGraphGeom; QRect m_wideGraphGeom;
QRect m_logQSOgeom;
QLabel* lab1; // labels in status bar QLabel* lab1; // labels in status bar
QLabel* lab2; QLabel* lab2;

View File

@ -1,6 +1,6 @@
[Setup] [Setup]
AppName=wsjtx AppName=wsjtx
AppVerName=wsjtx Version 0.95 r3229 AppVerName=wsjtx Version 0.95 r3236
AppCopyright=Copyright (C) 2001-2013 by Joe Taylor, K1JT AppCopyright=Copyright (C) 2001-2013 by Joe Taylor, K1JT
DefaultDirName=c:\wsjtx DefaultDirName=c:\wsjtx
DefaultGroupName=wsjtx DefaultGroupName=wsjtx

View File

@ -43,8 +43,7 @@ SOURCES += killbyname.cpp
HEADERS += mainwindow.h plotter.h soundin.h soundout.h \ HEADERS += mainwindow.h plotter.h soundin.h soundout.h \
about.h devsetup.h widegraph.h getfile.h \ about.h devsetup.h widegraph.h getfile.h \
commons.h sleep.h displaytext.h logqso.h \ commons.h sleep.h displaytext.h logqso.h \
psk_reporter.h \ psk_reporter.h rigclass.h
rigclass.h
DEFINES += __cplusplus DEFINES += __cplusplus