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.stylesheetPath = settings.value("StylesheetPath", defPrefs.stylesheetPath).toString();
|
||||
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();
|
||||
|
||||
// Radio and Comms: C-IV addr, port to use
|
||||
|
@ -431,6 +435,8 @@ void wfmain::loadSettings()
|
|||
settings.endGroup();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wfmain::saveSettings()
|
||||
{
|
||||
qDebug() << "Saving settings to " << settings.fileName();
|
||||
|
@ -443,6 +449,8 @@ void wfmain::saveSettings()
|
|||
settings.setValue("DrawPeaks", prefs.drawPeaks);
|
||||
settings.setValue("StylesheetPath", prefs.stylesheetPath);
|
||||
settings.setValue("splitter", ui->splitter->saveState());
|
||||
settings.setValue("windowGeometry", saveGeometry());
|
||||
settings.setValue("windowState", saveState());
|
||||
settings.endGroup();
|
||||
|
||||
// Radio and Comms: C-IV addr, port to use
|
||||
|
@ -494,8 +502,6 @@ void wfmain::saveSettings()
|
|||
|
||||
settings.endGroup();
|
||||
|
||||
|
||||
|
||||
settings.beginGroup("LightColors");
|
||||
|
||||
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 setDefPrefs(); // populate default values to default prefs
|
||||
|
||||
|
||||
int oldFreqDialVal;
|
||||
|
||||
void bandStackBtnClick();
|
||||
|
|
Ładowanie…
Reference in New Issue