| # kio Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# kdiskfreesp.h

    00001 /*
    00002  * kdiskfreesp.h
    00003  *
    00004  * Copyright (c) 1999 Michael Kropfberger <michael.kropfberger@gmx.net>
    00005  *
    00006  * Requires the Qt widget libraries, available at no cost at
    00007  * http://www.troll.no/
    00008  *
    00009  *
    00010  *  This library is free software; you can redistribute it and/or
    00011  *  modify it under the terms of the GNU Library General Public
    00012  *  License version 2 as published by the Free Software Foundation.
    00013  *
    00014  *  This library is distributed in the hope that it will be useful,
    00015  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00016  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00017  *  Library General Public License for more details.
    00018  *
    00019  *  You should have received a copy of the GNU Library General Public License
    00020  *  along with this library; see the file COPYING.LIB.  If not, write to
    00021  *  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00022  *  Boston, MA 02111-1307, USA.
    00023  */
    00024
    00025
    00026 #ifndef __KDISKFREESP_H__
    00027 #define __KDISKFREESP_H__
    00028
    00029 #include <qobject.h>
    00030 #include <qstring.h>
    00031
    00032 class KProcess;
    00033
    00038 class KDiskFreeSp : public QObject
    00039 {  Q_OBJECT
    00040 public:
    00041    KDiskFreeSp( QObject *parent=0, const char *name=0 );
    00045    ~KDiskFreeSp();
    00052    int readDF( const QString & mountPoint );
    00053
    00061    static KDiskFreeSp * findUsageInfo( const QString & path );
    00062
    00063 signals:
    00064    void foundMountPoint( const QString & mountPoint, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail );
    00065
    00066    // This one is a hack around a weird (compiler?) bug. In the former signal,
    00067    // the slot in KPropsDlg would get 0L, 0L as the last two parameters.
    00068    // When using const ulong& instead, all is ok.
    00069    void foundMountPoint( const unsigned long&, const unsigned long&, const unsigned long&, const QString& );
    00070    void done();
    00071
    00072 private slots:
    00073    void receivedDFStdErrOut(KProcess *, char *data, int len);
    00074    void dfDone();
    00075
    00076 private:
    00077   KProcess         *dfProc;
    00078   QCString          dfStringErrOut;
    00079   QString           m_mountPoint;
    00080   bool              readingDFStdErrOut;
    00081   class KDiskFreeSpPrivate;
    00082   KDiskFreeSpPrivate * d;
    00083 };
    00084 /***************************************************************************/
    00085
    00086
    00087 #endif

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:13:25 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001