add windows size/pos saving

This commit is contained in:
RetroPooh 2017-10-22 13:49:38 +03:00
parent b6f102cabb
commit b48916ca46
8 changed files with 26 additions and 8 deletions

View file

@ -95,10 +95,12 @@ StatisticsWindow::StatisticsWindow(QWidget *parent) :
{
ui->setupUi(this);
Settings->loadWidgetInformation(this);
initStackedPage();
connect(ui->stackPages, SIGNAL(currentChanged(int)), this, SLOT(setNewPage(int)));
ui->stackPages->setCurrentIndex(0);
int toolSize = Settings->getToolButtonSize();
ui->toolBar->setToolButtonStyle(Settings->getToolButtonStyle());
ui->toolBar->setIconSize(QSize(toolSize,toolSize));
@ -110,6 +112,11 @@ StatisticsWindow::~StatisticsWindow()
mInstance = NULL;
}
void StatisticsWindow::closeEvent (QCloseEvent * /*event*/)
{
Settings->saveWidgetInformation(this);
}
void StatisticsWindow::changeEvent(QEvent *e)
{
QMainWindow::changeEvent(e);