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

List:       kde-commits
Subject:    kdenox/konq-embed/src
From:       Eva Brucherseifer <eva () kde ! org>
Date:       2006-05-31 21:04:12
Message-ID: 1149109452.835888.27890.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 547110 by eva:

added animation icon while loading a web page


 M  +1 -1      Makefile.am  
 M  +2 -0      mainwindow_road.cc  
 M  +29 -1     roadmode.cc  
 M  +3 -2      roadmode.h  
 M  +1 -0      roadtabbar.cc  


--- trunk/kdenox/konq-embed/src/Makefile.am #547109:547110
@@ -54,7 +54,7 @@
 konqueror_DEPENDENCIES = $(LIB_KJSHTML) $(LIB_KHTML) $(LIB_ADDONS)
 BUILT_SOURCES = init.inc
 
-icon_DATA = $(shell ls $(srcdir)/pics/*png)
+icon_DATA = $(shell ls $(srcdir)/pics/*png $(srcdir)/pics/*gif)
 icondir = $(kde_icondir)
 
 dotdesktop_DATA = konqueror.desktop
--- trunk/kdenox/konq-embed/src/mainwindow_road.cc #547109:547110
@@ -709,6 +709,8 @@
 {
     setActionVisible( "go_stop", b );
     setActionVisible( "view_redisplay", !b );
+    
+    m_modes.at(m_defaultModeIdx)->modeBar()->setThrobble(b);
 }
 
 void MainWindowRoad::zoomIn()
--- trunk/kdenox/konq-embed/src/roadmode.cc #547109:547110
@@ -24,6 +24,8 @@
 #include "roadmode.h"
 #include "toggletoolbutton.h"
 
+#include <qmovie.h>
+
 #if (QT_VERSION < 0x030000)
 #define ROAD_DOCK_TOP QMainWindow::Top
 #define ROAD_DOCK_BOTTOM QMainWindow::Bottom
@@ -54,6 +56,14 @@
     m_pinBtn->setSizePolicy( QSizePolicy( QSizePolicy::Maximum, QSizePolicy::Maximum ) );
 
     m_loadStatus = new QLabel( this );
+    m_loadStatus->setMinimumWidth(20);
+    m_loadStatus->setMovie( KGlobal::dirs()->findResource("icon","Throbber.gif") );
+    m_loadStatus->hide();
+
+    m_loadLabel = new QLabel( this );
+    m_loadLabel->setPixmap( QPixmap( KGlobal::dirs()->findResource("icon","Throbber.png") ));
+    m_loadLabel->setMinimumWidth(20);
+    m_loadLabel->hide();
 }
 
 void ModeBar::showPinButton( bool b )
@@ -61,9 +71,26 @@
     if (m_pinBtn)
         (b) ? m_pinBtn->show() : m_pinBtn->hide();
     if (m_loadStatus)
-        (b) ? m_loadStatus->show() : m_pinBtn->hide();
+    {
+        (b) ? m_loadStatus->hide() : m_loadStatus->hide();
+        if (b) m_loadStatus->movie()->pause();
+    }
+    if (m_loadLabel)
+        (b) ? m_loadLabel->hide() : m_loadLabel->show();
 }
 
+void ModeBar::setThrobble( bool b )
+{
+    if (m_loadStatus)
+    {
+        (b) ? m_loadStatus->show() : m_loadStatus->hide();
+      //  (b) ? m_loadStatus->movie()->pause() : m_loadStatus->movie()->restart();
+    }
+    if (m_loadLabel)
+        (b) ? m_loadLabel->hide() : m_loadLabel->show();
+}
+
+
 void ModeBar::autoHide()
 {
     if (isVisible() && !m_blockAutoHide && !( m_pinBtn && m_pinBtn->isOn()))
@@ -105,6 +132,7 @@
             ? m_bar->mainWindow()->moveToolBar( m_bar, ROAD_DOCK_TOP, false, defaultModeToolBarIdx )
             : m_bar->mainWindow()->moveToolBar( m_bar, m_dockPos,     true,  -1 );
         m_bar->showPinButton( !b );
+
         if (b)
         {
             m_btn->setOn(true);  // this automatically shows the associated mode bar
--- trunk/kdenox/konq-embed/src/roadmode.h #547109:547110
@@ -47,6 +47,7 @@
     void finalize(); // call this after all subwidgets have been added
     void blockAutoHide( bool );
     void showPinButton( bool );
+    void setThrobble( bool );
 public slots:
     void autoHide();
 signals:
@@ -58,8 +59,7 @@
     QIconSet m_pinUpIcons;
     QIconSet m_pinDownIcons;
     QLabel *m_loadStatus;
-    QIconSet m_notLoadingIcon;
-    // HIER DAS ANIMIERTE STATUS ICON EINBAUEN 
+    QLabel *m_loadLabel;
 };
 
 /////////////////////////////////////////////////////////////////////////
@@ -72,6 +72,7 @@
                bool dockBottom = false );
      void setDefault( bool, int defaultModeToolBarIdx );
      QPixmap pixmap();
+     ModeBar* modeBar() { return m_bar; }
      const QString& description() { return m_desc; }
 private:
      QGuardedPtr<ModeBar> m_bar;
--- trunk/kdenox/konq-embed/src/roadtabbar.cc #547109:547110
@@ -38,6 +38,7 @@
 {
     initContextMenu();
     initTabParams();
+    setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
 }
 
 bool RoadTabBar::event( QEvent *e )
[prev in list] [next in list] [prev in thread] [next in thread] 

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