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

List:       kde-commits
Subject:    extragear/graphics/kipi-plugins/slideshow
From:       Gilles Caulier <caulier.gilles () gmail ! com>
Date:       2008-06-12 9:28:34
Message-ID: 1213262914.740471.3902.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 819821 by cgilles:

port ++



 M  +4 -2      CMakeLists.txt  
 M  +30 -25    plugin_slideshow.cpp  


--- trunk/extragear/graphics/kipi-plugins/slideshow/CMakeLists.txt #819820:819821
@@ -1,7 +1,8 @@
 ADD_DEFINITIONS(-DQT3_SUPPORT 
                 -DQT3_SUPPORT_WARNINGS
                )
-SET(kipiplugin_slideshow_PART_SRCS toolbar.cpp                                   
+
+SET(kipiplugin_slideshow_PART_SRCS toolbar.cpp
                                    kbeffect.cpp 
                                    screenproperties.cpp
                                    slideshowkb.cpp 
@@ -13,8 +14,9 @@
                                    #slideshowloader.cpp
                                    #plugin_slideshow.cpp 
    )
-#kde4_add_ui3_files(kipiplugin_slideshow_PART_SRCS slideshowconfigbase.ui)
 
+#KDE4_ADD_UI3_FILES(kipiplugin_slideshow_PART_SRCS slideshowconfigbase.ui)
+
 KDE4_ADD_PLUGIN(kipiplugin_slideshow ${kipiplugin_slideshow_PART_SRCS})
 
 TARGET_LINK_LIBRARIES(kipiplugin_slideshow 
--- trunk/extragear/graphics/kipi-plugins/slideshow/plugin_slideshow.cpp \
#819820:819821 @@ -70,10 +70,10 @@
 K_EXPORT_PLUGIN ( SlideShowFactory("kipiplugin_slideshow") )
 
 Plugin_SlideShow::Plugin_SlideShow(QObject *parent, const QVariantList &args)
-    : KIPI::Plugin( SlideShowFactory::componentData(), parent, "SlideShow")
+                : KIPI::Plugin( SlideShowFactory::componentData(), parent, \
"SlideShow")  {
     kDebug( 51001 ) << "Plugin_SlideShow plugin loaded"
-                     << endl;
+                    << endl;
 }
 
 void Plugin_SlideShow::setup( QWidget* widget )
@@ -86,9 +86,8 @@
             this, SLOT(slotActivate()));
 
     m_interface = dynamic_cast< KIPI::Interface* >( parent() );
+    m_urlList   = new KUrl::List();
 
-    m_urlList = new KUrl::List();
-
     if ( !m_interface )
     {
        kError( 51000 ) << "Kipi m_interface is null!" << endl;
@@ -97,8 +96,8 @@
 
     m_actionSlideShow->setEnabled( false );
 
-    connect( m_interface, SIGNAL( currentAlbumChanged( bool ) ),
-             SLOT( slotAlbumChanged( bool ) ) );
+    connect(m_interface, SIGNAL( currentAlbumChanged( bool )),
+            this, SLOT( slotAlbumChanged( bool )));
 
     addAction( m_actionSlideShow );
 }
@@ -133,7 +132,7 @@
                                                         m_urlList);
 
     connect(slideShowConfig, SIGNAL(buttonStartClicked()),
-             this, SLOT(slotSlideShow()));
+            this, SLOT(slotSlideShow()));
 
      slideShowConfig->show();
 }
@@ -179,14 +178,14 @@
     bool    shuffle;
     bool    wantKB;
     KConfigGroup grp = config.group("SlideShow Settings");
-    opengl                = grp.readEntry("OpenGL", false);
-    shuffle               = grp.readEntry("Shuffle", false);
-    wantKB                = grp.readEntry("Effect Name (OpenGL)") == QString("Ken \
Burns"); +    opengl           = grp.readEntry("OpenGL", false);
+    shuffle          = grp.readEntry("Shuffle", false);
+    wantKB           = grp.readEntry("Effect Name (OpenGL)") == QString("Ken \
Burns");  
     if ( m_urlList->isEmpty() )
     {
         KMessageBox::sorry(kapp->activeWindow(), i18n("There are no images to \
                show."));
-	return;
+        return;
     }
 
     typedef QPair<QString, int> FileAnglePair;
@@ -230,25 +229,31 @@
         }
     }
 
-    if (!opengl) {
-      KIPISlideShowPlugin::SlideShow* slideShow = new \
KIPISlideShowPlugin::SlideShow(fileList, commentsList, m_imagesHasComments); +    if \
(!opengl)  +    {
+        KIPISlideShowPlugin::SlideShow* slideShow = new \
KIPISlideShowPlugin::SlideShow(fileList, +                                            \
commentsList, m_imagesHasComments);  slideShow->show();
     }
-    else {
+    else 
+    {
         if (!QGLFormat::hasOpenGL())
             KMessageBox::error(kapp->activeWindow(),
                                i18n("Sorry. OpenGL support not available on your \
                system"));
-        else {
-          if (wantKB) {
-            KIPISlideShowPlugin::SlideShowKB* slideShow =
-                new KIPISlideShowPlugin::SlideShowKB(fileList, commentsList, \
                m_imagesHasComments);
-            slideShow->show();
-          }
-          else {
-            KIPISlideShowPlugin::SlideShowGL * slideShow =
-                new KIPISlideShowPlugin::SlideShowGL(fileList, commentsList, \
                m_imagesHasComments);
-            slideShow->show();
-          }
+        else 
+        {
+            if (wantKB) 
+            {
+                KIPISlideShowPlugin::SlideShowKB* slideShow = new \
KIPISlideShowPlugin::SlideShowKB(fileList,  +                                         \
commentsList, m_imagesHasComments); +                slideShow->show();
+            }
+            else 
+            {
+                KIPISlideShowPlugin::SlideShowGL* slideShow = new \
KIPISlideShowPlugin::SlideShowGL(fileList,  +                                         \
commentsList, m_imagesHasComments); +                slideShow->show();
+            }
         }
     }
 }


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

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