Commit 141bf296 authored by Jasem Mutlaq's avatar Jasem Mutlaq

Save INDI and Ekos manager window sizes between sessions

parent 706e5764
......@@ -198,6 +198,8 @@ EkosManager::EkosManager(QWidget * parent) : QDialog(parent)
QVBoxLayout * vlayout = new QVBoxLayout();
vlayout->addWidget(previewView);
previewWidget->setLayout(vlayout);
resize(Options::ekosWindowWidth(), Options::ekosWindowHeight());
}
void EkosManager::changeAlwaysOnTop(Qt::ApplicationState state)
......@@ -239,6 +241,9 @@ void EkosManager::closeEvent(QCloseEvent * /*event*/)
{
QAction * a = KStars::Instance()->actionCollection()->action( "show_ekos" );
a->setChecked(false);
Options::setEkosWindowWidth(width());
Options::setEkosWindowHeight(height());
}
void EkosManager::hideEvent(QHideEvent * /*event*/)
......
......@@ -91,7 +91,7 @@ GUIManager::GUIManager(QWidget * parent) : QWidget(parent, Qt::Window)
connect(closeB, SIGNAL(clicked()), this, SLOT(close()));
connect(clearB, SIGNAL(clicked()), this, SLOT(clearLog()));
resize( 640, 480);
resize(Options::iNDIWindowWidth(), Options::iNDIWindowHeight());
}
void GUIManager::changeAlwaysOnTop(Qt::ApplicationState state)
......@@ -118,6 +118,9 @@ void GUIManager::closeEvent(QCloseEvent * /*event*/)
QAction * centerTelescope = KStars::Instance()->actionCollection()->action( "lock_telescope" );
centerTelescope->setChecked(false);
}
Options::setINDIWindowWidth(width());
Options::setINDIWindowHeight(height());
}
void GUIManager::hideEvent(QHideEvent * /*event*/)
......
......@@ -131,6 +131,14 @@
</group>
<group name="indi">
<entry name="INDIWindowWidth" type="UInt">
<label>INDI window width</label>
<default>800</default>
</entry>
<entry name="INDIWindowHeight" type="UInt">
<label>INDI window height</label>
<default>600</default>
</entry>
<entry name="useGeographicUpdate" type="Bool">
<label>Automatically updates geographic location?</label>
<default>true</default>
......@@ -1336,6 +1344,14 @@
</entry>
</group>
<group name="Ekos">
<entry name="EkosWindowWidth" type="UInt">
<label>Ekos window width</label>
<default>600</default>
</entry>
<entry name="EkosWindowHeight" type="UInt">
<label>Ekos window height</label>
<default>600</default>
</entry>
<entry name="independentWindowEkos" type="Bool">
<label>Make Ekos window independent of KStars main window</label>
<default>false</default>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment