summaryrefslogtreecommitdiffstats
path: root/pictureviewer2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pictureviewer2.cpp')
-rw-r--r--pictureviewer2.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/pictureviewer2.cpp b/pictureviewer2.cpp
index 1ae2937..7536019 100644
--- a/pictureviewer2.cpp
+++ b/pictureviewer2.cpp
@@ -255,13 +255,22 @@ void PictureViewer2::readSettings(){
mScene->setCursorOffset(mCursorOffset);
mArchiveDir = s.value("paths/archivedir").toString();
showFile(mCurPicData);
+ int slideResult = s.value("ui/pvresult", PictureViewerSlideDlg::NoSlide).toInt();
+ mSlideDlg->setResult(slideResult);
+ int days = s.value("ui/pvdays").toInt();
+ mSlideDlg->setDays(days);
+ bool shuffle = s.value("ui/pvshuffle").toBool();
+ mSlideDlg->setShuffle(shuffle);
}
void PictureViewer2::writeSettings(){
+ QSettings s;
if(mFnItem){
- QSettings s;
s.setValue("ui/pvinfopos", mFnItem->scenePos());
}
+ s.setValue("ui/pvshuffle", mSlideDlg->shuffle());
+ s.setValue("ui/pvdays", mSlideDlg->days());
+ s.setValue("ui/pvresult", mSlideDlg->result());
}
void PictureViewer2::initActions(){
@@ -760,6 +769,18 @@ PictureViewerSlideDlg::PictureViewerSlideDlg(QWidget *parent, Qt::WindowFlags f)
mNoSlide->setChecked(true);
}
+void PictureViewerSlideDlg::setResult(int result){
+ if(result == SlideAll){
+ mSlideAll->setChecked(true);
+ }else if(result == SlideRecent){
+ mRecent->setChecked(true);
+ }else if(result == SlideSelection){
+ mSelection->setChecked(true);
+ }else if(result == NoSlide){
+ mNoSlide->setChecked(true);
+ }
+}
+
void PictureViewerSlideDlg::slideAllToggled(bool checked){
if(checked){
mRecentDays->setEnabled(false);