Added code to save last position of Qt movie play window.
This commit is contained in:
parent
829e8cb3f1
commit
67d64b0e63
|
@ -29,6 +29,7 @@
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
|
#include <QSettings>
|
||||||
|
|
||||||
#include "../../fceu.h"
|
#include "../../fceu.h"
|
||||||
#include "../../movie.h"
|
#include "../../movie.h"
|
||||||
|
@ -53,6 +54,7 @@ MoviePlayDialog_t::MoviePlayDialog_t(QWidget *parent)
|
||||||
QLabel *lbl;
|
QLabel *lbl;
|
||||||
QPushButton *okButton, *cancelButton;
|
QPushButton *okButton, *cancelButton;
|
||||||
bool replayReadOnlySetting;
|
bool replayReadOnlySetting;
|
||||||
|
QSettings settings;
|
||||||
|
|
||||||
setWindowTitle("Movie Play");
|
setWindowTitle("Movie Play");
|
||||||
|
|
||||||
|
@ -166,16 +168,19 @@ MoviePlayDialog_t::MoviePlayDialog_t(QWidget *parent)
|
||||||
doScan();
|
doScan();
|
||||||
|
|
||||||
updateMovieText();
|
updateMovieText();
|
||||||
|
|
||||||
|
restoreGeometry(settings.value("moviePlayWindow/geometry").toByteArray());
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
MoviePlayDialog_t::~MoviePlayDialog_t(void)
|
MoviePlayDialog_t::~MoviePlayDialog_t(void)
|
||||||
{
|
{
|
||||||
printf("Destroy Movie Play Window\n");
|
//printf("Destroy Movie Play Window\n");
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void MoviePlayDialog_t::closeEvent(QCloseEvent *event)
|
void MoviePlayDialog_t::closeEvent(QCloseEvent *event)
|
||||||
{
|
{
|
||||||
printf("Movie Play Close Window Event\n");
|
QSettings settings;
|
||||||
|
settings.setValue("moviePlayWindow/geometry", saveGeometry());
|
||||||
done(0);
|
done(0);
|
||||||
deleteLater();
|
deleteLater();
|
||||||
event->accept();
|
event->accept();
|
||||||
|
@ -183,7 +188,8 @@ void MoviePlayDialog_t::closeEvent(QCloseEvent *event)
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void MoviePlayDialog_t::closeWindow(void)
|
void MoviePlayDialog_t::closeWindow(void)
|
||||||
{
|
{
|
||||||
//printf("Close Window\n");
|
QSettings settings;
|
||||||
|
settings.setValue("moviePlayWindow/geometry", saveGeometry());
|
||||||
done(0);
|
done(0);
|
||||||
deleteLater();
|
deleteLater();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue