summaryrefslogtreecommitdiffstats
path: root/ksim/monitors/lm_sensors
diff options
context:
space:
mode:
Diffstat (limited to 'ksim/monitors/lm_sensors')
-rw-r--r--ksim/monitors/lm_sensors/NVCtrl.c20
-rw-r--r--ksim/monitors/lm_sensors/NVCtrl.h22
-rw-r--r--ksim/monitors/lm_sensors/NVCtrlLib.h14
-rw-r--r--ksim/monitors/lm_sensors/ksimsensors.cpp4
-rw-r--r--ksim/monitors/lm_sensors/ksimsensors.h3
-rw-r--r--ksim/monitors/lm_sensors/nv_control.h10
-rw-r--r--ksim/monitors/lm_sensors/sensorbase.cpp26
-rw-r--r--ksim/monitors/lm_sensors/sensorbase.h3
-rw-r--r--ksim/monitors/lm_sensors/sensorsconfig.cpp16
-rw-r--r--ksim/monitors/lm_sensors/sensorsconfig.h3
10 files changed, 62 insertions, 59 deletions
diff --git a/ksim/monitors/lm_sensors/NVCtrl.c b/ksim/monitors/lm_sensors/NVCtrl.c
index 6c61b8a..dd5f500 100644
--- a/ksim/monitors/lm_sensors/NVCtrl.c
+++ b/ksim/monitors/lm_sensors/NVCtrl.c
@@ -143,7 +143,7 @@ Bool XNVCTRLIsNvScreen (
void XNVCTRLSetAttribute (
Display *dpy,
int screen,
- unsigned int display_mask,
+ unsigned int display_tqmask,
unsigned int attribute,
int value
){
@@ -157,7 +157,7 @@ void XNVCTRLSetAttribute (
req->reqType = info->codes->major_opcode;
req->nvReqType = X_nvCtrlSetAttribute;
req->screen = screen;
- req->display_mask = display_mask;
+ req->display_tqmask = display_tqmask;
req->attribute = attribute;
req->value = value;
UnlockDisplay (dpy);
@@ -168,7 +168,7 @@ void XNVCTRLSetAttribute (
Bool XNVCTRLQueryAttribute (
Display *dpy,
int screen,
- unsigned int display_mask,
+ unsigned int display_tqmask,
unsigned int attribute,
int *value
){
@@ -187,7 +187,7 @@ Bool XNVCTRLQueryAttribute (
req->reqType = info->codes->major_opcode;
req->nvReqType = X_nvCtrlQueryAttribute;
req->screen = screen;
- req->display_mask = display_mask;
+ req->display_tqmask = display_tqmask;
req->attribute = attribute;
if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) {
UnlockDisplay (dpy);
@@ -205,7 +205,7 @@ Bool XNVCTRLQueryAttribute (
Bool XNVCTRLQueryStringAttribute (
Display *dpy,
int screen,
- unsigned int display_mask,
+ unsigned int display_tqmask,
unsigned int attribute,
char **ptr
){
@@ -227,7 +227,7 @@ Bool XNVCTRLQueryStringAttribute (
req->reqType = info->codes->major_opcode;
req->nvReqType = X_nvCtrlQueryStringAttribute;
req->screen = screen;
- req->display_mask = display_mask;
+ req->display_tqmask = display_tqmask;
req->attribute = attribute;
if (!_XReply (dpy, (xReply *) &rep, 0, False)) {
UnlockDisplay (dpy);
@@ -256,7 +256,7 @@ Bool XNVCTRLQueryStringAttribute (
Bool XNVCTRLQueryValidAttributeValues (
Display *dpy,
int screen,
- unsigned int display_mask,
+ unsigned int display_tqmask,
unsigned int attribute,
NVCTRLAttributeValidValuesRec *values
){
@@ -277,7 +277,7 @@ Bool XNVCTRLQueryValidAttributeValues (
req->reqType = info->codes->major_opcode;
req->nvReqType = X_nvCtrlQueryValidAttributeValues;
req->screen = screen;
- req->display_mask = display_mask;
+ req->display_tqmask = display_tqmask;
req->attribute = attribute;
if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) {
UnlockDisplay (dpy);
@@ -343,8 +343,8 @@ static Bool wire_to_event (Display *dpy, XEvent *host, xEvent *wire)
re->attribute_changed.display = dpy;
re->attribute_changed.time = event->u.attribute_changed.time;
re->attribute_changed.screen = event->u.attribute_changed.screen;
- re->attribute_changed.display_mask =
- event->u.attribute_changed.display_mask;
+ re->attribute_changed.display_tqmask =
+ event->u.attribute_changed.display_tqmask;
re->attribute_changed.attribute = event->u.attribute_changed.attribute;
re->attribute_changed.value = event->u.attribute_changed.value;
break;
diff --git a/ksim/monitors/lm_sensors/NVCtrl.h b/ksim/monitors/lm_sensors/NVCtrl.h
index 81c9432..5e78e27 100644
--- a/ksim/monitors/lm_sensors/NVCtrl.h
+++ b/ksim/monitors/lm_sensors/NVCtrl.h
@@ -26,7 +26,7 @@
/*
* Integer attributes; these are settable/gettable via
* XNVCTRLSetAttribute() and XNVCTRLQueryAttribute, respectively.
- * Some attributes may only be read; some may require a display_mask
+ * Some attributes may only be read; some may require a display_tqmask
* argument. This information is encoded in the "permission" comment
* after each attribute #define, and can be queried at run time with
* XNVCTRLQueryValidAttributeValues().
@@ -40,14 +40,14 @@
* various reasons: they represent static system information, they
* can only be changed by changing an XF86Config option, etc).
*
- * D: The attribute requires the display mask argument. The
+ * D: The attribute requires the display tqmask argument. The
* attributes NV_CTRL_CONNECTED_DISPLAYS and NV_CTRL_ENABLED_DISPLAYS
- * will be a bitmask of what display devices are connected and what
+ * will be a bittqmask of what display devices are connected and what
* display devices are enabled for use in X, respectively. Each bit
- * in the bitmask represents a display device; it is these bits which
- * should be used as the display_mask when dealing with attributes
+ * in the bittqmask represents a display device; it is these bits which
+ * should be used as the display_tqmask when dealing with attributes
* designated with "D" below. For attributes that do not require the
- * display mask, the argument is ignored.
+ * display tqmask, the argument is ignored.
*/
@@ -249,7 +249,7 @@
/*
- * NV_CTRL_CONNECTED_DISPLAYS - returns a display mask indicating what
+ * NV_CTRL_CONNECTED_DISPLAYS - returns a display tqmask indicating what
* display devices are connected to the GPU driving the specified X
* screen.
*/
@@ -258,7 +258,7 @@
/*
- * NV_CTRL_ENABLED_DISPLAYS - returns a display mask indicating what
+ * NV_CTRL_ENABLED_DISPLAYS - returns a display tqmask indicating what
* display devices are enabled for use on the specified X screen.
*/
@@ -717,7 +717,7 @@
/*
* NV_CTRL_STRING_DISPLAY_DEVICE_NAME - name of the display device
- * specified in the display_mask argument.
+ * specified in the display_tqmask argument.
*/
#define NV_CTRL_STRING_DISPLAY_DEVICE_NAME 4 /* R-D */
@@ -746,7 +746,7 @@
* is no fixed range of valid values.
*
* ATTRIBUTE_TYPE_BITMASK : the attribute is an integer value,
- * interpretted as a bitmask.
+ * interpretted as a bittqmask.
*
* ATTRIBUTE_TYPE_BOOL : the attribute is a boolean, valid values are
* either 1 (on/true) or 0 (off/false).
@@ -763,7 +763,7 @@
* which can only have certain values, depending on GPU.
*
*
- * The permissions field of NVCTRLAttributeValidValuesRec is a bitmask
+ * The permissions field of NVCTRLAttributeValidValuesRec is a bittqmask
* that may contain:
*
* ATTRIBUTE_TYPE_READ
diff --git a/ksim/monitors/lm_sensors/NVCtrlLib.h b/ksim/monitors/lm_sensors/NVCtrlLib.h
index 8d9cec4..704071c 100644
--- a/ksim/monitors/lm_sensors/NVCtrlLib.h
+++ b/ksim/monitors/lm_sensors/NVCtrlLib.h
@@ -55,7 +55,7 @@ Bool XNVCTRLIsNvScreen (
* Sets the attribute to the given value. The attributes and their
* possible values are listed in NVCtrl.h.
*
- * Not all attributes require the display_mask parameter; see
+ * Not all attributes require the display_tqmask parameter; see
* NVCtrl.h for details.
*
* Possible errors:
@@ -66,7 +66,7 @@ Bool XNVCTRLIsNvScreen (
void XNVCTRLSetAttribute (
Display *dpy,
int screen,
- unsigned int display_mask,
+ unsigned int display_tqmask,
unsigned int attribute,
int value
);
@@ -78,7 +78,7 @@ void XNVCTRLSetAttribute (
* If XNVCTRLQueryAttribute returns True, value will contain the
* value of the specified attribute.
*
- * Not all attributes require the display_mask parameter; see
+ * Not all attributes require the display_tqmask parameter; see
* NVCtrl.h for details.
*
* Possible errors:
@@ -90,7 +90,7 @@ void XNVCTRLSetAttribute (
Bool XNVCTRLQueryAttribute (
Display *dpy,
int screen,
- unsigned int display_mask,
+ unsigned int display_tqmask,
unsigned int attribute,
int *value
);
@@ -112,7 +112,7 @@ Bool XNVCTRLQueryAttribute (
Bool XNVCTRLQueryStringAttribute (
Display *dpy,
int screen,
- unsigned int display_mask,
+ unsigned int display_tqmask,
unsigned int attribute,
char **ptr
);
@@ -129,7 +129,7 @@ Bool XNVCTRLQueryStringAttribute (
Bool XNVCTRLQueryValidAttributeValues (
Display *dpy,
int screen,
- unsigned int display_mask,
+ unsigned int display_tqmask,
unsigned int attribute,
NVCTRLAttributeValidValuesRec *values
);
@@ -166,7 +166,7 @@ typedef struct {
Display *display;
Time time;
int screen;
- unsigned int display_mask;
+ unsigned int display_tqmask;
unsigned int attribute;
int value;
} XNVCtrlAttributeChangedEvent;
diff --git a/ksim/monitors/lm_sensors/ksimsensors.cpp b/ksim/monitors/lm_sensors/ksimsensors.cpp
index eb2614f..76bc4c3 100644
--- a/ksim/monitors/lm_sensors/ksimsensors.cpp
+++ b/ksim/monitors/lm_sensors/ksimsensors.cpp
@@ -71,8 +71,8 @@ void PluginModule::showAbout()
KAboutApplication(&aboutData).exec();
}
-SensorsView::SensorsView(KSim::PluginObject *parent, const char *name)
- : DCOPObject("sensors"), KSim::PluginView(parent, name)
+SensorsView::SensorsView(KSim::PluginObject *tqparent, const char *name)
+ : DCOPObject("sensors"), KSim::PluginView(tqparent, name)
{
config()->setGroup("Sensors");
(new TQVBoxLayout(this))->setAutoAdd(true);
diff --git a/ksim/monitors/lm_sensors/ksimsensors.h b/ksim/monitors/lm_sensors/ksimsensors.h
index a8a0482..195899e 100644
--- a/ksim/monitors/lm_sensors/ksimsensors.h
+++ b/ksim/monitors/lm_sensors/ksimsensors.h
@@ -48,8 +48,9 @@ class PluginModule : public KSim::PluginObject
class SensorsView : public KSim::PluginView, public KSimSensorsIface
{
Q_OBJECT
+ TQ_OBJECT
public:
- SensorsView(KSim::PluginObject *parent, const char *name);
+ SensorsView(KSim::PluginObject *tqparent, const char *name);
~SensorsView();
virtual void reparseConfig();
diff --git a/ksim/monitors/lm_sensors/nv_control.h b/ksim/monitors/lm_sensors/nv_control.h
index d94ee95..9900a00 100644
--- a/ksim/monitors/lm_sensors/nv_control.h
+++ b/ksim/monitors/lm_sensors/nv_control.h
@@ -87,7 +87,7 @@ typedef struct {
CARD8 nvReqType;
CARD16 length B16;
CARD32 screen B32;
- CARD32 display_mask B32;
+ CARD32 display_tqmask B32;
CARD32 attribute B32;
} xnvCtrlQueryAttributeReq;
#define sz_xnvCtrlQueryAttributeReq 16
@@ -111,7 +111,7 @@ typedef struct {
CARD8 nvReqType;
CARD16 length B16;
CARD32 screen B32;
- CARD32 display_mask B32;
+ CARD32 display_tqmask B32;
CARD32 attribute B32;
INT32 value B32;
} xnvCtrlSetAttributeReq;
@@ -122,7 +122,7 @@ typedef struct {
CARD8 nvReqType;
CARD16 length B16;
CARD32 screen B32;
- CARD32 display_mask B32;
+ CARD32 display_tqmask B32;
CARD32 attribute B32;
} xnvCtrlQueryStringAttributeReq;
#define sz_xnvCtrlQueryStringAttributeReq 16
@@ -150,7 +150,7 @@ typedef struct {
CARD8 nvReqType;
CARD16 length B16;
CARD32 screen B32;
- CARD32 display_mask B32;
+ CARD32 display_tqmask B32;
CARD32 attribute B32;
} xnvCtrlQueryValidAttributeValuesReq;
#define sz_xnvCtrlQueryValidAttributeValuesReq 16
@@ -192,7 +192,7 @@ typedef struct {
CARD16 sequenceNumber B16;
Time time B32;
CARD32 screen B32;
- CARD32 display_mask B32;
+ CARD32 display_tqmask B32;
CARD32 attribute B32;
CARD32 value B32;
CARD32 pad0 B32;
diff --git a/ksim/monitors/lm_sensors/sensorbase.cpp b/ksim/monitors/lm_sensors/sensorbase.cpp
index a0b82c5..de94a1b 100644
--- a/ksim/monitors/lm_sensors/sensorbase.cpp
+++ b/ksim/monitors/lm_sensors/sensorbase.cpp
@@ -126,7 +126,7 @@ void SensorBase::update()
m_sensorList.append(SensorInfo(currentSensor++, label,
TQString::fromUtf8(name), TQString::fromUtf8(chip->prefix),
- chipset, sensorType(TQString::fromLatin1(name))));
+ chipset, sensorType(TQString::tqfromLatin1(name))));
}
}
}
@@ -134,15 +134,15 @@ void SensorBase::update()
if (m_hasNVControl) {
int temp = 0;
if (XNVCTRLQueryAttribute(qt_xdisplay(), qt_xscreen(), 0 /* not used? */, NV_CTRL_GPU_CORE_TEMPERATURE, &temp)) {
- TQString name = TQString::fromLatin1("GPU Temp");
+ TQString name = TQString::tqfromLatin1("GPU Temp");
m_sensorList.append(SensorInfo(currentSensor++, TQString::number(temp),
- name, TQString::null, TQString::null, sensorType(name)));
+ name, TQString(), TQString(), sensorType(name)));
}
if (XNVCTRLQueryAttribute(qt_xdisplay(), qt_xscreen(), 0 /* not used? */, NV_CTRL_AMBIENT_TEMPERATURE, &temp)) {
- TQString name = TQString::fromLatin1("GPU Ambient Temp");
+ TQString name = TQString::tqfromLatin1("GPU Ambient Temp");
m_sensorList.append(SensorInfo(currentSensor++, TQString::number(temp),
- name, TQString::null, TQString::null, sensorType(name)));
+ name, TQString(), TQString(), sensorType(name)));
}
}
@@ -212,19 +212,19 @@ bool SensorBase::init()
TQString SensorBase::sensorType(const TQString &name)
{
- if (name.findRev("fan", -1, false) != -1)
+ if (name.tqfindRev("fan", -1, false) != -1)
return i18n("Rounds per minute", " RPM");
- if (name.findRev("temp", -1, false) != -1)
+ if (name.tqfindRev("temp", -1, false) != -1)
if (SensorBase::fahrenheit())
- return TQString::fromLatin1("°F");
+ return TQString::tqfromLatin1("°F");
else
- return TQString::fromLatin1("°C");
+ return TQString::tqfromLatin1("°C");
- if (name.findRev(TQRegExp("[^\\+]?[^\\-]?V$")) != -1)
+ if (name.tqfindRev(TQRegExp("[^\\+]?[^\\-]?V$")) != -1)
return i18n("Volt", "V");
- return TQString::null;
+ return TQString();
}
TQString SensorBase::chipsetString(const ChipName *c)
@@ -239,7 +239,7 @@ TQString SensorBase::chipsetString(const ChipName *c)
float SensorBase::formatValue(const TQString &label, float value)
{
- if (label.findRev("temp", -1, false) != -1)
+ if (label.tqfindRev("temp", -1, false) != -1)
return toFahrenheit(value);
return value;
@@ -247,7 +247,7 @@ float SensorBase::formatValue(const TQString &label, float value)
TQString SensorBase::formatString(const TQString &label, float value)
{
- if (label.findRev("fan", -1, false) != -1)
+ if (label.tqfindRev("fan", -1, false) != -1)
return TQString::number(value);
return TQString::number(value,'f',2);
diff --git a/ksim/monitors/lm_sensors/sensorbase.h b/ksim/monitors/lm_sensors/sensorbase.h
index 1c2d99c..7a39462 100644
--- a/ksim/monitors/lm_sensors/sensorbase.h
+++ b/ksim/monitors/lm_sensors/sensorbase.h
@@ -88,9 +88,10 @@ class SensorList : public TQValueList<SensorInfo>
SensorList(const SensorInfo &sensor) { append(sensor); }
};
-class SensorBase : public QObject
+class SensorBase : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
static SensorBase *self();
diff --git a/ksim/monitors/lm_sensors/sensorsconfig.cpp b/ksim/monitors/lm_sensors/sensorsconfig.cpp
index 2ab1235..e5f3b6a 100644
--- a/ksim/monitors/lm_sensors/sensorsconfig.cpp
+++ b/ksim/monitors/lm_sensors/sensorsconfig.cpp
@@ -37,13 +37,13 @@
#include <tqpopupmenu.h>
#include <tqpushbutton.h>
-class SensorViewItem : public QCheckListItem
+class SensorViewItem : public TQCheckListItem
{
public:
- SensorViewItem(TQListView *parent, const TQString &text1,
+ SensorViewItem(TQListView *tqparent, const TQString &text1,
const TQString &text2, const TQString &text3,
const TQString &text4)
- : TQCheckListItem(parent, text1, CheckBox)
+ : TQCheckListItem(tqparent, text1, CheckBox)
{
setText(1, text2);
setText(2, text3);
@@ -51,8 +51,8 @@ class SensorViewItem : public QCheckListItem
}
};
-SensorsConfig::SensorsConfig(KSim::PluginObject *parent, const char *name)
- : KSim::PluginPage(parent, name)
+SensorsConfig::SensorsConfig(KSim::PluginObject *tqparent, const char *name)
+ : KSim::PluginPage(tqparent, name)
{
m_layout = new TQGridLayout(this);
m_layout->setSpacing(6);
@@ -86,7 +86,7 @@ SensorsConfig::SensorsConfig(KSim::PluginObject *parent, const char *name)
m_updateLabel = new TQLabel(this);
m_updateLabel->setText(i18n("Update interval:"));
- m_updateLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed,
+ m_updateLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed,
TQSizePolicy::Fixed));
m_layout->addMultiCellWidget(m_updateLabel, 4, 4, 0, 0);
@@ -95,7 +95,7 @@ SensorsConfig::SensorsConfig(KSim::PluginObject *parent, const char *name)
TQLabel *intervalLabel = new TQLabel(this);
intervalLabel->setText(i18n("seconds"));
- intervalLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed,
+ intervalLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed,
TQSizePolicy::Fixed));
m_layout->addMultiCellWidget(intervalLabel, 4, 4, 2, 2);
}
@@ -233,7 +233,7 @@ void SensorsConfig::showEvent(TQShowEvent *)
const SensorList &list = SensorBase::self()->sensorsList();
SensorList::ConstIterator it;
for (it = list.begin(); it != list.end(); ++it) {
- TQListViewItem *item = m_sensorView->findItem((*it).sensorName(), 1);
+ TQListViewItem *item = m_sensorView->tqfindItem((*it).sensorName(), 1);
if (item)
item->setText(3, (*it).sensorValue() + (*it).sensorUnit());
}
diff --git a/ksim/monitors/lm_sensors/sensorsconfig.h b/ksim/monitors/lm_sensors/sensorsconfig.h
index 80ed701..f37c599 100644
--- a/ksim/monitors/lm_sensors/sensorsconfig.h
+++ b/ksim/monitors/lm_sensors/sensorsconfig.h
@@ -36,8 +36,9 @@ class TQTimer;
class SensorsConfig : public KSim::PluginPage
{
Q_OBJECT
+ TQ_OBJECT
public:
- SensorsConfig(KSim::PluginObject *parent, const char *name);
+ SensorsConfig(KSim::PluginObject *tqparent, const char *name);
~SensorsConfig();
void saveConfig();