From 681dd53ed7283ffefaa6ceee6a10d95e19debe99 Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 19 Jan 2000 01:35:02 +0000 Subject: [PATCH] die, duplicated code. svn path=/trunk/kdegraphics/kdvi/; revision=38694 --- Makefile.am | 4 ++-- konq_progressproxy.cc | 56 ------------------------------------------- konq_progressproxy.h | 47 ------------------------------------ 3 files changed, 2 insertions(+), 105 deletions(-) delete mode 100644 konq_progressproxy.cc delete mode 100644 konq_progressproxy.h diff --git a/Makefile.am b/Makefile.am index 544299fc1..4e7eaa04b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,7 @@ libkdvi_la_SOURCES = kdvi.cpp dviwin.cpp marklist.cpp prefs.cpp print.cpp\ printData.cpp printSetup.cpp printSetupData.cpp pushbutton.cpp\ scrbox.cpp kdvi_miniwidget.cpp kdvi_view.cpp kbrowser.moc.cc\ psheader.c dvi_draw.c dvi_init.c font-open.c gf.c new.c pk.c psgs.c\ - special.c util.c vf.c # konq_progressproxy.cc + special.c util.c vf.c kdvi_SOURCES = main.cpp @@ -36,7 +36,7 @@ kdvi_LDADD = libkdvi.la ## this option you can leave out. Just, if you use "make dist", you need it noinst_HEADERS = c-openmx.h dvi.h dviwin.h kdvi.h marklist.h oconfig.h\ prefs.h print.h printData.h printSetup.h printSetupData.h pushbutton.h\ - scrbox.h xdvi.h kdvi_miniwidget.h kdvi_view.h # konq_progressproxy.h + scrbox.h xdvi.h kdvi_miniwidget.h kdvi_view.h messages: $(XGETTEXT) -C -ki18n -x $(includedir)/kde.pot *.cpp && mv messages.po $(podir)/kdvi.pot diff --git a/konq_progressproxy.cc b/konq_progressproxy.cc deleted file mode 100644 index 67e0544a3..000000000 --- a/konq_progressproxy.cc +++ /dev/null @@ -1,56 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 1999 Simon Hausmann - - 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; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "konq_progressproxy.h" - -#include - -#include - -KonqProgressProxy::KonqProgressProxy( BrowserView *view, KIOJob *job ) -: QObject( job ) -{ - - connect( job, SIGNAL( sigTotalSize( int, unsigned long ) ), this, SLOT( slotTotalSize( int, unsigned long ) ) ); - connect( job, SIGNAL( sigProcessedSize( int, unsigned long ) ), this, SLOT( slotProcessedSize( int, unsigned long ) ) ); - connect( job, SIGNAL( sigSpeed( int, unsigned long ) ), this, SLOT( slotSpeed( int, unsigned long ) ) ); - - connect( this, SIGNAL( loadingProgress( int ) ), view, SIGNAL( loadingProgress( int ) ) ); - connect( this, SIGNAL( speedProgress( int ) ), view, SIGNAL( speedProgress( int ) ) ); - - m_ulTotalDocumentSize = 0; -} - -void KonqProgressProxy::slotTotalSize( int, unsigned long size ) -{ - m_ulTotalDocumentSize = size; -} - -void KonqProgressProxy::slotProcessedSize( int, unsigned long size ) -{ - if ( m_ulTotalDocumentSize > (unsigned long)0 ) - emit loadingProgress( size * 100 / m_ulTotalDocumentSize ); -} - -void KonqProgressProxy::slotSpeed( int, unsigned long bytesPerSecond ) -{ - emit speedProgress( (long int)bytesPerSecond ); -} - -#include "konq_progressproxy.moc" diff --git a/konq_progressproxy.h b/konq_progressproxy.h deleted file mode 100644 index 2c49794bf..000000000 --- a/konq_progressproxy.h +++ /dev/null @@ -1,47 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 1999 Simon Hausmann - - 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; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __konq_progressproxy_h__ -#define __konq_progressproxy_h__ - -#include - -class BrowserView; -class KIOJob; - -class KonqProgressProxy : public QObject -{ - Q_OBJECT -public: - KonqProgressProxy( BrowserView *view, KIOJob *job ); - -protected slots: - void slotTotalSize( int, unsigned long size ); - void slotProcessedSize( int, unsigned long size ); - void slotSpeed( int, unsigned long bytesPerSecond ); - -signals: - void loadingProgress( int percent ); - void speedProgress( int bytesPerSecond ); - -private: - unsigned long m_ulTotalDocumentSize; -}; - -#endif