メインウインドウのジオメトリを保存復元。
1 parent b55f6b4 commit 5351b4949d8e902b8a17e1edd5c23651a775171e
@TAM (Teppei Tamra) TAM (Teppei Tamra) authored on 8 Jul 2018
Showing 2 changed files
View
1
■■■■
saoridef.h
#define SAORI_MASTODON_APIPATH_STATUS_UNFAVOURITE "/api/v1/statuses/%1/unfavourite"
#define SAORI_MASTODON_APIPATH_STATUS_REBLOG "/api/v1/statuses/%1/reblog"
#define SAORI_MASTODON_APIPATH_STATUS_UNREBLOG "/api/v1/statuses/%1/unreblog"
 
#define SAORI_SETTING_GEOMETRY "application/geometry"
#define SAORI_SETTING_GETLIMIT "application/getlimit"
#define SAORI_SETTING_GETLIMIT_DEFAULT 10
#define SAORI_SETTING_NSFWBLUR "application/nsfwblur"
#define SAORI_SETTING_NSFWBLUR_DEFAULT true
View
7
saoriwindow.cpp
SaoriWindow::SaoriWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::SaoriWindow)
{
m_geometry = SaoriApplication::saori()->setting()->value(SAORI_SETTING_GEOMETRY,QRect(0,0,1000,700)).toRect();
ui->setupUi(this);
connect(ui->action_Quit,&QAction::triggered,SaoriApplication::saori(),&SaoriApplication::quit);
m_configDialog = new SaoriConfigureDialog();
m_configDialog->setModal(true);
connect(m_configDialog,&SaoriConfigureDialog::accountsUpdated,this,&SaoriWindow::updateTimelineList);
m_tray = new SaoriSystemTray();
connect(m_tray,&SaoriSystemTray::showMainwindow,this,[=](){
if (isHidden()) {
show();
setGeometry(m_geometry);
move(m_geometry.topLeft());
show();
}
});
updateTimelineList();
openPinedView();
setGeometry(m_geometry);
}
 
SaoriWindow::~SaoriWindow()
{
m_geometry = geometry();
delete ui;
delete m_configDialog;
SaoriApplication::saori()->setting()->setValue(SAORI_SETTING_GEOMETRY,m_geometry);
}
 
QPair<QString,QString> SaoriWindow::getTimelineTitle(const QString timeline)
{