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

List:       kde-commits
Subject:    branches/work/make_kget_cool/kget
From:       Dario Massarin <nekkar () libero ! it>
Date:       2005-08-06 15:21:32
Message-ID: 1123341692.189082.12247.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 443541 by dario:

Add missing copyright to viewscontainer.cpp
Cleanups to kget.cpp



 M  +0 -110    kget.cpp  
 M  +30 -6     ui/viewscontainer.cpp  
 M  +11 -5     ui/viewscontainer.h  


--- branches/work/make_kget_cool/kget/kget.cpp #443540:443541
@@ -378,116 +378,6 @@
         it->stop();
 }
 
-/*
-class ActionStart : public TransferAction
-{
-    public:
-        ActionStart( const QString& text, const QString& pix, 
-                     const KShortcut& cut, KActionCollection* parent, 
-                     const char* name )
-            : TransferAction(text, pix, cut, parent, name)
-        {}
-
-        void execute(const QList<TransferHandler *> & transfers)
-        {
-            QList<TransferHandler *>::const_iterator it = transfers.begin();
-            QList<TransferHandler *>::const_iterator itEnd = transfers.end();
-
-            for( ; it!=itEnd ; ++it )
-                (*it)->start();
-        }
-};
-
-class ActionStop : public TransferAction
-{
-    public:
-        ActionStop( const QString& text, const QString& pix, 
-                    const KShortcut& cut, KActionCollection* parent, 
-                    const char* name )
-            : TransferAction(text, pix, cut, parent, name)
-        {}
-
-        void execute(const QList<TransferHandler *> & transfers)
-        {
-            QList<TransferHandler *>::const_iterator it = transfers.begin();
-            QList<TransferHandler *>::const_iterator itEnd = transfers.end();
-
-            for( ; it!=itEnd ; ++it )
-                (*it)->stop();
-        }
-};
-
-class ActionDelete : public TransferAction
-{
-    public:
-        ActionDelete( const QString& text, const QString& pix,
-                      const KShortcut& cut, KActionCollection* parent,
-                      const char* name )
-            : TransferAction(text, pix, cut, parent, name)
-        {}
-
-        void execute(const QList<TransferHandler *> & transfers)
-        {
-            QList<TransferHandler *>::const_iterator it = transfers.begin();
-            QList<TransferHandler *>::const_iterator itEnd = transfers.end();
-
-            for( ; it!=itEnd ; ++it )
-            {
-                (*it)->stop();
-                Model::delTransfer(*it);
-            }
-        }
-};
-
-class ActionOpenDestination : public TransferAction
-{
-    public:
-        ActionOpenDestination( const QString& text, const QString& pix,
-                               const KShortcut& cut, KActionCollection* parent,
-                               const char* name )
-            : TransferAction(text, pix, cut, parent, name)
-        {}
-
-        void execute(const QList<TransferHandler *> & transfers)
-        {
-            QStringList openedDirs;
-
-            QList<TransferHandler *>::const_iterator it = transfers.begin();
-            QList<TransferHandler *>::const_iterator itEnd = transfers.end();
-
-            for( ; it!=itEnd ; ++it )
-            {
-                QString directory = (*it)->dest().directory();
-                if( !openedDirs.contains( directory ) )
-                {
-                    kapp->invokeBrowser( directory );
-                    openedDirs.append( directory );
-                }
-            }
-        }
-};
-
-class ActionShowDetails : public TransferAction
-{
-    public:
-        ActionShowDetails( const QString& text, const QString& pix,
-                           const KShortcut& cut, KActionCollection* parent,
-                           const char* name )
-            : TransferAction(text, pix, cut, parent, name)
-        {}
-
-        void execute(const QList<TransferHandler *> & transfers)
-        {
-/*            foreach( TransferHandler * it, transfers )
-            {
-                
-            }
-        }
-};
-
-*/
-
-
 void KGet::slotTransfersDelete()
 {
     foreach(TransferHandler * it, Model::selectedTransfers())
--- branches/work/make_kget_cool/kget/ui/viewscontainer.cpp #443540:443541
@@ -1,6 +1,18 @@
+/* This file is part of the KDE project
+
+   Copyright (C) 2005 Dario Massarin <nekkar@libero.it>
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public
+   License as published by the Free Software Foundation; version 2
+   of the License.
+*/
+
+
 #include <klocale.h>
 #include <kiconloader.h>
 
+#include "core/transferhandler.h"
 #include "mainview.h"
 #include "viewscontainer.h"
 
@@ -10,11 +22,9 @@
 {
     //Bottom bar layout
     m_HLayout = new QHBoxLayout();
-    m_HLayout->setSpacing(0);
+    m_HLayout->setSpacing(1);
     m_HLayout->setMargin(0);
-    
 
-
     m_downloads = new QToolButton();
     m_downloads->setToolButtonStyle ( Qt::ToolButtonTextBesideIcon );
     m_downloads->setText(i18n("Downloads"));
@@ -27,18 +37,32 @@
 
     m_HLayout->addWidget(m_downloads);
     m_HLayout->addWidget(m_finished);
+    m_HLayout->addSpacing(20);
     m_HLayout->addStretch(1);
 
     //
-
     m_VLayout = new QVBoxLayout();
     m_VLayout->setSpacing(1);
     m_VLayout->setMargin(0);
     setLayout(m_VLayout);
 
+    m_SLayout = new QStackedLayout();
+
+    m_VLayout->addLayout(m_SLayout);
+    m_VLayout->addLayout(m_HLayout);
+
     m_mainView = new MainView();
-    m_VLayout->addWidget(m_mainView);
-    m_VLayout->addLayout(m_HLayout);
+    m_SLayout->addWidget(m_mainView);
 }
 
+void ViewsContainer::showTransferDetails(TransferHandler * transfer)
+{
+    
+}
 
+void ViewsContainer::closeTransferDetails(TransferHandler * transfer)
+{
+
+}
+
+
--- branches/work/make_kget_cool/kget/ui/viewscontainer.h #443540:443541
@@ -16,8 +16,10 @@
 #include <QToolButton>
 #include <QVBoxLayout>
 #include <QHBoxLayout>
+#include <QStackedLayout>
 
 class MainView;
+class TransferHandler;
 
 class ViewsContainer : public QWidget
 {
@@ -25,14 +27,18 @@
     public:
         ViewsContainer(QWidget * parent = 0);
 
+        void showTransferDetails(TransferHandler * transfer);
+        void closeTransferDetails(TransferHandler * transfer);
+
     private:
-        QVBoxLayout * m_VLayout;
-        QHBoxLayout * m_HLayout;
+        QVBoxLayout    * m_VLayout;
+        QHBoxLayout    * m_HLayout;
 
-        MainView    * m_mainView;
+        QStackedLayout * m_SLayout;
+        MainView       * m_mainView;
 
-        QToolButton * m_downloads;
-        QToolButton * m_finished;
+        QToolButton    * m_downloads;
+        QToolButton    * m_finished;
 };
 
 #endif
[prev in list] [next in list] [prev in thread] [next in thread] 

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