kopia lustrzana https://gitlab.com/eliggett/wfview
Added window position restore as a setting, worked around qt bug to
retain window focus during resize.merge-requests/1/merge
rodzic
77428bd26c
commit
dd481afbbc
10
wfmain.cpp
10
wfmain.cpp
|
@ -380,6 +380,10 @@ void wfmain::loadSettings()
|
||||||
prefs.drawPeaks = settings.value("DrawPeaks", defPrefs.drawPeaks).toBool();
|
prefs.drawPeaks = settings.value("DrawPeaks", defPrefs.drawPeaks).toBool();
|
||||||
prefs.stylesheetPath = settings.value("StylesheetPath", defPrefs.stylesheetPath).toString();
|
prefs.stylesheetPath = settings.value("StylesheetPath", defPrefs.stylesheetPath).toString();
|
||||||
ui->splitter->restoreState(settings.value("splitter").toByteArray());
|
ui->splitter->restoreState(settings.value("splitter").toByteArray());
|
||||||
|
|
||||||
|
restoreGeometry(settings.value("windowGeometry").toByteArray());
|
||||||
|
restoreState(settings.value("windowState").toByteArray());
|
||||||
|
setWindowState(Qt::WindowActive); // Works around QT bug to returns window+keyboard focus.
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
// Radio and Comms: C-IV addr, port to use
|
// Radio and Comms: C-IV addr, port to use
|
||||||
|
@ -431,6 +435,8 @@ void wfmain::loadSettings()
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void wfmain::saveSettings()
|
void wfmain::saveSettings()
|
||||||
{
|
{
|
||||||
qDebug() << "Saving settings to " << settings.fileName();
|
qDebug() << "Saving settings to " << settings.fileName();
|
||||||
|
@ -443,6 +449,8 @@ void wfmain::saveSettings()
|
||||||
settings.setValue("DrawPeaks", prefs.drawPeaks);
|
settings.setValue("DrawPeaks", prefs.drawPeaks);
|
||||||
settings.setValue("StylesheetPath", prefs.stylesheetPath);
|
settings.setValue("StylesheetPath", prefs.stylesheetPath);
|
||||||
settings.setValue("splitter", ui->splitter->saveState());
|
settings.setValue("splitter", ui->splitter->saveState());
|
||||||
|
settings.setValue("windowGeometry", saveGeometry());
|
||||||
|
settings.setValue("windowState", saveState());
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
// Radio and Comms: C-IV addr, port to use
|
// Radio and Comms: C-IV addr, port to use
|
||||||
|
@ -494,8 +502,6 @@ void wfmain::saveSettings()
|
||||||
|
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
settings.beginGroup("LightColors");
|
settings.beginGroup("LightColors");
|
||||||
|
|
||||||
settings.setValue("Light_PlotBackground", QColor(255,255,255,255));
|
settings.setValue("Light_PlotBackground", QColor(255,255,255,255));
|
||||||
|
|
1
wfmain.h
1
wfmain.h
|
@ -362,7 +362,6 @@ private:
|
||||||
void useColors(); // set the plot up
|
void useColors(); // set the plot up
|
||||||
void setDefPrefs(); // populate default values to default prefs
|
void setDefPrefs(); // populate default values to default prefs
|
||||||
|
|
||||||
|
|
||||||
int oldFreqDialVal;
|
int oldFreqDialVal;
|
||||||
|
|
||||||
void bandStackBtnClick();
|
void bandStackBtnClick();
|
||||||
|
|
Ładowanie…
Reference in New Issue