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.
ksensors/src/lmsensordockpanel.h

73 lines
2.1 KiB

/***************************************************************************
lmsensordockpanel.h - description
-------------------
begin : Tue Sep 18 2001
copyright : (C) 2001 by Miguel Novas
email : michaell@teleline.es
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
#ifndef LMSENSORDOCKPANEL_H
#define LMSENSORDOCKPANEL_H
#include <ksystemtray.h>
#include <tdepopupmenu.h>
#include <ntqcolor.h>
#include "qlcddraw.h"
#include "sensor.h"
/**
*@author Miguel Novas
*/
class LMSensorDockPanel : public KSystemTray {
TQ_OBJECT
public:
LMSensorDockPanel(Sensor *newSensor=0, const char *name=0);
~LMSensorDockPanel();
static void writeColorAlarm (const char *name, const TQColor &color);
static void writeColorNormal(const char *name, const TQColor &color);
static void writeShowInDock (const char *name, bool fShow);
static TQColor readColorAlarm (const char *name);
static TQColor readColorNormal(const char *name);
static bool readShowInDock (const char *name);
public slots:
void setValue(double value);
void updateConfig();
signals:
void mouseEvent(TQMouseEvent *e);
protected:
void paintEvent ( TQPaintEvent * );
void mousePressEvent ( TQMouseEvent * );
void mouseReleaseEvent ( TQMouseEvent * );
private:
Sensor *sensor;
TQString strValue;
TQColor colorNormal,colorAlarm;
};
#endif