• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • @topname@
  • Sitemap
  • Contact Us
 

superkaramba

disksensor.h

00001 /***************************************************************************
00002  *   Copyright (C) 2003 by Hans Karlsson                                   *
00003  *   karlsson.h@home.se                                                      *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  ***************************************************************************/
00010 #ifndef DISKSENSOR_H
00011 #define DISKSENSOR_H
00012 #include "sensor.h"
00013 #include <tqmap.h>
00014 #include <tqstring.h>
00015 #include <tqtextcodec.h>
00016 #include <tqregexp.h>
00017 #include <tqstringlist.h>
00018 #include <kprocess.h>
00019 class DiskSensor :  public Sensor
00020 {
00021 Q_OBJECT
00022 public:
00023   DiskSensor(int msec );
00024   ~DiskSensor();
00025   void update();
00026   void setMaxValue( SensorParams *sp );
00027 
00028 private:
00029   long getFreeSpace(TQString mntPt) const;
00030   long getUsedSpace(TQString mntPt) const;
00031   long getTotalSpace(TQString mntPt) const;
00032   int getPercentUsed(TQString mntPt) const;
00033   int getPercentFree(TQString mntPt) const;
00034 
00035   KShellProcess ksp;
00036   TQString sensorResult;
00037 
00038   TQMap<TQString,TQString> mntMap;
00039   TQStringList stringList;
00040 
00041   int init;
00042 
00043 private slots:
00044   void receivedStdout(KProcess *, char *buffer, int);
00045   void processExited(KProcess *);
00046 
00047 signals:
00048   void initComplete();
00049 
00050 };
00051 #endif // DISKSENSOR_H

superkaramba

Skip menu "superkaramba"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members

@topname@

Skip menu "@topname@"
  • kcalc
  •   knumber
  • superkaramba
Generated for @topname@ by doxygen 1.5.6
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal