Merge pull request #1068 from RetroPooh/winsize

add windows size/pos saving
This commit is contained in:
csoler 2017-10-22 15:57:24 +02:00 committed by GitHub
commit 34eb971f5b
8 changed files with 26 additions and 8 deletions

View File

@ -27,6 +27,8 @@
#include "util/TokenQueue.h"
#include "gui/settings/rsharesettings.h"
#include <iostream>
PostedCreatePostDialog::PostedCreatePostDialog(TokenQueue* tokenQ, RsPosted *posted, const RsGxsGroupId& grpId, QWidget *parent):
@ -35,7 +37,7 @@ PostedCreatePostDialog::PostedCreatePostDialog(TokenQueue* tokenQ, RsPosted *pos
ui(new Ui::PostedCreatePostDialog)
{
ui->setupUi(this);
Settings->loadWidgetInformation(this);
connect(ui->submitButton, SIGNAL(clicked()), this, SLOT(createPost()));
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(close()));
@ -50,6 +52,7 @@ PostedCreatePostDialog::PostedCreatePostDialog(TokenQueue* tokenQ, RsPosted *pos
PostedCreatePostDialog::~PostedCreatePostDialog()
{
Settings->saveWidgetInformation(this);
delete ui;
}

View File

@ -83,7 +83,7 @@ ConfCertDialog::ConfCertDialog(const RsPeerId& id, const RsPgpId &pgp_id, QWidge
{
/* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this);
Settings->loadWidgetInformation(this);
ui.headerFrame->setHeaderImage(QPixmap(":/images/user/identityinfo64.png"));
//ui.headerFrame->setHeaderText(tr("Friend node details"));
@ -105,6 +105,7 @@ ConfCertDialog::ConfCertDialog(const RsPeerId& id, const RsPgpId &pgp_id, QWidge
ConfCertDialog::~ConfCertDialog()
{
Settings->saveWidgetInformation(this);
QMap<RsPeerId, ConfCertDialog*>::iterator it = instances_ssl.find(peerId);
if (it != instances_ssl.end())
instances_ssl.erase(it);

View File

@ -65,7 +65,7 @@ PGPKeyDialog::PGPKeyDialog(const RsPeerId& id, const RsPgpId &pgp_id, QWidget *p
{
/* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this);
Settings->loadWidgetInformation(this);
// if(id.isNull())
// ui._useOldFormat_CB->setChecked(true) ;
// else
@ -100,6 +100,7 @@ PGPKeyDialog::PGPKeyDialog(const RsPeerId& id, const RsPgpId &pgp_id, QWidget *p
PGPKeyDialog::~PGPKeyDialog()
{
Settings->saveWidgetInformation(this);
QMap<RsPgpId, PGPKeyDialog*>::iterator it = instances_pgp.find(pgpId);
if (it != instances_pgp.end())
instances_pgp.erase(it);

View File

@ -34,6 +34,8 @@
#include <retroshare/rspeers.h>
#include <retroshare/rsgxscircles.h>
#include <gui/settings/rsharesettings.h>
#include <iostream>
// Control of Publish Signatures.
@ -87,6 +89,7 @@ GxsGroupDialog::GxsGroupDialog(TokenQueue *tokenExternalQueue, RsTokenService *t
GxsGroupDialog::~GxsGroupDialog()
{
Settings->saveWidgetInformation(this);
if (mInternalTokenQueue) {
delete(mInternalTokenQueue);
}
@ -134,6 +137,7 @@ void GxsGroupDialog::init()
ui.personal_required->setChecked(true) ; // this is always true
initMode();
Settings->loadWidgetInformation(this);
}
QIcon GxsGroupDialog::serviceWindowIcon()

View File

@ -50,7 +50,7 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
{
/* Invoke the Qt Designer generated object setup routine */
setupUi(this);
Settings->loadWidgetInformation(this);
mChannelQueue = new TokenQueue(rsGxsChannels->getTokenService(), this);
headerFrame->setHeaderImage(QPixmap(":/images/channels.png"));
@ -95,6 +95,7 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
CreateGxsChannelMsg::~CreateGxsChannelMsg()
{
Settings->saveWidgetInformation(this);
#ifdef CHANNELS_FRAME_CATCHER
delete fCatcher;
#endif

View File

@ -60,7 +60,7 @@
<bool>false</bool>
</property>
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="channelPostTab">
<attribute name="title">

View File

@ -95,6 +95,8 @@ 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);
@ -110,6 +112,11 @@ StatisticsWindow::~StatisticsWindow()
mInstance = NULL;
}
void StatisticsWindow::closeEvent (QCloseEvent * /*event*/)
{
Settings->saveWidgetInformation(this);
}
void StatisticsWindow::changeEvent(QEvent *e)
{
QMainWindow::changeEvent(e);

View File

@ -65,6 +65,7 @@ public slots:
protected:
void changeEvent(QEvent *e);
void closeEvent (QCloseEvent * event);
private:
void initStackedPage();