kpilot Library API Documentation

fileInstaller.h

00001 /* fileInstaller.h                      KPilot
00002 **
00003 ** Copyright (C) 1998-2001 by Dan Pilone
00004 **
00005 ** This is a class that does "the work" of adding and deleting
00006 ** files in the pending_install directory of KPilot. It is used
00007 ** by the fileInstallWidget and by the daemon's drag-and-drop
00008 ** file accepter.
00009 */
00010 
00011 /*
00012 ** This program is free software; you can redistribute it and/or modify
00013 ** it under the terms of the GNU General Public License as published by
00014 ** the Free Software Foundation; either version 2 of the License, or
00015 ** (at your option) any later version.
00016 **
00017 ** This program is distributed in the hope that it will be useful,
00018 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00020 ** GNU General Public License for more details.
00021 **
00022 ** You should have received a copy of the GNU General Public License
00023 ** along with this program in a file called COPYING; if not, write to
00024 ** the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
00025 ** MA 02111-1307, USA.
00026 */
00027 
00028 /*
00029 ** Bug reports and questions can be sent to kde-pim@kde.org
00030 */
00031 
00032 #ifndef _KPILOT_FILEINSTALLER_H
00033 #define _KPILOT_FILEINSTALLER_H
00034 
00035 #include <qobject.h>
00036 #include <qstring.h>
00037 #include <qstringlist.h>
00038 
00039 class QStrList;
00040 
00041 class FileInstaller : public QObject
00042 {
00043         Q_OBJECT
00044 public:
00045         FileInstaller();
00046         virtual ~FileInstaller();
00047 
00048         void clearPending();
00049 
00050         void addFiles(QStrList&);
00051         void addFiles(QStringList&);
00052         void addFile(const QString&);
00053 
00059         const QString &dir() const { return fDirName; } ;
00060         const QStringList fileNames() const ;
00061         
00062 
00063 
00064 protected:
00065         virtual bool runCopy(const QString &src);
00066 
00067 public slots:
00068         void copyCompleted();
00069         void setEnabled(bool);
00070         
00071 signals:
00072         void filesChanged();
00073 private:
00074         QString fDirName;
00075         int fPendingCopies;
00076         bool enabled;
00077 } ;
00078 
00079 #else
00080 #ifdef DEBUG
00081 #warning "File doubly included"
00082 #endif
00083 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sat Oct 18 02:47:14 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001