You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdebase/kcontrol/info/memory.h

68 lines
1.4 KiB

#ifndef _MEMORY_H_KDEINFO_INCLUDED_
#define _MEMORY_H_KDEINFO_INCLUDED_
#include <tqwidget.h>
#include <tqframe.h>
#include <tqlabel.h>
#include <tqtabdialog.h>
#include <tqpushbutton.h>
#include <tqtimer.h>
#include <kcmodule.h>
#include <kaboutdata.h>
#include <config.h>
#ifdef HAVE_LONG_LONG
/* better to use long-long, because some 32bit-machines have more total
memory (with swap) than just the 4GB which fits into a 32bit-long */
typedef unsigned long long t_memsize;
#else
typedef unsigned long t_memsize;
#endif
#define COLOR_USED_MEMORY TQColor(255,0,0)
#define COLOR_USED_SWAP TQColor(255,134,64)
#define COLOR_FREE_MEMORY TQColor(127,255,212)
class KMemoryWidget:public KCModule {
Q_OBJECT
public:
KMemoryWidget(TQWidget * parent, const char *name = 0);
~KMemoryWidget();
TQString quickHelp() const;
private:
TQString Not_Available_Text;
TQTimer *timer;
bool ram_colors_initialized,
swap_colors_initialized,
all_colors_initialized;
TQColor ram_colors[4];
TQString ram_text[4];
TQColor swap_colors[2];
TQString swap_text[2];
TQColor all_colors[3];
TQString all_text[3];
void update();
bool Display_Graph(int widgetindex,
int count,
t_memsize total,
t_memsize *used,
TQColor *color,
TQString *text);
public slots:
void update_Values();
};
#endif // _MEMORY_H_KDEINFO_INCLUDED_