[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/utils/rsibreak/src
From:       Tom Albers <toma () kde ! org>
Date:       2010-10-01 18:06:51
Message-ID: 20101001180651.9B310AC891 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1181671 by toma:

Move slide interval setting from the Timings config page to the effect specific settings.


 M  +16 -1     setupmaximized.cpp  
 M  +1 -38     setuptiming.cpp  


--- trunk/extragear/utils/rsibreak/src/setupmaximized.cpp #1181670:1181671
@@ -1,5 +1,5 @@
 /* ============================================================
- * Copyright 2005-2007 by Tom Albers <toma@kde.org>
+ * Copyright 2005-2007,2010 by Tom Albers <toma@kde.org>
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General
@@ -34,6 +34,7 @@
 #include <KApplication>
 #include <KFileDialog>
 #include <KLineEdit>
+#include <KNumInput>
 #include <KVBox>
 #include <KWindowSystem>
 #include <kkeysequencewidget.h>
@@ -54,6 +55,7 @@
     QCheckBox*        hideLockButton;
     QCheckBox*        disableAccel;
     QPushButton*      changePathButton;
+    KIntNumInput*     slideInterval;
     QCheckBox*        usePopup;
     QCheckBox*        useFlash;
     QLabel*           useFlashLabel;
@@ -153,6 +155,16 @@
     d->showSmallImagesCheck = new QCheckBox( i18n( "Show small images" ),
             this );
 
+    KHBox *m5 = new KHBox( this );
+    QLabel *l5 = new QLabel( i18n( "Change images every:" ) + ' ', m5 );
+    l5->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+    l5->setWhatsThis( i18n( "Here you can set how long one image should be "
+                            "shown before it is replaced by the next one." ) );
+    d->slideInterval = new KIntNumInput( m5 );
+    d->slideInterval->setRange( 3, 1000, 1 );
+    d->slideInterval->setSliderEnabled( false );
+    d->slideInterval->setSuffix( ki18np( " second", " seconds" ) );
+
     connect( d->changePathButton, SIGNAL( clicked() ),
              this, SLOT( slotFolderPicker() ) );
     connect( d->imageFolderEdit, SIGNAL( textChanged( const QString& ) ),
@@ -162,6 +174,7 @@
     vbox2->addWidget( imageFolderBox );
     vbox2->addWidget( d->searchRecursiveCheck );
     vbox2->addWidget( d->showSmallImagesCheck );
+    vbox2->addWidget( m5 );
     d->slideshowBox->setLayout( vbox2 );
 
     //---------------- Popup setup
@@ -272,6 +285,7 @@
 {
     KConfigGroup config = KGlobal::config()->group( "General Settings" );
     config.writeEntry( "ImageFolder", d->imageFolderEdit->text() );
+    config.writeEntry( "SlideInterval", d->slideInterval->value() );
     config.writeEntry( "HideMinimizeButton",
                        d->hideMinimizeButton->isChecked() );
     config.writeEntry( "HideLockButton",
@@ -304,6 +318,7 @@
 
     KConfigGroup config = KGlobal::config()->group( "General Settings" );
     d->imageFolderEdit->setText( config.readEntry( "ImageFolder", dir ) );
+    d->slideInterval->setValue( config.readEntry( "SlideInterval", 10 ) );
     d->hideMinimizeButton->setChecked(
         config.readEntry( "HideMinimizeButton", false ) );
     d->hideLockButton->setChecked(
--- trunk/extragear/utils/rsibreak/src/setuptiming.cpp #1181670:1181671
@@ -1,5 +1,5 @@
 /* ============================================================
- * Copyright (C) 2005-2007,2009 by Tom Albers <toma@kde.org>
+ * Copyright (C) 2005-2007,2009-2010 by Tom Albers <toma@kde.org>
  * Copyright (C) 2006 Bram Schoenmakers <bramschoenmakers@kde.nl>
  *
  * This program is free software; you can redistribute it
@@ -41,7 +41,6 @@
     KIntNumInput*          tinyDuration;
     KIntNumInput*          bigInterval;
     KIntNumInput*          bigDuration;
-    KIntNumInput*          slideInterval;
     bool                   debug;
 };
 
@@ -116,51 +115,18 @@
     vbox1->addStretch( 1 );
     bigBox->setLayout( vbox1 );
 
-    // ------------------------ Slidebox
-
-    QGroupBox *slideBox = new QGroupBox( this );
-    slideBox->setTitle( i18n( "Slideshow" ) );
-
-    KHBox *m5 = new KHBox( this );
-    QLabel *l5 = new QLabel( i18n( "Change images every:" ) + ' ', m5 );
-    l5->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
-    l5->setWhatsThis( i18n( "Here you can set how long one image should be "
-                            "shown before it is replaced by the next one." ) );
-    d->slideInterval = new KIntNumInput( m5 );
-    d->slideInterval->setRange( 3, 1000, 1 );
-    d->slideInterval->setSliderEnabled( false );
-    l5->setBuddy( d->slideInterval );
-
-    QVBoxLayout *vbox2 = new QVBoxLayout( slideBox );
-    vbox2->addWidget( m5 );
-    vbox2->addStretch( 1 );
-    slideBox->setLayout( vbox2 );
-
     l->addWidget( tinyBox );
     l->addWidget( bigBox );
-    l->addWidget( slideBox );
     setLayout( l );
     readSettings();
 
-#if KDE_IS_VERSION(4, 2, 80)
     d->debug ? d->bigInterval->setSuffix( ki18np( " second", " seconds" ) )
     : d->bigInterval->setSuffix( ki18np( " minute", " minutes" ) );
     d->debug ? d->tinyInterval->setSuffix( ki18np( " second", " seconds" ) )
     : d->tinyInterval->setSuffix( ki18np( " minute", " minutes" ) );
     d->debug ? d->bigDuration->setSuffix( ki18np( " second", " seconds" ) )
     : d->bigDuration->setSuffix( ki18np( " minute", " minutes" ) );
-    d->slideInterval->setSuffix( ki18np( " second", " seconds" ) );
     d->tinyDuration->setSuffix( ki18np( " second", " seconds" ) );
-#else
-    d->debug ? d->bigInterval->setSuffix( i18n( " seconds" ) )
-    : d->bigInterval->setSuffix( i18n( " minutes" ) );
-    d->tinyDuration->setSuffix( i18n( " seconds" ) );
-    d->slideInterval->setSuffix( i18n( " seconds" ) );
-    d->debug ? d->bigDuration->setSuffix( i18n( " seconds" ) )
-    : d->bigDuration->setSuffix( i18n( " minutes" ) );
-    d->debug ? d->tinyInterval->setSuffix( i18n( " seconds" ) )
-    : d->tinyInterval->setSuffix( i18n( " minutes" ) );
-#endif
 
     slotTinyValueChanged( d->tinyInterval->value() );
 
@@ -169,7 +135,6 @@
     d->bigInterval->setFixedSize( d->tinyInterval->minimumSizeHint() );
     d->tinyDuration->setFixedSize( d->tinyInterval->minimumSizeHint() );
     d->bigDuration->setFixedSize( d->tinyInterval->minimumSizeHint() );
-    d->slideInterval->setFixedSize( d->tinyInterval->minimumSizeHint() );
 }
 
 SetupTiming::~SetupTiming()
@@ -184,7 +149,6 @@
     config.writeEntry( "TinyDuration", d->tinyDuration->value() );
     config.writeEntry( "BigInterval", d->bigInterval->value() );
     config.writeEntry( "BigDuration", d->bigDuration->value() );
-    config.writeEntry( "SlideInterval", d->slideInterval->value() );
     config.sync();
 }
 
@@ -198,7 +162,6 @@
     d->bigInterval->setValue( config.readEntry( "BigInterval", 60 ) );
     d->bigInterval->setMinimum( d->tinyInterval->value() );
     d->bigDuration->setValue( config.readEntry( "BigDuration", 1 ) );
-    d->slideInterval->setValue( config.readEntry( "SlideInterval", 10 ) );
 }
 
 void SetupTiming::slotTinyValueChanged( int i )
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic