File indexing completed on 2024-05-05 16:39:05
0001 /* This file is part of the KDE project 0002 Copyright (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org> 0003 0004 This program is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU General Public 0006 License as published by the Free Software Foundation, version 2. 0007 0008 This program is distributed in the hope that it will be useful, 0009 but WITHOUT ANY WARRANTY; without even the implied warranty of 0010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0011 General Public License for more details. 0012 0013 You should have received a copy of the GNU General Public License 0014 along with this program; see the file COPYING. If not, write to 0015 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0016 Boston, MA 02110-1301, USA. 0017 */ 0018 0019 #include "slideshowwidget.h" 0020 #include <ui_slideshowwidget.h> 0021 0022 #include "kuickdata.h" 0023 0024 0025 SlideShowWidget::SlideShowWidget( QWidget *parent ) 0026 : QWidget( parent ) 0027 { 0028 // setup the widget based on its .ui file 0029 ui = new Ui::SlideShowWidget; 0030 ui->setupUi(this); 0031 0032 loadSettings( *kdata ); 0033 } 0034 0035 SlideShowWidget::~SlideShowWidget() 0036 { 0037 delete ui; 0038 } 0039 0040 void SlideShowWidget::loadSettings( const KuickData& data ) 0041 { 0042 ui->delayTime->setValue( data.slideDelay / 1000 ); 0043 ui->cycles->setValue( data.slideshowCycles ); 0044 ui->fullScreen->setChecked( data.slideshowFullscreen ); 0045 ui->startWithCurrent->setChecked( !data.slideshowStartAtFirst ); 0046 } 0047 0048 void SlideShowWidget::applySettings( KuickData& data ) 0049 { 0050 data.slideDelay = ui->delayTime->value() * 1000; 0051 data.slideshowCycles = ui->cycles->value(); 0052 data.slideshowFullscreen = ui->fullScreen->isChecked(); 0053 data.slideshowStartAtFirst = !ui->startWithCurrent->isChecked(); 0054 }