summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am57
-rw-r--r--src/Makefile.in1276
-rw-r--r--src/aboutcfgdesign.cpp458
-rw-r--r--src/aboutcfgdesign.h55
-rw-r--r--src/aboutcfgdesign.ui1408
-rw-r--r--src/cpupanel.cpp140
-rw-r--r--src/cpupanel.h54
-rw-r--r--src/cputimepanel.cpp142
-rw-r--r--src/cputimepanel.h47
-rw-r--r--src/generalcfg.cpp78
-rw-r--r--src/generalcfg.h44
-rw-r--r--src/generalcfgdesign.cpp103
-rw-r--r--src/generalcfgdesign.h52
-rw-r--r--src/generalcfgdesign.ui143
-rw-r--r--src/hdsensorslist.cpp224
-rw-r--r--src/hdsensorslist.h53
-rw-r--r--src/i8ksensorslist.cpp129
-rw-r--r--src/i8ksensorslist.h55
-rw-r--r--src/infopanels.cpp91
-rw-r--r--src/infopanels.h63
-rw-r--r--src/ksensors.cpp25
-rw-r--r--src/ksensors.desktop24
-rw-r--r--src/ksensors.h34
-rw-r--r--src/ksensors.lsm16
-rw-r--r--src/ksensorscfg.cpp98
-rw-r--r--src/ksensorscfg.h67
-rw-r--r--src/ksensorssplash.cpp43
-rw-r--r--src/ksensorssplash.h41
-rw-r--r--src/ksensorsui.rc8
-rw-r--r--src/lmsensor.cpp143
-rw-r--r--src/lmsensor.h73
-rw-r--r--src/lmsensordockpanel.cpp145
-rw-r--r--src/lmsensordockpanel.h72
-rw-r--r--src/lmsensorpanel.cpp168
-rw-r--r--src/lmsensorpanel.h66
-rw-r--r--src/lmsensors.cpp127
-rw-r--r--src/lmsensors.h71
-rw-r--r--src/lmsensorsalarms.cpp145
-rw-r--r--src/lmsensorsalarms.h61
-rw-r--r--src/lmsensorscfg.cpp292
-rw-r--r--src/lmsensorscfg.h68
-rw-r--r--src/lmsensorscfgdesign.cpp471
-rw-r--r--src/lmsensorscfgdesign.h134
-rw-r--r--src/lmsensorscfgdesign.ui1133
-rw-r--r--src/lmsensorschip.cpp72
-rw-r--r--src/lmsensorschip.h55
-rw-r--r--src/lmsensorsdock.cpp211
-rw-r--r--src/lmsensorsdock.h89
-rw-r--r--src/lmsensorswidget.cpp371
-rw-r--r--src/lmsensorswidget.h82
-rw-r--r--src/main.cpp74
-rw-r--r--src/palettecfg.cpp110
-rw-r--r--src/palettecfg.h52
-rw-r--r--src/palettecfgdesign.cpp153
-rw-r--r--src/palettecfgdesign.h50
-rw-r--r--src/palettecfgdesign.ui426
-rw-r--r--src/panel.cpp57
-rw-r--r--src/panel.h55
-rw-r--r--src/panelsgroup.cpp19
-rw-r--r--src/panelsgroup.h42
-rw-r--r--src/pics/Makefile.am62
-rw-r--r--src/pics/Makefile.in623
-rw-r--r--src/pics/battery.pngbin0 -> 3422 bytes
-rw-r--r--src/pics/battery18x18.pngbin0 -> 729 bytes
-rw-r--r--src/pics/computers.pngbin0 -> 4146 bytes
-rw-r--r--src/pics/cooler.pngbin0 -> 4560 bytes
-rw-r--r--src/pics/cooler18x18.pngbin0 -> 996 bytes
-rw-r--r--src/pics/earth.pngbin0 -> 4941 bytes
-rw-r--r--src/pics/harddisk.pngbin0 -> 4706 bytes
-rw-r--r--src/pics/hi16-app-ksensors.pngbin0 -> 448 bytes
-rw-r--r--src/pics/hi32-app-ksensors.pngbin0 -> 1767 bytes
-rw-r--r--src/pics/ksensorsbackground.pngbin0 -> 3968 bytes
-rw-r--r--src/pics/ksensorsdocked.pngbin0 -> 1014 bytes
-rw-r--r--src/pics/ksensorssplash.pngbin0 -> 103758 bytes
-rw-r--r--src/pics/lo16-app-ksensors.pngbin0 -> 448 bytes
-rw-r--r--src/pics/lo32-app-ksensors.pngbin0 -> 1767 bytes
-rw-r--r--src/pics/motherboard.pngbin0 -> 4732 bytes
-rw-r--r--src/pics/thermometer.pngbin0 -> 2800 bytes
-rw-r--r--src/pics/thermometer18x18.pngbin0 -> 630 bytes
-rw-r--r--src/processexec.cpp58
-rw-r--r--src/processexec.h55
-rw-r--r--src/procinfo.cpp156
-rw-r--r--src/procinfo.h23
-rw-r--r--src/qbarmeter.cpp179
-rw-r--r--src/qbarmeter.h63
-rw-r--r--src/qdialarc.cpp352
-rw-r--r--src/qdialarc.h89
-rw-r--r--src/qlcddraw.h66
-rw-r--r--src/qlcdraw.cpp275
-rw-r--r--src/qlcdstring.cpp114
-rw-r--r--src/qlcdstring.h76
-rw-r--r--src/rampanel.cpp106
-rw-r--r--src/rampanel.h48
-rw-r--r--src/sensor.cpp189
-rw-r--r--src/sensor.h113
-rw-r--r--src/sensorslist.cpp132
-rw-r--r--src/sensorslist.h92
-rw-r--r--src/sounds/Makefile.am13
-rw-r--r--src/sounds/Makefile.in478
-rw-r--r--src/sounds/ksensors_alert.wavbin0 -> 103596 bytes
-rw-r--r--src/systemcfg.cpp126
-rw-r--r--src/systemcfg.h56
-rw-r--r--src/systemcfgdesign.cpp143
-rw-r--r--src/systemcfgdesign.h64
-rw-r--r--src/systemcfgdesign.ui316
-rw-r--r--src/uptimepanel.cpp75
-rw-r--r--src/uptimepanel.h47
107 files changed, 14304 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..63c262d
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,57 @@
+# set the include path for X, qt and KDE
+INCLUDES = $(all_includes)
+
+# these are the headers for your project
+noinst_HEADERS = ksensors.h aboutcfgdesign.h \
+ cpupanel.h cputimepanel.h generalcfgdesign.h generalcfg.h \
+ hdsensorslist.h i8ksensorslist.h infopanels.h ksensorscfg.h \
+ ksensors.h ksensorssplash.h lmsensordockpanel.h lmsensor.h \
+ lmsensorpanel.h lmsensorsalarms.h lmsensorscfgdesign.h \
+ lmsensorscfg.h lmsensorschip.h lmsensorsdock.h lmsensors.h \
+ lmsensorswidget.h palettecfgdesign.h palettecfg.h panel.h \
+ panelsgroup.h processexec.h procinfo.h qbarmeter.h \
+ qdialarc.h qlcddraw.h qlcdstring.h rampanel.h sensor.h \
+ sensorslist.h systemcfgdesign.h systemcfg.h uptimepanel.h
+
+# let automoc handle all of the meta source files (moc)
+METASOURCES = AUTO
+
+messages: rc.cpp
+ $(XGETTEXT) *.cpp -o $(podir)/ksensors.pot
+
+
+#########################################################################
+# APPLICATION SECTION
+#########################################################################
+# this is the program that gets installed. it's name is used for all
+# of the other Makefile.am variables
+bin_PROGRAMS = ksensors
+
+# the application source, library search path, and link libraries
+ksensors_SOURCES = main.cpp ksensors.cpp aboutcfgdesign.ui \
+ cpupanel.cpp cputimepanel.cpp generalcfg.cpp \
+ generalcfgdesign.ui hdsensorslist.cpp i8ksensorslist.cpp \
+ infopanels.cpp ksensorscfg.cpp \
+ ksensorssplash.cpp lmsensor.cpp lmsensordockpanel.cpp \
+ lmsensorpanel.cpp lmsensorsalarms.cpp lmsensorscfg.cpp \
+ lmsensorscfgdesign.ui lmsensorschip.cpp lmsensors.cpp \
+ lmsensorsdock.cpp lmsensorswidget.cpp palettecfg.cpp \
+ palettecfgdesign.ui panel.cpp panelsgroup.cpp \
+ processexec.cpp procinfo.cpp qbarmeter.cpp \
+ qdialarc.cpp qlcdraw.cpp qlcdstring.cpp \
+ rampanel.cpp sensor.cpp sensorslist.cpp \
+ systemcfg.cpp systemcfgdesign.ui uptimepanel.cpp
+
+ksensors_LDFLAGS = $(KDE_RPATH) $(all_libraries)
+ksensors_LDADD = $(LIB_KDEUI) $(LIB_KDECORE) -lsensors -lm
+
+# this is where the desktop file will go
+shelldesktopdir = $(kde_appsdir)/Utilities
+shelldesktop_DATA = ksensors.desktop
+
+# this is where the shell's XML-GUI resource file goes
+shellrcdir = $(kde_datadir)/ksensors
+shellrc_DATA = ksensorsui.rc
+
+SUBDIRS = pics sounds
+
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..8544ec8
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,1276 @@
+# Makefile.in generated by automake 1.6.3 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 1.5 $
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+
+EXEEXT = @EXEEXT@
+OBJEXT = @OBJEXT@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+AMTAR = @AMTAR@
+ARTSCCONFIG = @ARTSCCONFIG@
+AS = @AS@
+AUTODIRS = @AUTODIRS@
+AWK = @AWK@
+BROCKENBORING = @BROCKENBORING@
+CC = @CC@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN = @DOXYGEN@
+DOXYGEN_PROJECT_NAME = @DOXYGEN_PROJECT_NAME@
+DOXYGEN_PROJECT_NUMBER = @DOXYGEN_PROJECT_NUMBER@
+DPMSINC = @DPMSINC@
+DPMSLIB = @DPMSLIB@
+ECHO = @ECHO@
+FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
+GLINC = @GLINC@
+GLLIB = @GLLIB@
+GMSGFMT = @GMSGFMT@
+IDL = @IDL@
+IDL_DEPENDENCIES = @IDL_DEPENDENCIES@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JAR = @JAR@
+JAVAC = @JAVAC@
+JAVAH = @JAVAH@
+JVMLIBS = @JVMLIBS@
+KDECONFIG = @KDECONFIG@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_HAS_DOXYGEN = @KDE_HAS_DOXYGEN@
+KDE_HAVE_DOT = @KDE_HAVE_DOT@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_RPATH = @KDE_RPATH@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBBZ2 = @LIBBZ2@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBGEN = @LIBGEN@
+LIBJPEG = @LIBJPEG@
+LIBMICO = @LIBMICO@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBPYTHON = @LIBPYTHON@
+LIBQIMGIO = @LIBQIMGIO@
+LIBRESOLV = @LIBRESOLV@
+LIBSHADOW = @LIBSHADOW@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBSSL = @LIBSSL@
+LIBTIFF = @LIBTIFF@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBZ = @LIBZ@
+LIB_JASPER = @LIB_JASPER@
+LIB_KAB = @LIB_KAB@
+LIB_KABC = @LIB_KABC@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIMGIO = @LIB_KIMGIO@
+LIB_KIO = @LIB_KIO@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_POLL = @LIB_POLL@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_QTOPIA = @LIB_QTOPIA@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LIB_XRENDER = @LIB_XRENDER@
+LN_S = @LN_S@
+MCOPIDL = @MCOPIDL@
+MEINPROC = @MEINPROC@
+MICO_INCLUDES = @MICO_INCLUDES@
+MICO_LDFLAGS = @MICO_LDFLAGS@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJC = @OBJC@
+OBJCFLAGS = @OBJCFLAGS@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+PAMLIBS = @PAMLIBS@
+PASSWDLIBS = @PASSWDLIBS@
+PYTHONINC = @PYTHONINC@
+PYTHONLIB = @PYTHONLIB@
+PYTHONMODDIR = @PYTHONMODDIR@
+QTDOCDIR = @QTDOCDIR@
+QTE_NORTTI = @QTE_NORTTI@
+QTOPIA_INCLUDES = @QTOPIA_INCLUDES@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+RC = @RC@
+SETUIDFLAGS = @SETUIDFLAGS@
+SSL_INCLUDES = @SSL_INCLUDES@
+SSL_LDFLAGS = @SSL_LDFLAGS@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+XGETTEXT = @XGETTEXT@
+XPMINC = @XPMINC@
+XPMLIB = @XPMLIB@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+X_PRE_LIBS = @X_PRE_LIBS@
+X_RPATH = @X_RPATH@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+am__include = @am__include@
+am__quote = @am__quote@
+idldir = @idldir@
+install_sh = @install_sh@
+jni_includes = @jni_includes@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+kdeinitdir = @kdeinitdir@
+micodir = @micodir@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+xdg_appsdir = @xdg_appsdir@
+xdg_directorydir = @xdg_directorydir@
+
+# set the include path for X, qt and KDE
+INCLUDES = $(all_includes)
+
+# these are the headers for your project
+noinst_HEADERS = ksensors.h aboutcfgdesign.h \
+ cpupanel.h cputimepanel.h generalcfgdesign.h generalcfg.h \
+ hdsensorslist.h i8ksensorslist.h infopanels.h ksensorscfg.h \
+ ksensors.h ksensorssplash.h lmsensordockpanel.h lmsensor.h \
+ lmsensorpanel.h lmsensorsalarms.h lmsensorscfgdesign.h \
+ lmsensorscfg.h lmsensorschip.h lmsensorsdock.h lmsensors.h \
+ lmsensorswidget.h palettecfgdesign.h palettecfg.h panel.h \
+ panelsgroup.h processexec.h procinfo.h qbarmeter.h \
+ qdialarc.h qlcddraw.h qlcdstring.h rampanel.h sensor.h \
+ sensorslist.h systemcfgdesign.h systemcfg.h uptimepanel.h
+
+
+# let automoc handle all of the meta source files (moc)
+#>- METASOURCES = AUTO
+
+#########################################################################
+# APPLICATION SECTION
+#########################################################################
+# this is the program that gets installed. it's name is used for all
+# of the other Makefile.am variables
+bin_PROGRAMS = ksensors
+
+# the application source, library search path, and link libraries
+#>- ksensors_SOURCES = main.cpp ksensors.cpp aboutcfgdesign.ui \
+#>- cpupanel.cpp cputimepanel.cpp generalcfg.cpp \
+#>- generalcfgdesign.ui hdsensorslist.cpp i8ksensorslist.cpp \
+#>- infopanels.cpp ksensorscfg.cpp \
+#>- ksensorssplash.cpp lmsensor.cpp lmsensordockpanel.cpp \
+#>- lmsensorpanel.cpp lmsensorsalarms.cpp lmsensorscfg.cpp \
+#>- lmsensorscfgdesign.ui lmsensorschip.cpp lmsensors.cpp \
+#>- lmsensorsdock.cpp lmsensorswidget.cpp palettecfg.cpp \
+#>- palettecfgdesign.ui panel.cpp panelsgroup.cpp \
+#>- processexec.cpp procinfo.cpp qbarmeter.cpp \
+#>- qdialarc.cpp qlcdraw.cpp qlcdstring.cpp \
+#>- rampanel.cpp sensor.cpp sensorslist.cpp \
+#>- systemcfg.cpp systemcfgdesign.ui uptimepanel.cpp
+#>+ 13
+ksensors_SOURCES=main.cpp ksensors.cpp \
+ cpupanel.cpp cputimepanel.cpp generalcfg.cpp \
+ hdsensorslist.cpp i8ksensorslist.cpp \
+ infopanels.cpp ksensorscfg.cpp \
+ ksensorssplash.cpp lmsensor.cpp lmsensordockpanel.cpp \
+ lmsensorpanel.cpp lmsensorsalarms.cpp lmsensorscfg.cpp \
+ lmsensorschip.cpp lmsensors.cpp \
+ lmsensorsdock.cpp lmsensorswidget.cpp palettecfg.cpp \
+ panel.cpp panelsgroup.cpp \
+ processexec.cpp procinfo.cpp qbarmeter.cpp \
+ qdialarc.cpp qlcdraw.cpp qlcdstring.cpp \
+ rampanel.cpp sensor.cpp sensorslist.cpp \
+ systemcfg.cpp uptimepanel.cpp aboutcfgdesign.cpp generalcfgdesign.cpp lmsensorscfgdesign.cpp palettecfgdesign.cpp systemcfgdesign.cpp
+
+
+ksensors_LDFLAGS = $(KDE_RPATH) $(all_libraries)
+ksensors_LDADD = $(LIB_KDEUI) $(LIB_KDECORE) -lsensors -lm
+
+# this is where the desktop file will go
+shelldesktopdir = $(kde_appsdir)/Utilities
+shelldesktop_DATA = ksensors.desktop
+
+# this is where the shell's XML-GUI resource file goes
+shellrcdir = $(kde_datadir)/ksensors
+shellrc_DATA = ksensorsui.rc
+
+SUBDIRS = pics sounds
+subdir = src
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+bin_PROGRAMS = ksensors$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
+
+am_ksensors_OBJECTS = main.$(OBJEXT) ksensors.$(OBJEXT) \
+ cpupanel.$(OBJEXT) cputimepanel.$(OBJEXT) generalcfg.$(OBJEXT) \
+ hdsensorslist.$(OBJEXT) i8ksensorslist.$(OBJEXT) \
+ infopanels.$(OBJEXT) ksensorscfg.$(OBJEXT) \
+ ksensorssplash.$(OBJEXT) lmsensor.$(OBJEXT) \
+ lmsensordockpanel.$(OBJEXT) lmsensorpanel.$(OBJEXT) \
+ lmsensorsalarms.$(OBJEXT) lmsensorscfg.$(OBJEXT) \
+ lmsensorschip.$(OBJEXT) lmsensors.$(OBJEXT) \
+ lmsensorsdock.$(OBJEXT) lmsensorswidget.$(OBJEXT) \
+ palettecfg.$(OBJEXT) panel.$(OBJEXT) panelsgroup.$(OBJEXT) \
+ processexec.$(OBJEXT) procinfo.$(OBJEXT) qbarmeter.$(OBJEXT) \
+ qdialarc.$(OBJEXT) qlcdraw.$(OBJEXT) qlcdstring.$(OBJEXT) \
+ rampanel.$(OBJEXT) sensor.$(OBJEXT) sensorslist.$(OBJEXT) \
+ systemcfg.$(OBJEXT) uptimepanel.$(OBJEXT)
+#>- ksensors_OBJECTS = $(am_ksensors_OBJECTS)
+#>+ 18
+ksensors_final_OBJECTS = ksensors.all_cpp.o
+ksensors_nofinal_OBJECTS = main.$(OBJEXT) ksensors.$(OBJEXT) \
+ cpupanel.$(OBJEXT) cputimepanel.$(OBJEXT) generalcfg.$(OBJEXT) \
+ hdsensorslist.$(OBJEXT) i8ksensorslist.$(OBJEXT) \
+ infopanels.$(OBJEXT) ksensorscfg.$(OBJEXT) \
+ ksensorssplash.$(OBJEXT) lmsensor.$(OBJEXT) \
+ lmsensordockpanel.$(OBJEXT) lmsensorpanel.$(OBJEXT) \
+ lmsensorsalarms.$(OBJEXT) lmsensorscfg.$(OBJEXT) \
+ lmsensorschip.$(OBJEXT) lmsensors.$(OBJEXT) \
+ lmsensorsdock.$(OBJEXT) lmsensorswidget.$(OBJEXT) \
+ palettecfg.$(OBJEXT) panel.$(OBJEXT) panelsgroup.$(OBJEXT) \
+ processexec.$(OBJEXT) procinfo.$(OBJEXT) qbarmeter.$(OBJEXT) \
+ qdialarc.$(OBJEXT) qlcdraw.$(OBJEXT) qlcdstring.$(OBJEXT) \
+ rampanel.$(OBJEXT) sensor.$(OBJEXT) sensorslist.$(OBJEXT) \
+ systemcfg.$(OBJEXT) uptimepanel.$(OBJEXT) aboutcfgdesign.$(OBJEXT) generalcfgdesign.$(OBJEXT) lmsensorscfgdesign.$(OBJEXT) palettecfgdesign.$(OBJEXT) systemcfgdesign.$(OBJEXT)\
+panelsgroup.moc.o sensor.moc.o i8ksensorslist.moc.o lmsensorswidget.moc.o panel.moc.o lmsensordockpanel.moc.o lmsensorsalarms.moc.o generalcfg.moc.o hdsensorslist.moc.o infopanels.moc.o ksensorscfg.moc.o systemcfg.moc.o lmsensors.moc.o qlcdstring.moc.o qdialarc.moc.o ksensorssplash.moc.o lmsensorpanel.moc.o qbarmeter.moc.o cpupanel.moc.o palettecfg.moc.o lmsensorschip.moc.o processexec.moc.o uptimepanel.moc.o sensorslist.moc.o lmsensorsdock.moc.o lmsensorscfg.moc.o lmsensor.moc.o
+@KDE_USE_FINAL_FALSE@ksensors_OBJECTS = $(ksensors_nofinal_OBJECTS)
+@KDE_USE_FINAL_TRUE@ksensors_OBJECTS = $(ksensors_final_OBJECTS)
+ksensors_DEPENDENCIES =
+
+DEFS = @DEFS@
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
+am__depfiles_maybe = depfiles
+#>- @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/cpupanel.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/cputimepanel.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/generalcfg.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/hdsensorslist.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/i8ksensorslist.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/infopanels.Po ./$(DEPDIR)/ksensors.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/ksensorscfg.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/ksensorssplash.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/lmsensor.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/lmsensordockpanel.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/lmsensorpanel.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/lmsensors.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/lmsensorsalarms.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/lmsensorscfg.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/lmsensorschip.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/lmsensorsdock.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/lmsensorswidget.Po ./$(DEPDIR)/main.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/palettecfg.Po ./$(DEPDIR)/panel.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/panelsgroup.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/processexec.Po ./$(DEPDIR)/procinfo.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/qbarmeter.Po ./$(DEPDIR)/qdialarc.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/qlcdraw.Po ./$(DEPDIR)/qlcdstring.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/rampanel.Po ./$(DEPDIR)/sensor.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/sensorslist.Po ./$(DEPDIR)/systemcfg.Po \
+#>- @AMDEP_TRUE@ ./$(DEPDIR)/uptimepanel.Po
+#>+ 50
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@DEP_FILES = $(DEPDIR)/aboutcfgdesign.P $(DEPDIR)/generalcfgdesign.P $(DEPDIR)/lmsensorscfgdesign.P $(DEPDIR)/palettecfgdesign.P $(DEPDIR)/systemcfgdesign.P $(DEPDIR)/panelsgroup.moc.P $(DEPDIR)/sensor.moc.P $(DEPDIR)/i8ksensorslist.moc.P $(DEPDIR)/lmsensorswidget.moc.P $(DEPDIR)/panel.moc.P $(DEPDIR)/lmsensordockpanel.moc.P $(DEPDIR)/lmsensorsalarms.moc.P $(DEPDIR)/generalcfg.moc.P $(DEPDIR)/hdsensorslist.moc.P $(DEPDIR)/infopanels.moc.P $(DEPDIR)/ksensorscfg.moc.P $(DEPDIR)/systemcfg.moc.P $(DEPDIR)/lmsensors.moc.P $(DEPDIR)/qlcdstring.moc.P $(DEPDIR)/qdialarc.moc.P $(DEPDIR)/ksensorssplash.moc.P $(DEPDIR)/lmsensorpanel.moc.P $(DEPDIR)/qbarmeter.moc.P $(DEPDIR)/cpupanel.moc.P $(DEPDIR)/palettecfg.moc.P $(DEPDIR)/lmsensorschip.moc.P $(DEPDIR)/processexec.moc.P $(DEPDIR)/uptimepanel.moc.P $(DEPDIR)/lmsensorsdock.moc.P $(DEPDIR)/lmsensorscfg.moc.P $(DEPDIR)/lmsensor.moc.P $(DEPDIR)/ksensors.all_cpp.P ./$(DEPDIR)/cpupanel.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/cputimepanel.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/generalcfg.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/hdsensorslist.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/i8ksensorslist.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/infopanels.Po ./$(DEPDIR)/ksensors.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/ksensorscfg.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/ksensorssplash.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/lmsensor.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/lmsensordockpanel.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/lmsensorpanel.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/lmsensors.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/lmsensorsalarms.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/lmsensorscfg.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/lmsensorschip.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/lmsensorsdock.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/lmsensorswidget.Po ./$(DEPDIR)/main.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/palettecfg.Po ./$(DEPDIR)/panel.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/panelsgroup.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/processexec.Po ./$(DEPDIR)/procinfo.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/qbarmeter.Po ./$(DEPDIR)/qdialarc.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/qlcdraw.Po ./$(DEPDIR)/qlcdstring.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/rampanel.Po ./$(DEPDIR)/sensor.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/sensorslist.Po ./$(DEPDIR)/systemcfg.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_TRUE@ @AMDEP_TRUE@ ./$(DEPDIR)/uptimepanel.Po
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@DEP_FILES = $(DEPDIR)/aboutcfgdesign.P $(DEPDIR)/generalcfgdesign.P $(DEPDIR)/lmsensorscfgdesign.P $(DEPDIR)/palettecfgdesign.P $(DEPDIR)/systemcfgdesign.P $(DEPDIR)/panelsgroup.moc.P $(DEPDIR)/sensor.moc.P $(DEPDIR)/i8ksensorslist.moc.P $(DEPDIR)/lmsensorswidget.moc.P $(DEPDIR)/panel.moc.P $(DEPDIR)/lmsensordockpanel.moc.P $(DEPDIR)/lmsensorsalarms.moc.P $(DEPDIR)/generalcfg.moc.P $(DEPDIR)/hdsensorslist.moc.P $(DEPDIR)/infopanels.moc.P $(DEPDIR)/ksensorscfg.moc.P $(DEPDIR)/systemcfg.moc.P $(DEPDIR)/lmsensors.moc.P $(DEPDIR)/qlcdstring.moc.P $(DEPDIR)/qdialarc.moc.P $(DEPDIR)/ksensorssplash.moc.P $(DEPDIR)/lmsensorpanel.moc.P $(DEPDIR)/qbarmeter.moc.P $(DEPDIR)/cpupanel.moc.P $(DEPDIR)/palettecfg.moc.P $(DEPDIR)/lmsensorschip.moc.P $(DEPDIR)/processexec.moc.P $(DEPDIR)/uptimepanel.moc.P $(DEPDIR)/lmsensorsdock.moc.P $(DEPDIR)/lmsensorscfg.moc.P $(DEPDIR)/lmsensor.moc.P ./$(DEPDIR)/cpupanel.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/cputimepanel.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/generalcfg.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/hdsensorslist.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/i8ksensorslist.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/infopanels.Po ./$(DEPDIR)/ksensors.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/ksensorscfg.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/ksensorssplash.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/lmsensor.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/lmsensordockpanel.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/lmsensorpanel.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/lmsensors.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/lmsensorsalarms.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/lmsensorscfg.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/lmsensorschip.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/lmsensorsdock.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/lmsensorswidget.Po ./$(DEPDIR)/main.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/palettecfg.Po ./$(DEPDIR)/panel.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/panelsgroup.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/processexec.Po ./$(DEPDIR)/procinfo.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/qbarmeter.Po ./$(DEPDIR)/qdialarc.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/qlcdraw.Po ./$(DEPDIR)/qlcdstring.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/rampanel.Po ./$(DEPDIR)/sensor.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/sensorslist.Po ./$(DEPDIR)/systemcfg.Po \
+@AMDEP_TRUE@@KDE_USE_FINAL_FALSE@ @AMDEP_TRUE@ ./$(DEPDIR)/uptimepanel.Po
+#>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 2
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+#>- LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \
+#>- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+#>- $(AM_CXXFLAGS) $(CXXFLAGS)
+#>+ 3
+LTCXXCOMPILE = $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
+CXXLD = $(CXX)
+#>- CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
+#>- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+#>+ 2
+CXXLINK = $(LIBTOOL) --mode=link --tag=CXX $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+CXXFLAGS = @CXXFLAGS@
+DIST_SOURCES = $(ksensors_SOURCES)
+DATA = $(shelldesktop_DATA) $(shellrc_DATA)
+
+HEADERS = $(noinst_HEADERS)
+
+
+#>- RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
+#>- uninstall-info-recursive all-recursive install-data-recursive \
+#>- install-exec-recursive installdirs-recursive install-recursive \
+#>- uninstall-recursive check-recursive installcheck-recursive
+#>+ 4
+RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
+ uninstall-info-recursive all-recursive install-data-recursive \
+ install-exec-recursive installdirs-recursive install-recursive \
+ uninstall-recursive check-recursive installcheck-recursive nmcheck-recursive bcheck-recursive
+DIST_COMMON = $(noinst_HEADERS) Makefile.am Makefile.in
+DIST_SUBDIRS = $(SUBDIRS)
+SOURCES = $(ksensors_SOURCES)
+
+#>- all: all-recursive
+#>+ 1
+all: docs-am all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu src/Makefile
+#>+ 3
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/Makefile
+ cd $(top_srcdir) && perl admin/am_edit ksensors-0.7.3/src/Makefile.in
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ || test -f $$p1 \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+ rm -f $(DESTDIR)$(bindir)/$$f; \
+ done
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+ksensors$(EXEEXT): $(ksensors_OBJECTS) $(ksensors_DEPENDENCIES)
+ @rm -f ksensors$(EXEEXT)
+ $(CXXLINK) $(ksensors_LDFLAGS) $(ksensors_OBJECTS) $(ksensors_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpupanel.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cputimepanel.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generalcfg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hdsensorslist.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i8ksensorslist.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/infopanels.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ksensors.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ksensorscfg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ksensorssplash.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lmsensor.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lmsensordockpanel.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lmsensorpanel.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lmsensors.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lmsensorsalarms.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lmsensorscfg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lmsensorschip.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lmsensorsdock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lmsensorswidget.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/palettecfg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panel.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panelsgroup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/processexec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procinfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qbarmeter.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qdialarc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qlcdraw.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qlcdstring.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rampanel.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sensor.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sensorslist.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/systemcfg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uptimepanel.Po@am__quote@
+
+distclean-depend:
+ -rm -rf ./$(DEPDIR)
+
+.cpp.o:
+@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+
+.cpp.obj:
+@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(CXXCOMPILE) -c -o $@ `cygpath -w $<`
+
+.cpp.lo:
+@AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+CXXDEPMODE = @CXXDEPMODE@
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+shelldesktopDATA_INSTALL = $(INSTALL_DATA)
+install-shelldesktopDATA: $(shelldesktop_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(shelldesktopdir)
+ @list='$(shelldesktop_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " $(shelldesktopDATA_INSTALL) $$d$$p $(DESTDIR)$(shelldesktopdir)/$$f"; \
+ $(shelldesktopDATA_INSTALL) $$d$$p $(DESTDIR)$(shelldesktopdir)/$$f; \
+ done
+
+uninstall-shelldesktopDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(shelldesktop_DATA)'; for p in $$list; do \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " rm -f $(DESTDIR)$(shelldesktopdir)/$$f"; \
+ rm -f $(DESTDIR)$(shelldesktopdir)/$$f; \
+ done
+shellrcDATA_INSTALL = $(INSTALL_DATA)
+install-shellrcDATA: $(shellrc_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(shellrcdir)
+ @list='$(shellrc_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " $(shellrcDATA_INSTALL) $$d$$p $(DESTDIR)$(shellrcdir)/$$f"; \
+ $(shellrcDATA_INSTALL) $$d$$p $(DESTDIR)$(shellrcdir)/$$f; \
+ done
+
+uninstall-shellrcDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(shellrc_DATA)'; for p in $$list; do \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " rm -f $(DESTDIR)$(shellrcdir)/$$f"; \
+ rm -f $(DESTDIR)$(shellrcdir)/$$f; \
+ done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @set fnord $$MAKEFLAGS; amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $$MAKEFLAGS; amf=$$2; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+
+ETAGS = etags
+ETAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+#>+ 1
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @list='$(DISTFILES)'; for file in $$list; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" \
+ distdir=../$(distdir)/$$subdir \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(PROGRAMS) $(DATA) $(HEADERS)
+installdirs: installdirs-recursive
+installdirs-am:
+ $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(shelldesktopdir) $(DESTDIR)$(shellrcdir)
+
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+#>- clean: clean-recursive
+#>+ 1
+clean: kde-rpo-clean clean-recursive
+
+#>- clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+#>+ 1
+clean-am: clean-metasources clean-ui clean-bcheck clean-final clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+
+distclean-am: clean-am distclean-compile distclean-depend \
+ distclean-generic distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-shelldesktopDATA install-shellrcDATA
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am \
+ uninstall-shelldesktopDATA uninstall-shellrcDATA
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
+ clean-binPROGRAMS clean-generic clean-libtool clean-recursive \
+ distclean distclean-compile distclean-depend distclean-generic \
+ distclean-libtool distclean-recursive distclean-tags distdir \
+ dvi dvi-am dvi-recursive info info-am info-recursive install \
+ install-am install-binPROGRAMS install-data install-data-am \
+ install-data-recursive install-exec install-exec-am \
+ install-exec-recursive install-info install-info-am \
+ install-info-recursive install-man install-recursive \
+ install-shelldesktopDATA install-shellrcDATA install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ installdirs-recursive maintainer-clean maintainer-clean-generic \
+ maintainer-clean-recursive mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
+ tags tags-recursive uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-info-am \
+ uninstall-info-recursive uninstall-recursive \
+ uninstall-shelldesktopDATA uninstall-shellrcDATA
+
+
+messages: rc.cpp
+ $(XGETTEXT) *.cpp -o $(podir)/ksensors.pot
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
+
+
+#>+ 3
+panelsgroup.moc.cpp: $(srcdir)/panelsgroup.h
+ $(MOC) $(srcdir)/panelsgroup.h -o panelsgroup.moc.cpp
+
+#>+ 2
+mocs: panelsgroup.moc.cpp
+
+#>+ 3
+sensor.moc.cpp: $(srcdir)/sensor.h
+ $(MOC) $(srcdir)/sensor.h -o sensor.moc.cpp
+
+#>+ 2
+mocs: sensor.moc.cpp
+
+#>+ 3
+i8ksensorslist.moc.cpp: $(srcdir)/i8ksensorslist.h
+ $(MOC) $(srcdir)/i8ksensorslist.h -o i8ksensorslist.moc.cpp
+
+#>+ 2
+mocs: i8ksensorslist.moc.cpp
+
+#>+ 3
+lmsensorswidget.moc.cpp: $(srcdir)/lmsensorswidget.h
+ $(MOC) $(srcdir)/lmsensorswidget.h -o lmsensorswidget.moc.cpp
+
+#>+ 2
+mocs: lmsensorswidget.moc.cpp
+
+#>+ 3
+panel.moc.cpp: $(srcdir)/panel.h
+ $(MOC) $(srcdir)/panel.h -o panel.moc.cpp
+
+#>+ 2
+mocs: panel.moc.cpp
+
+#>+ 3
+lmsensordockpanel.moc.cpp: $(srcdir)/lmsensordockpanel.h
+ $(MOC) $(srcdir)/lmsensordockpanel.h -o lmsensordockpanel.moc.cpp
+
+#>+ 2
+mocs: lmsensordockpanel.moc.cpp
+
+#>+ 3
+lmsensorsalarms.moc.cpp: $(srcdir)/lmsensorsalarms.h
+ $(MOC) $(srcdir)/lmsensorsalarms.h -o lmsensorsalarms.moc.cpp
+
+#>+ 2
+mocs: lmsensorsalarms.moc.cpp
+
+#>+ 3
+generalcfg.moc.cpp: $(srcdir)/generalcfg.h
+ $(MOC) $(srcdir)/generalcfg.h -o generalcfg.moc.cpp
+
+#>+ 2
+mocs: generalcfg.moc.cpp
+
+#>+ 3
+hdsensorslist.moc.cpp: $(srcdir)/hdsensorslist.h
+ $(MOC) $(srcdir)/hdsensorslist.h -o hdsensorslist.moc.cpp
+
+#>+ 2
+mocs: hdsensorslist.moc.cpp
+
+#>+ 3
+infopanels.moc.cpp: $(srcdir)/infopanels.h
+ $(MOC) $(srcdir)/infopanels.h -o infopanels.moc.cpp
+
+#>+ 2
+mocs: infopanels.moc.cpp
+
+#>+ 3
+ksensorscfg.moc.cpp: $(srcdir)/ksensorscfg.h
+ $(MOC) $(srcdir)/ksensorscfg.h -o ksensorscfg.moc.cpp
+
+#>+ 2
+mocs: ksensorscfg.moc.cpp
+
+#>+ 3
+systemcfg.moc.cpp: $(srcdir)/systemcfg.h
+ $(MOC) $(srcdir)/systemcfg.h -o systemcfg.moc.cpp
+
+#>+ 2
+mocs: systemcfg.moc.cpp
+
+#>+ 3
+lmsensors.moc.cpp: $(srcdir)/lmsensors.h
+ $(MOC) $(srcdir)/lmsensors.h -o lmsensors.moc.cpp
+
+#>+ 2
+mocs: lmsensors.moc.cpp
+
+#>+ 3
+qlcdstring.moc.cpp: $(srcdir)/qlcdstring.h
+ $(MOC) $(srcdir)/qlcdstring.h -o qlcdstring.moc.cpp
+
+#>+ 2
+mocs: qlcdstring.moc.cpp
+
+#>+ 3
+qdialarc.moc.cpp: $(srcdir)/qdialarc.h
+ $(MOC) $(srcdir)/qdialarc.h -o qdialarc.moc.cpp
+
+#>+ 2
+mocs: qdialarc.moc.cpp
+
+#>+ 3
+ksensorssplash.moc.cpp: $(srcdir)/ksensorssplash.h
+ $(MOC) $(srcdir)/ksensorssplash.h -o ksensorssplash.moc.cpp
+
+#>+ 2
+mocs: ksensorssplash.moc.cpp
+
+#>+ 3
+lmsensorpanel.moc.cpp: $(srcdir)/lmsensorpanel.h
+ $(MOC) $(srcdir)/lmsensorpanel.h -o lmsensorpanel.moc.cpp
+
+#>+ 2
+mocs: lmsensorpanel.moc.cpp
+
+#>+ 3
+qbarmeter.moc.cpp: $(srcdir)/qbarmeter.h
+ $(MOC) $(srcdir)/qbarmeter.h -o qbarmeter.moc.cpp
+
+#>+ 2
+mocs: qbarmeter.moc.cpp
+
+#>+ 3
+ksensors.moc: $(srcdir)/ksensors.h
+ $(MOC) $(srcdir)/ksensors.h -o ksensors.moc
+
+#>+ 2
+mocs: ksensors.moc
+
+#>+ 3
+cpupanel.moc.cpp: $(srcdir)/cpupanel.h
+ $(MOC) $(srcdir)/cpupanel.h -o cpupanel.moc.cpp
+
+#>+ 2
+mocs: cpupanel.moc.cpp
+
+#>+ 3
+palettecfg.moc.cpp: $(srcdir)/palettecfg.h
+ $(MOC) $(srcdir)/palettecfg.h -o palettecfg.moc.cpp
+
+#>+ 2
+mocs: palettecfg.moc.cpp
+
+#>+ 3
+lmsensorschip.moc.cpp: $(srcdir)/lmsensorschip.h
+ $(MOC) $(srcdir)/lmsensorschip.h -o lmsensorschip.moc.cpp
+
+#>+ 2
+mocs: lmsensorschip.moc.cpp
+
+#>+ 3
+processexec.moc.cpp: $(srcdir)/processexec.h
+ $(MOC) $(srcdir)/processexec.h -o processexec.moc.cpp
+
+#>+ 2
+mocs: processexec.moc.cpp
+
+#>+ 3
+uptimepanel.moc.cpp: $(srcdir)/uptimepanel.h
+ $(MOC) $(srcdir)/uptimepanel.h -o uptimepanel.moc.cpp
+
+#>+ 2
+mocs: uptimepanel.moc.cpp
+
+#>+ 3
+sensorslist.moc.cpp: $(srcdir)/sensorslist.h
+ $(MOC) $(srcdir)/sensorslist.h -o sensorslist.moc.cpp
+
+#>+ 2
+mocs: sensorslist.moc.cpp
+
+#>+ 3
+lmsensorsdock.moc.cpp: $(srcdir)/lmsensorsdock.h
+ $(MOC) $(srcdir)/lmsensorsdock.h -o lmsensorsdock.moc.cpp
+
+#>+ 2
+mocs: lmsensorsdock.moc.cpp
+
+#>+ 3
+lmsensorscfg.moc.cpp: $(srcdir)/lmsensorscfg.h
+ $(MOC) $(srcdir)/lmsensorscfg.h -o lmsensorscfg.moc.cpp
+
+#>+ 2
+mocs: lmsensorscfg.moc.cpp
+
+#>+ 3
+lmsensor.moc.cpp: $(srcdir)/lmsensor.h
+ $(MOC) $(srcdir)/lmsensor.h -o lmsensor.moc.cpp
+
+#>+ 2
+mocs: lmsensor.moc.cpp
+
+#>+ 3
+clean-metasources:
+ -rm -f panelsgroup.moc.cpp sensor.moc.cpp i8ksensorslist.moc.cpp lmsensorswidget.moc.cpp panel.moc.cpp lmsensordockpanel.moc.cpp lmsensorsalarms.moc.cpp generalcfg.moc.cpp hdsensorslist.moc.cpp infopanels.moc.cpp ksensorscfg.moc.cpp systemcfg.moc.cpp lmsensors.moc.cpp qlcdstring.moc.cpp qdialarc.moc.cpp ksensorssplash.moc.cpp lmsensorpanel.moc.cpp qbarmeter.moc.cpp ksensors.moc cpupanel.moc.cpp palettecfg.moc.cpp lmsensorschip.moc.cpp processexec.moc.cpp uptimepanel.moc.cpp sensorslist.moc.cpp lmsensorsdock.moc.cpp lmsensorscfg.moc.cpp lmsensor.moc.cpp
+
+#>+ 2
+KDE_DIST=ksensors.lsm palettecfgdesign.ui ksensorsui.rc aboutcfgdesign.ui generalcfgdesign.ui lmsensorscfgdesign.ui systemcfgdesign.ui ksensors.desktop
+
+#>+ 8
+clean-ui:
+ -rm -f \
+ aboutcfgdesign.cpp aboutcfgdesign.h aboutcfgdesign.moc \
+ generalcfgdesign.cpp generalcfgdesign.h generalcfgdesign.moc \
+ lmsensorscfgdesign.cpp lmsensorscfgdesign.h lmsensorscfgdesign.moc \
+ palettecfgdesign.cpp palettecfgdesign.h palettecfgdesign.moc \
+ systemcfgdesign.cpp systemcfgdesign.h systemcfgdesign.moc
+
+#>+ 2
+docs-am:
+
+#>+ 6
+force-reedit:
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/Makefile
+ cd $(top_srcdir) && perl admin/am_edit ksensors-0.7.3/src/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-recursive
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXXCOMPILE) --dump-class-hierarchy $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 11
+ksensors.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/main.cpp $(srcdir)/ksensors.cpp $(srcdir)/cpupanel.cpp $(srcdir)/cputimepanel.cpp $(srcdir)/generalcfg.cpp $(srcdir)/hdsensorslist.cpp $(srcdir)/i8ksensorslist.cpp $(srcdir)/infopanels.cpp $(srcdir)/ksensorscfg.cpp $(srcdir)/ksensorssplash.cpp $(srcdir)/lmsensor.cpp $(srcdir)/lmsensordockpanel.cpp $(srcdir)/lmsensorpanel.cpp $(srcdir)/lmsensorsalarms.cpp $(srcdir)/lmsensorscfg.cpp $(srcdir)/lmsensorschip.cpp $(srcdir)/lmsensors.cpp $(srcdir)/lmsensorsdock.cpp $(srcdir)/lmsensorswidget.cpp $(srcdir)/palettecfg.cpp $(srcdir)/panel.cpp $(srcdir)/panelsgroup.cpp $(srcdir)/processexec.cpp $(srcdir)/procinfo.cpp $(srcdir)/qbarmeter.cpp $(srcdir)/qdialarc.cpp $(srcdir)/qlcdraw.cpp $(srcdir)/qlcdstring.cpp $(srcdir)/rampanel.cpp $(srcdir)/sensor.cpp $(srcdir)/sensorslist.cpp $(srcdir)/systemcfg.cpp $(srcdir)/uptimepanel.cpp $(srcdir)/aboutcfgdesign.cpp $(srcdir)/generalcfgdesign.cpp $(srcdir)/lmsensorscfgdesign.cpp $(srcdir)/palettecfgdesign.cpp $(srcdir)/systemcfgdesign.cpp sensor.moc.cpp panelsgroup.moc.cpp i8ksensorslist.moc.cpp lmsensordockpanel.moc.cpp generalcfg.moc.cpp infopanels.moc.cpp ksensorscfg.moc.cpp qdialarc.moc.cpp qlcdstring.moc.cpp lmsensorpanel.moc.cpp ksensorssplash.moc.cpp processexec.moc.cpp lmsensorscfg.moc.cpp lmsensorsdock.moc.cpp sensorslist.moc.cpp lmsensorswidget.moc.cpp panel.moc.cpp lmsensorsalarms.moc.cpp hdsensorslist.moc.cpp lmsensors.moc.cpp systemcfg.moc.cpp qbarmeter.moc.cpp cpupanel.moc.cpp palettecfg.moc.cpp lmsensorschip.moc.cpp uptimepanel.moc.cpp lmsensor.moc.cpp generalcfgdesign.moc lmsensorscfgdesign.moc palettecfgdesign.moc systemcfgdesign.moc aboutcfgdesign.moc ksensors.moc
+ @echo 'creating ksensors.all_cpp.cpp ...'; \
+ rm -f ksensors.all_cpp.files ksensors.all_cpp.final; \
+ echo "#define KDE_USE_FINAL 1" >> ksensors.all_cpp.final; \
+ for file in main.cpp ksensors.cpp cpupanel.cpp cputimepanel.cpp generalcfg.cpp hdsensorslist.cpp i8ksensorslist.cpp infopanels.cpp ksensorscfg.cpp ksensorssplash.cpp lmsensor.cpp lmsensordockpanel.cpp lmsensorpanel.cpp lmsensorsalarms.cpp lmsensorscfg.cpp lmsensorschip.cpp lmsensors.cpp lmsensorsdock.cpp lmsensorswidget.cpp palettecfg.cpp panel.cpp panelsgroup.cpp processexec.cpp procinfo.cpp qbarmeter.cpp qdialarc.cpp qlcdraw.cpp qlcdstring.cpp rampanel.cpp sensor.cpp sensorslist.cpp systemcfg.cpp uptimepanel.cpp aboutcfgdesign.cpp generalcfgdesign.cpp lmsensorscfgdesign.cpp palettecfgdesign.cpp systemcfgdesign.cpp sensor.moc.cpp panelsgroup.moc.cpp i8ksensorslist.moc.cpp lmsensordockpanel.moc.cpp generalcfg.moc.cpp infopanels.moc.cpp ksensorscfg.moc.cpp qdialarc.moc.cpp qlcdstring.moc.cpp lmsensorpanel.moc.cpp ksensorssplash.moc.cpp processexec.moc.cpp lmsensorscfg.moc.cpp lmsensorsdock.moc.cpp sensorslist.moc.cpp lmsensorswidget.moc.cpp panel.moc.cpp lmsensorsalarms.moc.cpp hdsensorslist.moc.cpp lmsensors.moc.cpp systemcfg.moc.cpp qbarmeter.moc.cpp cpupanel.moc.cpp palettecfg.moc.cpp lmsensorschip.moc.cpp uptimepanel.moc.cpp lmsensor.moc.cpp ; do \
+ echo "#include \"$$file\"" >> ksensors.all_cpp.files; \
+ test ! -f $(srcdir)/$$file || egrep '^#pragma +implementation' $(srcdir)/$$file >> ksensors.all_cpp.final; \
+ done; \
+ cat ksensors.all_cpp.final ksensors.all_cpp.files > ksensors.all_cpp.cpp; \
+ rm -f ksensors.all_cpp.final ksensors.all_cpp.files
+
+#>+ 3
+clean-final:
+ -rm -f ksensors.all_cpp.cpp
+
+#>+ 3
+final:
+ $(MAKE) ksensors_OBJECTS="$(ksensors_final_OBJECTS)" all-am
+
+#>+ 3
+final-install:
+ $(MAKE) ksensors_OBJECTS="$(ksensors_final_OBJECTS)" install-am
+
+#>+ 3
+no-final:
+ $(MAKE) ksensors_OBJECTS="$(ksensors_nofinal_OBJECTS)" all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) ksensors_OBJECTS="$(ksensors_nofinal_OBJECTS)" install-am
+
+#>+ 3
+cvs-clean:
+ $(MAKE) admindir=$(top_srcdir)/admin -f $(top_srcdir)/admin/Makefile.common cvs-clean
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 38
+$(srcdir)/cpupanel.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/i8ksensorslist.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/main.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/rampanel.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/ksensorssplash.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/systemcfg.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/qlcdraw.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+ksensors.o: ksensors.moc
+$(srcdir)/lmsensorsalarms.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/hdsensorslist.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/lmsensordockpanel.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/lmsensor.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/lmsensors.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/sensor.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+nmcheck-am: nmcheck
+$(srcdir)/processexec.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/infopanels.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/qdialarc.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/uptimepanel.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+ksensors.lo: ksensors.moc
+$(srcdir)/procinfo.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/ksensorscfg.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/cputimepanel.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/qlcdstring.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/qbarmeter.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/generalcfg.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/lmsensorswidget.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/lmsensorsdock.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/ksensors.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/lmsensorschip.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/lmsensorscfg.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+nmcheck:
+$(srcdir)/panelsgroup.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/palettecfg.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/lmsensorpanel.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/panel.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+$(srcdir)/sensorslist.cpp: aboutcfgdesign.h generalcfgdesign.h lmsensorscfgdesign.h palettecfgdesign.h systemcfgdesign.h
+
+#>+ 70
+lmsensorscfgdesign.cpp: $(srcdir)/lmsensorscfgdesign.ui lmsensorscfgdesign.h lmsensorscfgdesign.moc
+ rm -f lmsensorscfgdesign.cpp
+ echo '#include <klocale.h>' > lmsensorscfgdesign.cpp
+ $(UIC) -tr ${UIC_TR} -i lmsensorscfgdesign.h $(srcdir)/lmsensorscfgdesign.ui > lmsensorscfgdesign.cpp.temp ; ret=$$?; \
+ sed -e "s,${UIC_TR}( \"\" ),QString::null,g" lmsensorscfgdesign.cpp.temp | sed -e "s,${UIC_TR}( \"\"\, \"\" ),QString::null,g" | sed -e "s,image\([0-9][0-9]*\)_data,img\1_lmsensorscfgdesign,g" >> lmsensorscfgdesign.cpp ;\
+ rm -f lmsensorscfgdesign.cpp.temp ;\
+ if test "$$ret" = 0; then echo '#include "lmsensorscfgdesign.moc"' >> lmsensorscfgdesign.cpp; else rm -f lmsensorscfgdesign.cpp ; exit $$ret ; fi
+
+lmsensorscfgdesign.h: $(srcdir)/lmsensorscfgdesign.ui
+ $(UIC) -o lmsensorscfgdesign.h $(srcdir)/lmsensorscfgdesign.ui
+
+lmsensorscfgdesign.moc: lmsensorscfgdesign.h
+ $(MOC) lmsensorscfgdesign.h -o lmsensorscfgdesign.moc
+
+aboutcfgdesign.cpp: $(srcdir)/aboutcfgdesign.ui aboutcfgdesign.h aboutcfgdesign.moc
+ rm -f aboutcfgdesign.cpp
+ echo '#include <klocale.h>' > aboutcfgdesign.cpp
+ $(UIC) -tr ${UIC_TR} -i aboutcfgdesign.h $(srcdir)/aboutcfgdesign.ui > aboutcfgdesign.cpp.temp ; ret=$$?; \
+ sed -e "s,${UIC_TR}( \"\" ),QString::null,g" aboutcfgdesign.cpp.temp | sed -e "s,${UIC_TR}( \"\"\, \"\" ),QString::null,g" | sed -e "s,image\([0-9][0-9]*\)_data,img\1_aboutcfgdesign,g" >> aboutcfgdesign.cpp ;\
+ rm -f aboutcfgdesign.cpp.temp ;\
+ if test "$$ret" = 0; then echo '#include "aboutcfgdesign.moc"' >> aboutcfgdesign.cpp; else rm -f aboutcfgdesign.cpp ; exit $$ret ; fi
+
+aboutcfgdesign.h: $(srcdir)/aboutcfgdesign.ui
+ $(UIC) -o aboutcfgdesign.h $(srcdir)/aboutcfgdesign.ui
+
+aboutcfgdesign.moc: aboutcfgdesign.h
+ $(MOC) aboutcfgdesign.h -o aboutcfgdesign.moc
+
+systemcfgdesign.cpp: $(srcdir)/systemcfgdesign.ui systemcfgdesign.h systemcfgdesign.moc
+ rm -f systemcfgdesign.cpp
+ echo '#include <klocale.h>' > systemcfgdesign.cpp
+ $(UIC) -tr ${UIC_TR} -i systemcfgdesign.h $(srcdir)/systemcfgdesign.ui > systemcfgdesign.cpp.temp ; ret=$$?; \
+ sed -e "s,${UIC_TR}( \"\" ),QString::null,g" systemcfgdesign.cpp.temp | sed -e "s,${UIC_TR}( \"\"\, \"\" ),QString::null,g" | sed -e "s,image\([0-9][0-9]*\)_data,img\1_systemcfgdesign,g" >> systemcfgdesign.cpp ;\
+ rm -f systemcfgdesign.cpp.temp ;\
+ if test "$$ret" = 0; then echo '#include "systemcfgdesign.moc"' >> systemcfgdesign.cpp; else rm -f systemcfgdesign.cpp ; exit $$ret ; fi
+
+systemcfgdesign.h: $(srcdir)/systemcfgdesign.ui
+ $(UIC) -o systemcfgdesign.h $(srcdir)/systemcfgdesign.ui
+
+systemcfgdesign.moc: systemcfgdesign.h
+ $(MOC) systemcfgdesign.h -o systemcfgdesign.moc
+
+palettecfgdesign.cpp: $(srcdir)/palettecfgdesign.ui palettecfgdesign.h palettecfgdesign.moc
+ rm -f palettecfgdesign.cpp
+ echo '#include <klocale.h>' > palettecfgdesign.cpp
+ $(UIC) -tr ${UIC_TR} -i palettecfgdesign.h $(srcdir)/palettecfgdesign.ui > palettecfgdesign.cpp.temp ; ret=$$?; \
+ sed -e "s,${UIC_TR}( \"\" ),QString::null,g" palettecfgdesign.cpp.temp | sed -e "s,${UIC_TR}( \"\"\, \"\" ),QString::null,g" | sed -e "s,image\([0-9][0-9]*\)_data,img\1_palettecfgdesign,g" >> palettecfgdesign.cpp ;\
+ rm -f palettecfgdesign.cpp.temp ;\
+ if test "$$ret" = 0; then echo '#include "palettecfgdesign.moc"' >> palettecfgdesign.cpp; else rm -f palettecfgdesign.cpp ; exit $$ret ; fi
+
+palettecfgdesign.h: $(srcdir)/palettecfgdesign.ui
+ $(UIC) -o palettecfgdesign.h $(srcdir)/palettecfgdesign.ui
+
+palettecfgdesign.moc: palettecfgdesign.h
+ $(MOC) palettecfgdesign.h -o palettecfgdesign.moc
+
+generalcfgdesign.cpp: $(srcdir)/generalcfgdesign.ui generalcfgdesign.h generalcfgdesign.moc
+ rm -f generalcfgdesign.cpp
+ echo '#include <klocale.h>' > generalcfgdesign.cpp
+ $(UIC) -tr ${UIC_TR} -i generalcfgdesign.h $(srcdir)/generalcfgdesign.ui > generalcfgdesign.cpp.temp ; ret=$$?; \
+ sed -e "s,${UIC_TR}( \"\" ),QString::null,g" generalcfgdesign.cpp.temp | sed -e "s,${UIC_TR}( \"\"\, \"\" ),QString::null,g" | sed -e "s,image\([0-9][0-9]*\)_data,img\1_generalcfgdesign,g" >> generalcfgdesign.cpp ;\
+ rm -f generalcfgdesign.cpp.temp ;\
+ if test "$$ret" = 0; then echo '#include "generalcfgdesign.moc"' >> generalcfgdesign.cpp; else rm -f generalcfgdesign.cpp ; exit $$ret ; fi
+
+generalcfgdesign.h: $(srcdir)/generalcfgdesign.ui
+ $(UIC) -o generalcfgdesign.h $(srcdir)/generalcfgdesign.ui
+
+generalcfgdesign.moc: generalcfgdesign.h
+ $(MOC) generalcfgdesign.h -o generalcfgdesign.moc
diff --git a/src/aboutcfgdesign.cpp b/src/aboutcfgdesign.cpp
new file mode 100644
index 0000000..b72c70a
--- /dev/null
+++ b/src/aboutcfgdesign.cpp
@@ -0,0 +1,458 @@
+#include <klocale.h>
+/****************************************************************************
+** Form implementation generated from reading ui file './aboutcfgdesign.ui'
+**
+** Created: mer aoû 18 23:39:01 2004
+** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#include "aboutcfgdesign.h"
+
+#include <qvariant.h>
+#include <kcolorbutton.h>
+#include <qframe.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+#include <qimage.h>
+#include <qpixmap.h>
+
+static const char* const img0_aboutcfgdesign[] = {
+"32 32 76 2",
+"Qt c None",
+".# c #000000",
+".R c #292429",
+".P c #292829",
+".S c #292c29",
+".T c #312c31",
+".U c #313031",
+".X c #313431",
+".Y c #393439",
+".2 c #393839",
+".6 c #393c39",
+".5 c #413c41",
+"#a c #5a5d5a",
+"#d c #625d62",
+".7 c #626162",
+".3 c #626562",
+".8 c #6a656a",
+".4 c #6a696a",
+".9 c #736d73",
+".Z c #737173",
+".V c #737573",
+".0 c #7b757b",
+".W c #7b797b",
+".L c #7b7d7b",
+".M c #837d83",
+".G c #838183",
+".A c #838583",
+".Q c #83858b",
+".H c #8b858b",
+".B c #8b898b",
+".N c #8b8994",
+".O c #8b8d8b",
+".t c #8b8d94",
+".I c #948d94",
+".u c #949194",
+".C c #94919c",
+".x c #94959c",
+".o c #9c959c",
+".v c #9c999c",
+".p c #9c99a4",
+".q c #9c9da4",
+".F c #a49da4",
+".K c #a49dac",
+".y c #a4a1a4",
+".w c #a4a1ac",
+".b c #bdf600",
+".l c #c5d600",
+".k c #c5d608",
+".h c #c5da00",
+".g c #c5de08",
+".f c #c5ea00",
+".c c #c5ee00",
+".e c #c5f200",
+".d c #c5f208",
+".a c #c5f600",
+".s c #cdba08",
+".r c #cdbe08",
+".m c #cdc608",
+".n c #cdc610",
+".j c #cdd608",
+".i c #cdde08",
+".z c #d5ae10",
+".D c #d5d2d5",
+".E c #d5d6d5",
+".J c #ded6de",
+"#i c #e64418",
+"#j c #e64820",
+"#g c #e64c18",
+"#e c #e64c20",
+"#b c #e65518",
+"#c c #e65520",
+"#. c #e65918",
+"## c #e65d18",
+".1 c #e66918",
+"#h c #ee4820",
+"#f c #ee4c20",
+"QtQtQtQt.#.#.#.#.#.#.#.#.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
+"QtQtQtQt.#.a.b.a.b.a.b.a.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
+"QtQtQtQt.#.a.a.a.a.a.a.a.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
+"QtQtQtQt.#.#.#.#.#.#.#.#.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
+"QtQtQtQt.#.c.d.c.d.c.e.c.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
+"QtQtQtQt.#.f.f.f.f.f.f.f.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
+"QtQtQtQt.#.#.#.#.#.#.#.#.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
+"QtQtQtQt.#.g.h.i.h.g.h.i.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
+"QtQtQtQt.#.j.j.k.j.j.j.l.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
+"QtQtQtQt.#.#.#.#.#.#.#.#.#Qt.#.#.#.#QtQtQtQtQtQtQtQtQtQtQtQtQtQt",
+"QtQtQtQt.#.m.m.m.m.m.n.m.#.#.o.o.p.q.#.#QtQtQtQtQtQtQtQtQtQtQtQt",
+"QtQtQtQt.#.r.r.r.s.r.#.#.t.u.u.o.v.q.q.w.#.#QtQtQtQtQtQtQtQtQtQt",
+"QtQtQtQt.#.#.#.#.#.#.t.t.u.u.o.x.p.p.y.y.w.y.#.#QtQtQtQtQtQtQtQt",
+"QtQtQtQt.#.z.#.#.A.B.B.t.t.C.D.E.v.q.q.w.F.w.q.w.#.#QtQtQtQtQtQt",
+"QtQtQtQt.#.#.G.G.H.H.I.t.u.u.o.o.J.E.K.y.w.y.w.y.w.y.#.#QtQtQtQt",
+"QtQt.#.#.L.G.M.G.A.B.B.I.D.E.u.o.x.q.D.J.q.w.F.w.q.w.F.w.#.#QtQt",
+"Qt.#.G.G.G.G.G.G.H.H.N.O.u.u.J.E.p.p.F.F.J.E.w.y.w.y.w.y.w.y.#Qt",
+"Qt.#.L.G.M.G.L.G.G.B.B.t.t.u.u.o.D.J.q.y.F.w.q.w.F.w.q.w.F.w.#Qt",
+"Qt.#.P.P.G.G.G.G.H.Q.N.B.u.u.o.x.p.v.F.F.w.y.w.y.w.y.w.y.G.G.#Qt",
+"Qt.#.R.P.P.S.M.G.G.H.B.t.O.u.u.o.x.p.p.w.q.w.F.w.q.w.M.G.L.G.#Qt",
+"Qt.#.P.P.T.S.U.T.H.H.B.B.I.u.x.x.p.p.F.F.w.y.w.y.G.G.G.G.G.G.#Qt",
+"QtQt.#.#.P.T.S.U.U.U.Q.t.O.u.u.o.x.p.v.F.F.w.V.W.W.G.L.G.#.#QtQt",
+"QtQt.UQt.#.#.U.U.X.U.Y.Y.I.u.o.x.v.v.F.F.Z.Z.0.W.M.L.#.#Qt.#QtQt",
+"QtQt.UQt.U.1.#.#.U.X.X.Y.X.2.u.o.x.p.3.4.4.Z.Z.0.#.#Qt.#Qt.#QtQt",
+"QtQtQtQt.U.#.U.#.#.#.2.Y.2.2.5.6.7.7.8.4.9.9.#.UQt.UQt.#QtQtQtQt",
+"QtQtQtQt.##..U##.U#..#.#.2.2.2.6#a.7.7.4.#.#Qt.UQt.UQtQtQtQtQtQt",
+"QtQtQtQt.##b#c#b.U#b.U#b.#.#.5.6#d#d.#.#Qt.UQt.UQtQtQtQtQtQtQtQt",
+"QtQtQtQt.#.#.#.#.#.#.U.#.UQt.#.#.#.#Qt.UQt.UQtQtQtQtQtQtQtQtQtQt",
+"QtQtQtQt.##e#f#e#f#e#f#g.UQt.UQtQt.UQt.UQtQtQtQtQtQtQtQtQtQtQtQt",
+"QtQtQtQt.##h#i#j#i#h#i#j.#Qt.UQtQt.UQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
+"QtQtQtQt.#.#.#.#.#.#.#.#.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
+"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};
+
+
+/*
+ * Constructs a AboutCfgDesign as a child of 'parent', with the
+ * name 'name' and widget flags set to 'f'.
+ */
+AboutCfgDesign::AboutCfgDesign( QWidget* parent, const char* name, WFlags fl )
+ : QWidget( parent, name, fl ),
+ image0( (const char **) img0_aboutcfgdesign )
+{
+ if ( !name )
+ setName( "AboutCfgDesign" );
+ AboutCfgDesignLayout = new QVBoxLayout( this, 0, 0, "AboutCfgDesignLayout");
+
+ Frame3 = new QFrame( this, "Frame3" );
+ Frame3->setMinimumSize( QSize( 0, 47 ) );
+ Frame3->setMaximumSize( QSize( 32767, 47 ) );
+ QPalette pal;
+ QColorGroup cg;
+ cg.setColor( QColorGroup::Foreground, black );
+ cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) );
+ cg.setColor( QColorGroup::Light, white );
+ cg.setColor( QColorGroup::Midlight, QColor( 241, 241, 241) );
+ cg.setColor( QColorGroup::Dark, QColor( 114, 114, 114) );
+ cg.setColor( QColorGroup::Mid, QColor( 152, 152, 152) );
+ cg.setColor( QColorGroup::Text, black );
+ cg.setColor( QColorGroup::BrightText, white );
+ cg.setColor( QColorGroup::ButtonText, black );
+ cg.setColor( QColorGroup::Base, white );
+ cg.setColor( QColorGroup::Background, QColor( 222, 226, 246) );
+ cg.setColor( QColorGroup::Shadow, black );
+ cg.setColor( QColorGroup::Highlight, QColor( 10, 95, 137) );
+ cg.setColor( QColorGroup::HighlightedText, white );
+ pal.setActive( cg );
+ cg.setColor( QColorGroup::Foreground, black );
+ cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) );
+ cg.setColor( QColorGroup::Light, white );
+ cg.setColor( QColorGroup::Midlight, white );
+ cg.setColor( QColorGroup::Dark, QColor( 114, 114, 114) );
+ cg.setColor( QColorGroup::Mid, QColor( 152, 152, 152) );
+ cg.setColor( QColorGroup::Text, black );
+ cg.setColor( QColorGroup::BrightText, white );
+ cg.setColor( QColorGroup::ButtonText, black );
+ cg.setColor( QColorGroup::Base, white );
+ cg.setColor( QColorGroup::Background, QColor( 222, 226, 246) );
+ cg.setColor( QColorGroup::Shadow, black );
+ cg.setColor( QColorGroup::Highlight, QColor( 10, 95, 137) );
+ cg.setColor( QColorGroup::HighlightedText, white );
+ pal.setInactive( cg );
+ cg.setColor( QColorGroup::Foreground, QColor( 128, 128, 128) );
+ cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) );
+ cg.setColor( QColorGroup::Light, white );
+ cg.setColor( QColorGroup::Midlight, white );
+ cg.setColor( QColorGroup::Dark, QColor( 114, 114, 114) );
+ cg.setColor( QColorGroup::Mid, QColor( 152, 152, 152) );
+ cg.setColor( QColorGroup::Text, black );
+ cg.setColor( QColorGroup::BrightText, white );
+ cg.setColor( QColorGroup::ButtonText, QColor( 128, 128, 128) );
+ cg.setColor( QColorGroup::Base, white );
+ cg.setColor( QColorGroup::Background, QColor( 222, 226, 246) );
+ cg.setColor( QColorGroup::Shadow, black );
+ cg.setColor( QColorGroup::Highlight, QColor( 10, 95, 137) );
+ cg.setColor( QColorGroup::HighlightedText, white );
+ pal.setDisabled( cg );
+ Frame3->setPalette( pal );
+ Frame3->setFrameShape( QFrame::NoFrame );
+ Frame3->setFrameShadow( QFrame::Plain );
+
+ PixmapLabel1 = new QLabel( Frame3, "PixmapLabel1" );
+ PixmapLabel1->setGeometry( QRect( 10, 5, 38, 38 ) );
+ PixmapLabel1->setPixmap( image0 );
+ PixmapLabel1->setScaledContents( TRUE );
+
+ TextLabel2 = new QLabel( Frame3, "TextLabel2" );
+ TextLabel2->setGeometry( QRect( 61, 12, 326, 24 ) );
+ QFont TextLabel2_font( TextLabel2->font() );
+ TextLabel2_font.setPointSize( 14 );
+ TextLabel2_font.setBold( TRUE );
+ TextLabel2->setFont( TextLabel2_font );
+ AboutCfgDesignLayout->addWidget( Frame3 );
+
+ Frame4 = new QFrame( this, "Frame4" );
+ Frame4->setMinimumSize( QSize( 0, 22 ) );
+ Frame4->setMaximumSize( QSize( 32767, 22 ) );
+ cg.setColor( QColorGroup::Foreground, black );
+ cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) );
+ cg.setColor( QColorGroup::Light, white );
+ cg.setColor( QColorGroup::Midlight, QColor( 241, 241, 241) );
+ cg.setColor( QColorGroup::Dark, QColor( 114, 114, 114) );
+ cg.setColor( QColorGroup::Mid, QColor( 152, 152, 152) );
+ cg.setColor( QColorGroup::Text, black );
+ cg.setColor( QColorGroup::BrightText, white );
+ cg.setColor( QColorGroup::ButtonText, black );
+ cg.setColor( QColorGroup::Base, white );
+ cg.setColor( QColorGroup::Background, QColor( 97, 97, 97) );
+ cg.setColor( QColorGroup::Shadow, black );
+ cg.setColor( QColorGroup::Highlight, QColor( 10, 95, 137) );
+ cg.setColor( QColorGroup::HighlightedText, white );
+ pal.setActive( cg );
+ cg.setColor( QColorGroup::Foreground, black );
+ cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) );
+ cg.setColor( QColorGroup::Light, white );
+ cg.setColor( QColorGroup::Midlight, white );
+ cg.setColor( QColorGroup::Dark, QColor( 114, 114, 114) );
+ cg.setColor( QColorGroup::Mid, QColor( 152, 152, 152) );
+ cg.setColor( QColorGroup::Text, black );
+ cg.setColor( QColorGroup::BrightText, white );
+ cg.setColor( QColorGroup::ButtonText, black );
+ cg.setColor( QColorGroup::Base, white );
+ cg.setColor( QColorGroup::Background, QColor( 97, 97, 97) );
+ cg.setColor( QColorGroup::Shadow, black );
+ cg.setColor( QColorGroup::Highlight, QColor( 10, 95, 137) );
+ cg.setColor( QColorGroup::HighlightedText, white );
+ pal.setInactive( cg );
+ cg.setColor( QColorGroup::Foreground, QColor( 128, 128, 128) );
+ cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) );
+ cg.setColor( QColorGroup::Light, white );
+ cg.setColor( QColorGroup::Midlight, white );
+ cg.setColor( QColorGroup::Dark, QColor( 114, 114, 114) );
+ cg.setColor( QColorGroup::Mid, QColor( 152, 152, 152) );
+ cg.setColor( QColorGroup::Text, black );
+ cg.setColor( QColorGroup::BrightText, white );
+ cg.setColor( QColorGroup::ButtonText, QColor( 128, 128, 128) );
+ cg.setColor( QColorGroup::Base, white );
+ cg.setColor( QColorGroup::Background, QColor( 97, 97, 97) );
+ cg.setColor( QColorGroup::Shadow, black );
+ cg.setColor( QColorGroup::Highlight, QColor( 10, 95, 137) );
+ cg.setColor( QColorGroup::HighlightedText, white );
+ pal.setDisabled( cg );
+ Frame4->setPalette( pal );
+ Frame4->setFrameShape( QFrame::NoFrame );
+ Frame4->setFrameShadow( QFrame::Plain );
+
+ TextLabel1 = new QLabel( Frame4, "TextLabel1" );
+ TextLabel1->setGeometry( QRect( 7, 2, 305, 16 ) );
+ cg.setColor( QColorGroup::Foreground, white );
+ cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) );
+ cg.setColor( QColorGroup::Light, white );
+ cg.setColor( QColorGroup::Midlight, QColor( 241, 241, 241) );
+ cg.setColor( QColorGroup::Dark, QColor( 114, 114, 114) );
+ cg.setColor( QColorGroup::Mid, QColor( 152, 152, 152) );
+ cg.setColor( QColorGroup::Text, black );
+ cg.setColor( QColorGroup::BrightText, white );
+ cg.setColor( QColorGroup::ButtonText, black );
+ cg.setColor( QColorGroup::Base, white );
+ cg.setColor( QColorGroup::Background, QColor( 97, 97, 97) );
+ cg.setColor( QColorGroup::Shadow, black );
+ cg.setColor( QColorGroup::Highlight, QColor( 10, 95, 137) );
+ cg.setColor( QColorGroup::HighlightedText, white );
+ pal.setActive( cg );
+ cg.setColor( QColorGroup::Foreground, white );
+ cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) );
+ cg.setColor( QColorGroup::Light, white );
+ cg.setColor( QColorGroup::Midlight, white );
+ cg.setColor( QColorGroup::Dark, QColor( 114, 114, 114) );
+ cg.setColor( QColorGroup::Mid, QColor( 152, 152, 152) );
+ cg.setColor( QColorGroup::Text, black );
+ cg.setColor( QColorGroup::BrightText, white );
+ cg.setColor( QColorGroup::ButtonText, black );
+ cg.setColor( QColorGroup::Base, white );
+ cg.setColor( QColorGroup::Background, QColor( 97, 97, 97) );
+ cg.setColor( QColorGroup::Shadow, black );
+ cg.setColor( QColorGroup::Highlight, QColor( 10, 95, 137) );
+ cg.setColor( QColorGroup::HighlightedText, white );
+ pal.setInactive( cg );
+ cg.setColor( QColorGroup::Foreground, QColor( 128, 128, 128) );
+ cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) );
+ cg.setColor( QColorGroup::Light, white );
+ cg.setColor( QColorGroup::Midlight, white );
+ cg.setColor( QColorGroup::Dark, QColor( 114, 114, 114) );
+ cg.setColor( QColorGroup::Mid, QColor( 152, 152, 152) );
+ cg.setColor( QColorGroup::Text, black );
+ cg.setColor( QColorGroup::BrightText, white );
+ cg.setColor( QColorGroup::ButtonText, QColor( 128, 128, 128) );
+ cg.setColor( QColorGroup::Base, white );
+ cg.setColor( QColorGroup::Background, QColor( 97, 97, 97) );
+ cg.setColor( QColorGroup::Shadow, black );
+ cg.setColor( QColorGroup::Highlight, QColor( 10, 95, 137) );
+ cg.setColor( QColorGroup::HighlightedText, white );
+ pal.setDisabled( cg );
+ TextLabel1->setPalette( pal );
+ AboutCfgDesignLayout->addWidget( Frame4 );
+
+ Frame5 = new QFrame( this, "Frame5" );
+ cg.setColor( QColorGroup::Foreground, black );
+ cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) );
+ cg.setColor( QColorGroup::Light, white );
+ cg.setColor( QColorGroup::Midlight, QColor( 241, 241, 241) );
+ cg.setColor( QColorGroup::Dark, QColor( 114, 114, 114) );
+ cg.setColor( QColorGroup::Mid, QColor( 152, 152, 152) );
+ cg.setColor( QColorGroup::Text, black );
+ cg.setColor( QColorGroup::BrightText, white );
+ cg.setColor( QColorGroup::ButtonText, black );
+ cg.setColor( QColorGroup::Base, white );
+ cg.setColor( QColorGroup::Background, QColor( 49, 121, 172) );
+ cg.setColor( QColorGroup::Shadow, black );
+ cg.setColor( QColorGroup::Highlight, QColor( 10, 95, 137) );
+ cg.setColor( QColorGroup::HighlightedText, white );
+ pal.setActive( cg );
+ cg.setColor( QColorGroup::Foreground, black );
+ cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) );
+ cg.setColor( QColorGroup::Light, white );
+ cg.setColor( QColorGroup::Midlight, white );
+ cg.setColor( QColorGroup::Dark, QColor( 114, 114, 114) );
+ cg.setColor( QColorGroup::Mid, QColor( 152, 152, 152) );
+ cg.setColor( QColorGroup::Text, black );
+ cg.setColor( QColorGroup::BrightText, white );
+ cg.setColor( QColorGroup::ButtonText, black );
+ cg.setColor( QColorGroup::Base, white );
+ cg.setColor( QColorGroup::Background, QColor( 49, 121, 172) );
+ cg.setColor( QColorGroup::Shadow, black );
+ cg.setColor( QColorGroup::Highlight, QColor( 10, 95, 137) );
+ cg.setColor( QColorGroup::HighlightedText, white );
+ pal.setInactive( cg );
+ cg.setColor( QColorGroup::Foreground, QColor( 128, 128, 128) );
+ cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) );
+ cg.setColor( QColorGroup::Light, white );
+ cg.setColor( QColorGroup::Midlight, white );
+ cg.setColor( QColorGroup::Dark, QColor( 114, 114, 114) );
+ cg.setColor( QColorGroup::Mid, QColor( 152, 152, 152) );
+ cg.setColor( QColorGroup::Text, black );
+ cg.setColor( QColorGroup::BrightText, white );
+ cg.setColor( QColorGroup::ButtonText, QColor( 128, 128, 128) );
+ cg.setColor( QColorGroup::Base, white );
+ cg.setColor( QColorGroup::Background, QColor( 49, 121, 172) );
+ cg.setColor( QColorGroup::Shadow, black );
+ cg.setColor( QColorGroup::Highlight, QColor( 10, 95, 137) );
+ cg.setColor( QColorGroup::HighlightedText, white );
+ pal.setDisabled( cg );
+ Frame5->setPalette( pal );
+ Frame5->setFrameShape( QFrame::NoFrame );
+ Frame5->setFrameShadow( QFrame::Plain );
+ Frame5Layout = new QHBoxLayout( Frame5, 22, 6, "Frame5Layout");
+
+ Frame6 = new QFrame( Frame5, "Frame6" );
+ Frame6->setMinimumSize( QSize( 300, 200 ) );
+ cg.setColor( QColorGroup::Foreground, black );
+ cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) );
+ cg.setColor( QColorGroup::Light, white );
+ cg.setColor( QColorGroup::Midlight, QColor( 241, 241, 241) );
+ cg.setColor( QColorGroup::Dark, QColor( 114, 114, 114) );
+ cg.setColor( QColorGroup::Mid, QColor( 152, 152, 152) );
+ cg.setColor( QColorGroup::Text, black );
+ cg.setColor( QColorGroup::BrightText, white );
+ cg.setColor( QColorGroup::ButtonText, black );
+ cg.setColor( QColorGroup::Base, white );
+ cg.setColor( QColorGroup::Background, QColor( 222, 226, 246) );
+ cg.setColor( QColorGroup::Shadow, black );
+ cg.setColor( QColorGroup::Highlight, QColor( 10, 95, 137) );
+ cg.setColor( QColorGroup::HighlightedText, white );
+ pal.setActive( cg );
+ cg.setColor( QColorGroup::Foreground, black );
+ cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) );
+ cg.setColor( QColorGroup::Light, white );
+ cg.setColor( QColorGroup::Midlight, white );
+ cg.setColor( QColorGroup::Dark, QColor( 114, 114, 114) );
+ cg.setColor( QColorGroup::Mid, QColor( 152, 152, 152) );
+ cg.setColor( QColorGroup::Text, black );
+ cg.setColor( QColorGroup::BrightText, white );
+ cg.setColor( QColorGroup::ButtonText, black );
+ cg.setColor( QColorGroup::Base, white );
+ cg.setColor( QColorGroup::Background, QColor( 222, 226, 246) );
+ cg.setColor( QColorGroup::Shadow, black );
+ cg.setColor( QColorGroup::Highlight, QColor( 10, 95, 137) );
+ cg.setColor( QColorGroup::HighlightedText, white );
+ pal.setInactive( cg );
+ cg.setColor( QColorGroup::Foreground, QColor( 128, 128, 128) );
+ cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) );
+ cg.setColor( QColorGroup::Light, white );
+ cg.setColor( QColorGroup::Midlight, white );
+ cg.setColor( QColorGroup::Dark, QColor( 114, 114, 114) );
+ cg.setColor( QColorGroup::Mid, QColor( 152, 152, 152) );
+ cg.setColor( QColorGroup::Text, black );
+ cg.setColor( QColorGroup::BrightText, white );
+ cg.setColor( QColorGroup::ButtonText, QColor( 128, 128, 128) );
+ cg.setColor( QColorGroup::Base, white );
+ cg.setColor( QColorGroup::Background, QColor( 222, 226, 246) );
+ cg.setColor( QColorGroup::Shadow, black );
+ cg.setColor( QColorGroup::Highlight, QColor( 10, 95, 137) );
+ cg.setColor( QColorGroup::HighlightedText, white );
+ pal.setDisabled( cg );
+ Frame6->setPalette( pal );
+ Frame6->setFrameShape( QFrame::NoFrame );
+ Frame6->setFrameShadow( QFrame::Plain );
+
+ labelTitle = new QLabel( Frame6, "labelTitle" );
+ labelTitle->setGeometry( QRect( 19, 19, 221, 16 ) );
+ QFont labelTitle_font( labelTitle->font() );
+ labelTitle_font.setPointSize( 10 );
+ labelTitle_font.setBold( TRUE );
+ labelTitle->setFont( labelTitle_font );
+
+ TextLabel3_2 = new QLabel( Frame6, "TextLabel3_2" );
+ TextLabel3_2->setGeometry( QRect( 20, 49, 248, 147 ) );
+ TextLabel3_2->setAlignment( int( QLabel::WordBreak | QLabel::AlignTop | QLabel::AlignLeft ) );
+ Frame5Layout->addWidget( Frame6 );
+ Spacer1 = new QSpacerItem( 61, 20, QSizePolicy::Fixed, QSizePolicy::Minimum );
+ Frame5Layout->addItem( Spacer1 );
+ AboutCfgDesignLayout->addWidget( Frame5 );
+ languageChange();
+ resize( QSize(413, 353).expandedTo(minimumSizeHint()) );
+ clearWState( WState_Polished );
+}
+
+/*
+ * Destroys the object and frees any allocated resources
+ */
+AboutCfgDesign::~AboutCfgDesign()
+{
+ // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ * Sets the strings of the subwidgets using the current
+ * language.
+ */
+void AboutCfgDesign::languageChange()
+{
+ setCaption( tr2i18n( "AboutCfgDesign" ) );
+ TextLabel2->setText( tr2i18n( "KSensors configuration" ) );
+ TextLabel1->setText( tr2i18n( "Monitoring your motherboard" ) );
+ labelTitle->setText( tr2i18n( "KSensors" ) );
+ TextLabel3_2->setText( tr2i18n( "Welcome to the KSensors configuration window. Click on the left to select a configuration option." ) );
+}
+
+#include "aboutcfgdesign.moc"
diff --git a/src/aboutcfgdesign.h b/src/aboutcfgdesign.h
new file mode 100644
index 0000000..0f3dc00
--- /dev/null
+++ b/src/aboutcfgdesign.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+** Form interface generated from reading ui file './aboutcfgdesign.ui'
+**
+** Created: mer aoû 18 23:39:01 2004
+** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#ifndef ABOUTCFGDESIGN_H
+#define ABOUTCFGDESIGN_H
+
+#include <qvariant.h>
+#include <qpixmap.h>
+#include <qwidget.h>
+
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QSpacerItem;
+class QFrame;
+class QLabel;
+
+class AboutCfgDesign : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AboutCfgDesign( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ ~AboutCfgDesign();
+
+ QFrame* Frame3;
+ QLabel* PixmapLabel1;
+ QLabel* TextLabel2;
+ QFrame* Frame4;
+ QLabel* TextLabel1;
+ QFrame* Frame5;
+ QFrame* Frame6;
+ QLabel* labelTitle;
+ QLabel* TextLabel3_2;
+
+protected:
+ QVBoxLayout* AboutCfgDesignLayout;
+ QHBoxLayout* Frame5Layout;
+ QSpacerItem* Spacer1;
+
+protected slots:
+ virtual void languageChange();
+
+private:
+ QPixmap image0;
+
+};
+
+#endif // ABOUTCFGDESIGN_H
diff --git a/src/aboutcfgdesign.ui b/src/aboutcfgdesign.ui
new file mode 100644
index 0000000..9f7bdcb
--- /dev/null
+++ b/src/aboutcfgdesign.ui
@@ -0,0 +1,1408 @@
+<!DOCTYPE UI><UI>
+<class>AboutCfgDesign</class>
+<include location="global">kcolorbutton.h</include>
+<widget>
+ <class>QWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>AboutCfgDesign</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>413</width>
+ <height>353</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>caption</name>
+ <string>AboutCfgDesign</string>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>0</number>
+ </property>
+ <widget>
+ <class>QFrame</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Frame3</cstring>
+ </property>
+ <property stdset="1">
+ <name>minimumSize</name>
+ <size>
+ <width>0</width>
+ <height>47</height>
+ </size>
+ </property>
+ <property stdset="1">
+ <name>maximumSize</name>
+ <size>
+ <width>32767</width>
+ <height>47</height>
+ </size>
+ </property>
+ <property stdset="1">
+ <name>palette</name>
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>241</red>
+ <green>241</green>
+ <blue>241</blue>
+ </color>
+ <color>
+ <red>114</red>
+ <green>114</green>
+ <blue>114</blue>
+ </color>
+ <color>
+ <red>152</red>
+ <green>152</green>
+ <blue>152</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>222</red>
+ <green>226</green>
+ <blue>246</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </active>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>114</red>
+ <green>114</green>
+ <blue>114</blue>
+ </color>
+ <color>
+ <red>152</red>
+ <green>152</green>
+ <blue>152</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>222</red>
+ <green>226</green>
+ <blue>246</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </disabled>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>114</red>
+ <green>114</green>
+ <blue>114</blue>
+ </color>
+ <color>
+ <red>152</red>
+ <green>152</green>
+ <blue>152</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>222</red>
+ <green>226</green>
+ <blue>246</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </inactive>
+ </palette>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>NoFrame</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Plain</enum>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>PixmapLabel1</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>10</x>
+ <y>5</y>
+ <width>38</width>
+ <height>38</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>pixmap</name>
+ <pixmap>image0</pixmap>
+ </property>
+ <property stdset="1">
+ <name>scaledContents</name>
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>61</x>
+ <y>12</y>
+ <width>326</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>font</name>
+ <font>
+ <pointsize>14</pointsize>
+ <bold>1</bold>
+ </font>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>KSensors configuration</string>
+ </property>
+ </widget>
+ </widget>
+ <widget>
+ <class>QFrame</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Frame4</cstring>
+ </property>
+ <property stdset="1">
+ <name>minimumSize</name>
+ <size>
+ <width>0</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property stdset="1">
+ <name>maximumSize</name>
+ <size>
+ <width>32767</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property stdset="1">
+ <name>palette</name>
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>241</red>
+ <green>241</green>
+ <blue>241</blue>
+ </color>
+ <color>
+ <red>114</red>
+ <green>114</green>
+ <blue>114</blue>
+ </color>
+ <color>
+ <red>152</red>
+ <green>152</green>
+ <blue>152</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>97</red>
+ <green>97</green>
+ <blue>97</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </active>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>114</red>
+ <green>114</green>
+ <blue>114</blue>
+ </color>
+ <color>
+ <red>152</red>
+ <green>152</green>
+ <blue>152</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>97</red>
+ <green>97</green>
+ <blue>97</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </disabled>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>114</red>
+ <green>114</green>
+ <blue>114</blue>
+ </color>
+ <color>
+ <red>152</red>
+ <green>152</green>
+ <blue>152</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>97</red>
+ <green>97</green>
+ <blue>97</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </inactive>
+ </palette>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>NoFrame</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Plain</enum>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>7</x>
+ <y>2</y>
+ <width>305</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>palette</name>
+ <palette>
+ <active>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>241</red>
+ <green>241</green>
+ <blue>241</blue>
+ </color>
+ <color>
+ <red>114</red>
+ <green>114</green>
+ <blue>114</blue>
+ </color>
+ <color>
+ <red>152</red>
+ <green>152</green>
+ <blue>152</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>97</red>
+ <green>97</green>
+ <blue>97</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </active>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>114</red>
+ <green>114</green>
+ <blue>114</blue>
+ </color>
+ <color>
+ <red>152</red>
+ <green>152</green>
+ <blue>152</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>97</red>
+ <green>97</green>
+ <blue>97</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </disabled>
+ <inactive>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>114</red>
+ <green>114</green>
+ <blue>114</blue>
+ </color>
+ <color>
+ <red>152</red>
+ <green>152</green>
+ <blue>152</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>97</red>
+ <green>97</green>
+ <blue>97</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </inactive>
+ </palette>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Monitoring your motherboard</string>
+ </property>
+ </widget>
+ </widget>
+ <widget>
+ <class>QFrame</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Frame5</cstring>
+ </property>
+ <property stdset="1">
+ <name>palette</name>
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>241</red>
+ <green>241</green>
+ <blue>241</blue>
+ </color>
+ <color>
+ <red>114</red>
+ <green>114</green>
+ <blue>114</blue>
+ </color>
+ <color>
+ <red>152</red>
+ <green>152</green>
+ <blue>152</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>49</red>
+ <green>121</green>
+ <blue>172</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </active>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>114</red>
+ <green>114</green>
+ <blue>114</blue>
+ </color>
+ <color>
+ <red>152</red>
+ <green>152</green>
+ <blue>152</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>49</red>
+ <green>121</green>
+ <blue>172</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </disabled>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>114</red>
+ <green>114</green>
+ <blue>114</blue>
+ </color>
+ <color>
+ <red>152</red>
+ <green>152</green>
+ <blue>152</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>49</red>
+ <green>121</green>
+ <blue>172</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </inactive>
+ </palette>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>NoFrame</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Plain</enum>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>22</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QFrame</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Frame6</cstring>
+ </property>
+ <property stdset="1">
+ <name>minimumSize</name>
+ <size>
+ <width>300</width>
+ <height>200</height>
+ </size>
+ </property>
+ <property stdset="1">
+ <name>palette</name>
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>241</red>
+ <green>241</green>
+ <blue>241</blue>
+ </color>
+ <color>
+ <red>114</red>
+ <green>114</green>
+ <blue>114</blue>
+ </color>
+ <color>
+ <red>152</red>
+ <green>152</green>
+ <blue>152</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>222</red>
+ <green>226</green>
+ <blue>246</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </active>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>114</red>
+ <green>114</green>
+ <blue>114</blue>
+ </color>
+ <color>
+ <red>152</red>
+ <green>152</green>
+ <blue>152</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>222</red>
+ <green>226</green>
+ <blue>246</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </disabled>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>114</red>
+ <green>114</green>
+ <blue>114</blue>
+ </color>
+ <color>
+ <red>152</red>
+ <green>152</green>
+ <blue>152</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>222</red>
+ <green>226</green>
+ <blue>246</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </inactive>
+ </palette>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>NoFrame</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Plain</enum>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>labelTitle</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>19</x>
+ <y>19</y>
+ <width>221</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>font</name>
+ <font>
+ <pointsize>10</pointsize>
+ <bold>1</bold>
+ </font>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>KSensors</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel3_2</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>20</x>
+ <y>49</y>
+ <width>248</width>
+ <height>147</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Welcome to the KSensors configuration window. Click on the left to select a configuration option.</string>
+ </property>
+ <property stdset="1">
+ <name>alignment</name>
+ <set>WordBreak|AlignTop|AlignLeft</set>
+ </property>
+ <property>
+ <name>vAlign</name>
+ </property>
+ <property>
+ <name>wordwrap</name>
+ </property>
+ </widget>
+ </widget>
+ <spacer>
+ <property>
+ <name>name</name>
+ <cstring>Spacer1</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Horizontal</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Fixed</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>61</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<images>
+ <image>
+ <name>image0</name>
+ <data format="XPM.GZ" length="3437">789cc5955b4fdb401085dff91511fb86aa055f63abea43694b81724b212db4ea83ed7580b4102e8140abfef7cece9c5d1293445554a91cc6cea7c99c3deb0bacaeb48e0f765b2bab4bb7c362785eb5aab3e2a6b562ee2e2e1ebf7e7bf56b69390a5bf4db4e5be1f28ba5e5ceb055b5f60697b505ad08d41aff307fb41ce6611ce6cc07e00c7c08aec04796a320aca280b92b1cad818fc131f884392796f9109c815370054e2cc74154c53caf0acb499198a4603696d33031296f4eb785d3001c811370c65c10f3bc8ec13938b7dc8e52d38e98bf08b703f02770025e632e894be6cfe01cbc0336e05dcb59d43699ccbf17ce02f06b7002ee7896f94de6d2f33a3807ef39ce63e67db0417fe818fd2dcb79ecf94e380fc06f3c57cc0fe0043c60ae3cdf8373f095e342fcaec106bc61b9883d7ff02cf38fc24580fec8b3f44bcba5e9a5787e7f58aee871007ff79c319f810bf44fc135fa3de1daf52b700dae857b21d87896f902ecd6bf65366581fe0dd8ad77215cb97c978e0399ef0bfbfce76037ffd332bd0c35beff56d88426617e074ec1dbcc3531bfff8afdea348e03f6537d7016b29f3a0557e8d78ed12f859304fdca31fa1a9ca3afc0465807c2a9ebf3fda96bbf7e0f8cf53a4391564db9ce7c353c0a5d8ed5a21ee35acce35feca5d20655532de6d19bd0ffdbcba93ed3e754725ecca34ffacec7befef1aff6f237bb6a785c785d52d9e901e94a5fcff36978dcb06ea9ecfc50df9106fa9e3caef56896cfccbd0cbdc303e5b8d28fa411d5149f86c74f9e7fadd749d6e58d7eabdff91c1b5453f23ccbf19eb449daf239067a9b7c3e20c7e8791ee7c1f33b34bf4b2539b63883ece69a3e6f4f64d978ca231e58dfc9e6d8d3fb9cc366b0d76383643f8f9a79c63c5c861d7671d7437623191e2732f82c631e07a4a71c1dcab13e765fee39473383fdeeb8c7477639e42cd6c5e6d89fb8bb93195ce6668e23f2e8d271933dec55bda3f9077f3dc6d777528dfbe25cac3a8d1c6e379ff46712328cdf17f2e8c2c7ce1f539d90b6e0700f872fa43572d82507bc91cf3cba3a80cf31e9842af439221d93c4c5cf4f7a880fcfcbfb129247484a74aadba48c1c729292d5dcfcf3675d69dda54397cee26395aa825d62ac0f8f59ef8b2a55a54af290b23e9443196566cdcf7df7bb48fdf4176deafc941cb5eaf93a7d9a9a3d3fc5e34c9dab3e159fddeaf3e6e7ee65c1ff2f8b6af9f7cba53f82c98c27</data>
+ </image>
+</images>
+</UI>
diff --git a/src/cpupanel.cpp b/src/cpupanel.cpp
new file mode 100644
index 0000000..54b1165
--- /dev/null
+++ b/src/cpupanel.cpp
@@ -0,0 +1,140 @@
+/***************************************************************************
+ cpudisplay.cpp - description
+ -------------------
+ begin : Sun Nov 25 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. *
+ * *
+ ***************************************************************************/
+
+#include "cpupanel.h"
+#include "qlcddraw.h"
+
+#include <qcolor.h>
+#include <qpainter.h>
+#include <qlcdnumber.h>
+
+#include <string.h>
+
+bool getCpuInfoValue(const char *name,QString &value)
+{
+char buffer[128];
+char *ptr;
+FILE *fp;
+bool result;
+
+ result= false;
+ if( (fp= fopen("/proc/cpuinfo","r")) ) {
+ while( fgets(buffer, 127, fp) ) {
+ if(!strncmp(name,buffer,strlen(name))) {
+ ptr= strchr(buffer,':');
+ if(ptr) {
+ value= (const char *)(ptr+2);
+ value = value.stripWhiteSpace();
+ }
+ result= true;
+ break;
+ }
+ }
+ fclose(fp);
+ }
+ return result;
+}
+
+void adjustString(QString &str,int maxlen)
+{
+int i= str.find('(');
+
+ str.truncate(maxlen);
+ if(i>=0) str.truncate(i);
+ str= str.stripWhiteSpace();
+}
+
+CpuPanel::CpuPanel(QWidget *parent, const char *name) : Panel(parent,name)
+{
+ sCpu= "Unknow";
+ getCpuInfoValue("model name",sCpu);
+ adjustString(sCpu,16);
+
+ sVendor= "Unknow";
+ getCpuInfoValue("vendor_id",sVendor);
+ adjustString(sVendor,16);
+
+ sBogomips= "0";
+ getCpuInfoValue("bogomips",sBogomips);
+ sBogomips.sprintf("%.0f BMPS",sBogomips.toDouble());
+
+ QString sSpeed= "0";
+ getCpuInfoValue("cpu MHz",sSpeed);
+ sSpeed.sprintf("%.0f",sSpeed.toDouble());
+ speed= new QLCDNumber(this);
+ speed->setGeometry(6,20,52,26);
+ speed->setNumDigits(sSpeed.length());
+ speed->setSegmentStyle(QLCDNumber::Filled);
+ speed->setFrameShape(QFrame::NoFrame);
+ speed->display(sSpeed);
+ QPalette cg= speed->palette();
+ cg.setColor( QColorGroup::Foreground, QColor( 255, 0, 0) );
+ cg.setColor( QColorGroup::Light, QColor( 255, 0, 0) );
+ cg.setColor( QColorGroup::Midlight, QColor( 231, 232, 246) );
+ cg.setColor( QColorGroup::Dark, QColor( 104, 105, 118) );
+ cg.setColor( QColorGroup::Mid, QColor( 139, 140, 158) );
+ cg.setColor( QColorGroup::Background, palette().active().background() );
+ speed->setPalette(cg);
+ speed->installEventFilter(this);
+}
+
+CpuPanel::~CpuPanel()
+{
+}
+
+void CpuPanel::updateInfo()
+{
+ getCpuInfoValue("bogomips",sBogomips);
+ sBogomips.sprintf("%.0f BMPS",sBogomips.toDouble());
+
+ getCpuInfoValue("cpu MHz",sSpeed);
+ sSpeed.sprintf("%.0f",sSpeed.toDouble());
+ speed->setNumDigits(sSpeed.length());
+ speed->display(sSpeed);
+ update();
+}
+
+void CpuPanel::drawContents(QPainter *p)
+{
+ int w= width();
+ int h= height();
+
+ int i2= (h * 4) / 5;
+ int th= h-i2-h/11;
+
+ QLcd::draw(p, 2,h/10,w-4,th,sCpu.latin1(),QLcd::alignJustify, &getColorTitle());
+ QLcd::draw(p, 2,i2+1,w-4,th,sBogomips.latin1(),QLcd::alignCenter,&getColorTitle());
+}
+
+void CpuPanel::paletteChange( const QPalette &oldPalette)
+{
+QPalette cg= speed->palette();
+
+ cg.setColor(QColorGroup::Background,palette().active().background());
+ speed->setPalette(cg);
+}
+
+
+void CpuPanel::resizeEvent ( QResizeEvent *e )
+{
+ int w= width();
+ int h= height();
+
+ int mw= w/10;
+
+ speed->setGeometry(mw,h/3,w-mw*2,(h*2)/5);
+}
diff --git a/src/cpupanel.h b/src/cpupanel.h
new file mode 100644
index 0000000..29d9a55
--- /dev/null
+++ b/src/cpupanel.h
@@ -0,0 +1,54 @@
+/***************************************************************************
+ cpudisplay.h - description
+ -------------------
+ begin : Sun Nov 25 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 CPUPANEL_H
+#define CPUPANEL_H
+
+#include "panel.h"
+
+#include <qlcdnumber.h>
+#include "qlcdstring.h"
+
+/**
+ *@author Miguel Novas
+ */
+
+#include <stdio.h>
+
+class CpuPanel : public Panel {
+Q_OBJECT
+public:
+ CpuPanel(QWidget *parent=0, const char *name=0);
+ ~CpuPanel();
+
+protected:
+
+ void drawContents ( QPainter *p );
+ void paletteChange( const QPalette &oldPalette);
+
+private:
+
+ void updateInfo();
+
+ QLCDNumber *speed;
+
+ QString sCpu,sVendor,sSpeed,sBogomips;
+
+ void resizeEvent ( QResizeEvent *e );
+};
+
+#endif
diff --git a/src/cputimepanel.cpp b/src/cputimepanel.cpp
new file mode 100644
index 0000000..5581dc2
--- /dev/null
+++ b/src/cputimepanel.cpp
@@ -0,0 +1,142 @@
+/***************************************************************************
+ rampanel.cpp - description
+ -------------------
+ begin : Fri Jan 11 2002
+ copyright : (C) 2002 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. *
+ * *
+ ***************************************************************************/
+
+#include "cputimepanel.h"
+
+#include "procinfo.h"
+
+CpuTimePanel::CpuTimePanel(QWidget *parent, const char *name): Panel(parent,name)
+{
+ lcd1= new QLCDString(this);
+ lcd1->setGeometry(16,38,46,8);
+ lcd1->setForeColor(red);
+ lcd1->setAlign(QLCDString::alignLeft);
+ lcd1->setNumberDisplay(true);
+ lcd1->installEventFilter(this);
+
+ QColor color2( 200, 0, 0);
+
+ lcd2= new QLCDString(this);
+ lcd2->setGeometry(16,28,46,8);
+ lcd2->setForeColor(color2);
+ lcd2->setAlign(QLCDString::alignLeft);
+ lcd2->setNumberDisplay(true);
+ lcd2->installEventFilter(this);
+
+ QColor color3( 128,32,0 );
+
+ lcd3= new QLCDString(this);
+ lcd3->setGeometry(16,18,46,8);
+ lcd3->setForeColor(color3);
+ lcd3->setAlign(QLCDString::alignLeft);
+ lcd3->setNumberDisplay(true);
+ lcd3->installEventFilter(this);
+
+ lcd4= new QLCDString(this);
+ lcd4->setGeometry(16,8,46,8);
+ lcd4->setForeColor(darkGreen);
+ lcd4->setAlign(QLCDString::alignLeft);
+ lcd4->setNumberDisplay(true);
+ lcd4->installEventFilter(this);
+
+ barMeter= new QBarMeter(this);
+ barMeter->setGeometry(6,6,6,40);
+ barMeter->setDirection(QBarMeter::dirUp);
+ barMeter->setSteps(20);
+ barMeter->useValueMax(false);
+ barMeter->setValueColor( 0, red );
+ barMeter->setValueColor( 1, color2 );
+ barMeter->setValueColor( 2, color3 );
+ barMeter->setValueColor( 3, QColor(0,220,0) );
+ barMeter->setValueCount(4);
+ barMeter->installEventFilter(this);
+
+ getCpuTime(&old_user,&old_nice,&old_system,&old_idle);
+ updateInfo();
+}
+
+CpuTimePanel::~CpuTimePanel(){
+}
+
+void CpuTimePanel::drawContents(QPainter *p)
+{
+ int w= width();
+ int h= height();
+ int i2= (h * 4) / 5;
+ int th= h-i2-h/11;
+ QLcd::draw(p, 2,i2+1,w-4,th, "CPU STATE",QLcd::alignCenter,&getColorTitle());
+}
+
+
+void CpuTimePanel::updateInfo()
+{
+ int user,nice,system,idle;
+
+ getCpuTime(&user,&nice,&system,&idle);
+
+ int puser = user - old_user;
+ int pnice = nice - old_nice;
+ int psystem= system - old_system;
+ int pidle = idle - old_idle;
+
+ int ptotal= puser+pnice+psystem+pidle;
+
+ if (ptotal==0) ptotal=1;
+
+ QString str;
+ str.sprintf ("USER%5.1f" , (float)puser /ptotal * 100 );
+ lcd1->display(str);
+ str.sprintf ("NICE%5.1f" , (float)pnice /ptotal * 100 );
+ lcd2->display(str);
+ str.sprintf ("SYS %5.1f" , (float)psystem/ptotal * 100 );
+ lcd3->display(str);
+ str.sprintf ("IDLE%5.1f" , (float)pidle /ptotal * 100 );
+ lcd4->display(str);
+
+ barMeter->setValue(0,(double)puser);
+ barMeter->setValue(1,(double)pnice);
+ barMeter->setValue(2,(double)psystem);
+ barMeter->setValue(3,(double)pidle);
+
+ old_user = user;
+ old_nice = nice;
+ old_system= system;
+ old_idle = idle;
+}
+
+void CpuTimePanel::resizeEvent ( QResizeEvent *e )
+{
+ int w= width();
+ int h= height();
+
+ int lw= (w*10)/14;
+ int lh= h/8;
+ int sh= (h*10)/64;
+ int i= h/8;
+ int i0= i-1;
+ lcd4 ->setGeometry(w/4 ,i ,lw,lh);
+ i+= sh;
+ lcd3 ->setGeometry(w/4 ,i ,lw,lh);
+ i+= sh;
+ lcd2 ->setGeometry(w/4 ,i ,lw,lh);
+ i+= sh;
+ lcd1 ->setGeometry(w/4 ,i ,lw,lh);
+
+ int bl= i+lh-i0;
+ barMeter->setGeometry(w/10,i0,w/10,bl);
+ barMeter->setSteps(bl/2);
+}
diff --git a/src/cputimepanel.h b/src/cputimepanel.h
new file mode 100644
index 0000000..efc1326
--- /dev/null
+++ b/src/cputimepanel.h
@@ -0,0 +1,47 @@
+/***************************************************************************
+ rampanel.h - description
+ -------------------
+ begin : Fri Jan 11 2002
+ copyright : (C) 2002 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 CPUTIMEPANEL_H
+#define CPUTIMEPANEL_H
+
+#include <qpainter.h>
+
+#include <panel.h>
+#include "qlcdstring.h"
+#include "qbarmeter.h"
+
+/**
+ *@author Miguel Novas
+ */
+
+class CpuTimePanel : public Panel {
+public:
+ CpuTimePanel(QWidget *parent=0, const char *name=0);
+ ~CpuTimePanel();
+
+protected:
+
+ int old_user,old_nice,old_system,old_idle;
+ QLCDString *lcd1,*lcd2,*lcd3,*lcd4;
+ QBarMeter *barMeter;
+
+ void updateInfo();
+ void drawContents(QPainter *p);
+ void resizeEvent ( QResizeEvent *e );
+};
+
+#endif
diff --git a/src/generalcfg.cpp b/src/generalcfg.cpp
new file mode 100644
index 0000000..52ab597
--- /dev/null
+++ b/src/generalcfg.cpp
@@ -0,0 +1,78 @@
+/***************************************************************************
+ generalcfg.cpp - description
+ -------------------
+ begin : mar may 14 2002
+ copyright : (C) 2002 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. *
+ * *
+ ***************************************************************************/
+
+#include "generalcfg.h"
+
+#include <qgroupbox.h>
+#include <qlayout.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qcheckbox.h>
+
+#include "lmsensorswidget.h"
+#include "lmsensorsdock.h"
+
+GeneralCfg::GeneralCfg(LMSensors *lsensors, QWidget *parent, const char *name) : GeneralCfgDesign(parent,name)
+{
+ sensors= lsensors;
+
+ palPanelCfg= new PaletteCfg( boxGeneralPalette );
+ boxGeneralPalette->setColumnLayout(0, Qt::Vertical );
+ boxGeneralPalette->layout()->setSpacing( 6 );
+ boxGeneralPalette->layout()->setMargin( 12 );
+ QGridLayout *boxGeneralPaletteLayout = new QGridLayout( boxGeneralPalette->layout() );
+ boxGeneralPaletteLayout->setAlignment( Qt::AlignTop );
+ boxGeneralPaletteLayout->addWidget( palPanelCfg, 0, 0 );
+
+ palPanelCfg->readPalette(0);
+
+ int panelSize= LMSensorsWidget::cfgReadPanelSize();
+ switch(panelSize) {
+ case 64: Radio64->setChecked(true); break;
+ case 56: Radio56->setChecked(true); break;
+ case 48: Radio48->setChecked(true); break;
+ }
+
+ KConfig *cfg= KGlobal::config();
+ cfg->setGroup( "General" );
+ CheckBoxAutoStart->setChecked(cfg->readBoolEntry("AutoStart",true));
+ //connect( buttonApply ,SIGNAL(clicked()),this, SLOT(slotApplyChanges()));
+}
+
+GeneralCfg::~GeneralCfg(){
+}
+
+
+void GeneralCfg::slotApplyChanges()
+{
+ if (!isVisible())
+ return;
+
+ palPanelCfg->savePalette();
+ //
+ int panelSize= 64;
+ if(Radio56->isChecked()) panelSize= 56;
+ else if(Radio48->isChecked()) panelSize= 48;
+ LMSensorsWidget::cfgWritePanelSize(panelSize);
+
+ KConfig *cfg= KGlobal::config();
+ cfg->setGroup( "General" );
+ cfg->writeEntry("AutoStart", CheckBoxAutoStart->isChecked());
+
+ //
+ sensors->emitConfigChanged();
+}
diff --git a/src/generalcfg.h b/src/generalcfg.h
new file mode 100644
index 0000000..7bcb32f
--- /dev/null
+++ b/src/generalcfg.h
@@ -0,0 +1,44 @@
+/***************************************************************************
+ generalcfg.h - description
+ -------------------
+ begin : mar may 14 2002
+ copyright : (C) 2002 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 GENERALCFG_H
+#define GENERALCFG_H
+
+#include "lmsensors.h"
+#include "generalcfgdesign.h"
+#include "palettecfg.h"
+
+/**
+ *@author Miguel Novas
+ */
+
+class GeneralCfg : public GeneralCfgDesign {
+Q_OBJECT
+public:
+ GeneralCfg(LMSensors *lsensors, QWidget *parent=0, const char *name=0);
+ ~GeneralCfg();
+
+public slots:
+
+ void slotApplyChanges();
+
+private:
+ PaletteCfg *palPanelCfg;
+ LMSensors *sensors;
+};
+
+#endif
diff --git a/src/generalcfgdesign.cpp b/src/generalcfgdesign.cpp
new file mode 100644
index 0000000..692c693
--- /dev/null
+++ b/src/generalcfgdesign.cpp
@@ -0,0 +1,103 @@
+#include <klocale.h>
+/****************************************************************************
+** Form implementation generated from reading ui file './generalcfgdesign.ui'
+**
+** Created: mer aoû 18 23:39:02 2004
+** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#include "generalcfgdesign.h"
+
+#include <qvariant.h>
+#include <qpushbutton.h>
+#include <qbuttongroup.h>
+#include <qradiobutton.h>
+#include <qgroupbox.h>
+#include <qcheckbox.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/*
+ * Constructs a GeneralCfgDesign as a child of 'parent', with the
+ * name 'name' and widget flags set to 'f'.
+ */
+GeneralCfgDesign::GeneralCfgDesign( QWidget* parent, const char* name, WFlags fl )
+ : QWidget( parent, name, fl )
+{
+ if ( !name )
+ setName( "GeneralCfgDesign" );
+ GeneralCfgDesignLayout = new QGridLayout( this, 1, 1, 8, 6, "GeneralCfgDesignLayout");
+
+ ButtonGroup5 = new QButtonGroup( this, "ButtonGroup5" );
+ ButtonGroup5->setColumnLayout(0, Qt::Vertical );
+ ButtonGroup5->layout()->setSpacing( 6 );
+ ButtonGroup5->layout()->setMargin( 11 );
+ ButtonGroup5Layout = new QGridLayout( ButtonGroup5->layout() );
+ ButtonGroup5Layout->setAlignment( Qt::AlignTop );
+
+ Radio64 = new QRadioButton( ButtonGroup5, "Radio64" );
+ Radio64->setChecked( TRUE );
+
+ ButtonGroup5Layout->addWidget( Radio64, 0, 0 );
+
+ Radio56 = new QRadioButton( ButtonGroup5, "Radio56" );
+
+ ButtonGroup5Layout->addWidget( Radio56, 0, 1 );
+
+ Radio48 = new QRadioButton( ButtonGroup5, "Radio48" );
+
+ ButtonGroup5Layout->addWidget( Radio48, 0, 2 );
+
+ GeneralCfgDesignLayout->addWidget( ButtonGroup5, 0, 0 );
+
+ boxGeneralPalette = new QGroupBox( this, "boxGeneralPalette" );
+ boxGeneralPalette->setMinimumSize( QSize( 0, 65 ) );
+
+ GeneralCfgDesignLayout->addWidget( boxGeneralPalette, 1, 0 );
+
+ GroupBox2 = new QGroupBox( this, "GroupBox2" );
+ GroupBox2->setColumnLayout(0, Qt::Vertical );
+ GroupBox2->layout()->setSpacing( 6 );
+ GroupBox2->layout()->setMargin( 11 );
+ GroupBox2Layout = new QVBoxLayout( GroupBox2->layout() );
+ GroupBox2Layout->setAlignment( Qt::AlignTop );
+
+ CheckBoxAutoStart = new QCheckBox( GroupBox2, "CheckBoxAutoStart" );
+ GroupBox2Layout->addWidget( CheckBoxAutoStart );
+
+ GeneralCfgDesignLayout->addWidget( GroupBox2, 2, 0 );
+ Spacer28 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ GeneralCfgDesignLayout->addItem( Spacer28, 3, 0 );
+ languageChange();
+ resize( QSize(343, 239).expandedTo(minimumSizeHint()) );
+ clearWState( WState_Polished );
+}
+
+/*
+ * Destroys the object and frees any allocated resources
+ */
+GeneralCfgDesign::~GeneralCfgDesign()
+{
+ // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ * Sets the strings of the subwidgets using the current
+ * language.
+ */
+void GeneralCfgDesign::languageChange()
+{
+ setCaption( tr2i18n( "GeneralCfg" ) );
+ ButtonGroup5->setTitle( tr2i18n( "Panels size" ) );
+ Radio64->setText( tr2i18n( "64 x 64" ) );
+ Radio56->setText( tr2i18n( "56 x 56" ) );
+ Radio48->setText( tr2i18n( "48 x 48" ) );
+ boxGeneralPalette->setTitle( tr2i18n( "Colors" ) );
+ GroupBox2->setTitle( tr2i18n( "Startup" ) );
+ CheckBoxAutoStart->setText( tr2i18n( "Autostart KSensors on KDE startup" ) );
+}
+
+#include "generalcfgdesign.moc"
diff --git a/src/generalcfgdesign.h b/src/generalcfgdesign.h
new file mode 100644
index 0000000..94735ab
--- /dev/null
+++ b/src/generalcfgdesign.h
@@ -0,0 +1,52 @@
+/****************************************************************************
+** Form interface generated from reading ui file './generalcfgdesign.ui'
+**
+** Created: mer aoû 18 23:39:01 2004
+** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#ifndef GENERALCFGDESIGN_H
+#define GENERALCFGDESIGN_H
+
+#include <qvariant.h>
+#include <qwidget.h>
+
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QSpacerItem;
+class QButtonGroup;
+class QRadioButton;
+class QGroupBox;
+class QCheckBox;
+
+class GeneralCfgDesign : public QWidget
+{
+ Q_OBJECT
+
+public:
+ GeneralCfgDesign( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ ~GeneralCfgDesign();
+
+ QButtonGroup* ButtonGroup5;
+ QRadioButton* Radio64;
+ QRadioButton* Radio56;
+ QRadioButton* Radio48;
+ QGroupBox* boxGeneralPalette;
+ QGroupBox* GroupBox2;
+ QCheckBox* CheckBoxAutoStart;
+
+protected:
+ QGridLayout* GeneralCfgDesignLayout;
+ QSpacerItem* Spacer28;
+ QGridLayout* ButtonGroup5Layout;
+ QVBoxLayout* GroupBox2Layout;
+
+protected slots:
+ virtual void languageChange();
+
+};
+
+#endif // GENERALCFGDESIGN_H
diff --git a/src/generalcfgdesign.ui b/src/generalcfgdesign.ui
new file mode 100644
index 0000000..fa060e8
--- /dev/null
+++ b/src/generalcfgdesign.ui
@@ -0,0 +1,143 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>GeneralCfgDesign</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>GeneralCfgDesign</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>343</width>
+ <height>239</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>GeneralCfg</string>
+ </property>
+ <property name="layoutMargin" stdset="0">
+ </property>
+ <property name="layoutSpacing" stdset="0">
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>8</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QButtonGroup" row="0" column="0">
+ <property name="name">
+ <cstring>ButtonGroup5</cstring>
+ </property>
+ <property name="title">
+ <string>Panels size</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>Radio64</cstring>
+ </property>
+ <property name="text">
+ <string>64 x 64</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="1">
+ <property name="name">
+ <cstring>Radio56</cstring>
+ </property>
+ <property name="text">
+ <string>56 x 56</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="2">
+ <property name="name">
+ <cstring>Radio48</cstring>
+ </property>
+ <property name="text">
+ <string>48 x 48</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox" row="1" column="0">
+ <property name="name">
+ <cstring>boxGeneralPalette</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>65</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Colors</string>
+ </property>
+ <property name="layoutMargin" stdset="0">
+ </property>
+ <property name="layoutSpacing" stdset="0">
+ </property>
+ </widget>
+ <widget class="QGroupBox" row="2" column="0">
+ <property name="name">
+ <cstring>GroupBox2</cstring>
+ </property>
+ <property name="title">
+ <string>Startup</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>CheckBoxAutoStart</cstring>
+ </property>
+ <property name="text">
+ <string>Autostart KSensors on KDE startup</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer row="3" column="0">
+ <property name="name">
+ <cstring>Spacer28</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/hdsensorslist.cpp b/src/hdsensorslist.cpp
new file mode 100644
index 0000000..3f9c704
--- /dev/null
+++ b/src/hdsensorslist.cpp
@@ -0,0 +1,224 @@
+/***************************************************************************
+ hdsensorslist.cpp - description
+ -------------------
+ begin : vie abr 26 2002
+ copyright : (C) 2002 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. *
+ * *
+ ***************************************************************************/
+
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <dirent.h>
+#include <sys/types.h>
+#include <stdlib.h>
+#include <qstringlist.h>
+#include <klocale.h>
+#include <regex.h>
+
+#include "sensor.h"
+#include "hdsensorslist.h"
+
+
+HDSensorsList::HDSensorsList(QObject *parent, const char * name): SensorsList(parent,name)
+{
+ process= 0;
+
+ setDescription( QString(i18n("Hard Disks")) );
+
+ setClass(Sensor::hdSensor);
+
+ readConfig();
+
+ if(!isHddTempInstalled()) return;
+
+ QStringList disks;
+ if(!getDisks(disks)) return;
+
+ ProcessExec proc;
+ proc << "hddtemp" << "-q";
+ for(QStringList::Iterator it = disks.begin(); it != disks.end(); ++it ) {
+ proc << *it;
+ }
+
+ if(proc.runAndWait()) {
+ double value;
+ QString str;
+ for(QStringList::Iterator it = disks.begin(); it != disks.end(); ++it ) {
+ if(getDiskInfo(proc.getStdoutData(),*it,str,value)) {
+ Sensor *sensor= new Sensor(this);
+ sensor->setType(Sensor::lmTemp);
+ sensor->setName(*it);
+ sensor->setDescription(str);
+ sensor->setValueMax (40 , Sensor::dgCelsius);
+ sensor->setValueMin ( 0 , Sensor::dgCelsius);
+ sensor->setValueIdeal(value, Sensor::dgCelsius);
+ sensor->setValue (value, Sensor::dgCelsius);
+ sensor->readConfig();
+ }
+ }
+ }
+}
+
+HDSensorsList::~HDSensorsList()
+{
+ delete process;
+}
+
+//*************
+
+void HDSensorsList::updateSensors()
+{
+ if(process) return;
+
+ QObjectList *list= (QObjectList *)children();
+ if(!list) return;
+
+ QStringList params;
+ for(Sensor *obj= (Sensor *)list->first(); obj!=0; obj= (Sensor *)list->next())
+ if(obj->monitorized())
+ params << obj->name();
+
+ if(params.count()>0) {
+ process= new ProcessExec;
+#if ( KDE_VERSION_MAJOR >= 3 )
+ *process << "hddtemp" << "-q" << params;
+#else
+ *process << "hddtemp" << "-q";
+ for (QStringList::Iterator it= params.begin(); it!=params.end(); ++it)
+ *process << *it;
+#endif
+ connect( process, SIGNAL(processExited(KProcess *)), this, SLOT(slotProcessExited(KProcess *)) );
+ process->run();
+ }
+}
+
+
+void HDSensorsList::slotProcessExited(KProcess *)
+{
+ QObjectList *list= (QObjectList *)children();
+
+ if(!list) return;
+
+ char *buf= process->getStdoutData();
+
+ if( process->outputErrors() ) {
+ qWarning("HddTemp Error:\n%s", buf);
+ }
+
+ char *ptr;
+ regex_t *preg;
+ regmatch_t pmatch[1];
+ preg = (regex_t*) malloc(sizeof(regex_t));
+ regcomp(preg, ": [0-9]\\+.*C$", REG_NEWLINE);
+
+ for(Sensor *obj= (Sensor *)list->first(); obj!=0; obj= (Sensor *)list->next()) {
+ buf= strstr(buf,obj->name());
+ if(!buf) break;
+ if (regexec(preg, buf, 1, pmatch, 0) == 0)
+ {
+ ptr = buf + pmatch[0].rm_so + 2;
+ buf += pmatch[0].rm_eo;
+ obj->setValue(atof(ptr), Sensor::dgCelsius);
+ }
+ }
+ regfree(preg);
+ free(preg);
+
+ delete process;
+ process= 0;
+}
+
+// *************** Static methods
+
+
+bool HDSensorsList::getDiskInfo(const char *buf, QString disk, QString &name, double &value)
+{
+ regex_t *preg;
+ regmatch_t pmatch[1];
+ preg = (regex_t*) malloc(sizeof(regex_t));
+
+ // Take disk model
+ char reg_string[30];
+ snprintf(reg_string, sizeof(reg_string), "%s: .*: [0-9]", disk.latin1());
+ regcomp(preg, reg_string, REG_NEWLINE);
+ if (regexec(preg, buf, 1, pmatch, 0) == 0)
+ {
+ name="";
+ pmatch[0].rm_eo -= 3;
+ pmatch[0].rm_so += 10;
+ buf += pmatch[0].rm_so;
+ while (pmatch[0].rm_so < pmatch[0].rm_eo)
+ {
+ name += *buf;
+ buf++;
+ pmatch[0].rm_so++;
+ }
+ regfree(preg);
+ name= name.stripWhiteSpace();
+ if( name.length()>40 ) name= disk;
+ }
+ else
+ {
+ regfree(preg);
+ free(preg);
+ return false;
+ }
+
+ // Take disk temperature
+ regcomp(preg, ": [0-9]\\+.*C$", REG_NEWLINE);
+ if (regexec(preg, buf, 1, pmatch, 0) == 0)
+ {
+ value= atof(buf + pmatch[0].rm_so + 2);
+ regfree(preg);
+ free(preg);
+ }
+ else
+ {
+ regfree(preg);
+ free(preg);
+ return false;
+ }
+ return true;
+}
+
+
+bool HDSensorsList::isHddTempInstalled()
+{
+ProcessExec proc;
+
+ proc << "hddtemp" ;
+ if(proc.runAndWait()) {
+ if(strstr(proc.getStdoutData(),"ERROR")==0) return true;
+ qWarning("HddTemp Error:\n%s", proc.getStdoutData());
+ }
+ return false;
+}
+
+bool HDSensorsList::getDisks(QStringList &disks )
+{
+ DIR *dir= opendir("/proc/ide");
+ if(!dir) return false;
+ QString str;
+ struct dirent *ptr;
+ while((ptr= readdir(dir))) {
+ if(ptr->d_name[0]=='h' && ptr->d_name[1]=='d') {
+ str.sprintf("/dev/hd%c",ptr->d_name[2]);
+ disks << str;
+ }
+ }
+ closedir(dir);
+ return true;
+}
+
+// ***************
+
diff --git a/src/hdsensorslist.h b/src/hdsensorslist.h
new file mode 100644
index 0000000..5662858
--- /dev/null
+++ b/src/hdsensorslist.h
@@ -0,0 +1,53 @@
+/***************************************************************************
+ hdsensorslist.h - description
+ -------------------
+ begin : vie abr 26 2002
+ copyright : (C) 2002 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 HDSENSORSLIST_H
+#define HDSENSORSLIST_H
+
+#include <sensorslist.h>
+
+#include "sensor.h"
+#include "processexec.h"
+
+/**
+ *@author Miguel Novas
+ */
+
+class HDSensorsList : public SensorsList {
+Q_OBJECT
+public:
+ HDSensorsList(QObject *parent, const char * name);
+ ~HDSensorsList();
+
+public slots:
+
+ void updateSensors();
+
+protected slots:
+
+ void slotProcessExited(KProcess *proc);
+
+private:
+
+ ProcessExec *process;
+
+ static bool isHddTempInstalled();
+ static bool getDisks(QStringList &disks);
+ static bool getDiskInfo(const char *buf, QString disk, QString &name, double &value);
+};
+
+#endif
diff --git a/src/i8ksensorslist.cpp b/src/i8ksensorslist.cpp
new file mode 100644
index 0000000..06d12c9
--- /dev/null
+++ b/src/i8ksensorslist.cpp
@@ -0,0 +1,129 @@
+/***************************************************************************
+ i8ksensorslist.cpp - description
+ -------------------
+ begin : jue jun 20 2002
+ copyright : (C) 2002 by Miguel Novas
+ email : migueln@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#include <klocale.h>
+
+#include "i8ksensorslist.h"
+
+#include "procinfo.h"
+
+
+
+
+I8KSensorsList::I8KSensorsList(QObject *parent, const char *name): SensorsList(parent,name)
+{
+ setDescription(QString(i18n("MainBoard")) );
+
+ setClass(Sensor::lmSensor);
+
+ readConfig();
+
+ if ( (i8kAvail = (I8KOnlyAvailable()==0)) )
+ {
+ cpuTemp= new Sensor(this);
+ cpuTemp->setType(Sensor::lmTemp);
+ cpuTemp->setName("cputemp");
+ cpuTemp->setDescription("CPU Temp");
+ cpuTemp->setValueMax (40 , Sensor::dgCelsius);
+ cpuTemp->setValueMin ( 0 , Sensor::dgCelsius);
+ cpuTemp->setValueIdeal(30 , Sensor::dgCelsius);
+ cpuTemp->setValue (30 , Sensor::dgCelsius);
+ cpuTemp->readConfig();
+
+ leftFan= new Sensor(this);
+ leftFan->setType(Sensor::lmFan);
+ leftFan->setName("fan1");
+ leftFan->setDescription("Left Fan");
+ leftFan->setValueMax (10000);
+ leftFan->setValueMin ( 0);
+ leftFan->setValueIdeal( 4500);
+ leftFan->setValue ( 4500);
+ leftFan->readConfig();
+
+ rightFan= new Sensor(this);
+ rightFan->setType(Sensor::lmFan);
+ rightFan->setName("fan2");
+ rightFan->setDescription("Right Fan");
+ rightFan->setValueMax (10000);
+ rightFan->setValueMin ( 0);
+ rightFan->setValueIdeal( 4500);
+ rightFan->setValue ( 4500);
+ rightFan->readConfig();
+ }
+
+ if ( (acpiAvail=(AcpiAvailable()==0)) )
+ {
+ cpuTempAcpi= new Sensor(this);
+ cpuTempAcpi->setType(Sensor::lmTemp);
+ cpuTempAcpi->setName("cputemp");
+ cpuTempAcpi->setDescription("CPU Temp");
+ cpuTempAcpi->setValueMax (40 , Sensor::dgCelsius);
+ cpuTempAcpi->setValueMin ( 0 , Sensor::dgCelsius);
+ cpuTempAcpi->setValueIdeal(30 , Sensor::dgCelsius);
+ cpuTempAcpi->setValue (30 , Sensor::dgCelsius);
+ cpuTempAcpi->readConfig();
+ }
+
+ updateSensors();
+}
+
+I8KSensorsList::~I8KSensorsList(){
+}
+
+
+void I8KSensorsList::updateSensors()
+{
+double t,f1,f2;
+
+ if(i8kAvail && !getI8KInfo(&t,&f1,&f2)) {
+ cpuTemp->setValue(t,Sensor::dgCelsius);
+ leftFan->setValue(f1);
+ rightFan->setValue(f2);
+ }
+ if(acpiAvail && !getAcpiTemperature(&t)) {
+ cpuTempAcpi->setValue(t,Sensor::dgCelsius);
+ }
+}
+
+
+int I8KSensorsList::AcpiAvailable()
+{
+ double t;
+ return getAcpiTemperature(&t);
+}
+
+int I8KSensorsList::I8KOnlyAvailable()
+{
+double d1,d2,d3;
+
+ return getI8KInfo(&d1,&d2,&d3);
+}
+
+bool I8KSensorsList::I8KAvailable()
+{
+int result;
+
+ switch(result= I8KOnlyAvailable()) {
+ case -2: qWarning("I18K Warning: /proc/i8k format not valid or not supported. Inform the author."); break;
+ case -3: qWarning("I18K Warning: Only format version 1.0 is supported. Inform the author."); break;
+ }
+
+ return (result==0 || AcpiAvailable()==0);
+}
+
+
+
diff --git a/src/i8ksensorslist.h b/src/i8ksensorslist.h
new file mode 100644
index 0000000..39a355e
--- /dev/null
+++ b/src/i8ksensorslist.h
@@ -0,0 +1,55 @@
+/***************************************************************************
+ i8ksensorslist.h - description
+ -------------------
+ begin : jue jun 20 2002
+ copyright : (C) 2002 by Miguel Novas
+ email : migueln@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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 I8KSENSORSLIST_H
+#define I8KSENSORSLIST_H
+
+#include <sensorslist.h>
+
+/**
+ *@author Miguel Novas
+ */
+
+class I8KSensorsList : public SensorsList {
+Q_OBJECT
+public:
+
+ I8KSensorsList(QObject *parent, const char * name);
+ ~I8KSensorsList();
+
+
+ static bool I8KAvailable();
+
+public slots:
+
+ void updateSensors();
+
+private:
+
+ bool i8kAvail;
+ bool acpiAvail;
+
+ Sensor *cpuTempAcpi;
+ Sensor *cpuTemp;
+ Sensor *leftFan;
+ Sensor *rightFan;
+
+ static int AcpiAvailable();
+ static int I8KOnlyAvailable();
+};
+
+#endif
diff --git a/src/infopanels.cpp b/src/infopanels.cpp
new file mode 100644
index 0000000..18d4736
--- /dev/null
+++ b/src/infopanels.cpp
@@ -0,0 +1,91 @@
+/***************************************************************************
+ infopanels.cpp - description
+ -------------------
+ begin : vie may 10 2002
+ copyright : (C) 2002 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. *
+ * *
+ ***************************************************************************/
+
+#include "infopanels.h"
+
+
+
+InfoPanels::InfoPanels(QWidget *panelsWidget, QObject *parent, const char *name): PanelsGroup(widget,parent,name)
+{
+ widget= panelsWidget;
+ timerPanelCount=0;
+ timer = new QTimer(this);
+ configChanged("proc.CPUINFO");
+ configChanged("proc.RAMINFO");
+ configChanged("proc.SWAPINFO");
+ configChanged("proc.CPULOAD");
+ configChanged("proc.UPTIME");
+}
+
+InfoPanels::~InfoPanels(){
+}
+
+void InfoPanels::configChanged(const char *name)
+{
+ if(!strcmp(name,"proc")) readUpdateInterval();
+ else {
+ Panel *panel= (Panel *)widget->child(name);
+ if( Panel::readShow(name)!= (bool)panel ) {
+ if(panel) delete panel;
+ else {
+ if(!strcmp(name,"proc.CPUINFO" )) panel= new CpuPanel(widget,name);
+ else
+ if(!strcmp(name,"proc.RAMINFO" )) panel= new RamPanel(widget,name,RamPanel::memRAM);
+ else
+ if(!strcmp(name,"proc.SWAPINFO")) panel= new RamPanel(widget,name,RamPanel::memSWAP);
+ else
+ if(!strcmp(name,"proc.CPULOAD" )) panel= new CpuTimePanel(widget,name);
+ else
+ if(!strcmp(name,"proc.UPTIME" )) panel= new UpTimePanel(widget,name);
+ if(panel) timerConnect(panel);
+ }
+ }
+ }
+}
+
+void InfoPanels::timerConnect(Panel *display)
+{
+ if(timerPanelCount==0) timer->start( cfgReadUpdateInterval()*1000 );
+ connect( timer , SIGNAL(timeout() ), display, SLOT(updateInfo()) );
+ connect( display, SIGNAL(destroyed()), this , SLOT(infoPanelDestroyed()) );
+ timerPanelCount++;
+}
+
+void InfoPanels::infoPanelDestroyed()
+{
+ if(--timerPanelCount<=0) timer->stop();
+}
+
+void InfoPanels::cfgWriteUpdateInterval(int interval)
+{
+ KGlobal::config()->setGroup("ShowWidget");
+ KGlobal::config()->writeEntry("UpdateInterval" , interval );
+}
+
+int InfoPanels::cfgReadUpdateInterval()
+{
+ KGlobal::config()->setGroup("ShowWidget");
+ return KGlobal::config()->readNumEntry("UpdateInterval" , 5 );
+}
+
+void InfoPanels::readUpdateInterval()
+{
+ timer->changeInterval(cfgReadUpdateInterval()*1000);
+}
+
+// ******************* Public static methods **********************
+
diff --git a/src/infopanels.h b/src/infopanels.h
new file mode 100644
index 0000000..9dff7a5
--- /dev/null
+++ b/src/infopanels.h
@@ -0,0 +1,63 @@
+/***************************************************************************
+ infopanels.h - description
+ -------------------
+ begin : vie may 10 2002
+ copyright : (C) 2002 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 INFOPANELS_H
+#define INFOPANELS_H
+
+#include <qtimer.h>
+#include <kglobal.h>
+
+#include "panelsgroup.h"
+#include "cpupanel.h"
+#include "rampanel.h"
+#include "cputimepanel.h"
+#include "uptimepanel.h"
+
+
+/**
+ *@author Miguel Novas
+ */
+
+class InfoPanels : public PanelsGroup {
+Q_OBJECT
+
+public:
+ InfoPanels(QWidget *panelsWidget, QObject *parent=0, const char *name=0);
+ ~InfoPanels();
+
+ static int cfgReadUpdateInterval();
+ static void cfgWriteUpdateInterval(int interval);
+
+public slots:
+
+ void configChanged(const char *name);
+
+protected slots:
+
+ void infoPanelDestroyed();
+
+private:
+
+ int timerPanelCount;
+ QTimer *timer;
+ QWidget *widget;
+
+ void readUpdateInterval();
+ void timerConnect(Panel *display);
+};
+
+#endif
diff --git a/src/ksensors.cpp b/src/ksensors.cpp
new file mode 100644
index 0000000..2447fcb
--- /dev/null
+++ b/src/ksensors.cpp
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2003 noname <s@s.org>
+ */
+
+#include "ksensors.h"
+
+#include <qlabel.h>
+
+#include <kmainwindow.h>
+#include <klocale.h>
+
+ksensors::ksensors()
+ : KMainWindow( 0, "ksensors" )
+{
+ // set the shell's ui resource file
+ setXMLFile("ksensorsui.rc");
+
+ new QLabel( "Hello World", this, "hello label" );
+}
+
+ksensors::~ksensors()
+{
+}
+
+#include "ksensors.moc"
diff --git a/src/ksensors.desktop b/src/ksensors.desktop
new file mode 100644
index 0000000..9e58b7d
--- /dev/null
+++ b/src/ksensors.desktop
@@ -0,0 +1,24 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=ksensors
+Name[xx]=xxksensorsxx
+Exec=ksensors
+Icon=ksensors
+Type=Application
+Comment=A simple KDE Application
+Comment[ca]=Una simple aplicació KDE
+Comment[da]=Et simpelt KDE program
+Comment[de]=Eine einfache KDE-Anwendung
+Comment[el]=Μια απλή εφαρμογή του KDE
+Comment[es]=Una aplicación de KDE sencilla
+Comment[et]=Lihtne KDE rakendus
+Comment[fr]=Une application simple pour KDE.
+Comment[hu]=Egyszerű KDE-alkalmazás
+Comment[it]=Una semplice applicazione KDE
+Comment[pt]=Uma aplicação KDE simples
+Comment[pt_BR]=Um simples Aplicativo do KDE
+Comment[ru]=Простое приложение KDE
+Comment[sl]=Preprost program za KDE
+Comment[sr]=Проста KDE-ова апликација
+Comment[sv]=Ett enkelt KDE-program
+Comment[xx]=xxA simple KDE Applicationxx
diff --git a/src/ksensors.h b/src/ksensors.h
new file mode 100644
index 0000000..16dbc7f
--- /dev/null
+++ b/src/ksensors.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2003 noname <s@s.org>
+ */
+
+#ifndef _KSENSORS_H_
+#define _KSENSORS_H_
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <kmainwindow.h>
+
+/**
+ * @short Application Main Window
+ * @author noname <s@s.org>
+ * @version 0.1
+ */
+class ksensors : public KMainWindow
+{
+ Q_OBJECT
+public:
+ /**
+ * Default Constructor
+ */
+ ksensors();
+
+ /**
+ * Default Destructor
+ */
+ virtual ~ksensors();
+};
+
+#endif // _KSENSORS_H_
diff --git a/src/ksensors.lsm b/src/ksensors.lsm
new file mode 100644
index 0000000..717281e
--- /dev/null
+++ b/src/ksensors.lsm
@@ -0,0 +1,16 @@
+Begin3
+Title: ksensors -- Some description
+Version: 0.1
+Entered-date:
+Description:
+Keywords: KDE Qt
+Author: noname <s@s.org>
+Maintained-by: noname <s@s.org>
+Home-page:
+Alternate-site:
+Primary-site: ftp://ftp.kde.org/pub/kde/unstable/apps/utils
+ xxxxxx ksensors-0.1.tar.gz
+ xxx ksensors-0.1.lsm
+Platform: Linux. Needs KDE
+Copying-policy: GPL
+End
diff --git a/src/ksensorscfg.cpp b/src/ksensorscfg.cpp
new file mode 100644
index 0000000..1b9e603
--- /dev/null
+++ b/src/ksensorscfg.cpp
@@ -0,0 +1,98 @@
+/***************************************************************************
+ ksensorscfg.cpp - description
+ -------------------
+ begin : mi may 8 2002
+ copyright : (C) 2002 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. *
+ * *
+ ***************************************************************************/
+
+#include "ksensorscfg.h"
+
+#include <qvariant.h>
+#include <qframe.h>
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+#include <qimage.h>
+#include <qpixmap.h>
+
+#include <kiconloader.h>
+#include <klocale.h>
+#include <kaboutdata.h>
+#include <kdialogbase.h>
+
+#include <kuniqueapp.h>
+#include "lmsensors.h"
+#include "sensorslist.h"
+#include "generalcfg.h"
+#include "systemcfg.h"
+#include "lmsensorscfg.h"
+#include "aboutcfgdesign.h"
+
+#define Icon(x) KGlobal::instance()->iconLoader()->loadIcon( x, KIcon::NoGroup, KIcon::SizeMedium )
+
+KSensorsCfg::KSensorsCfg(LMSensors *lsensors, const char *name)
+: KDialogBase(IconList, name, Apply|Close, Close )
+{
+ sensors= lsensors;
+
+ //resize( 558, 370 );
+ setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
+ setCaption( i18n("KSensors Configuration") );
+
+ QFrame *page;
+ QVBoxLayout *lay;
+
+ page = addPage( i18n("Global settings"), i18n("Global settings"), Icon("earth.png") );
+ m_generalcfg = new GeneralCfg(sensors, page);
+ lay = new QVBoxLayout( page );
+ lay->addWidget(m_generalcfg);
+ connect(this, SIGNAL(applyClicked()), m_generalcfg, SLOT(slotApplyChanges()) );
+
+ QObjectList *list= sensors->getSensorsChips();
+ if(list) {
+ for(SensorsList *chip= (SensorsList *)list->first(); chip!=0; chip= (SensorsList *)list->next())
+ {
+ if(chip->getClass()==Sensor::lmSensor)
+ {
+ page = addPage( chip->getDescription()+QString(i18n(" sensors")), chip->getDescription()+QString(i18n(" sensors")), Icon("motherboard.png") );
+ cfgWidget = new LMSensorsCfg(chip, page);
+ lay = new QVBoxLayout( page );
+ lay->addWidget(cfgWidget);
+ connect(this, SIGNAL(applyClicked()), cfgWidget, SLOT(slotApplyChanges()) );
+ }
+ else
+ {
+ page = addPage( chip->getDescription(), chip->getDescription(), Icon("harddisk.png") );
+ cfgWidget = new LMSensorsCfg(chip, page);
+ lay = new QVBoxLayout( page );
+ lay->addWidget(cfgWidget);
+ connect(this, SIGNAL(applyClicked()), cfgWidget, SLOT(slotApplyChanges()) );
+ }
+ }
+ }
+
+ page = addPage( i18n( "System Information" ), i18n( "System Information" ), Icon("computers.png") );
+ m_systemcfg = new SystemCfg(sensors, page);
+ lay = new QVBoxLayout( page );
+ lay->addWidget(m_systemcfg);
+ connect(this, SIGNAL(applyClicked()), m_systemcfg, SLOT(slotApplyChanges()) );
+
+ adjustSize();
+}
+
+KSensorsCfg::~KSensorsCfg()
+{
+}
+
+
diff --git a/src/ksensorscfg.h b/src/ksensorscfg.h
new file mode 100644
index 0000000..764e7fc
--- /dev/null
+++ b/src/ksensorscfg.h
@@ -0,0 +1,67 @@
+/***************************************************************************
+ ksensorscfg.h - description
+ -------------------
+ begin : mi may 8 2002
+ copyright : (C) 2002 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 KSENSORSCFG_H
+#define KSENSORSCFG_H
+
+#include <qwidget.h>
+#include <kdialogbase.h>
+
+//class QVBoxLayout;
+//class QHBoxLayout;
+//class QGridLayout;
+//class QFrame;
+//class QIconView;
+//class QIconViewItem;
+class KDialogBase;
+class GeneralCfg;
+class LMSensorsCfg;
+class SystemCfg;
+
+class LMSensors;
+
+/**
+ *@author Miguel Novas
+ */
+
+class KSensorsCfg : public KDialogBase
+{
+Q_OBJECT
+public:
+ KSensorsCfg(LMSensors *lsensors, const char *name=0);
+ ~KSensorsCfg();
+
+/*protected slots:
+
+ void slotSelectionChanged();
+*/
+private:
+
+ LMSensors *sensors;
+ GeneralCfg *m_generalcfg;
+ LMSensorsCfg *m_lmsensorscfg;
+ SystemCfg *m_systemcfg;
+
+ QWidget *cfgWidget;
+
+ /*
+ QIconView *IconView;
+ QWidget *cfgWidget;
+ QHBoxLayout *FormLayout;*/
+};
+
+#endif
diff --git a/src/ksensorssplash.cpp b/src/ksensorssplash.cpp
new file mode 100644
index 0000000..0c65203
--- /dev/null
+++ b/src/ksensorssplash.cpp
@@ -0,0 +1,43 @@
+/***************************************************************************
+ ksensorssplash.cpp - description
+ -------------------
+ begin : sb abr 20 2002
+ copyright : (C) 2002 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. *
+ * *
+ ***************************************************************************/
+
+#include "ksensorssplash.h"
+
+#include <kapp.h>
+#include <kstandarddirs.h>
+
+KSensorsSplash::KSensorsSplash(QWidget *parent, const char *name ) :
+ QWidget(parent,name, WStyle_NoBorder | WStyle_Customize | WDestructiveClose | WStyle_StaysOnTop )
+{
+ QPixmap pm;
+ pm.load( locate("appdata", "pics/ksensorssplash.png") );
+ setBackgroundPixmap(pm);
+ setGeometry( QApplication::desktop()->width ()/2-pm.width()/2,
+ QApplication::desktop()->height()/2-pm.height()/2,
+ pm.width(),pm.height()
+ );
+ show();
+ startTimer( 4000 );
+}
+
+KSensorsSplash::~KSensorsSplash(){
+}
+
+void KSensorsSplash::timerEvent( QTimerEvent * )
+{
+ close();
+}
diff --git a/src/ksensorssplash.h b/src/ksensorssplash.h
new file mode 100644
index 0000000..3330b64
--- /dev/null
+++ b/src/ksensorssplash.h
@@ -0,0 +1,41 @@
+/***************************************************************************
+ ksensorssplash.h - description
+ -------------------
+ begin : sb abr 20 2002
+ copyright : (C) 2002 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 KSENSORSSPLASH_H
+#define KSENSORSSPLASH_H
+
+#include <qwidget.h>
+//#include <qwidget.h>
+
+
+/**
+ *@author Miguel Novas
+ */
+
+class KSensorsSplash : public QWidget {
+ Q_OBJECT
+public:
+
+ KSensorsSplash(QWidget *parent=0, const char *name=0 );
+ ~KSensorsSplash();
+
+protected:
+
+ void timerEvent( QTimerEvent * );
+};
+
+#endif
diff --git a/src/ksensorsui.rc b/src/ksensorsui.rc
new file mode 100644
index 0000000..4675607
--- /dev/null
+++ b/src/ksensorsui.rc
@@ -0,0 +1,8 @@
+<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
+<kpartgui name="ksensors" version="1">
+<MenuBar>
+ <Menu name="custom"><text>C&amp;ustom</text>
+ <Action name="custom_action" />
+ </Menu>
+</MenuBar>
+</kpartgui>
diff --git a/src/lmsensor.cpp b/src/lmsensor.cpp
new file mode 100644
index 0000000..89a79c3
--- /dev/null
+++ b/src/lmsensor.cpp
@@ -0,0 +1,143 @@
+/***************************************************************************
+ lmsensor.cpp - description
+ -------------------
+ begin : Mon Aug 6 2001
+ copyright : (C) 2001 by
+ email :
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#include "lmsensor.h"
+
+#include "lmsensorschip.h"
+
+#include "stdio.h"
+
+LMSensor::LMSensor(SensorsList *parent): Sensor(parent)
+{
+ feature= -1;
+}
+
+
+LMSensor::~LMSensor(){
+}
+
+
+bool LMSensor::init(const sensors_feature_data **data, int *nr1,int *nr2)
+{
+double min,max;
+
+ const sensors_chip_name *chip_name= getChipName();
+
+ if (strstr((*data)->name, "temp"))
+ {
+ setType(lmTemp);
+ max= 65;
+ min= 0;
+ }
+ else if (strstr((*data)->name, "fan"))
+ {
+ setType(lmFan);
+ max= 10000;
+ min= 3000;
+ }
+ else
+ {
+ setType(lmVoltage);
+ max= 16;
+ min= -16;
+ }
+
+ feature= (*data)->number;
+
+ QString str;
+ str.sprintf("%s.%s", chip_name->prefix, (*data)->name );
+ setName( str.latin1() );
+
+ char *label;
+ sensors_get_label(*chip_name,feature,&label);
+ setDescription(QString(label));
+
+ bool valid= false;
+ while( (*data= sensors_get_all_features(*chip_name, nr1, nr2)) && (*data)->mapping!=SENSORS_NO_MAPPING) {
+ str= (*data)->name;
+ if(str.find("_min")>=0 || str.find("_low")>=0) {
+ sensors_get_feature(*chip_name, (*data)->number, &valMin);
+ valid= true;
+ } else
+ if(str.find("_max")>=0 || str.find("_over")>=0 || str.find("_high")>=0) {
+ sensors_get_feature(*chip_name, (*data)->number, &valMax);
+ valid= true;
+ }
+ }
+
+ if(valid) {
+ double newVal;
+ valid= (sensors_get_feature(*chip_name, feature, &newVal)==0);
+ if(valid) {
+ if(min>max) {
+ double pivot= valMin;
+ min= max;
+ max= pivot;
+ }
+ setValueMax(max,dgCelsius);
+ setValueMin(min,dgCelsius);
+ setValue((max+min)/2,dgCelsius);
+ readConfig();
+ updateValue();
+ setValueIdeal(getValue());
+ }
+ }
+ return valid;
+}
+
+void LMSensor::updateValue()
+{
+ setValue( readSensorValue(), dgCelsius );
+}
+
+double LMSensor::readSensorValue()
+{
+ double newVal;
+ const sensors_chip_name *chip_name= getChipName();
+ sensors_get_feature(*chip_name, feature, &newVal);
+ return newVal;
+}
+
+#define ABSOLUTE_VALUE(n) ( (n)>=0 ? (n) : -(n) )
+#define TRUNCATE_VALUE(n) ( (double)(int)(n) )
+
+double LMSensor::calculateIdealValue()
+{
+ double value= readSensorValue();
+
+ if(getType()==lmVoltage) {
+ double decimals= 10;
+ double module = ABSOLUTE_VALUE(value);
+ if(module>3.0) {
+ if( ABSOLUTE_VALUE( 12.0-value)<2.0 ) return 12.0;
+ if( ABSOLUTE_VALUE(-12.0-value)<2.0 ) return -12.0;
+ if( ABSOLUTE_VALUE( 5.0-value)<1.0 ) return 5.0;
+ if( ABSOLUTE_VALUE( -5.0-value)<1.0 ) return -5.0;
+ if( ABSOLUTE_VALUE( 3.3-value)<0.3 ) return 3.3;
+ if( ABSOLUTE_VALUE( -3.3-value)<0.3 ) return -3.3;
+ if(module>4.0) decimals= 1;
+ }
+ return TRUNCATE_VALUE((value * decimals)) / decimals;
+ } else {
+ return value;
+ }
+}
+
+const sensors_chip_name *LMSensor::getChipName()
+{
+ return ((LMSensorsChip *)parent())->getChipName();
+}
diff --git a/src/lmsensor.h b/src/lmsensor.h
new file mode 100644
index 0000000..704f2fe
--- /dev/null
+++ b/src/lmsensor.h
@@ -0,0 +1,73 @@
+/***************************************************************************
+ lmsensor.h - description
+ -------------------
+ begin : Mon Aug 6 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 LMSENSOR_H
+#define LMSENSOR_H
+
+#include <qobject.h>
+#include <kconfig.h>
+#include <qstring.h>
+#include <qcstring.h>
+
+#include <sensors/sensors.h>
+#include "sensor.h"
+
+
+class LMSensorsList;
+
+/**
+ *@author Miguel Novas
+ */
+
+class LMSensor : public Sensor {
+ Q_OBJECT
+
+ friend class LMSensorsChip;
+
+public:
+
+ LMSensor(SensorsList *parent=0);
+ ~LMSensor();
+
+public slots:
+
+ void updateValue();
+
+protected:
+
+ double calculateIdealValue();
+
+ bool init(const sensors_feature_data **data, int *nr1,int *nr2);
+ const sensors_chip_name *getChipName();
+
+private:
+
+ int feature;
+ SensorType type;
+ QString description;
+ double val;
+ double valPrevious;
+ double compensation;
+ double multiplicator;
+ double valMax;
+ double valMin;
+ double valIdeal;
+ bool monitorize;
+ double readSensorValue();
+};
+
+#endif
diff --git a/src/lmsensordockpanel.cpp b/src/lmsensordockpanel.cpp
new file mode 100644
index 0000000..143007e
--- /dev/null
+++ b/src/lmsensordockpanel.cpp
@@ -0,0 +1,145 @@
+/***************************************************************************
+ lmsensordockpanel.cpp - 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. *
+ * *
+ ***************************************************************************/
+
+
+#include <qpixmap.h>
+
+#include <kstddirs.h>
+#include <klocale.h>
+#include <kconfig.h>
+#include <kiconloader.h>
+
+#include "lmsensordockpanel.h"
+
+LMSensorDockPanel::LMSensorDockPanel(Sensor *newSensor, const char *name) : KSystemTray( 0, name )
+{
+ strValue = "";
+ if(newSensor) {
+ sensor= newSensor;
+ updateConfig();
+ connect( newSensor, SIGNAL(valueChanged(double)) , this, SLOT(setValue(double)) );
+ connect( newSensor, SIGNAL(configChanged()) , this, SLOT(updateConfig()) );
+ setPixmap(0);
+ } else {
+ sensor= 0;
+ setPixmap(BarIcon("ksensorsdocked"));
+ }
+}
+
+LMSensorDockPanel::~LMSensorDockPanel()
+{
+}
+
+void LMSensorDockPanel::setValue(double value)
+{
+ if(sensor) {
+ switch(sensor->getType()) {
+ case Sensor::lmTemp:
+ strValue.sprintf("%2.0f",value);
+ break;
+ case Sensor::lmFan:
+ strValue.sprintf("%1.1f",value/1000);
+ break;
+ case Sensor::lmVoltage:
+ strValue.sprintf("%2.1f",value);
+ break;
+ }
+ update();
+ }
+}
+
+
+void LMSensorDockPanel::updateConfig()
+{
+ colorAlarm = readColorAlarm (name());
+ colorNormal= readColorNormal(name());
+ setValue(sensor->getValue());
+}
+
+void LMSensorDockPanel::paintEvent ( QPaintEvent *e )
+{
+ if(sensor) {
+ int w= width();
+ int h= height();
+ QPainter painter(this);
+ QColor color= sensor->getAlarm() ? colorAlarm : colorNormal;
+ QColor colorShadow= color.dark(200);
+ painter.setPen(color);
+ painter.drawLine(2, 2 , w-2,2 );
+ painter.drawLine(2, h-3, w-2,h-3);
+ painter.setPen(colorShadow);
+ painter.drawLine(3, 3 , w-3,3 );
+ painter.drawLine(3, h-4, w-3,h-4);
+ if(sensor->getType()==Sensor::lmTemp) {
+ QLcd::draw(&painter,4,6,w-6, h-12,strValue.latin1(),QLcd::drawShadow,&color,&colorShadow);
+ } else {
+ QLcd::draw(&painter,1,7,w-1, h-14,strValue.latin1(),QLcd::drawNumber|QLcd::alignCenter|QLcd::drawShadow,&color,&colorShadow);
+ }
+ } else {
+ KSystemTray::paintEvent(e);
+ }
+}
+
+void LMSensorDockPanel::mousePressEvent ( QMouseEvent *e )
+{
+ emit mouseEvent(e);
+}
+
+void LMSensorDockPanel::mouseReleaseEvent ( QMouseEvent *e )
+{
+ emit mouseEvent(e);
+}
+
+
+//*****************************************************************+
+
+void LMSensorDockPanel::writeColorAlarm(const char *name, const QColor &color)
+{
+ KGlobal::config()->setGroup(name);
+ KGlobal::config()->writeEntry("colorAlarm",color);
+}
+
+void LMSensorDockPanel::writeColorNormal(const char *name,const QColor &color)
+{
+ KGlobal::config()->setGroup(name);
+ KGlobal::config()->writeEntry("colorNormal",color);
+}
+
+QColor LMSensorDockPanel::readColorAlarm(const char *name)
+{
+ KGlobal::config()->setGroup(name);
+ return KGlobal::config()->readColorEntry("colorAlarm" , &red );
+}
+
+QColor LMSensorDockPanel::readColorNormal(const char *name)
+{
+ KGlobal::config()->setGroup(name);
+ return KGlobal::config()->readColorEntry("colorNormal", &darkGreen);
+}
+
+void LMSensorDockPanel::writeShowInDock(const char *name, bool fShow)
+{
+ KGlobal::config()->setGroup(name);
+ KGlobal::config()->writeEntry("showInDock",fShow);
+}
+
+bool LMSensorDockPanel::readShowInDock(const char *name)
+{
+ KGlobal::config()->setGroup(name);
+ return KGlobal::config()->readBoolEntry("showInDock", false);
+}
+
diff --git a/src/lmsensordockpanel.h b/src/lmsensordockpanel.h
new file mode 100644
index 0000000..e8cb9fe
--- /dev/null
+++ b/src/lmsensordockpanel.h
@@ -0,0 +1,72 @@
+/***************************************************************************
+ 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 <kpopupmenu.h>
+#include <qcolor.h>
+
+#include "qlcddraw.h"
+
+#include "sensor.h"
+
+
+/**
+ *@author Miguel Novas
+ */
+
+class LMSensorDockPanel : public KSystemTray {
+Q_OBJECT
+public:
+ LMSensorDockPanel(Sensor *newSensor=0, const char *name=0);
+ ~LMSensorDockPanel();
+
+ static void writeColorAlarm (const char *name, const QColor &color);
+ static void writeColorNormal(const char *name, const QColor &color);
+ static void writeShowInDock (const char *name, bool fShow);
+
+ static QColor readColorAlarm (const char *name);
+ static QColor readColorNormal(const char *name);
+ static bool readShowInDock (const char *name);
+
+public slots:
+
+ void setValue(double value);
+ void updateConfig();
+
+signals:
+
+ void mouseEvent(QMouseEvent *e);
+
+protected:
+
+ void paintEvent ( QPaintEvent * );
+ void mousePressEvent ( QMouseEvent * );
+ void mouseReleaseEvent ( QMouseEvent * );
+
+private:
+
+ Sensor *sensor;
+ QString strValue;
+ QColor colorNormal,colorAlarm;
+
+};
+
+#endif
diff --git a/src/lmsensorpanel.cpp b/src/lmsensorpanel.cpp
new file mode 100644
index 0000000..5a73fde
--- /dev/null
+++ b/src/lmsensorpanel.cpp
@@ -0,0 +1,168 @@
+/***************************************************************************
+ lmsensordisplay.cpp - description
+ -------------------
+ begin : Sat Aug 11 2001
+ copyright : (C) 2001 by
+ email :
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#include "lmsensorpanel.h"
+
+LMSensorPanel::LMSensorPanel(Sensor *newSensor, QWidget *parent, const char *name ) : Panel(parent,name)
+{
+ alarm= false;
+ //
+ sensor= newSensor;
+ //
+ createTitleWidget();
+ createGraphicWidget();
+ createValueWidget();
+ //
+ updateConfig();
+ //
+ connect( sensor, SIGNAL(valueChanged(double)) , this, SLOT(setValue(double)) );
+ connect( sensor, SIGNAL(configChanged()) , this, SLOT(updateConfig()) );
+ //
+}
+
+LMSensorPanel::~LMSensorPanel()
+{
+}
+
+void LMSensorPanel::updateConfig()
+{
+ switch(sensor->getType())
+ {
+ case Sensor::lmTemp:
+ if(arc) {
+ arc->setValueRanges(sensor->celsiusTo(0),sensor->celsiusTo(100));
+ arc->setValueMinLimit( sensor->getValueMin(),0);
+ arc->setValueMaxLimit( sensor->getValueMax(),15);
+ arc->setColorRanges(red,green,red);
+ }
+ switch( sensor->getTempScale() )
+ {
+ case Sensor::dgKelvin: valMask= "%.0fK"; break;
+ default : valMask= "%.0f^"; break;
+ }
+ break;
+
+ case Sensor::lmFan :
+ if(arc) {
+ arc->setValueRanges(0,10000);
+ arc->setValueMinLimit( sensor->getValueMin(),15);
+ arc->setValueMaxLimit( sensor->getValueMax(),0);
+ arc->setColorRanges(red,green,green);
+ }
+ valMask= "%.0f RPM";
+ break;
+
+ case Sensor::lmVoltage :
+ if(arc) {
+ double min= sensor->getValueMin();
+ double max= sensor->getValueMax();
+ arc->setValueRanges( min - (max-min)/3, max + (max-min)/3 );
+ arc->setValueMinLimit( min,10);
+ arc->setValueMaxLimit( max,10);
+ arc->setColorRanges(blue,QColor(0,200,150),blue);
+ arc->setArrowColor(darkBlue);
+ }
+ valMask= "%.2fv";
+ break;
+
+ }
+ setValue(sensor->getValue());
+ arc->update();
+ lcdVal->update();
+ lcdDes->display(sensor->getDescription());
+}
+
+
+void LMSensorPanel::setValue(double value)
+{
+QString str;
+
+ str.sprintf(valMask.latin1(),value);
+ lcdVal->display(str);
+ arc->setValue(value);
+ //
+ bool newAlarm= sensor->getAlarm();
+ if(newAlarm!=alarm) {
+ alarm= newAlarm;
+ if(newAlarm) {
+ startTimer(500);
+ lcdVal->setForeColor(red);
+ } else {
+ killTimers();
+ lcdVal->setForeColor(black);
+ if(lcdVal->isHidden()) lcdVal->show();
+ }
+ }
+}
+
+//**********************************************************************
+
+
+void LMSensorPanel::createTitleWidget()
+{
+ lcdDes = new QLCDString(this);
+ lcdDes->setNumberDisplay(true);
+ lcdDes->installEventFilter(this);
+}
+
+
+void LMSensorPanel::createGraphicWidget()
+{
+ arc = new QDialArc(this);
+ arc->installEventFilter(this);
+ arc->setAngles(180,-180);
+}
+
+
+void LMSensorPanel::createValueWidget()
+{
+ lcdVal = new QLCDString(this);
+ lcdVal->installEventFilter(this);
+ lcdVal->setShadow(true);
+ lcdVal->setNumberDisplay(sensor->getType()==Sensor::lmVoltage);
+}
+
+
+void LMSensorPanel::resizeEvent ( QResizeEvent *e )
+{
+ int w= width();
+ int h= height();
+
+ int i1= (h * 2) / 5;
+ int i2= (h * 4) / 5;
+
+ if(sensor->getType()==Sensor::lmVoltage) lcdVal->setGeometry( 3 , h/8 , w -4 , h/5-h/32);
+ else lcdVal->setGeometry( 3 , h/8 , w -4 , h/4-h/16);
+ arc->setGeometry ( 3 , i1 , w -6 , i2-i1-2);
+ lcdDes->setGeometry( 3 , i2+1, w -6 , h -i2-h/11);
+}
+
+void LMSensorPanel::timerEvent( QTimerEvent * )
+{
+ if(lcdVal->isVisible()) lcdVal->hide();
+ else lcdVal->show();
+ repaint();
+}
+
+
+void LMSensorPanel::paletteChange(const QPalette &oldPalette)
+{
+ lcdDes->setForeColor(getColorTitle());
+ lcdVal->setForeColor(getColorValue());
+ lcdVal->setShadowColor(getColorValue());
+ arc->setArrowColor(getColorValue());
+}
diff --git a/src/lmsensorpanel.h b/src/lmsensorpanel.h
new file mode 100644
index 0000000..8d0bad4
--- /dev/null
+++ b/src/lmsensorpanel.h
@@ -0,0 +1,66 @@
+/***************************************************************************
+ lmsensorpanel.h - description
+ -------------------
+ begin : Sat Aug 11 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 LMSENSORPANEL_H
+#define LMSENSORPANEL_H
+
+#include <qstring.h>
+
+#include "panel.h"
+#include "sensor.h"
+#include "qdialarc.h"
+#include "qlcdstring.h"
+
+
+/**
+ *@author
+ */
+
+class LMSensorPanel : public Panel {
+ Q_OBJECT
+public:
+
+ LMSensorPanel(Sensor *newSensor, QWidget *parent=0, const char *name=0);
+ ~LMSensorPanel();
+
+public slots:
+
+ void setValue(double value);
+ void updateConfig();
+
+protected:
+
+ void resizeEvent ( QResizeEvent * );
+
+ void createTitleWidget();
+ void createGraphicWidget();
+ void createValueWidget();
+
+ void timerEvent( QTimerEvent * );
+ void paletteChange(const QPalette &oldPalette);
+
+private:
+
+ Sensor *sensor;
+ QDialArc *arc;
+ QLCDString *lcdDes;
+ QLCDString *lcdVal;
+ QString valMask;
+ bool alarm;
+};
+
+#endif
diff --git a/src/lmsensors.cpp b/src/lmsensors.cpp
new file mode 100644
index 0000000..73b8253
--- /dev/null
+++ b/src/lmsensors.cpp
@@ -0,0 +1,127 @@
+/***************************************************************************
+ LMSensors.cpp - description
+ -------------------
+ begin : Mon Aug 6 2001
+ copyright : (C) 2001 by
+ email :
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#include <stdio.h>
+
+#include <unistd.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#include <qstrlist.h>
+#include <qobjectlist.h>
+
+#include "lmsensors.h"
+
+//****************************************************************************
+// Public methods
+//****************************************************************************
+
+LMSensors::LMSensors(QObject *parent, const char * name)
+ : QObject(parent,name)
+{
+ if(initSensors()) createLMSensors();
+ createI8KSensors();
+ createHDSensors();
+}
+
+LMSensors::~LMSensors()
+{
+ if(count()) sensors_cleanup();
+}
+
+bool LMSensors::initSensors()
+{
+ FILE *fp=fopen("/etc/sensors.conf","r");
+ if(!fp) {
+ qWarning("KSensors error: /etc/sensors.conf not found !");
+ return false;
+ }
+ int err= sensors_init(fp);
+ if(err) {
+ qWarning("KSensors error: sensors_init fail, error code %d",err);
+ return false;
+ }
+ fclose(fp);
+ return true;
+}
+
+void LMSensors::createLMSensors()
+{
+ const sensors_chip_name *chip_name;
+ int err= 0;
+ while( (chip_name= sensors_get_detected_chips(&err)) )
+ if( existSensor(chip_name,"temp") ||
+ existSensor(chip_name,"fan") )
+ {
+ (void)new LMSensorsChip(chip_name,this);
+ }
+}
+
+void LMSensors::createHDSensors()
+{
+ HDSensorsList *disks= new HDSensorsList(this,"Disks");
+ if(disks->count()==0) delete disks;
+}
+
+void LMSensors::createI8KSensors()
+{
+ if(I8KSensorsList::I8KAvailable())
+ (void) new I8KSensorsList(this,"I8KSensors");
+}
+
+
+int LMSensors::existSensor(const sensors_chip_name *chip_name,const char *sensor_name)
+{
+int nr1,nr2;
+const sensors_feature_data *sensor_data;
+
+ nr1=nr2= 0;
+ while( (sensor_data= sensors_get_all_features(*chip_name, &nr1, &nr2)) )
+ if( strstr(sensor_data->name,sensor_name) )
+ return sensor_data->number;
+ return 0;
+}
+
+void LMSensors::setMonitorized(bool enable)
+{
+ QObjectList *list= getSensorsChips();
+ if(list)
+ for(LMSensorsChip *sensor=(LMSensorsChip*)list->first(); sensor!=0; sensor= (LMSensorsChip *)list->next())
+ sensor->setMonitorized(enable);
+}
+
+
+Sensor *LMSensors::getSensor(const char *name)
+{
+ int index= count();
+ Sensor *sensor= 0;
+ while(--index>=0 && !sensor) {
+ sensor= getSensorsChip(index)->getSensor(name);
+ }
+ return sensor;
+}
+
+void LMSensors::childEvent( QChildEvent *e )
+{
+ if(e->inserted()) {
+ connect((SensorsList *)e->child(),SIGNAL(valueChanged(Sensor *)) ,this,SIGNAL(valueChanged(Sensor *)));
+ connect((SensorsList *)e->child(),SIGNAL(configChanged(const char *)),this,SIGNAL(configChanged(const char *)));
+ }
+}
+
+
+/*********************************************************************************/
diff --git a/src/lmsensors.h b/src/lmsensors.h
new file mode 100644
index 0000000..c6fb1e7
--- /dev/null
+++ b/src/lmsensors.h
@@ -0,0 +1,71 @@
+/***************************************************************************
+ LMSensors.h - description
+ -------------------
+ begin : Mon Aug 6 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 LMSENSORS_H
+#define LMSENSORS_H
+
+#include <qobject.h>
+#include <qobjcoll.h>
+#include <kconfig.h>
+#include <qstringlist.h>
+
+#include <sensors/sensors.h>
+
+#include "lmsensorschip.h"
+#include "hdsensorslist.h"
+#include "i8ksensorslist.h"
+/**
+ *@author Michael
+ */
+
+class LMSensors : public QObject
+{
+Q_OBJECT
+
+ friend class LMSensor;
+
+public:
+
+ LMSensors(QObject *parent=0, const char *name=0);
+ ~LMSensors();
+
+ void setMonitorized(bool enable);
+ QObjectList *getSensorsChips() { return (QObjectList *)children(); };
+ SensorsList *getSensorsChip(int index) { return children() ? (SensorsList *)((QObjectList *)children())->at(index) : 0; }
+ SensorsList *getSensorsChip(const char *name) { return (SensorsList *)child(name); }
+ int count() { return children() ? children()->count() : 0; }
+ Sensor *getSensor(const char *name);
+
+ void emitConfigChanged(const char *name=0) { emit configChanged(name); }
+
+signals:
+
+ void valueChanged(Sensor *);
+ void configChanged(const char *name);
+
+private:
+
+ bool initSensors();
+ void createLMSensors();
+ void createHDSensors();
+ void createI8KSensors();
+ void childEvent ( QChildEvent *e );
+
+ static int existSensor(const sensors_chip_name *chip_name,const char *sensor_name);
+};
+
+#endif
diff --git a/src/lmsensorsalarms.cpp b/src/lmsensorsalarms.cpp
new file mode 100644
index 0000000..895e223
--- /dev/null
+++ b/src/lmsensorsalarms.cpp
@@ -0,0 +1,145 @@
+/***************************************************************************
+ lmsensorsalarms.cpp - description
+ -------------------
+ begin : Wed Nov 14 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. *
+ * *
+ ***************************************************************************/
+
+
+#include <stdlib.h>
+
+#include <qstring.h>
+#include <kglobal.h>
+#include <kprocess.h>
+#include <kaudioplayer.h>
+#include "lmsensorsalarms.h"
+
+
+
+
+LMSensorsAlarms::LMSensorsAlarms(LMSensors *sensors, QObject *parent, const char *name)
+ : QObject(parent,name)
+{
+ sensorCount= 0;
+ soundPlay = "";
+ connect( sensors, SIGNAL(valueChanged(Sensor *)) , this, SLOT(setValueChanged(Sensor *)) );
+}
+
+LMSensorsAlarms::~LMSensorsAlarms()
+{
+}
+
+//###########################################################################################
+
+
+void LMSensorsAlarms::runSensorCommand(const char *name,const char *value, const char *cmd)
+{
+ setenv("SENSOR_NAME" , name , 1);
+ setenv("SENSOR_VALUE", value, 1);
+ runCommand( cmd );
+}
+
+void LMSensorsAlarms::runCommand(const char *str)
+{
+KShellProcess p;
+
+ p << str;
+ p.start(KShellProcess::DontCare);
+ p.detach();
+}
+
+void LMSensorsAlarms::playSound(const char *sound)
+{
+ KAudioPlayer::play(sound);
+}
+
+//###########################################################################################
+
+void LMSensorsAlarms::setValueChanged(Sensor *sensor)
+{
+ if(sensor->getAlarm()) {
+ if(!sensor->getAlarmPrevious()) {
+ switch ( readAlarm(sensor->name()) )
+ {
+ case acSound:
+
+ sensorCount++;
+ soundPlay= readAlarmSound(sensor->name());
+ if(sensorCount==1) startTimer(3000);
+ break;
+
+ case acCommand:
+
+ runSensorCommand(
+ (const char *)sensor->getDescription(),
+ (const char *)QString::number(sensor->getValue()),
+ (const char *)readAlarmCommand(sensor->name())
+ );
+ break;
+ }
+ }
+ } else {
+ if(sensor->getAlarmPrevious()) {
+ if( readAlarm(sensor->name())==acSound ) {
+ if(--sensorCount==0) killTimers();
+ }
+ }
+ }
+}
+
+void LMSensorsAlarms::timerEvent( QTimerEvent * )
+{
+ KAudioPlayer::play(soundPlay);
+}
+
+//##########################################################################
+
+int LMSensorsAlarms::readAlarm(const char *name)
+{
+ KGlobal::config()->setGroup(name);
+ return KGlobal::config()->readNumEntry("Alarm",acNothing);
+}
+
+void LMSensorsAlarms::writeAlarm(const char *name, int alarm)
+{
+ KGlobal::config()->setGroup(name);
+ KGlobal::config()->writeEntry("Alarm",alarm);
+}
+
+
+QString LMSensorsAlarms::readAlarmCommand(const char *name)
+{
+ KGlobal::config()->setGroup(name);
+ return KGlobal::config()->readEntry("AlarmCommand", "");
+}
+
+
+void LMSensorsAlarms::writeAlarmCommand(const char *name, const QString &cmd)
+{
+ KGlobal::config()->setGroup(name);
+ KGlobal::config()->writeEntry("AlarmCommand", cmd);
+}
+
+
+QString LMSensorsAlarms::readAlarmSound(const char *name)
+{
+ KGlobal::config()->setGroup(name);
+ return KGlobal::config()->readEntry("AlarmSound", "ksensors_alert.wav");
+}
+
+
+void LMSensorsAlarms::writeAlarmSound(const char *name, const QString &cmd)
+{
+ KGlobal::config()->setGroup(name);
+ KGlobal::config()->writeEntry("AlarmSound", cmd);
+}
diff --git a/src/lmsensorsalarms.h b/src/lmsensorsalarms.h
new file mode 100644
index 0000000..4c811bb
--- /dev/null
+++ b/src/lmsensorsalarms.h
@@ -0,0 +1,61 @@
+/***************************************************************************
+ lmsensorsalarms.h - description
+ -------------------
+ begin : Wed Nov 14 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 LMSENSORSALARMS_H
+#define LMSENSORSALARMS_H
+
+#include <qobject.h>
+#include <qstring.h>
+#include "lmsensors.h"
+
+/**
+ *@author Miguel Novas
+ */
+
+class LMSensorsAlarms : public QObject {
+Q_OBJECT
+public:
+
+ enum Actions { acNothing, acSound, acCommand };
+
+ LMSensorsAlarms(LMSensors *sensors, QObject *parent=0, const char *name=0);
+ ~LMSensorsAlarms();
+
+ static int readAlarm(const char *name);
+ static QString readAlarmSound(const char *name);
+ static void writeAlarm(const char *name, int alarm);
+ static QString readAlarmCommand(const char *name);
+ static void writeAlarmCommand(const char *name, const QString &cmd);
+ static void writeAlarmSound(const char *name, const QString &cmd);
+
+ static void runSensorCommand(const char *name,const char *value, const char *cmd);
+ static void playSound(const char *sound);
+public slots:
+
+ void setValueChanged(Sensor *);
+
+private:
+
+ int sensorCount;
+ QString soundPlay;
+
+ static void runCommand(const char *str);
+
+ void timerEvent( QTimerEvent * );
+};
+
+#endif
diff --git a/src/lmsensorscfg.cpp b/src/lmsensorscfg.cpp
new file mode 100644
index 0000000..42c8dc2
--- /dev/null
+++ b/src/lmsensorscfg.cpp
@@ -0,0 +1,292 @@
+/***************************************************************************
+ lmsensorscfg.cpp - description
+ -------------------
+ begin : Mon Aug 13 2001
+ copyright : (C) 2001 by
+ email :
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#include "lmsensorscfg.h"
+
+#include "lmsensorsalarms.h"
+#include "lmsensorpanel.h"
+#include "lmsensordockpanel.h"
+#include "lmsensorswidget.h"
+
+#include <qcolor.h>
+#include <qlistbox.h>
+#include <qlineedit.h>
+#include <qcheckbox.h>
+#include <qgroupbox.h>
+#include <qradiobutton.h>
+#include <qpushbutton.h>
+#include <qobjcoll.h>
+#include <qtabwidget.h>
+#include <qcombobox.h>
+#include <qspinbox.h>
+#include <qlayout.h>
+#include <kcolorbutton.h>
+#include <kiconloader.h>
+#include <klocale.h>
+#include <kaboutapplication.h>
+
+LMSensorsCfg::LMSensorsCfg(SensorsList *lsensors,QWidget *parent, const char *name) : LMSensorsCfgDesign(parent,name,WDestructiveClose)
+{
+ sensors = lsensors;
+
+ curSensor= 0;
+
+ palPanelCfg= new PaletteCfg( boxPanelPalette );
+ boxPanelPalette->setColumnLayout(0, Qt::Vertical );
+ boxPanelPalette->layout()->setSpacing( 6 );
+ boxPanelPalette->layout()->setMargin( 12 );
+ QGridLayout *boxPanelPaletteLayout = new QGridLayout( boxPanelPalette->layout() );
+ boxPanelPaletteLayout->setAlignment( Qt::AlignTop );
+ boxPanelPaletteLayout->addWidget( palPanelCfg, 0, 0 );
+
+ readSensorsList();
+
+ connect( MainTab ,SIGNAL(currentChanged(QWidget*)), this, SLOT(slotMainTabPageChanged(QWidget *)));
+ connect( listSensors ,SIGNAL(highlighted(int)),this,SLOT(slotCurrentSensorChanged(int)) );
+ //connect( buttonApply ,SIGNAL(clicked()),this,SLOT(slotApplyChanges()));
+ connect( buttonTest ,SIGNAL(clicked()),this,SLOT(slotTestAlarm()));
+ connect( editMinValue ,SIGNAL(activated(int)),this,SLOT(slotComboMinMaxSelected(int)));
+ connect( editMaxValue ,SIGNAL(activated(int)),this,SLOT(slotComboMinMaxSelected(int)));
+}
+
+LMSensorsCfg::~LMSensorsCfg()
+{
+}
+
+void LMSensorsCfg::readSensorsList()
+{
+ QObjectList *list= sensors->getSensors();
+ if(list) {
+ listSensors->clear();
+ QPixmap pm;
+ for(LMSensor *sensor=(LMSensor*)list->first(); sensor!=0; sensor= (LMSensor*)list->next()) {
+ switch(sensor->getType()) {
+ case LMSensor::lmTemp : pm= UserIcon("thermometer18x18.png"); break;
+ case LMSensor::lmFan : pm= UserIcon("cooler18x18.png"); break;
+ case LMSensor::lmVoltage: pm= UserIcon("battery18x18.png"); break;
+ }
+ listSensors->insertItem(pm,sensor->getDescription());
+ }
+ listSensors->setCurrentItem(0);
+ }
+}
+
+
+void LMSensorsCfg::readSensorInfo(int index)
+{
+ if(index<0) return;
+
+ Sensor *oldSensor= curSensor;
+
+ curSensor= sensors->getSensor(index);
+
+ if(!curSensor) return;
+
+ if( oldSensor==0 || curSensor->getType()!=oldSensor->getType() || curSensor->getClass()!=oldSensor->getClass() )
+ switch(curSensor->getType()) {
+ case LMSensor::lmTemp : GroupBoxDes->setTitle(i18n("Temperature"));
+ pixmapSensor->setPixmap( UserIcon(
+ curSensor->getClass()==Sensor::lmSensor ?
+ "thermometer.png":"harddisk.png"
+ ) );
+ break;
+ case LMSensor::lmFan : GroupBoxDes->setTitle(i18n("Fan"));
+ pixmapSensor->setPixmap(UserIcon("cooler.png"));
+ break;
+ case LMSensor::lmVoltage: GroupBoxDes->setTitle(i18n("Voltage"));
+ pixmapSensor->setPixmap(UserIcon("battery.png"));
+ break;
+ }
+
+ editDescription ->setText(curSensor->getDescription());
+
+ QString str;
+
+ const char *mask= curSensor->getType()==LMSensor::lmVoltage ? "%.2lf":"%.0lf";
+
+ str.sprintf(curSensor->getPrintMask(true), curSensor->getValue());
+ editValue->setText(str);
+
+ str.sprintf(mask, curSensor->getValueIdeal());
+ editIdealValue->setText(str);
+
+ str.sprintf(mask, curSensor->getValueMin());
+ editMinValue->setEditText(str);
+
+ str.sprintf(mask, curSensor->getValueMax());
+ editMaxValue->setEditText(str);
+
+ editSum->setText(QString::number(curSensor->getCompensation()));
+ editMul->setText(QString::number(curSensor->getMultiplicator()));
+
+ //checkShowInDock->setEnabled( curSensor->getType()==LMSensor::lmTemp );
+ //GroupBoxColorDock->setEnabled( curSensor->getType()==LMSensor::lmTemp );
+
+ CheckAllSensors->setChecked(false);
+
+ colorAlarm ->setColor ( LMSensorDockPanel::readColorAlarm(curSensor->name()) );
+ colorNormal ->setColor ( LMSensorDockPanel::readColorNormal(curSensor->name()) );
+ checkShow ->setChecked( LMSensorPanel::readShow(curSensor->name()) );
+ checkShowInDock->setChecked( checkShowInDock->isEnabled() && LMSensorDockPanel::readShowInDock(curSensor->name()) );
+
+ editLaunch->setText( LMSensorsAlarms::readAlarmCommand(curSensor->name()) );
+ editPlay ->setText( LMSensorsAlarms::readAlarmSound (curSensor->name()) );
+ switch( LMSensorsAlarms::readAlarm(curSensor->name()) )
+ {
+ case LMSensorsAlarms::acNothing : radioAlarm1->setChecked(true); break;
+ case LMSensorsAlarms::acSound : radioAlarm2->setChecked(true); break;
+ case LMSensorsAlarms::acCommand : radioAlarm3->setChecked(true); break;
+ }
+ palPanelCfg->readPalette(curSensor->name());
+
+}
+
+
+void LMSensorsCfg::readPreferencesInfo()
+{
+ switch(sensors->getTempScale()) {
+ case LMSensor::dgCelsius : RadioC->setChecked(true); break;
+ case LMSensor::dgFahrenheit: RadioF->setChecked(true); break;
+ case LMSensor::dgKelvin : RadioK->setChecked(true); break;
+ }
+ SpinUpdateTime->setValue(sensors->getUpdateInterval());
+}
+
+
+void LMSensorsCfg::applySensorChanges()
+{
+ if(!curSensor) return;
+
+ const QString sName(curSensor->name());
+ // Apply sensor configuration
+ curSensor->setDescription(editDescription->text());
+ curSensor->setCompensation(editSum->text().toDouble());
+ curSensor->setMultiplicator(editMul->text().toDouble());
+ curSensor->setValueIdeal(editIdealValue->text().toDouble());
+ curSensor->setValueMax(editMaxValue->currentText().toDouble());
+ curSensor->setValueMin(editMinValue->currentText().toDouble());
+ curSensor->setMonitorized(
+ checkShow->isChecked() ||
+ checkShowInDock->isChecked() ||
+ !radioAlarm1->isChecked()
+ );
+ // Apply show in main window configuration
+ LMSensorPanel::writeShow(sName,checkShow->isChecked() );
+ // Apply dock configuration
+ LMSensorDockPanel::writeShowInDock(sName,checkShowInDock->isChecked());
+ LMSensorDockPanel::writeColorNormal(sName,colorNormal->color());
+ LMSensorDockPanel::writeColorAlarm(sName,colorAlarm->color());
+ //
+ palPanelCfg->savePalette();
+ //
+ // Apply alarms configuration
+ if( CheckAllSensors->isChecked() ) {
+ QObjectList *list= sensors->getSensors();
+ for(Sensor *sensor=(Sensor*)list->first(); sensor!=0; sensor= (Sensor*)list->next()) {
+ applySensorAlarmConfig(sensor);
+ sensor->writeConfig();
+ }
+ } else {
+ applySensorAlarmConfig(curSensor);
+ curSensor->writeConfig();
+ }
+ // This line must always be at the end of the method
+ listSensors->changeItem( *listSensors->pixmap(listSensors->currentItem()),editDescription->text(), listSensors->currentItem() );
+}
+
+
+void LMSensorsCfg::applySensorAlarmConfig(Sensor *sensor)
+{
+ const char *name= sensor->name();
+ LMSensorsAlarms::writeAlarmCommand(name,editLaunch->text());
+ LMSensorsAlarms::writeAlarmSound (name,editPlay ->text());
+ int code= LMSensorsAlarms::acNothing;
+ if(radioAlarm1->isChecked()) code= LMSensorsAlarms::acNothing;
+ else if(radioAlarm2->isChecked()) code= LMSensorsAlarms::acSound;
+ else if(radioAlarm3->isChecked()) code= LMSensorsAlarms::acCommand;
+ LMSensorsAlarms::writeAlarm(name,code);
+}
+
+
+void LMSensorsCfg::applyPreferencesChanges()
+{
+ LMSensor::TempScale scale= LMSensor::dgCelsius;
+ if(RadioK->isChecked()) scale= LMSensor::dgKelvin;
+ else if(RadioF->isChecked()) scale= LMSensor::dgFahrenheit;
+ sensors->setTempScale(scale);
+ sensors->setUpdateInterval(SpinUpdateTime->value());
+ sensors->writeConfig();
+}
+
+
+void LMSensorsCfg::slotCurrentSensorChanged(int index)
+{
+ readSensorInfo(index);
+}
+
+void LMSensorsCfg::slotApplyChanges()
+{
+ if (!isVisible())
+ return;
+
+ switch(MainTab->currentPageIndex())
+ {
+ case 0: applySensorChanges(); break;
+ case 1: applyPreferencesChanges(); break;
+ }
+}
+
+void LMSensorsCfg::slotAccept()
+{
+ slotApplyChanges();
+ close();
+}
+
+void LMSensorsCfg::slotTestAlarm()
+{
+ if( radioAlarm2->isChecked() ) {
+ LMSensorsAlarms::playSound(editPlay->text());
+ } else
+ if( radioAlarm3->isChecked() ) {
+ LMSensorsAlarms::runSensorCommand("TEST","100",editLaunch->text());
+ }
+}
+
+void LMSensorsCfg::slotMainTabPageChanged(QWidget *)
+{
+ switch(MainTab->currentPageIndex())
+ {
+ case 0: readSensorInfo(listSensors->currentItem()); break;
+ case 1: readPreferencesInfo(); break;
+ }
+}
+
+void LMSensorsCfg::slotComboMinMaxSelected(int index)
+{
+ QComboBox *combo = (QComboBox*)sender();
+ QString str = combo->text(index);
+ double percent= str.left(str.length()-1).toDouble();
+ double value = editIdealValue->text().toDouble();
+
+ if(value<0) percent= -percent;
+ value= value + value * percent / 100;
+
+ const char *mask= curSensor->getType()==LMSensor::lmVoltage ? "%.2lf":"%.0lf";
+ str.sprintf(mask,value);
+
+ combo->setEditText(str);
+}
diff --git a/src/lmsensorscfg.h b/src/lmsensorscfg.h
new file mode 100644
index 0000000..00300ca
--- /dev/null
+++ b/src/lmsensorscfg.h
@@ -0,0 +1,68 @@
+/***************************************************************************
+ lmsensorscfg.h - description
+ -------------------
+ begin : Mon Aug 13 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 LMSENSORSCFG_H
+#define LMSENSORSCFG_H
+
+//#include <qobject.h>
+
+#include "sensorslist.h"
+#include "lmsensorscfgdesign.h"
+#include "palettecfg.h"
+
+/**
+ *@author
+ */
+
+class LMSensorsCfg : public LMSensorsCfgDesign {
+Q_OBJECT
+public:
+ LMSensorsCfg(SensorsList *lsensors,QWidget *parent=0, const char *name=0);
+ ~LMSensorsCfg();
+
+protected slots:
+
+ void slotAccept();
+
+ void slotTestAlarm();
+ void slotCurrentSensorChanged(int index);
+
+ void slotMainTabPageChanged(QWidget *);
+ void slotComboMinMaxSelected(int index);
+
+public slots:
+ void slotApplyChanges();
+
+protected:
+
+ void applySensorChanges();
+ void applyPreferencesChanges();
+ void applySensorAlarmConfig(Sensor *sensor);
+
+ void readSensorInfo(int index);
+ void readPreferencesInfo();
+ void readSensorsList();
+
+private:
+
+ PaletteCfg *palPanelCfg;
+
+ SensorsList *sensors;
+ Sensor *curSensor;
+};
+
+#endif
diff --git a/src/lmsensorscfgdesign.cpp b/src/lmsensorscfgdesign.cpp
new file mode 100644
index 0000000..2f9f3c6
--- /dev/null
+++ b/src/lmsensorscfgdesign.cpp
@@ -0,0 +1,471 @@
+#include <klocale.h>
+/****************************************************************************
+** Form implementation generated from reading ui file './lmsensorscfgdesign.ui'
+**
+** Created: mer aoû 18 23:39:03 2004
+** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#include "lmsensorscfgdesign.h"
+
+#include <qvariant.h>
+#include <qpushbutton.h>
+#include <qtabwidget.h>
+#include <qgroupbox.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qcombobox.h>
+#include <qcheckbox.h>
+#include <kcolorbutton.h>
+#include <qframe.h>
+#include <qradiobutton.h>
+#include <qlistbox.h>
+#include <qbuttongroup.h>
+#include <qspinbox.h>
+#include <qslider.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/*
+ * Constructs a LMSensorsCfgDesign as a child of 'parent', with the
+ * name 'name' and widget flags set to 'f'.
+ */
+LMSensorsCfgDesign::LMSensorsCfgDesign( QWidget* parent, const char* name, WFlags fl )
+ : QWidget( parent, name, fl )
+{
+ if ( !name )
+ setName( "LMSensorsCfgDesign" );
+ setMinimumSize( QSize( 0, 340 ) );
+ LMSensorsCfgDesignLayout = new QGridLayout( this, 1, 1, 8, 4, "LMSensorsCfgDesignLayout");
+
+ MainTab = new QTabWidget( this, "MainTab" );
+ MainTab->setMinimumSize( QSize( 422, 295 ) );
+
+ tab = new QWidget( MainTab, "tab" );
+ tabLayout = new QGridLayout( tab, 1, 1, 11, 6, "tabLayout");
+
+ SensorsTab = new QTabWidget( tab, "SensorsTab" );
+ SensorsTab->setMinimumSize( QSize( 272, 276 ) );
+ SensorsTab->setTabShape( QTabWidget::Rounded );
+ SensorsTab->setMargin( 0 );
+
+ tab_2 = new QWidget( SensorsTab, "tab_2" );
+ tabLayout_2 = new QGridLayout( tab_2, 1, 1, 11, 6, "tabLayout_2");
+
+ GroupBoxDes = new QGroupBox( tab_2, "GroupBoxDes" );
+ GroupBoxDes->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, 0, 0, GroupBoxDes->sizePolicy().hasHeightForWidth() ) );
+ GroupBoxDes->setColumnLayout(0, Qt::Vertical );
+ GroupBoxDes->layout()->setSpacing( 6 );
+ GroupBoxDes->layout()->setMargin( 11 );
+ GroupBoxDesLayout = new QGridLayout( GroupBoxDes->layout() );
+ GroupBoxDesLayout->setAlignment( Qt::AlignTop );
+
+ layout5 = new QHBoxLayout( 0, 0, 6, "layout5");
+
+ pixmapSensor = new QLabel( GroupBoxDes, "pixmapSensor" );
+ pixmapSensor->setScaledContents( TRUE );
+ layout5->addWidget( pixmapSensor );
+
+ layout4 = new QVBoxLayout( 0, 0, 6, "layout4");
+
+ TextLabel2_2 = new QLabel( GroupBoxDes, "TextLabel2_2" );
+ layout4->addWidget( TextLabel2_2 );
+
+ editDescription = new QLineEdit( GroupBoxDes, "editDescription" );
+ layout4->addWidget( editDescription );
+ layout5->addLayout( layout4 );
+
+ GroupBoxDesLayout->addLayout( layout5, 0, 0 );
+
+ tabLayout_2->addWidget( GroupBoxDes, 0, 0 );
+
+ GroupBox2_2_2 = new QGroupBox( tab_2, "GroupBox2_2_2" );
+ GroupBox2_2_2->setFrameShape( QGroupBox::Box );
+ GroupBox2_2_2->setFrameShadow( QGroupBox::Sunken );
+ GroupBox2_2_2->setColumnLayout(0, Qt::Vertical );
+ GroupBox2_2_2->layout()->setSpacing( 6 );
+ GroupBox2_2_2->layout()->setMargin( 11 );
+ GroupBox2_2_2Layout = new QGridLayout( GroupBox2_2_2->layout() );
+ GroupBox2_2_2Layout->setAlignment( Qt::AlignTop );
+
+ editValue = new QLineEdit( GroupBox2_2_2, "editValue" );
+ editValue->setEnabled( FALSE );
+ editValue->setAlignment( int( QLineEdit::AlignLeft ) );
+ editValue->setEdited( TRUE );
+
+ GroupBox2_2_2Layout->addWidget( editValue, 1, 0 );
+
+ TextLabel3_2_2_3_2_2_2 = new QLabel( GroupBox2_2_2, "TextLabel3_2_2_3_2_2_2" );
+
+ GroupBox2_2_2Layout->addWidget( TextLabel3_2_2_3_2_2_2, 0, 0 );
+
+ TextLabel3_2_4_2_2_2 = new QLabel( GroupBox2_2_2, "TextLabel3_2_4_2_2_2" );
+ TextLabel3_2_4_2_2_2->setScaledContents( FALSE );
+
+ GroupBox2_2_2Layout->addWidget( TextLabel3_2_4_2_2_2, 0, 1 );
+
+ editMaxValue = new QComboBox( FALSE, GroupBox2_2_2, "editMaxValue" );
+ editMaxValue->setEditable( TRUE );
+ editMaxValue->setSizeLimit( 12 );
+
+ GroupBox2_2_2Layout->addWidget( editMaxValue, 1, 1 );
+
+ TextLabel1_2_3_2_2 = new QLabel( GroupBox2_2_2, "TextLabel1_2_3_2_2" );
+
+ GroupBox2_2_2Layout->addWidget( TextLabel1_2_3_2_2, 0, 2 );
+
+ editMul = new QLineEdit( GroupBox2_2_2, "editMul" );
+
+ GroupBox2_2_2Layout->addWidget( editMul, 1, 2 );
+
+ TextLabel3_2 = new QLabel( GroupBox2_2_2, "TextLabel3_2" );
+
+ GroupBox2_2_2Layout->addWidget( TextLabel3_2, 3, 0 );
+
+ TextLabel3_2_3_2_2_2_2 = new QLabel( GroupBox2_2_2, "TextLabel3_2_3_2_2_2_2" );
+
+ GroupBox2_2_2Layout->addWidget( TextLabel3_2_3_2_2_2_2, 3, 1 );
+
+ TextLabel1_3_3_2 = new QLabel( GroupBox2_2_2, "TextLabel1_3_3_2" );
+
+ GroupBox2_2_2Layout->addWidget( TextLabel1_3_3_2, 3, 2 );
+
+ editIdealValue = new QLineEdit( GroupBox2_2_2, "editIdealValue" );
+ editIdealValue->setAlignment( int( QLineEdit::AlignLeft ) );
+
+ GroupBox2_2_2Layout->addWidget( editIdealValue, 4, 0 );
+
+ editMinValue = new QComboBox( FALSE, GroupBox2_2_2, "editMinValue" );
+ editMinValue->setEditable( TRUE );
+ editMinValue->setSizeLimit( 12 );
+
+ GroupBox2_2_2Layout->addWidget( editMinValue, 4, 1 );
+
+ editSum = new QLineEdit( GroupBox2_2_2, "editSum" );
+
+ GroupBox2_2_2Layout->addWidget( editSum, 4, 2 );
+ spacer12 = new QSpacerItem( 21, 21, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ GroupBox2_2_2Layout->addItem( spacer12, 5, 1 );
+ spacer10 = new QSpacerItem( 20, 5, QSizePolicy::Minimum, QSizePolicy::Fixed );
+ GroupBox2_2_2Layout->addItem( spacer10, 2, 1 );
+
+ tabLayout_2->addWidget( GroupBox2_2_2, 1, 0 );
+ SensorsTab->insertTab( tab_2, QString("") );
+
+ tab_3 = new QWidget( SensorsTab, "tab_3" );
+ tabLayout_3 = new QVBoxLayout( tab_3, 11, 6, "tabLayout_3");
+
+ GroupBox13 = new QGroupBox( tab_3, "GroupBox13" );
+ GroupBox13->setMinimumSize( QSize( 0, 50 ) );
+ GroupBox13->setMaximumSize( QSize( 32767, 50 ) );
+ GroupBox13->setColumnLayout(0, Qt::Vertical );
+ GroupBox13->layout()->setSpacing( 6 );
+ GroupBox13->layout()->setMargin( 11 );
+ GroupBox13Layout = new QGridLayout( GroupBox13->layout() );
+ GroupBox13Layout->setAlignment( Qt::AlignTop );
+
+ checkShow = new QCheckBox( GroupBox13, "checkShow" );
+ checkShow->setCursor( QCursor( 0 ) );
+
+ GroupBox13Layout->addWidget( checkShow, 0, 0 );
+ tabLayout_3->addWidget( GroupBox13 );
+
+ boxPanelPalette = new QGroupBox( tab_3, "boxPanelPalette" );
+ boxPanelPalette->setMinimumSize( QSize( 0, 90 ) );
+ tabLayout_3->addWidget( boxPanelPalette );
+ Spacer4_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ tabLayout_3->addItem( Spacer4_2 );
+ SensorsTab->insertTab( tab_3, QString("") );
+
+ tab_4 = new QWidget( SensorsTab, "tab_4" );
+ tabLayout_4 = new QGridLayout( tab_4, 1, 1, 11, 6, "tabLayout_4");
+
+ GroupBox14 = new QGroupBox( tab_4, "GroupBox14" );
+ GroupBox14->setMinimumSize( QSize( 0, 50 ) );
+ GroupBox14->setMaximumSize( QSize( 32767, 50 ) );
+ GroupBox14->setColumnLayout(0, Qt::Vertical );
+ GroupBox14->layout()->setSpacing( 6 );
+ GroupBox14->layout()->setMargin( 11 );
+ GroupBox14Layout = new QGridLayout( GroupBox14->layout() );
+ GroupBox14Layout->setAlignment( Qt::AlignTop );
+
+ checkShowInDock = new QCheckBox( GroupBox14, "checkShowInDock" );
+ checkShowInDock->setCursor( QCursor( 0 ) );
+
+ GroupBox14Layout->addWidget( checkShowInDock, 0, 0 );
+
+ tabLayout_4->addWidget( GroupBox14, 0, 0 );
+ Spacer3_2 = new QSpacerItem( 20, 120, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ tabLayout_4->addItem( Spacer3_2, 2, 0 );
+
+ GroupBoxColorDock = new QGroupBox( tab_4, "GroupBoxColorDock" );
+ GroupBoxColorDock->setEnabled( TRUE );
+ GroupBoxColorDock->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)5, 0, 0, GroupBoxColorDock->sizePolicy().hasHeightForWidth() ) );
+ GroupBoxColorDock->setFrameShape( QGroupBox::Box );
+ GroupBoxColorDock->setColumnLayout(0, Qt::Vertical );
+ GroupBoxColorDock->layout()->setSpacing( 6 );
+ GroupBoxColorDock->layout()->setMargin( 11 );
+ GroupBoxColorDockLayout = new QGridLayout( GroupBoxColorDock->layout() );
+ GroupBoxColorDockLayout->setAlignment( Qt::AlignTop );
+
+ TextLabel1_2_2_2_2 = new QLabel( GroupBoxColorDock, "TextLabel1_2_2_2_2" );
+ TextLabel1_2_2_2_2->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignLeft ) );
+
+ GroupBoxColorDockLayout->addWidget( TextLabel1_2_2_2_2, 1, 0 );
+
+ colorAlarm = new KColorButton( GroupBoxColorDock, "colorAlarm" );
+ colorAlarm->setEnabled( TRUE );
+ colorAlarm->setToggleButton( FALSE );
+ colorAlarm->setColor( QColor( 255, 85, 0 ) );
+
+ GroupBoxColorDockLayout->addWidget( colorAlarm, 1, 1 );
+
+ colorNormal = new KColorButton( GroupBoxColorDock, "colorNormal" );
+ colorNormal->setEnabled( TRUE );
+ colorNormal->setAcceptDrops( TRUE );
+ colorNormal->setToggleButton( FALSE );
+ colorNormal->setOn( FALSE );
+ colorNormal->setColor( QColor( 0, 0, 255 ) );
+
+ GroupBoxColorDockLayout->addWidget( colorNormal, 0, 1 );
+ spacer5 = new QSpacerItem( 41, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ GroupBoxColorDockLayout->addItem( spacer5, 0, 2 );
+ spacer6 = new QSpacerItem( 41, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ GroupBoxColorDockLayout->addItem( spacer6, 1, 2 );
+
+ TextLabel1_4_2_2 = new QLabel( GroupBoxColorDock, "TextLabel1_4_2_2" );
+ TextLabel1_4_2_2->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignLeft ) );
+
+ GroupBoxColorDockLayout->addWidget( TextLabel1_4_2_2, 0, 0 );
+
+ tabLayout_4->addWidget( GroupBoxColorDock, 1, 0 );
+ SensorsTab->insertTab( tab_4, QString("") );
+
+ tab_5 = new QWidget( SensorsTab, "tab_5" );
+ tabLayout_5 = new QVBoxLayout( tab_5, 11, 6, "tabLayout_5");
+
+ TextLabel1_3_2_2_2_2 = new QLabel( tab_5, "TextLabel1_3_2_2_2_2" );
+ tabLayout_5->addWidget( TextLabel1_3_2_2_2_2 );
+
+ Frame11_2_2_2 = new QFrame( tab_5, "Frame11_2_2_2" );
+ Frame11_2_2_2->setFrameShape( QFrame::HLine );
+ Frame11_2_2_2->setFrameShadow( QFrame::Sunken );
+ tabLayout_5->addWidget( Frame11_2_2_2 );
+
+ layout9 = new QGridLayout( 0, 1, 1, 0, 6, "layout9");
+
+ CheckAllSensors = new QCheckBox( tab_5, "CheckAllSensors" );
+ CheckAllSensors->setAutoResize( TRUE );
+
+ layout9->addWidget( CheckAllSensors, 6, 0 );
+ spacer9 = new QSpacerItem( 20, 31, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ layout9->addItem( spacer9, 7, 0 );
+
+ radioAlarm1 = new QRadioButton( tab_5, "radioAlarm1" );
+ radioAlarm1->setCursor( QCursor( 0 ) );
+ radioAlarm1->setChecked( TRUE );
+
+ layout9->addWidget( radioAlarm1, 4, 0 );
+
+ buttonTest = new QPushButton( tab_5, "buttonTest" );
+ buttonTest->setEnabled( FALSE );
+
+ layout9->addWidget( buttonTest, 5, 1 );
+
+ radioAlarm2 = new QRadioButton( tab_5, "radioAlarm2" );
+ radioAlarm2->setCursor( QCursor( 0 ) );
+ radioAlarm2->setChecked( FALSE );
+
+ layout9->addWidget( radioAlarm2, 2, 0 );
+
+ radioAlarm3 = new QRadioButton( tab_5, "radioAlarm3" );
+ radioAlarm3->setCursor( QCursor( 0 ) );
+
+ layout9->addWidget( radioAlarm3, 0, 0 );
+
+ layout6 = new QHBoxLayout( 0, 0, 6, "layout6");
+ spacer7 = new QSpacerItem( 31, 20, QSizePolicy::Fixed, QSizePolicy::Minimum );
+ layout6->addItem( spacer7 );
+
+ editLaunch = new QLineEdit( tab_5, "editLaunch" );
+ editLaunch->setEnabled( FALSE );
+ layout6->addWidget( editLaunch );
+
+ layout9->addLayout( layout6, 1, 0 );
+
+ layout7 = new QHBoxLayout( 0, 0, 6, "layout7");
+ spacer8 = new QSpacerItem( 31, 21, QSizePolicy::Fixed, QSizePolicy::Minimum );
+ layout7->addItem( spacer8 );
+
+ editPlay = new QLineEdit( tab_5, "editPlay" );
+ editPlay->setEnabled( FALSE );
+ layout7->addWidget( editPlay );
+
+ layout9->addLayout( layout7, 3, 0 );
+ tabLayout_5->addLayout( layout9 );
+ SensorsTab->insertTab( tab_5, QString("") );
+
+ tabLayout->addWidget( SensorsTab, 0, 1 );
+
+ listSensors = new QListBox( tab, "listSensors" );
+ listSensors->setMinimumSize( QSize( 120, 0 ) );
+ listSensors->setMaximumSize( QSize( 120, 32767 ) );
+ listSensors->setFrameShape( QListBox::StyledPanel );
+ listSensors->setFrameShadow( QListBox::Sunken );
+ listSensors->setLineWidth( 2 );
+ listSensors->setColumnMode( QListBox::FixedNumber );
+
+ tabLayout->addWidget( listSensors, 0, 0 );
+ MainTab->insertTab( tab, QString("") );
+
+ tab_6 = new QWidget( MainTab, "tab_6" );
+ tabLayout_6 = new QGridLayout( tab_6, 1, 1, 11, 6, "tabLayout_6");
+
+ ButtonGroup5 = new QButtonGroup( tab_6, "ButtonGroup5" );
+ ButtonGroup5->setColumnLayout(0, Qt::Vertical );
+ ButtonGroup5->layout()->setSpacing( 6 );
+ ButtonGroup5->layout()->setMargin( 11 );
+ ButtonGroup5Layout = new QGridLayout( ButtonGroup5->layout() );
+ ButtonGroup5Layout->setAlignment( Qt::AlignTop );
+
+ RadioF = new QRadioButton( ButtonGroup5, "RadioF" );
+ RadioF->setMinimumSize( QSize( 0, 0 ) );
+
+ ButtonGroup5Layout->addWidget( RadioF, 1, 0 );
+
+ RadioC = new QRadioButton( ButtonGroup5, "RadioC" );
+ RadioC->setChecked( TRUE );
+
+ ButtonGroup5Layout->addWidget( RadioC, 0, 0 );
+
+ RadioK = new QRadioButton( ButtonGroup5, "RadioK" );
+
+ ButtonGroup5Layout->addWidget( RadioK, 2, 0 );
+
+ tabLayout_6->addWidget( ButtonGroup5, 0, 0 );
+ spacer12_2 = new QSpacerItem( 5, 5, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ tabLayout_6->addItem( spacer12_2, 2, 0 );
+
+ groupBox79 = new QGroupBox( tab_6, "groupBox79" );
+ groupBox79->setColumnLayout(0, Qt::Vertical );
+ groupBox79->layout()->setSpacing( 6 );
+ groupBox79->layout()->setMargin( 18 );
+ groupBox79Layout = new QGridLayout( groupBox79->layout() );
+ groupBox79Layout->setAlignment( Qt::AlignTop );
+
+ SpinUpdateTime = new QSpinBox( groupBox79, "SpinUpdateTime" );
+ SpinUpdateTime->setMinValue( 1 );
+ SpinUpdateTime->setValue( 5 );
+
+ groupBox79Layout->addWidget( SpinUpdateTime, 0, 0 );
+
+ SliderUpdateTime = new QSlider( groupBox79, "SliderUpdateTime" );
+ SliderUpdateTime->setMaxValue( 60 );
+ SliderUpdateTime->setValue( 5 );
+ SliderUpdateTime->setOrientation( QSlider::Horizontal );
+ SliderUpdateTime->setTickmarks( QSlider::Below );
+ SliderUpdateTime->setTickInterval( 1 );
+
+ groupBox79Layout->addWidget( SliderUpdateTime, 0, 1 );
+
+ tabLayout_6->addWidget( groupBox79, 1, 0 );
+ MainTab->insertTab( tab_6, QString("") );
+
+ LMSensorsCfgDesignLayout->addWidget( MainTab, 0, 0 );
+ languageChange();
+ resize( QSize(438, 344).expandedTo(minimumSizeHint()) );
+ clearWState( WState_Polished );
+
+ // signals and slots connections
+ connect( radioAlarm3, SIGNAL( toggled(bool) ), editLaunch, SLOT( setEnabled(bool) ) );
+ connect( radioAlarm2, SIGNAL( toggled(bool) ), editPlay, SLOT( setEnabled(bool) ) );
+ connect( radioAlarm1, SIGNAL( toggled(bool) ), buttonTest, SLOT( setDisabled(bool) ) );
+ connect( SliderUpdateTime, SIGNAL( valueChanged(int) ), SpinUpdateTime, SLOT( setValue(int) ) );
+ connect( SpinUpdateTime, SIGNAL( valueChanged(int) ), SliderUpdateTime, SLOT( setValue(int) ) );
+}
+
+/*
+ * Destroys the object and frees any allocated resources
+ */
+LMSensorsCfgDesign::~LMSensorsCfgDesign()
+{
+ // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ * Sets the strings of the subwidgets using the current
+ * language.
+ */
+void LMSensorsCfgDesign::languageChange()
+{
+ setCaption( tr2i18n( "LMSensorsCfgDesign" ) );
+ GroupBoxDes->setTitle( QString::null );
+ TextLabel2_2->setText( tr2i18n( "Description" ) );
+ editDescription->setText( QString::null );
+ GroupBox2_2_2->setTitle( tr2i18n( "Values" ) );
+ editValue->setText( QString::null );
+ TextLabel3_2_2_3_2_2_2->setText( tr2i18n( "Current" ) );
+ TextLabel3_2_4_2_2_2->setText( tr2i18n( "Maximum" ) );
+ editMaxValue->clear();
+ editMaxValue->insertItem( tr2i18n( "+1%" ) );
+ editMaxValue->insertItem( tr2i18n( "+2%" ) );
+ editMaxValue->insertItem( tr2i18n( "+3%" ) );
+ editMaxValue->insertItem( tr2i18n( "+4%" ) );
+ editMaxValue->insertItem( tr2i18n( "+5%" ) );
+ editMaxValue->insertItem( tr2i18n( "+10%" ) );
+ editMaxValue->insertItem( tr2i18n( "+15%" ) );
+ editMaxValue->insertItem( tr2i18n( "+20%" ) );
+ editMaxValue->insertItem( tr2i18n( "+30%" ) );
+ editMaxValue->insertItem( tr2i18n( "+40%" ) );
+ editMaxValue->insertItem( tr2i18n( "+50%" ) );
+ TextLabel1_2_3_2_2->setText( tr2i18n( "Multiplier" ) );
+ TextLabel3_2->setText( tr2i18n( "Ideal" ) );
+ TextLabel3_2_3_2_2_2_2->setText( tr2i18n( "Minimum" ) );
+ TextLabel1_3_3_2->setText( tr2i18n( "Addition" ) );
+ editIdealValue->setText( QString::null );
+ editMinValue->clear();
+ editMinValue->insertItem( tr2i18n( "-1%" ) );
+ editMinValue->insertItem( tr2i18n( "-2%" ) );
+ editMinValue->insertItem( tr2i18n( "-3%" ) );
+ editMinValue->insertItem( tr2i18n( "-4%" ) );
+ editMinValue->insertItem( tr2i18n( "-5%" ) );
+ editMinValue->insertItem( tr2i18n( "-10%" ) );
+ editMinValue->insertItem( tr2i18n( "-15%" ) );
+ editMinValue->insertItem( tr2i18n( "-20%" ) );
+ editMinValue->insertItem( tr2i18n( "-30%" ) );
+ editMinValue->insertItem( tr2i18n( "-40%" ) );
+ editMinValue->insertItem( tr2i18n( "-50%" ) );
+ SensorsTab->changeTab( tab_2, tr2i18n( "General" ) );
+ GroupBox13->setTitle( QString::null );
+ checkShow->setText( tr2i18n( "Visible" ) );
+ boxPanelPalette->setTitle( tr2i18n( "Colors" ) );
+ SensorsTab->changeTab( tab_3, tr2i18n( "Panel" ) );
+ GroupBox14->setTitle( QString::null );
+ checkShowInDock->setText( tr2i18n( "Visible" ) );
+ GroupBoxColorDock->setTitle( tr2i18n( "Colors" ) );
+ TextLabel1_2_2_2_2->setText( tr2i18n( "Alarm" ) );
+ colorAlarm->setText( QString::null );
+ colorNormal->setText( QString::null );
+ TextLabel1_4_2_2->setText( tr2i18n( "Normal" ) );
+ SensorsTab->changeTab( tab_4, tr2i18n( "Dock" ) );
+ TextLabel1_3_2_2_2_2->setText( tr2i18n( "On reach alarm value:" ) );
+ CheckAllSensors->setText( tr2i18n( "Apply to all sensors" ) );
+ radioAlarm1->setText( tr2i18n( "Do nothing" ) );
+ buttonTest->setText( tr2i18n( "Test" ) );
+ radioAlarm2->setText( tr2i18n( "Play alarm sound" ) );
+ radioAlarm3->setText( tr2i18n( "Run command" ) );
+ SensorsTab->changeTab( tab_5, tr2i18n( "Alarms" ) );
+ MainTab->changeTab( tab, tr2i18n( "Sensors" ) );
+ ButtonGroup5->setTitle( tr2i18n( "Temperatures scale" ) );
+ RadioF->setText( tr2i18n( "Fahrenheit" ) );
+ RadioC->setText( tr2i18n( "Celsius" ) );
+ RadioK->setText( tr2i18n( "Kelvin" ) );
+ groupBox79->setTitle( tr2i18n( "Update interval" ) );
+ SpinUpdateTime->setSuffix( tr2i18n( "s" ) );
+ MainTab->changeTab( tab_6, tr2i18n( "Preferences" ) );
+}
+
+#include "lmsensorscfgdesign.moc"
diff --git a/src/lmsensorscfgdesign.h b/src/lmsensorscfgdesign.h
new file mode 100644
index 0000000..78db656
--- /dev/null
+++ b/src/lmsensorscfgdesign.h
@@ -0,0 +1,134 @@
+/****************************************************************************
+** Form interface generated from reading ui file './lmsensorscfgdesign.ui'
+**
+** Created: mer aoû 18 23:39:01 2004
+** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#ifndef LMSENSORSCFGDESIGN_H
+#define LMSENSORSCFGDESIGN_H
+
+#include <qvariant.h>
+#include <qwidget.h>
+#include <kcolorbutton.h>
+
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QSpacerItem;
+class QTabWidget;
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QComboBox;
+class QCheckBox;
+class KColorButton;
+class QFrame;
+class QRadioButton;
+class QPushButton;
+class QListBox;
+class QListBoxItem;
+class QButtonGroup;
+class QSpinBox;
+class QSlider;
+
+class LMSensorsCfgDesign : public QWidget
+{
+ Q_OBJECT
+
+public:
+ LMSensorsCfgDesign( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ ~LMSensorsCfgDesign();
+
+ QTabWidget* MainTab;
+ QWidget* tab;
+ QTabWidget* SensorsTab;
+ QWidget* tab_2;
+ QGroupBox* GroupBoxDes;
+ QLabel* pixmapSensor;
+ QLabel* TextLabel2_2;
+ QLineEdit* editDescription;
+ QGroupBox* GroupBox2_2_2;
+ QLineEdit* editValue;
+ QLabel* TextLabel3_2_2_3_2_2_2;
+ QLabel* TextLabel3_2_4_2_2_2;
+ QComboBox* editMaxValue;
+ QLabel* TextLabel1_2_3_2_2;
+ QLineEdit* editMul;
+ QLabel* TextLabel3_2;
+ QLabel* TextLabel3_2_3_2_2_2_2;
+ QLabel* TextLabel1_3_3_2;
+ QLineEdit* editIdealValue;
+ QComboBox* editMinValue;
+ QLineEdit* editSum;
+ QWidget* tab_3;
+ QGroupBox* GroupBox13;
+ QCheckBox* checkShow;
+ QGroupBox* boxPanelPalette;
+ QWidget* tab_4;
+ QGroupBox* GroupBox14;
+ QCheckBox* checkShowInDock;
+ QGroupBox* GroupBoxColorDock;
+ QLabel* TextLabel1_2_2_2_2;
+ KColorButton* colorAlarm;
+ KColorButton* colorNormal;
+ QLabel* TextLabel1_4_2_2;
+ QWidget* tab_5;
+ QLabel* TextLabel1_3_2_2_2_2;
+ QFrame* Frame11_2_2_2;
+ QCheckBox* CheckAllSensors;
+ QRadioButton* radioAlarm1;
+ QPushButton* buttonTest;
+ QRadioButton* radioAlarm2;
+ QRadioButton* radioAlarm3;
+ QLineEdit* editLaunch;
+ QLineEdit* editPlay;
+ QListBox* listSensors;
+ QWidget* tab_6;
+ QButtonGroup* ButtonGroup5;
+ QRadioButton* RadioF;
+ QRadioButton* RadioC;
+ QRadioButton* RadioK;
+ QGroupBox* groupBox79;
+ QSpinBox* SpinUpdateTime;
+ QSlider* SliderUpdateTime;
+
+protected:
+ QGridLayout* LMSensorsCfgDesignLayout;
+ QGridLayout* tabLayout;
+ QGridLayout* tabLayout_2;
+ QGridLayout* GroupBoxDesLayout;
+ QHBoxLayout* layout5;
+ QVBoxLayout* layout4;
+ QGridLayout* GroupBox2_2_2Layout;
+ QSpacerItem* spacer12;
+ QSpacerItem* spacer10;
+ QVBoxLayout* tabLayout_3;
+ QSpacerItem* Spacer4_2;
+ QGridLayout* GroupBox13Layout;
+ QGridLayout* tabLayout_4;
+ QSpacerItem* Spacer3_2;
+ QGridLayout* GroupBox14Layout;
+ QGridLayout* GroupBoxColorDockLayout;
+ QSpacerItem* spacer5;
+ QSpacerItem* spacer6;
+ QVBoxLayout* tabLayout_5;
+ QGridLayout* layout9;
+ QSpacerItem* spacer9;
+ QHBoxLayout* layout6;
+ QSpacerItem* spacer7;
+ QHBoxLayout* layout7;
+ QSpacerItem* spacer8;
+ QGridLayout* tabLayout_6;
+ QSpacerItem* spacer12_2;
+ QGridLayout* ButtonGroup5Layout;
+ QGridLayout* groupBox79Layout;
+
+protected slots:
+ virtual void languageChange();
+
+};
+
+#endif // LMSENSORSCFGDESIGN_H
diff --git a/src/lmsensorscfgdesign.ui b/src/lmsensorscfgdesign.ui
new file mode 100644
index 0000000..deed61d
--- /dev/null
+++ b/src/lmsensorscfgdesign.ui
@@ -0,0 +1,1133 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>LMSensorsCfgDesign</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>LMSensorsCfgDesign</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>438</width>
+ <height>344</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>340</height>
+ </size>
+ </property>
+ <property name="caption">
+ <string>LMSensorsCfgDesign</string>
+ </property>
+ <property name="layoutMargin" stdset="0">
+ </property>
+ <property name="layoutSpacing" stdset="0">
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>8</number>
+ </property>
+ <property name="spacing">
+ <number>4</number>
+ </property>
+ <widget class="QTabWidget" row="0" column="0">
+ <property name="name">
+ <cstring>MainTab</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>422</width>
+ <height>295</height>
+ </size>
+ </property>
+ <property name="layoutMargin" stdset="0">
+ </property>
+ <property name="layoutSpacing" stdset="0">
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Sensors</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QTabWidget" row="0" column="1">
+ <property name="name">
+ <cstring>SensorsTab</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>272</width>
+ <height>276</height>
+ </size>
+ </property>
+ <property name="tabShape">
+ <enum>Rounded</enum>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="layoutMargin" stdset="0">
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>General</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>GroupBoxDes</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>layout5</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>pixmapSensor</cstring>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout4</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Description</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>editDescription</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox" row="1" column="0">
+ <property name="name">
+ <cstring>GroupBox2_2_2</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>Box</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="title">
+ <string>Values</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLineEdit" row="1" column="0">
+ <property name="name">
+ <cstring>editValue</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="alignment">
+ <set>AlignLeft</set>
+ </property>
+ <property name="edited">
+ <bool>true</bool>
+ </property>
+ <property name="hAlign" stdset="0">
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel3_2_2_3_2_2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Current</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring></cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="1">
+ <property name="name">
+ <cstring>TextLabel3_2_4_2_2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Maximum</string>
+ </property>
+ <property name="scaledContents">
+ <bool>false</bool>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring></cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="1">
+ <item>
+ <property name="text">
+ <string>+1%</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>+2%</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>+3%</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>+4%</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>+5%</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>+10%</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>+15%</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>+20%</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>+30%</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>+40%</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>+50%</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>editMaxValue</cstring>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="sizeLimit">
+ <number>12</number>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="2">
+ <property name="name">
+ <cstring>TextLabel1_2_3_2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Multiplier</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="2">
+ <property name="name">
+ <cstring>editMul</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>TextLabel3_2</cstring>
+ </property>
+ <property name="text">
+ <string>Ideal</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="1">
+ <property name="name">
+ <cstring>TextLabel3_2_3_2_2_2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Minimum</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring></cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="2">
+ <property name="name">
+ <cstring>TextLabel1_3_3_2</cstring>
+ </property>
+ <property name="text">
+ <string>Addition</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="4" column="0">
+ <property name="name">
+ <cstring>editIdealValue</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="alignment">
+ <set>AlignLeft</set>
+ </property>
+ <property name="hAlign" stdset="0">
+ </property>
+ </widget>
+ <widget class="QComboBox" row="4" column="1">
+ <item>
+ <property name="text">
+ <string>-1%</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>-2%</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>-3%</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>-4%</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>-5%</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>-10%</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>-15%</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>-20%</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>-30%</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>-40%</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>-50%</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>editMinValue</cstring>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="sizeLimit">
+ <number>12</number>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="4" column="2">
+ <property name="name">
+ <cstring>editSum</cstring>
+ </property>
+ </widget>
+ <spacer row="5" column="1">
+ <property name="name">
+ <cstring>spacer12</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>21</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="2" column="1">
+ <property name="name">
+ <cstring>spacer10</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>5</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Panel</string>
+ </attribute>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>GroupBox13</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>50</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32767</width>
+ <height>50</height>
+ </size>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>checkShow</cstring>
+ </property>
+ <property name="cursor">
+ <cursor>0</cursor>
+ </property>
+ <property name="text">
+ <string>Visible</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>boxPanelPalette</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>90</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Colors</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer4_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Dock</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>GroupBox14</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>50</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32767</width>
+ <height>50</height>
+ </size>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>checkShowInDock</cstring>
+ </property>
+ <property name="cursor">
+ <cursor>0</cursor>
+ </property>
+ <property name="text">
+ <string>Visible</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer row="2" column="0">
+ <property name="name">
+ <cstring>Spacer3_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>120</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QGroupBox" row="1" column="0">
+ <property name="name">
+ <cstring>GroupBoxColorDock</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>Box</enum>
+ </property>
+ <property name="title">
+ <string>Colors</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel1_2_2_2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Alarm</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignLeft</set>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring></cstring>
+ </property>
+ <property name="hAlign" stdset="0">
+ </property>
+ </widget>
+ <widget class="KColorButton" row="1" column="1">
+ <property name="name">
+ <cstring>colorAlarm</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="toggleButton">
+ <bool>false</bool>
+ </property>
+ <property name="color">
+ <color>
+ <red>255</red>
+ <green>85</green>
+ <blue>0</blue>
+ </color>
+ </property>
+ </widget>
+ <widget class="KColorButton" row="0" column="1">
+ <property name="name">
+ <cstring>colorNormal</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="acceptDrops">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="toggleButton">
+ <bool>false</bool>
+ </property>
+ <property name="on">
+ <bool>false</bool>
+ </property>
+ <property name="color">
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>255</blue>
+ </color>
+ </property>
+ </widget>
+ <spacer row="0" column="2">
+ <property name="name">
+ <cstring>spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>41</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="1" column="2">
+ <property name="name">
+ <cstring>spacer6</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>41</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1_4_2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Normal</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignLeft</set>
+ </property>
+ <property name="hAlign" stdset="0">
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Alarms</string>
+ </attribute>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel1_3_2_2_2_2</cstring>
+ </property>
+ <property name="text">
+ <string>On reach alarm value:</string>
+ </property>
+ </widget>
+ <widget class="QFrame">
+ <property name="name">
+ <cstring>Frame11_2_2_2</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>HLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout9</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="6" column="0">
+ <property name="name">
+ <cstring>CheckAllSensors</cstring>
+ </property>
+ <property name="text">
+ <string>Apply to all sensors</string>
+ </property>
+ <property name="autoResize">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer row="7" column="0">
+ <property name="name">
+ <cstring>spacer9</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QRadioButton" row="4" column="0">
+ <property name="name">
+ <cstring>radioAlarm1</cstring>
+ </property>
+ <property name="cursor">
+ <cursor>0</cursor>
+ </property>
+ <property name="text">
+ <string>Do nothing</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="5" column="1">
+ <property name="name">
+ <cstring>buttonTest</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Test</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="2" column="0">
+ <property name="name">
+ <cstring>radioAlarm2</cstring>
+ </property>
+ <property name="cursor">
+ <cursor>0</cursor>
+ </property>
+ <property name="text">
+ <string>Play alarm sound</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>radioAlarm3</cstring>
+ </property>
+ <property name="cursor">
+ <cursor>0</cursor>
+ </property>
+ <property name="text">
+ <string>Run command</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>layout6</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer7</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>31</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>editLaunch</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="3" column="0">
+ <property name="name">
+ <cstring>layout7</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer8</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>31</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>editPlay</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ </vbox>
+ </widget>
+ </widget>
+ <widget class="QListBox" row="0" column="0">
+ <property name="name">
+ <cstring>listSensors</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>120</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>120</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="frameShape">
+ <enum>StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="lineWidth">
+ <number>2</number>
+ </property>
+ <property name="columnMode">
+ <enum>FixedNumber</enum>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Preferences</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QButtonGroup" row="0" column="0">
+ <property name="name">
+ <cstring>ButtonGroup5</cstring>
+ </property>
+ <property name="title">
+ <string>Temperatures scale</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>RadioF</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Fahrenheit</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>RadioC</cstring>
+ </property>
+ <property name="text">
+ <string>Celsius</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="2" column="0">
+ <property name="name">
+ <cstring>RadioK</cstring>
+ </property>
+ <property name="text">
+ <string>Kelvin</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer row="2" column="0">
+ <property name="name">
+ <cstring>spacer12_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>5</width>
+ <height>5</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QGroupBox" row="1" column="0">
+ <property name="name">
+ <cstring>groupBox79</cstring>
+ </property>
+ <property name="title">
+ <string>Update interval</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>18</number>
+ </property>
+ <widget class="QSpinBox" row="0" column="0">
+ <property name="name">
+ <cstring>SpinUpdateTime</cstring>
+ </property>
+ <property name="suffix">
+ <string>s</string>
+ </property>
+ <property name="minValue">
+ <number>1</number>
+ </property>
+ <property name="value">
+ <number>5</number>
+ </property>
+ </widget>
+ <widget class="QSlider" row="0" column="1">
+ <property name="name">
+ <cstring>SliderUpdateTime</cstring>
+ </property>
+ <property name="maxValue">
+ <number>60</number>
+ </property>
+ <property name="value">
+ <number>5</number>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="tickmarks">
+ <enum>Below</enum>
+ </property>
+ <property name="tickInterval">
+ <number>1</number>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>radioAlarm3</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>editLaunch</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>radioAlarm2</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>editPlay</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>radioAlarm1</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>buttonTest</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>SliderUpdateTime</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>SpinUpdateTime</receiver>
+ <slot>setValue(int)</slot>
+ </connection>
+ <connection>
+ <sender>SpinUpdateTime</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>SliderUpdateTime</receiver>
+ <slot>setValue(int)</slot>
+ </connection>
+</connections>
+<includes>
+ <include location="global" impldecl="in declaration">kcolorbutton.h</include>
+</includes>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+</includehints>
+</UI>
diff --git a/src/lmsensorschip.cpp b/src/lmsensorschip.cpp
new file mode 100644
index 0000000..1a15493
--- /dev/null
+++ b/src/lmsensorschip.cpp
@@ -0,0 +1,72 @@
+/***************************************************************************
+ lmsensorschip.cpp - description
+ -------------------
+ begin : Wed Feb 20 2002
+ copyright : (C) 2002 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. *
+ * *
+ ***************************************************************************/
+
+#include <unistd.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sensors/sensors.h>
+
+#include "lmsensorschip.h"
+
+//****************************************************************************
+// Public methods
+//****************************************************************************
+
+LMSensorsChip::LMSensorsChip(const sensors_chip_name *chip, QObject *parent, const char * name)
+ : SensorsList(parent,name)
+{
+ setClass(Sensor::lmSensor);
+ chip_name= chip;
+ setName( chip_name->prefix );
+ setDescription( chip_name->prefix );
+ readConfig();
+ createSensors();
+}
+
+LMSensorsChip::~LMSensorsChip()
+{
+}
+
+const sensors_chip_name *LMSensorsChip::getChipName()
+{
+ return chip_name;
+}
+
+
+void LMSensorsChip::createSensors()
+{
+ if(!chip_name) return;
+ const sensors_feature_data *data;
+ int nr1= 0;
+ int nr2= 0;
+ data= sensors_get_all_features(*chip_name, &nr1, &nr2);
+ while(data) {
+ LMSensor *sensor= new LMSensor(this);
+ if( !sensor->init(&data,&nr1,&nr2) )
+ delete sensor;
+ }
+}
+
+void LMSensorsChip::updateSensors()
+{
+QObjectList *sensors= (QObjectList *)children();
+
+ if(sensors)
+ for(LMSensor *sensor= (LMSensor *)sensors->first(); sensor!=0; sensor= (LMSensor *)sensors->next())
+ if(sensor->monitorized()) sensor->updateValue();
+}
+
diff --git a/src/lmsensorschip.h b/src/lmsensorschip.h
new file mode 100644
index 0000000..90972a1
--- /dev/null
+++ b/src/lmsensorschip.h
@@ -0,0 +1,55 @@
+/***************************************************************************
+ lmsensorschip.h - description
+ -------------------
+ begin : Wed Feb 20 2002
+ copyright : (C) 2002 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 LMSENSORSCHIP_H
+#define LMSENSORSCHIP_H
+
+#include "lmsensor.h"
+#include "sensorslist.h"
+
+/**
+ *@author Miguel Novas
+ */
+
+class LMSensorsChip : public SensorsList
+{
+Q_OBJECT
+
+ friend class LMSensor;
+
+public:
+
+ LMSensorsChip(const sensors_chip_name *chip=0, QObject *parent=0, const char *name=0);
+ ~LMSensorsChip();
+
+public slots:
+
+ void updateSensors();
+
+protected:
+
+ const sensors_chip_name *getChipName();
+
+private:
+
+ const sensors_chip_name *chip_name;
+ bool initSensorsChip();
+ void createSensors();
+};
+
+
+#endif
diff --git a/src/lmsensorsdock.cpp b/src/lmsensorsdock.cpp
new file mode 100644
index 0000000..5429883
--- /dev/null
+++ b/src/lmsensorsdock.cpp
@@ -0,0 +1,211 @@
+/***************************************************************************
+ lmsensorsdock.cpp - description
+ -------------------
+ begin : Sun Sep 23 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. *
+ * *
+ ***************************************************************************/
+
+#include "lmsensorsdock.h"
+
+#include <qobjectlist.h>
+#include <klocale.h>
+#include <kiconloader.h>
+#include <kapp.h>
+#include <kaboutapplication.h>
+
+#include <kwin.h>
+#include <netwm.h>
+
+LMSensorsDock::LMSensorsDock(bool fNoDock, QObject *parent, const char *name): QObject(parent,name)
+{
+ noDock= fNoDock;
+
+ sensors= new LMSensors;
+ sensors->setMonitorized(true);
+
+ connect(sensors,SIGNAL(configChanged(const char *)),this,SLOT(updateItemDock(const char *)));
+
+ createAlarmControl();
+ createWidgets();
+ if(!noDock) createDockWidgets();
+ createMenu();
+}
+
+
+LMSensorsDock::~LMSensorsDock()
+{
+ saveConfig();
+ if(sensorsWidget) delete sensorsWidget;
+ if(sensorsCfg) delete sensorsCfg;
+ if(sensorsAlarm) delete sensorsAlarm;
+ delete menu;
+ if(sensors) delete sensors;
+}
+
+
+void LMSensorsDock::createMenu()
+{
+ menu= new KPopupMenu;
+ menu->insertTitle(kapp->miniIcon(),"KSensors");
+ menu->insertItem(SmallIcon("configure"),i18n("&Configure"), this, SLOT(createConfigWidget() ) ,0,101 );
+ menu->insertSeparator();
+ menu->insertItem(kapp->miniIcon() ,i18n("&About KSensors"), this, SLOT(showAbout() ) ,0,103 );
+ menu->insertSeparator();
+ if(!noDock) menu->insertItem(sensorsWidget ? i18n("&Minimize"):i18n("&Restore"), this, SLOT(minimizeRestoreWidget() ) ,0,100 );
+ menu->insertItem(SmallIcon("exit"),i18n("&Exit"), this, SLOT(close()),0,102);
+}
+
+void LMSensorsDock::createWidgets()
+{
+ KGlobal::config()->setGroup("General");
+ if(noDock) createShowWidget();
+ else if(KGlobal::config()->readBoolEntry("showWidget",false)) {
+ int desktop = KGlobal::config()->readNumEntry("desktop", 0);
+ createShowWidget(desktop);
+ }
+}
+
+void LMSensorsDock::saveConfig()
+{
+ KGlobal::config()->setGroup("General");
+ KGlobal::config()->writeEntry("showWidget",(bool)sensorsWidget);
+ if(sensorsWidget) {
+ NETWinInfo wm_client(qt_xdisplay(), sensorsWidget->winId(), qt_xrootwin(), NET::WMDesktop);
+ KGlobal::config()->writeEntry("desktop", wm_client.desktop());
+ }
+}
+
+void LMSensorsDock::createDockWidgets()
+{
+QObjectList *chips= sensors->getSensorsChips();
+
+ countSensors= 0;
+ if(chips)
+ for(LMSensorsChip *chip= (LMSensorsChip *)chips->first(); chip!=0; chip= (LMSensorsChip *)chips->next()) {
+ QObjectList *list= (QObjectList *)chip->getSensors();
+ if(list) {
+ for(LMSensor *sensor= (LMSensor *)list->first(); sensor!=0; sensor= (LMSensor *)list->next()) {
+ if( LMSensorDockPanel::readShowInDock(sensor->name()) )
+ createDockSensor(sensor);
+ }
+ }
+ }
+ if(countSensors==0) createDockSensor(0);
+}
+
+void LMSensorsDock::createAlarmControl()
+{
+ sensorsAlarm= new LMSensorsAlarms(sensors);
+}
+
+
+void LMSensorsDock::minimizeRestoreWidget()
+{
+ if(sensorsWidget) delete sensorsWidget;
+ else createShowWidget();
+ updateMenu();
+}
+
+void LMSensorsDock::updateMenu()
+{
+ if(noDock && !sensorsWidget)
+ close();
+ else
+ menu->changeItem(100, sensorsWidget ? i18n("&Minimize") : i18n("&Restore"));
+}
+
+void LMSensorsDock::createShowWidget(int desktop)
+{
+ if(!sensorsWidget) {
+ sensorsWidget= new LMSensorsWidget(sensors);
+ connect( sensorsWidget, SIGNAL(rightMouseClicked(QMouseEvent *)), this, SLOT(mouseEventReceived(QMouseEvent *)) );
+ connect( sensorsWidget, SIGNAL(destroyed()), this, SLOT(updateMenu()) );
+ }
+ if ((desktop != 0) && (desktop <= KWin::numberOfDesktops())) KWin::setOnDesktop(sensorsWidget->winId(), desktop);
+ sensorsWidget->show();
+}
+
+
+void LMSensorsDock::createConfigWidget()
+{
+ if(!sensorsCfg) {
+ sensorsCfg= new KSensorsCfg(sensors);
+ }
+ sensorsCfg->show();
+}
+
+
+void LMSensorsDock::close()
+{
+ delete this;
+}
+
+void LMSensorsDock::mouseEventReceived(QMouseEvent *e)
+{
+ if(e->type()==QEvent::MouseButtonRelease) {
+ if( e->button()==LeftButton ) minimizeRestoreWidget();
+ if( e->button()==RightButton ) menu->popup(e->globalPos());
+ }
+}
+
+void LMSensorsDock::createDockSensor(Sensor *sensor)
+{
+ if(countSensors==0) {
+ QObjectList *list= (QObjectList *)children();
+ if(list)
+ for(LMSensorDockPanel *sensor= (LMSensorDockPanel *)list->first(); sensor!=0; sensor= (LMSensorDockPanel *)list->next())
+ delete sensor;
+ }
+ const char *name= sensor ? sensor->name() : 0;
+ LMSensorDockPanel *dock= new LMSensorDockPanel(sensor,name);
+ connect( dock, SIGNAL(mouseEvent(QMouseEvent *)), this, SLOT(mouseEventReceived(QMouseEvent *)) );
+ insertChild(dock);
+ dock->show();
+ if(name) countSensors++;
+}
+
+void LMSensorsDock::deleteDockSensor(LMSensorDockPanel *sensor)
+{
+ delete sensor;
+ if(--countSensors==0) createDockSensor(0);
+}
+
+void LMSensorsDock::updateItemDock(const char *name)
+{
+ if(!name) return;
+
+ Sensor *sensor= sensors->getSensor(name);
+
+// if((bool)sensor && sensor->getType()==LMSensor::lmTemp) {
+ bool fShow= LMSensorDockPanel::readShowInDock(name);
+ LMSensorDockPanel *dockSensor= (LMSensorDockPanel *)child(name);
+ if( fShow!=(bool)dockSensor ) {
+ if(dockSensor) deleteDockSensor(dockSensor);
+ else createDockSensor(sensor);
+ } else {
+ if(dockSensor!=0)
+ dockSensor->updateConfig();
+ }
+// }
+}
+
+
+void LMSensorsDock::showAbout()
+{
+KAboutApplication *dialog;
+
+ dialog= new KAboutApplication;
+ dialog->exec();
+ delete dialog;
+}
+
diff --git a/src/lmsensorsdock.h b/src/lmsensorsdock.h
new file mode 100644
index 0000000..ce52441
--- /dev/null
+++ b/src/lmsensorsdock.h
@@ -0,0 +1,89 @@
+/***************************************************************************
+ lmsensorsdock.h - description
+ -------------------
+ begin : Sun Sep 23 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 LMSENSORSDOCK_H
+#define LMSENSORSDOCK_H
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include <qobject.h>
+#include <qguardedptr.h>
+
+#include <kconfig.h>
+#include <kpopupmenu.h>
+#include <kdialogbase.h>
+
+#include "lmsensors.h"
+#include "lmsensorpanel.h"
+#include "lmsensorswidget.h"
+#include "lmsensordockpanel.h"
+#include "lmsensorsalarms.h"
+#include "ksensorscfg.h"
+
+/**
+ *@author Miguel Novas
+ */
+
+class LMSensorsDock : public QObject
+{
+
+ Q_OBJECT
+
+public:
+ LMSensorsDock(bool fNoDock=false, QObject *parent=0, const char *name=0);
+ ~LMSensorsDock();
+
+public slots:
+ void saveConfig();
+
+protected slots:
+
+ void updateItemDock(const char *name);
+ void mouseEventReceived(QMouseEvent *e);
+ void minimizeRestoreWidget();
+ void createConfigWidget();
+ void updateMenu();
+ void showAbout();
+ void close();
+
+private:
+
+ bool noDock;
+
+ int countSensors;
+
+ LMSensors *sensors;
+ QGuardedPtr<KSensorsCfg> sensorsCfg;
+ QGuardedPtr<LMSensorsWidget> sensorsWidget;
+ QGuardedPtr<LMSensorsAlarms> sensorsAlarm;
+
+ KPopupMenu *menu;
+
+ void createMenu();
+ void createWidgets();
+ void createDockWidgets();
+ void createDockSensor(Sensor *sensor);
+ void deleteDockSensor(LMSensorDockPanel *sensor);
+ void createShowWidget(int desktop=0);
+ void createAlarmControl();
+};
+
+#endif
diff --git a/src/lmsensorswidget.cpp b/src/lmsensorswidget.cpp
new file mode 100644
index 0000000..ab6a8b9
--- /dev/null
+++ b/src/lmsensorswidget.cpp
@@ -0,0 +1,371 @@
+/***************************************************************************
+ lmsensorswidget.cpp - description
+ -------------------
+ begin : Mon Aug 6 2001
+ copyright : (C) 2001 by
+ email :
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#include <qobject.h>
+#include <qobjectlist.h>
+#include <qpixmap.h>
+#include <qtimer.h>
+
+#include <kiconloader.h>
+#include <kstddirs.h>
+
+#include "lmsensorswidget.h"
+
+
+/***************************************************************************
+ * Public methods *
+ ***************************************************************************/
+
+LMSensorsWidget::LMSensorsWidget(LMSensors *lsensors,QWidget *parent, const char *name )
+ : QWidget(parent,name,
+ WStyle_Customize |
+ WType_TopLevel |
+ WStyle_StaysOnTop |
+ WStyle_NormalBorder |
+ WDestructiveClose )
+{
+ panelsSize= 64;
+ setMinimumSize(0,0);
+ setSizeIncrement(64,64);
+ setBaseSize(64,64);
+ //
+ sensors= lsensors;
+ //
+ childDraging = 0;
+ //
+ setCaption("KSensors");
+ //
+ loadPalette();
+ //
+ loadGeneralOptions();
+ //
+ setBackgroundPixmap( UserIcon("ksensorsbackground.png") );
+ //
+ KConfig *cfg= KGlobal::config();
+ cfg->setGroup("ShowWidget");
+ QRect rect(32,32,64*4,64*3);
+ rect= cfg->readRectEntry ("geometry", &rect);
+ move( rect.topLeft() );
+ resize( rect.size() );
+ //
+ createSensorPanels();
+ //
+ infoPanels= new InfoPanels(this);
+ //
+ connect(sensors, SIGNAL(configChanged(const char *)), this, SLOT(slotConfigChanged(const char *)) );
+}
+
+
+LMSensorsWidget::~LMSensorsWidget()
+{
+ if(x()>=0 && y()>=0) {
+ KConfig *cfg= KGlobal::config();
+ cfg->setGroup("ShowWidget");
+ //cfg->writeEntry("geometry" , geometry() );
+ cfg->writeEntry( "geometry" , QRect(pos(), size()) );
+ }
+ delete infoPanels;
+}
+
+// ******************* Protected slots ******************************
+
+void LMSensorsWidget::slotConfigChanged(const char *name)
+{
+ if(name) {
+ Panel *panel= (Panel *)child(name);
+ Sensor *sensor= sensors->getSensor(name);
+ if(sensor) {
+ if(Panel::readShow(name)!= (bool)panel ) {
+ if(panel) { delete panel; }
+ else (void)new LMSensorPanel(sensor, this, sensor->name() );
+ }
+ } else infoPanels->configChanged(name);
+ panel= (Panel *)child(name);
+ if(panel) loadPalette(panel);
+ } else {
+ loadPalette();
+ loadGeneralOptions();
+ }
+}
+
+
+/***************************************************************************
+ * Private methods *
+ ***************************************************************************/
+
+void LMSensorsWidget::childEvent(QChildEvent *e)
+{
+ if(e->inserted()) {
+ loadDisplayConfig((Panel *)e->child());
+ }
+}
+
+// ************* Draging panels and show menu ************************
+
+void LMSensorsWidget::childEventReceived(QEvent *e)
+{
+QMouseEvent *m = (QMouseEvent*)e;
+
+ switch(e->type()) {
+ case QEvent::MouseButtonPress:
+
+ if( m->button()==LeftButton ) startDragChild(m,(QWidget *)sender());
+ break;
+
+ case QEvent::MouseButtonRelease:
+
+ if( m->button()==RightButton ) emit rightMouseClicked(m);
+ break;
+ }
+}
+
+
+void LMSensorsWidget::startDragChild(QMouseEvent *m, QWidget *w)
+{
+ if(childDraging==0)
+ {
+ childDraging= w;
+ grabMouse(sizeAllCursor);
+ origMousePt = w->mapFromGlobal(m->globalPos());
+ //w->move( m->globalPos()-mapToGlobal(QPoint(0,0))-origMousePt);
+ w->raise();
+ w->update();
+ }
+}
+
+void LMSensorsWidget::endDragChild()
+{
+int x= childDraging->x();
+int y= childDraging->y();
+
+ if(x<0) x=0;
+ if(y<0) y=0;
+ releaseMouse();
+ childDraging->move(
+ ((x+childDraging->width() /2) / panelsSize) * panelsSize ,
+ ((y+childDraging->height()/2) / panelsSize) * panelsSize
+ );
+ saveDisplayConfig((Panel *)childDraging);
+ childDraging= 0;
+}
+
+void LMSensorsWidget::mouseMoveEvent ( QMouseEvent *m )
+{
+ if(childDraging)
+ {
+ childDraging->move(m->pos()-origMousePt);
+ childDraging->update();
+ }
+}
+
+
+void LMSensorsWidget::mouseReleaseEvent ( QMouseEvent *m )
+{
+ if(childDraging && m->button()==LeftButton) endDragChild();
+ else
+ if(m->button()==RightButton) emit rightMouseClicked(m);
+}
+
+// ********************** Panels creation ************************
+
+void LMSensorsWidget::findUnusedPosition(int *px,int *py)
+{
+bool found;
+uint mx,my,x,y,a[32];
+QObjectList *list= (QObjectList *)children();
+
+ for(y=0; y<32; y++) a[y]= 0;
+ mx= 0; my= 0;
+ if(list)
+ for(QWidget *obj= (QWidget *)list->first(); obj!=0; obj= (QWidget *)list->next())
+ {
+ y=obj->y()/panelsSize;
+ x=obj->x()/panelsSize;
+ if(x<32 && y<32) a[y]|= (1 << x);
+ if(x>mx) mx= x;
+ if(y>my) my= y;
+ }
+ //
+ for(x=0,y=0,found=false;y<=my && !found;) {
+ found= ((a[y] & (1 << x))==0);
+ if(!found)
+ if(++x>mx) { x= 0; y++; }
+ }
+
+ if(!found) {
+ x= (width()-1) / panelsSize;
+ if(x>mx) { x= mx+1; y= 0; }
+ else { x= 0; y= my+1; }
+ }
+ //
+ *px= x;
+ *py= y;
+}
+
+void LMSensorsWidget::loadDisplayConfig(Panel *display)
+{
+ if(display==0) return;
+
+ loadPalette(display);
+
+ bool fNoCfg;
+ QPoint p(-1,-1);
+ KConfig *cfg= KGlobal::config();
+ cfg->setGroup(display->name());
+ p= cfg->readPointEntry("showPos", &p );
+ fNoCfg= (p.x()<0 || p.y()<0);
+ if(fNoCfg) findUnusedPosition(&p.rx(),&p.ry());
+ display->move(p.x()*panelsSize,p.y()*panelsSize);
+ display->resize(panelsSize,panelsSize);
+ display->show();
+ if(fNoCfg) {
+ saveDisplayConfig(display);
+ adjustSize();
+ }
+ display->installEventFilter(this);
+ connect(display, SIGNAL(eventReceived(QEvent *)), this, SLOT(childEventReceived(QEvent *)) );
+}
+
+
+void LMSensorsWidget::saveDisplayConfig(Panel *display)
+{
+KConfig *cfg= KGlobal::config();
+
+ cfg->setGroup(display->name());
+ cfg->writeEntry("show",true);
+ QPoint p= display->pos()/panelsSize;
+ cfg->writeEntry("showPos",p);
+}
+
+void LMSensorsWidget::createSensorPanels()
+{
+ QObjectList *chips= sensors->getSensorsChips();
+ if(chips)
+ for(LMSensorsChip *chip= (LMSensorsChip *)chips->first(); chip!=0; chip= (LMSensorsChip *)chips->next()) {
+ QObjectList *list= (QObjectList *)chip->getSensors();
+ if(list) {
+ for(LMSensor *sensor= (LMSensor *)list->first(); sensor!=0; sensor= (LMSensor *)list->next()) {
+ if( Panel::readShow(sensor->name()) )
+ (void) new LMSensorPanel(sensor, this, sensor->name() );
+ }
+ }
+ }
+}
+
+void LMSensorsWidget::resizePanels(int newSize)
+{
+QObjectList *panels= (QObjectList *)children();
+
+ if(panels)
+ for(QWidget *panel= (QWidget *)panels->first(); panel!=0; panel= (QWidget *)panels->next()) {
+ panel->move( (panel->x()/panelsSize)*newSize, (panel->y()/panelsSize)*newSize);
+ panel->resize(newSize,newSize);
+ }
+ panelsSize= newSize;
+ adjustSize();
+}
+
+int LMSensorsWidget::cfgReadPanelSize()
+{
+KConfig *cfg= KGlobal::config();
+ cfg->setGroup( "ShowWidget" );
+ return cfg->readNumEntry("PanelsSize",64);
+}
+
+void LMSensorsWidget::cfgWritePanelSize(int newSize)
+{
+KConfig *cfg= KGlobal::config();
+ cfg->setGroup( "ShowWidget" );
+ cfg->writeEntry("PanelsSize",newSize);
+}
+
+
+void LMSensorsWidget::loadGeneralOptions()
+{
+ int newSize= cfgReadPanelSize();
+ if(panelsSize!=newSize) {
+ setSizeIncrement(newSize,newSize);
+ setBaseSize(newSize,newSize);
+ resizePanels(newSize);
+ }
+}
+
+// ************************+******** Palettes stuff ****************************
+
+void LMSensorsWidget::loadPalette(Panel *panel)
+{
+ QPalette pal= palette();
+ if(panel) {
+ if(cfgReadPalette(pal,panel->name(),false)) panel->setPalette(pal);
+ else panel->unsetPalette();
+ } else {
+ cfgReadPalette(pal,0,true);
+ setPalette(pal);
+ }
+}
+
+
+void LMSensorsWidget::getDefaultPalette(QPalette &pal)
+{
+ pal.setColor(QColorGroup::Background, Qt::white );
+ pal.setColor(QColorGroup::Light , Qt::white );
+ pal.setColor(QColorGroup::Dark, Qt::black );
+ pal.setColor(QColorGroup::Foreground, Qt::black );
+ pal.setColor(QColorGroup::Text, Qt::black );
+}
+
+
+bool LMSensorsWidget::cfgReadPalette(QPalette &pal,const char *name, bool returnDefault)
+{
+ KConfig *cfg= KGlobal::config();
+ cfg->setGroup( name ? name : "General" );
+ if (cfg->readBoolEntry("PaletteActive",false)) {
+ pal.setColor(QColorGroup::Background, cfg->readColorEntry("ColorBackground",&Qt::white) );
+ pal.setColor(QColorGroup::Light , cfg->readColorEntry("ColorBackground",&Qt::white) );
+ pal.setColor(QColorGroup::Dark, cfg->readColorEntry("ColorShadow" ,&Qt::black) );
+ pal.setColor(QColorGroup::Foreground, cfg->readColorEntry("ColorValue" ,&Qt::black) );
+ pal.setColor(QColorGroup::Text, cfg->readColorEntry("ColorTitle" ,&Qt::black) );
+ return true;
+ } else {
+ if(returnDefault) {
+ getDefaultPalette(pal);
+ return true;
+ }
+ }
+ return false;
+}
+
+void LMSensorsWidget::cfgWritePalette(const QPalette &pal,const char *name)
+{
+ KConfig *cfg= KGlobal::config();
+ QColorGroup colors= pal.active();
+ cfg->setGroup( name ? name : "General" );
+ cfg->writeEntry("PaletteActive",true);
+ cfg->writeEntry("ColorBackground",colors.background() );
+ cfg->writeEntry("ColorShadow" ,colors.dark() );
+ cfg->writeEntry("ColorValue" ,colors.foreground() );
+ cfg->writeEntry("ColorTitle" ,colors.text() );
+}
+
+void LMSensorsWidget::cfgUnsetPalette(const char *name)
+{
+ KGlobal::config()->setGroup( name ? name : "General" );
+ KGlobal::config()->writeEntry("PaletteActive",false);
+}
+
+// *********************************** End *************************************
+
diff --git a/src/lmsensorswidget.h b/src/lmsensorswidget.h
new file mode 100644
index 0000000..c331ad0
--- /dev/null
+++ b/src/lmsensorswidget.h
@@ -0,0 +1,82 @@
+/***************************************************************************
+ lmsensorswidget.h - description
+ -------------------
+ begin : Mon Aug 6 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 LMSENSORSWIDGET_H
+#define LMSENSORSWIDGET_H
+
+#include <qwidget.h>
+#include <qpixmap.h>
+
+#include "lmsensors.h"
+#include "lmsensorpanel.h"
+#include "infopanels.h"
+
+/**
+ *@author Miguel Novas
+ */
+
+class LMSensorsWidget : public QWidget {
+ Q_OBJECT
+public:
+
+ LMSensorsWidget(LMSensors *lsensors,QWidget *parent=0, const char *name=0);
+ ~LMSensorsWidget();
+
+ static bool cfgReadPalette(QPalette &pal,const char *name=0, bool returnDefault= false);
+ static void cfgWritePalette(const QPalette &pal,const char *name=0);
+ static void cfgUnsetPalette(const char *name=0);
+ static void getDefaultPalette(QPalette &pal);
+ static void cfgWritePanelSize(int newSize);
+ static int cfgReadPanelSize();
+
+protected slots:
+
+ void slotConfigChanged(const char *name);
+
+signals:
+
+ void rightMouseClicked(QMouseEvent *);
+
+private:
+
+ LMSensors *sensors;
+ InfoPanels *infoPanels;
+ QWidget *childDraging;
+ int panelsSize;
+ QPoint origMousePt;
+
+ void loadPalette(Panel *panel=0);
+ void loadDisplayConfig(Panel *display);
+ void saveDisplayConfig(Panel *display);
+ void mouseReleaseEvent ( QMouseEvent *m );
+ void mouseMoveEvent ( QMouseEvent *m );
+
+ void createSensorPanels();
+ void findUnusedPosition(int *px,int *py);
+ void startDragChild(QMouseEvent *m, QWidget *w);
+ void endDragChild();
+ void resizePanels(int newSize);
+ void loadGeneralOptions();
+
+private slots:
+
+ void childEvent(QChildEvent *);
+ void childEventReceived(QEvent *);
+
+};
+
+#endif
diff --git a/src/main.cpp b/src/main.cpp
new file mode 100644
index 0000000..ac442cf
--- /dev/null
+++ b/src/main.cpp
@@ -0,0 +1,74 @@
+/***************************************************************************
+ main.cpp - description
+ -------------------
+ begin : dom ago 19 02:10:35 EDT 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. *
+ * *
+ ***************************************************************************/
+
+#include <kcmdlineargs.h>
+#include <kaboutdata.h>
+#include <klocale.h>
+
+#include <kuniqueapp.h>
+#include "ksensorssplash.h"
+#include "lmsensorsdock.h"
+
+static const char *description =
+ I18N_NOOP("KSensors - A nice lmsensors frontend for KDE");
+// INSERT A DESCRIPTION FOR YOUR APPLICATION HERE
+
+
+static KCmdLineOptions options[] =
+{
+ { "nodock", I18N_NOOP("Don't dock in KDE system tray."), 0 },
+ { "splash", I18N_NOOP("Show splash screen."), 0 },
+ { 0, 0, 0 }
+ // INSERT YOUR COMMANDLINE OPTIONS HERE
+};
+
+
+int main(int argc, char *argv[])
+{
+
+ KAboutData aboutData( "ksensors", I18N_NOOP("KSensors"),
+ VERSION, description, KAboutData::License_GPL,
+ "(c) 2001, Miguel Novas", 0, 0, "michaell@teleline.es");
+ aboutData.addAuthor("Miguel Novas",0, "michaell@teleline.es");
+
+ KCmdLineArgs::init( argc, argv, &aboutData );
+ KCmdLineArgs::addCmdLineOptions( options );
+ KUniqueApplication::addCmdLineOptions();
+
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ bool noDock= !args->isSet("dock");
+ bool showSplash= args->isSet("splash");
+ args->clear();
+
+ if(!KUniqueApplication::start()) return 0;
+ KUniqueApplication a;
+
+ KConfig *cfg= kapp->config();
+ cfg->setGroup("General");
+ if( cfg->readEntry("Version")!=aboutData.version() ) {
+ cfg->writeEntry("Version",aboutData.version());
+ showSplash= true;
+ }
+
+ if(showSplash) (void)new KSensorsSplash();
+
+ LMSensorsDock *ksensors= new LMSensorsDock(noDock);
+ QObject::connect( ksensors, SIGNAL(destroyed()), kapp, SLOT(quit()) );
+ QObject::connect( kapp, SIGNAL(saveYourself()), ksensors, SLOT(saveConfig()) );
+
+ return a.exec();
+}
diff --git a/src/palettecfg.cpp b/src/palettecfg.cpp
new file mode 100644
index 0000000..9196712
--- /dev/null
+++ b/src/palettecfg.cpp
@@ -0,0 +1,110 @@
+/***************************************************************************
+ palettecfg.cpp - description
+ -------------------
+ begin : lun abr 15 2002
+ copyright : (C) 2002 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. *
+ * *
+ ***************************************************************************/
+
+#include "palettecfg.h"
+#include "lmsensorswidget.h"
+
+#include <qlabel.h>
+#include <qpalette.h>
+#include <qcombobox.h>
+#include <kcolorbutton.h>
+
+PaletteCfg::PaletteCfg(QWidget *parent, const char *name): PaletteCfgDesign(parent,name)
+{
+ groupName= 0;
+ slotComboSelected(0);
+ connect( comboSelect,SIGNAL(activated(int)),this,SLOT(slotComboSelected(int)) );
+ connect( buttonColor,SIGNAL(changed(const QColor &)),this,SLOT(slotColorChanged(const QColor &)) );
+ connect( buttonDefaultPalette, SIGNAL(clicked()),this,SLOT(slotPaletteDefault()) );
+}
+
+PaletteCfg::~PaletteCfg()
+{
+}
+
+void PaletteCfg::slotComboSelected(int index)
+{
+ QColorGroup colors= framePanel->palette().active();
+ QColor color;
+ switch(index) {
+ case 0: color= colors.background(); break;
+ case 1: color= colors.dark(); break;
+ case 2: color= colors.text(); break;
+ case 3: color= colors.foreground(); break;
+ }
+ buttonColor->blockSignals(true);
+ buttonColor->setColor(color);
+ buttonColor->blockSignals(false);
+}
+
+void PaletteCfg::slotColorChanged(const QColor &newColor)
+{
+ QPalette pal= framePanel->palette();
+ switch(comboSelect->currentItem()) {
+ case 0: pal.setColor(QColorGroup::Background,newColor);
+ pal.setColor(QColorGroup::Light ,newColor); break;
+ case 1: pal.setColor(QColorGroup::Dark ,newColor); break;
+ case 2: pal.setColor(QColorGroup::Text ,newColor); break;
+ case 3: pal.setColor(QColorGroup::Foreground,newColor); break;
+ default: return;
+ }
+ setPanelPalette(pal,false);
+ palDefault= false;
+}
+
+void PaletteCfg::slotPaletteDefault()
+{
+ palDefault= true;
+ QPalette pal;
+ if(groupName) {
+ LMSensorsWidget::cfgReadPalette(pal,"General",true);
+ } else {
+ LMSensorsWidget::getDefaultPalette(pal);
+ }
+ setPanelPalette(pal,true);
+}
+
+void PaletteCfg::setPanelPalette(const QPalette &pal, bool updateColorButton)
+{
+ labelTitle->unsetPalette();
+ framePanel->setPalette(pal);
+#if ( KDE_VERSION_MAJOR >= 3 )
+ labelTitle->setPaletteForegroundColor(pal.active().text());
+#else
+ QPalette p= labelTitle->palette();
+ p.setColor(QColorGroup::Foreground,pal.active().text());
+ labelTitle->setPalette(p);
+#endif
+ if(updateColorButton) slotComboSelected(comboSelect->currentItem());
+}
+
+void PaletteCfg::readPalette(const char *name)
+{
+ groupName= name;
+ QPalette pal;
+ palDefault= !LMSensorsWidget::cfgReadPalette(pal,name,false);
+ if(palDefault) LMSensorsWidget::cfgReadPalette(pal,"General",true);
+ setPanelPalette(pal,true);
+}
+
+void PaletteCfg::savePalette()
+{
+ if(palDefault) LMSensorsWidget::cfgUnsetPalette(groupName);
+ else LMSensorsWidget::cfgWritePalette(framePanel->palette(),groupName);
+}
+
+
diff --git a/src/palettecfg.h b/src/palettecfg.h
new file mode 100644
index 0000000..497be69
--- /dev/null
+++ b/src/palettecfg.h
@@ -0,0 +1,52 @@
+/***************************************************************************
+ palettecfg.h - description
+ -------------------
+ begin : lun abr 15 2002
+ copyright : (C) 2002 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 PALETTECFG_H
+#define PALETTECFG_H
+
+#include <palettecfgdesign.h>
+
+#include <kconfig.h>
+
+/**
+ *@author Miguel Novas
+ */
+
+class PaletteCfg : public PaletteCfgDesign {
+Q_OBJECT
+public:
+ PaletteCfg(QWidget *parent=0, const char *name=0);
+ ~PaletteCfg();
+
+ void readPalette(const char *name);
+ void savePalette();
+
+protected slots:
+
+ void slotComboSelected(int index);
+ void slotColorChanged(const QColor &newColor);
+ void slotPaletteDefault();
+
+private:
+
+ bool palDefault;
+ const char *groupName;
+
+ void setPanelPalette(const QPalette &pal, bool updateColorButton=false);
+};
+
+#endif
diff --git a/src/palettecfgdesign.cpp b/src/palettecfgdesign.cpp
new file mode 100644
index 0000000..4e9034f
--- /dev/null
+++ b/src/palettecfgdesign.cpp
@@ -0,0 +1,153 @@
+#include <klocale.h>
+/****************************************************************************
+** Form implementation generated from reading ui file './palettecfgdesign.ui'
+**
+** Created: mer aoû 18 23:39:05 2004
+** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#include "palettecfgdesign.h"
+
+#include <qvariant.h>
+#include <qframe.h>
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include <qcombobox.h>
+#include <kcolorbutton.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/*
+ * Constructs a PaletteCfgDesign as a child of 'parent', with the
+ * name 'name' and widget flags set to 'f'.
+ */
+PaletteCfgDesign::PaletteCfgDesign( QWidget* parent, const char* name, WFlags fl )
+ : QWidget( parent, name, fl )
+{
+ if ( !name )
+ setName( "PaletteCfgDesign" );
+ setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
+ PaletteCfgDesignLayout = new QGridLayout( this, 1, 1, 0, 6, "PaletteCfgDesignLayout");
+
+ framePanel = new QFrame( this, "framePanel" );
+ framePanel->setMinimumSize( QSize( 64, 64 ) );
+ framePanel->setMaximumSize( QSize( 64, 64 ) );
+ QPalette pal;
+ QColorGroup cg;
+ cg.setColor( QColorGroup::Foreground, black );
+ cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) );
+ cg.setColor( QColorGroup::Light, white );
+ cg.setColor( QColorGroup::Midlight, QColor( 241, 241, 241) );
+ cg.setColor( QColorGroup::Dark, QColor( 114, 114, 114) );
+ cg.setColor( QColorGroup::Mid, QColor( 152, 152, 152) );
+ cg.setColor( QColorGroup::Text, black );
+ cg.setColor( QColorGroup::BrightText, white );
+ cg.setColor( QColorGroup::ButtonText, black );
+ cg.setColor( QColorGroup::Base, white );
+ cg.setColor( QColorGroup::Background, white );
+ cg.setColor( QColorGroup::Shadow, black );
+ cg.setColor( QColorGroup::Highlight, QColor( 10, 95, 137) );
+ cg.setColor( QColorGroup::HighlightedText, white );
+ cg.setColor( QColorGroup::Link, black );
+ cg.setColor( QColorGroup::LinkVisited, black );
+ pal.setActive( cg );
+ cg.setColor( QColorGroup::Foreground, black );
+ cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) );
+ cg.setColor( QColorGroup::Light, white );
+ cg.setColor( QColorGroup::Midlight, white );
+ cg.setColor( QColorGroup::Dark, QColor( 114, 114, 114) );
+ cg.setColor( QColorGroup::Mid, QColor( 152, 152, 152) );
+ cg.setColor( QColorGroup::Text, black );
+ cg.setColor( QColorGroup::BrightText, white );
+ cg.setColor( QColorGroup::ButtonText, black );
+ cg.setColor( QColorGroup::Base, white );
+ cg.setColor( QColorGroup::Background, white );
+ cg.setColor( QColorGroup::Shadow, black );
+ cg.setColor( QColorGroup::Highlight, QColor( 10, 95, 137) );
+ cg.setColor( QColorGroup::HighlightedText, white );
+ cg.setColor( QColorGroup::Link, black );
+ cg.setColor( QColorGroup::LinkVisited, black );
+ pal.setInactive( cg );
+ cg.setColor( QColorGroup::Foreground, QColor( 128, 128, 128) );
+ cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) );
+ cg.setColor( QColorGroup::Light, white );
+ cg.setColor( QColorGroup::Midlight, white );
+ cg.setColor( QColorGroup::Dark, QColor( 114, 114, 114) );
+ cg.setColor( QColorGroup::Mid, QColor( 152, 152, 152) );
+ cg.setColor( QColorGroup::Text, black );
+ cg.setColor( QColorGroup::BrightText, white );
+ cg.setColor( QColorGroup::ButtonText, QColor( 128, 128, 128) );
+ cg.setColor( QColorGroup::Base, white );
+ cg.setColor( QColorGroup::Background, white );
+ cg.setColor( QColorGroup::Shadow, black );
+ cg.setColor( QColorGroup::Highlight, QColor( 10, 95, 137) );
+ cg.setColor( QColorGroup::HighlightedText, white );
+ cg.setColor( QColorGroup::Link, black );
+ cg.setColor( QColorGroup::LinkVisited, black );
+ pal.setDisabled( cg );
+ framePanel->setPalette( pal );
+ framePanel->setFrameShape( QFrame::Panel );
+ framePanel->setFrameShadow( QFrame::Raised );
+
+ labelTitle = new QLabel( framePanel, "labelTitle" );
+ labelTitle->setGeometry( QRect( 8, 40, 50, 20 ) );
+ QFont labelTitle_font( labelTitle->font() );
+ labelTitle_font.setPointSize( 7 );
+ labelTitle->setFont( labelTitle_font );
+ labelTitle->setAlignment( int( QLabel::AlignCenter ) );
+
+ labelValue = new QLabel( framePanel, "labelValue" );
+ labelValue->setGeometry( QRect( 7, 16, 50, 20 ) );
+ labelValue->setAlignment( int( QLabel::AlignCenter ) );
+
+ PaletteCfgDesignLayout->addMultiCellWidget( framePanel, 0, 1, 0, 0 );
+
+ buttonDefaultPalette = new QPushButton( this, "buttonDefaultPalette" );
+ buttonDefaultPalette->setMinimumSize( QSize( 0, 22 ) );
+
+ PaletteCfgDesignLayout->addMultiCellWidget( buttonDefaultPalette, 1, 1, 1, 2 );
+
+ comboSelect = new QComboBox( FALSE, this, "comboSelect" );
+ comboSelect->setMinimumSize( QSize( 0, 22 ) );
+
+ PaletteCfgDesignLayout->addWidget( comboSelect, 0, 1 );
+
+ buttonColor = new KColorButton( this, "buttonColor" );
+ buttonColor->setMinimumSize( QSize( 0, 22 ) );
+
+ PaletteCfgDesignLayout->addWidget( buttonColor, 0, 2 );
+ languageChange();
+ resize( QSize(287, 74).expandedTo(minimumSizeHint()) );
+ clearWState( WState_Polished );
+}
+
+/*
+ * Destroys the object and frees any allocated resources
+ */
+PaletteCfgDesign::~PaletteCfgDesign()
+{
+ // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ * Sets the strings of the subwidgets using the current
+ * language.
+ */
+void PaletteCfgDesign::languageChange()
+{
+ setCaption( tr2i18n( "PaletteCfg" ) );
+ labelTitle->setText( tr2i18n( "Title" ) );
+ labelValue->setText( tr2i18n( "+3.5V" ) );
+ buttonDefaultPalette->setText( tr2i18n( "Default colors" ) );
+ comboSelect->clear();
+ comboSelect->insertItem( tr2i18n( "Background" ) );
+ comboSelect->insertItem( tr2i18n( "Border" ) );
+ comboSelect->insertItem( tr2i18n( "Title" ) );
+ comboSelect->insertItem( tr2i18n( "Value" ) );
+ buttonColor->setText( QString::null );
+}
+
+#include "palettecfgdesign.moc"
diff --git a/src/palettecfgdesign.h b/src/palettecfgdesign.h
new file mode 100644
index 0000000..466b6ac
--- /dev/null
+++ b/src/palettecfgdesign.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+** Form interface generated from reading ui file './palettecfgdesign.ui'
+**
+** Created: mer aoû 18 23:39:01 2004
+** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#ifndef PALETTECFGDESIGN_H
+#define PALETTECFGDESIGN_H
+
+#include <qvariant.h>
+#include <qwidget.h>
+#include <kcolorbutton.h>
+
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QSpacerItem;
+class QFrame;
+class QLabel;
+class QPushButton;
+class QComboBox;
+class KColorButton;
+
+class PaletteCfgDesign : public QWidget
+{
+ Q_OBJECT
+
+public:
+ PaletteCfgDesign( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ ~PaletteCfgDesign();
+
+ QFrame* framePanel;
+ QLabel* labelTitle;
+ QLabel* labelValue;
+ QPushButton* buttonDefaultPalette;
+ QComboBox* comboSelect;
+ KColorButton* buttonColor;
+
+protected:
+ QGridLayout* PaletteCfgDesignLayout;
+
+protected slots:
+ virtual void languageChange();
+
+};
+
+#endif // PALETTECFGDESIGN_H
diff --git a/src/palettecfgdesign.ui b/src/palettecfgdesign.ui
new file mode 100644
index 0000000..879edd4
--- /dev/null
+++ b/src/palettecfgdesign.ui
@@ -0,0 +1,426 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>PaletteCfgDesign</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>PaletteCfgDesign</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>287</width>
+ <height>74</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="caption">
+ <string>PaletteCfg</string>
+ </property>
+ <property name="layoutMargin" stdset="0">
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QFrame" row="0" column="0" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>framePanel</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>64</width>
+ <height>64</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>64</width>
+ <height>64</height>
+ </size>
+ </property>
+ <property name="palette">
+ <palette>
+ <active>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>241</red>
+ <green>241</green>
+ <blue>241</blue>
+ </color>
+ <color>
+ <red>114</red>
+ <green>114</green>
+ <blue>114</blue>
+ </color>
+ <color>
+ <red>152</red>
+ <green>152</green>
+ <blue>152</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </active>
+ <disabled>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>114</red>
+ <green>114</green>
+ <blue>114</blue>
+ </color>
+ <color>
+ <red>152</red>
+ <green>152</green>
+ <blue>152</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>128</red>
+ <green>128</green>
+ <blue>128</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </disabled>
+ <inactive>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>228</red>
+ <green>228</green>
+ <blue>228</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>114</red>
+ <green>114</green>
+ <blue>114</blue>
+ </color>
+ <color>
+ <red>152</red>
+ <green>152</green>
+ <blue>152</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>10</red>
+ <green>95</green>
+ <blue>137</blue>
+ </color>
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </inactive>
+ </palette>
+ </property>
+ <property name="frameShape">
+ <enum>Panel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Raised</enum>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>labelTitle</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>8</x>
+ <y>40</y>
+ <width>50</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>7</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Title</string>
+ </property>
+ <property name="alignment">
+ <set>AlignCenter</set>
+ </property>
+ <property name="hAlign" stdset="0">
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>labelValue</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>7</x>
+ <y>16</y>
+ <width>50</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>+3.5V</string>
+ </property>
+ <property name="alignment">
+ <set>AlignCenter</set>
+ </property>
+ <property name="hAlign" stdset="0">
+ </property>
+ </widget>
+ </widget>
+ <widget class="QPushButton" row="1" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>buttonDefaultPalette</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Default colors</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="0" column="1">
+ <item>
+ <property name="text">
+ <string>Background</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Border</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Title</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Value</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>comboSelect</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>22</height>
+ </size>
+ </property>
+ </widget>
+ <widget class="KColorButton" row="0" column="2">
+ <property name="name">
+ <cstring>buttonColor</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<includes>
+ <include location="global" impldecl="in declaration">kcolorbutton.h</include>
+</includes>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kcolorbutton.h</includehint>
+</includehints>
+</UI>
diff --git a/src/panel.cpp b/src/panel.cpp
new file mode 100644
index 0000000..96c7763
--- /dev/null
+++ b/src/panel.cpp
@@ -0,0 +1,57 @@
+/***************************************************************************
+ display.cpp - description
+ -------------------
+ begin : Sun Nov 11 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. *
+ * *
+ ***************************************************************************/
+
+#include "panel.h"
+
+#include <kglobal.h>
+
+Panel::Panel(QWidget *parent, const char *name) : QFrame(parent,name)
+{
+ setFrameStyle(QFrame::Panel|QFrame::Raised);
+ resize(64,64);
+ installEventFilter(this);
+}
+
+Panel::~Panel(){
+}
+
+
+// Maybe another better solution to capture childs of child widgets events ???
+
+bool Panel::eventFilter( QObject *o , QEvent *e)
+{
+ emit eventReceived(e);
+ return false;
+}
+
+
+//*****************************************************************************
+
+bool Panel::readShow(const char *name)
+{
+ KGlobal::config()->setGroup(name);
+ return KGlobal::config()->readBoolEntry("show",false);
+}
+
+void Panel::writeShow(const char *name, bool fShow)
+{
+ KGlobal::config()->setGroup(name);
+ KGlobal::config()->writeEntry("show",fShow);
+}
+
+
+//*****************************************************************************
diff --git a/src/panel.h b/src/panel.h
new file mode 100644
index 0000000..51e5181
--- /dev/null
+++ b/src/panel.h
@@ -0,0 +1,55 @@
+/***************************************************************************
+ display.h - description
+ -------------------
+ begin : Sun Nov 11 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 PANEL_H
+#define PANEL_H
+
+#include <qframe.h>
+#include <kconfig.h>
+#include <qpalette.h>
+
+/**
+ *@author Miguel Novas
+ */
+
+class Panel : public QFrame {
+Q_OBJECT
+public:
+
+ Panel(QWidget *parent, const char *name);
+ ~Panel();
+
+ inline const QColor &getColorTitle() { return colorGroup().text(); };
+ inline const QColor &getColorValue() { return colorGroup().foreground(); };
+
+ static bool readShow (const char *name);
+ static void writeShow(const char *name, bool fShow);
+
+public slots:
+
+ virtual void updateInfo(){};
+
+signals:
+
+ void eventReceived(QEvent *);
+
+private:
+
+ bool eventFilter( QObject *o , QEvent *e);
+};
+
+#endif
diff --git a/src/panelsgroup.cpp b/src/panelsgroup.cpp
new file mode 100644
index 0000000..a6172b2
--- /dev/null
+++ b/src/panelsgroup.cpp
@@ -0,0 +1,19 @@
+/***************************************************************************
+ panelsfactory.cpp - description
+ -------------------
+ begin : vie may 10 2002
+ copyright : (C) 2002 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. *
+ * *
+ ***************************************************************************/
+
+#include "panelsgroup.h"
+
diff --git a/src/panelsgroup.h b/src/panelsgroup.h
new file mode 100644
index 0000000..b1187a6
--- /dev/null
+++ b/src/panelsgroup.h
@@ -0,0 +1,42 @@
+/***************************************************************************
+ panelsfactory.h - description
+ -------------------
+ begin : vie may 10 2002
+ copyright : (C) 2002 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 PANELSGROUP_H
+#define PANELSGROUP_H
+
+#include <qobject.h>
+
+#include <panel.h>
+/**
+ *@author Miguel Novas
+ */
+
+class PanelsGroup : public QObject {
+Q_OBJECT
+public:
+
+ PanelsGroup(QWidget *widget, QObject *parent=0, const char *name=0) {};
+ ~PanelsGroup() {};
+
+
+public slots:
+
+ virtual void configChanged(const char *name)= 0;
+
+};
+
+#endif
diff --git a/src/pics/Makefile.am b/src/pics/Makefile.am
new file mode 100644
index 0000000..0170b55
--- /dev/null
+++ b/src/pics/Makefile.am
@@ -0,0 +1,62 @@
+####### kdevelop will overwrite this part!!! (begin)##########
+
+INCLUDES = $(all_includes)
+
+EXTRA_DIST = thermometer.png thermometer18x18.png motherboard.png ksensorssplash.png ksensorsdocked.png ksensorsbackground.png harddisk.png earth.png cooler.png cooler18x18.png computers.png battery.png battery18x18.png lo32-app-ksensors.png lo16-app-ksensors.png hi32-app-ksensors.png hi16-app-ksensors.png
+
+install-data-local:
+ $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+ $(INSTALL_DATA) $(srcdir)/thermometer.png $(kde_datadir)/ksensors/pics/thermometer.png
+ $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+ $(INSTALL_DATA) $(srcdir)/thermometer18x18.png $(kde_datadir)/ksensors/pics/thermometer18x18.png
+ $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+ $(INSTALL_DATA) $(srcdir)/motherboard.png $(kde_datadir)/ksensors/pics/motherboard.png
+ $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+ $(INSTALL_DATA) $(srcdir)/ksensorssplash.png $(kde_datadir)/ksensors/pics/ksensorssplash.png
+ $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+ $(INSTALL_DATA) $(srcdir)/ksensorsdocked.png $(kde_datadir)/ksensors/pics/ksensorsdocked.png
+ $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+ $(INSTALL_DATA) $(srcdir)/ksensorsbackground.png $(kde_datadir)/ksensors/pics/ksensorsbackground.png
+ $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+ $(INSTALL_DATA) $(srcdir)/harddisk.png $(kde_datadir)/ksensors/pics/harddisk.png
+ $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+ $(INSTALL_DATA) $(srcdir)/earth.png $(kde_datadir)/ksensors/pics/earth.png
+ $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+ $(INSTALL_DATA) $(srcdir)/cooler.png $(kde_datadir)/ksensors/pics/cooler.png
+ $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+ $(INSTALL_DATA) $(srcdir)/cooler18x18.png $(kde_datadir)/ksensors/pics/cooler18x18.png
+ $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+ $(INSTALL_DATA) $(srcdir)/computers.png $(kde_datadir)/ksensors/pics/computers.png
+ $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+ $(INSTALL_DATA) $(srcdir)/battery.png $(kde_datadir)/ksensors/pics/battery.png
+ $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+ $(INSTALL_DATA) $(srcdir)/battery18x18.png $(kde_datadir)/ksensors/pics/battery18x18.png
+ $(mkinstalldirs) $(kde_icondir)/locolor/32x32/apps/
+ $(INSTALL_DATA) $(srcdir)/lo32-app-ksensors.png $(kde_icondir)/locolor/32x32/apps/ksensors.png
+ $(mkinstalldirs) $(kde_icondir)/locolor/16x16/apps/
+ $(INSTALL_DATA) $(srcdir)/lo16-app-ksensors.png $(kde_icondir)/locolor/16x16/apps/ksensors.png
+ $(mkinstalldirs) $(kde_icondir)/hicolor/32x32/apps/
+ $(INSTALL_DATA) $(srcdir)/hi32-app-ksensors.png $(kde_icondir)/hicolor/32x32/apps/ksensors.png
+ $(mkinstalldirs) $(kde_icondir)/hicolor/16x16/apps/
+ $(INSTALL_DATA) $(srcdir)/hi16-app-ksensors.png $(kde_icondir)/hicolor/16x16/apps/ksensors.png
+
+uninstall-local:
+ -rm -f $(kde_datadir)/ksensors/pics/thermometer.png
+ -rm -f $(kde_datadir)/ksensors/pics/thermometer18x18.png
+ -rm -f $(kde_datadir)/ksensors/pics/motherboard.png
+ -rm -f $(kde_datadir)/ksensors/pics/ksensorssplash.png
+ -rm -f $(kde_datadir)/ksensors/pics/ksensorsdocked.png
+ -rm -f $(kde_datadir)/ksensors/pics/ksensorsbackground.png
+ -rm -f $(kde_datadir)/ksensors/pics/harddisk.png
+ -rm -f $(kde_datadir)/ksensors/pics/earth.png
+ -rm -f $(kde_datadir)/ksensors/pics/cooler.png
+ -rm -f $(kde_datadir)/ksensors/pics/cooler18x18.png
+ -rm -f $(kde_datadir)/ksensors/pics/computers.png
+ -rm -f $(kde_datadir)/ksensors/pics/battery.png
+ -rm -f $(kde_datadir)/ksensors/pics/battery18x18.png
+ -rm -f $(kde_icondir)/locolor/32x32/apps/ksensors.png
+ -rm -f $(kde_icondir)/locolor/16x16/apps/ksensors.png
+ -rm -f $(kde_icondir)/hicolor/32x32/apps/ksensors.png
+ -rm -f $(kde_icondir)/hicolor/16x16/apps/ksensors.png
+
+####### kdevelop will overwrite this part!!! (end)############
diff --git a/src/pics/Makefile.in b/src/pics/Makefile.in
new file mode 100644
index 0000000..e67665b
--- /dev/null
+++ b/src/pics/Makefile.in
@@ -0,0 +1,623 @@
+# Makefile.in generated by automake 1.6.3 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 1.5 $
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+####### kdevelop will overwrite this part!!! (begin)##########
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+
+EXEEXT = @EXEEXT@
+OBJEXT = @OBJEXT@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+AMTAR = @AMTAR@
+ARTSCCONFIG = @ARTSCCONFIG@
+AS = @AS@
+AUTODIRS = @AUTODIRS@
+AWK = @AWK@
+BROCKENBORING = @BROCKENBORING@
+CC = @CC@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN = @DOXYGEN@
+DOXYGEN_PROJECT_NAME = @DOXYGEN_PROJECT_NAME@
+DOXYGEN_PROJECT_NUMBER = @DOXYGEN_PROJECT_NUMBER@
+DPMSINC = @DPMSINC@
+DPMSLIB = @DPMSLIB@
+ECHO = @ECHO@
+FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
+GLINC = @GLINC@
+GLLIB = @GLLIB@
+GMSGFMT = @GMSGFMT@
+IDL = @IDL@
+IDL_DEPENDENCIES = @IDL_DEPENDENCIES@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JAR = @JAR@
+JAVAC = @JAVAC@
+JAVAH = @JAVAH@
+JVMLIBS = @JVMLIBS@
+KDECONFIG = @KDECONFIG@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_HAS_DOXYGEN = @KDE_HAS_DOXYGEN@
+KDE_HAVE_DOT = @KDE_HAVE_DOT@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_RPATH = @KDE_RPATH@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBBZ2 = @LIBBZ2@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBGEN = @LIBGEN@
+LIBJPEG = @LIBJPEG@
+LIBMICO = @LIBMICO@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBPYTHON = @LIBPYTHON@
+LIBQIMGIO = @LIBQIMGIO@
+LIBRESOLV = @LIBRESOLV@
+LIBSHADOW = @LIBSHADOW@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBSSL = @LIBSSL@
+LIBTIFF = @LIBTIFF@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBZ = @LIBZ@
+LIB_JASPER = @LIB_JASPER@
+LIB_KAB = @LIB_KAB@
+LIB_KABC = @LIB_KABC@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIMGIO = @LIB_KIMGIO@
+LIB_KIO = @LIB_KIO@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_POLL = @LIB_POLL@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_QTOPIA = @LIB_QTOPIA@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LIB_XRENDER = @LIB_XRENDER@
+LN_S = @LN_S@
+MCOPIDL = @MCOPIDL@
+MEINPROC = @MEINPROC@
+MICO_INCLUDES = @MICO_INCLUDES@
+MICO_LDFLAGS = @MICO_LDFLAGS@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJC = @OBJC@
+OBJCFLAGS = @OBJCFLAGS@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+PAMLIBS = @PAMLIBS@
+PASSWDLIBS = @PASSWDLIBS@
+PYTHONINC = @PYTHONINC@
+PYTHONLIB = @PYTHONLIB@
+PYTHONMODDIR = @PYTHONMODDIR@
+QTDOCDIR = @QTDOCDIR@
+QTE_NORTTI = @QTE_NORTTI@
+QTOPIA_INCLUDES = @QTOPIA_INCLUDES@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+RC = @RC@
+SETUIDFLAGS = @SETUIDFLAGS@
+SSL_INCLUDES = @SSL_INCLUDES@
+SSL_LDFLAGS = @SSL_LDFLAGS@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+XGETTEXT = @XGETTEXT@
+XPMINC = @XPMINC@
+XPMLIB = @XPMLIB@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+X_PRE_LIBS = @X_PRE_LIBS@
+X_RPATH = @X_RPATH@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+am__include = @am__include@
+am__quote = @am__quote@
+idldir = @idldir@
+install_sh = @install_sh@
+jni_includes = @jni_includes@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+kdeinitdir = @kdeinitdir@
+micodir = @micodir@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+xdg_appsdir = @xdg_appsdir@
+xdg_directorydir = @xdg_directorydir@
+
+INCLUDES = $(all_includes)
+
+EXTRA_DIST = thermometer.png thermometer18x18.png motherboard.png ksensorssplash.png ksensorsdocked.png ksensorsbackground.png harddisk.png earth.png cooler.png cooler18x18.png computers.png battery.png battery18x18.png lo32-app-ksensors.png lo16-app-ksensors.png hi32-app-ksensors.png hi16-app-ksensors.png
+subdir = src/pics
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
+DIST_COMMON = Makefile.am Makefile.in
+#>- all: all-am
+#>+ 1
+all: docs-am all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu src/pics/Makefile
+#>+ 3
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/pics/Makefile
+ cd $(top_srcdir) && perl admin/am_edit ksensors-0.7.3/src/pics/Makefile.in
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @list='$(DISTFILES)'; for file in $$list; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+
+installdirs:
+
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+#>- clean: clean-am
+#>+ 1
+clean: kde-rpo-clean clean-am
+
+#>- clean-am: clean-generic clean-libtool mostlyclean-am
+#>+ 1
+clean-am: clean-bcheck clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-generic distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+uninstall-am: uninstall-info-am uninstall-local
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am info info-am install install-am install-data \
+ install-data-am install-data-local install-exec install-exec-am \
+ install-info install-info-am install-man install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool uninstall uninstall-am uninstall-info-am \
+ uninstall-local
+
+
+install-data-local:
+#>- $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+#>+ 1
+ $(mkinstalldirs) $(DESTDIR)$(kde_datadir)/ksensors/pics/
+#>- $(INSTALL_DATA) $(srcdir)/thermometer.png $(kde_datadir)/ksensors/pics/thermometer.png
+#>+ 1
+ $(INSTALL_DATA) $(srcdir)/thermometer.png $(DESTDIR)$(kde_datadir)/ksensors/pics/thermometer.png
+#>- $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+#>+ 1
+ $(mkinstalldirs) $(DESTDIR)$(kde_datadir)/ksensors/pics/
+#>- $(INSTALL_DATA) $(srcdir)/thermometer18x18.png $(kde_datadir)/ksensors/pics/thermometer18x18.png
+#>+ 1
+ $(INSTALL_DATA) $(srcdir)/thermometer18x18.png $(DESTDIR)$(kde_datadir)/ksensors/pics/thermometer18x18.png
+#>- $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+#>+ 1
+ $(mkinstalldirs) $(DESTDIR)$(kde_datadir)/ksensors/pics/
+#>- $(INSTALL_DATA) $(srcdir)/motherboard.png $(kde_datadir)/ksensors/pics/motherboard.png
+#>+ 1
+ $(INSTALL_DATA) $(srcdir)/motherboard.png $(DESTDIR)$(kde_datadir)/ksensors/pics/motherboard.png
+#>- $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+#>+ 1
+ $(mkinstalldirs) $(DESTDIR)$(kde_datadir)/ksensors/pics/
+#>- $(INSTALL_DATA) $(srcdir)/ksensorssplash.png $(kde_datadir)/ksensors/pics/ksensorssplash.png
+#>+ 1
+ $(INSTALL_DATA) $(srcdir)/ksensorssplash.png $(DESTDIR)$(kde_datadir)/ksensors/pics/ksensorssplash.png
+#>- $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+#>+ 1
+ $(mkinstalldirs) $(DESTDIR)$(kde_datadir)/ksensors/pics/
+#>- $(INSTALL_DATA) $(srcdir)/ksensorsdocked.png $(kde_datadir)/ksensors/pics/ksensorsdocked.png
+#>+ 1
+ $(INSTALL_DATA) $(srcdir)/ksensorsdocked.png $(DESTDIR)$(kde_datadir)/ksensors/pics/ksensorsdocked.png
+#>- $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+#>+ 1
+ $(mkinstalldirs) $(DESTDIR)$(kde_datadir)/ksensors/pics/
+#>- $(INSTALL_DATA) $(srcdir)/ksensorsbackground.png $(kde_datadir)/ksensors/pics/ksensorsbackground.png
+#>+ 1
+ $(INSTALL_DATA) $(srcdir)/ksensorsbackground.png $(DESTDIR)$(kde_datadir)/ksensors/pics/ksensorsbackground.png
+#>- $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+#>+ 1
+ $(mkinstalldirs) $(DESTDIR)$(kde_datadir)/ksensors/pics/
+#>- $(INSTALL_DATA) $(srcdir)/harddisk.png $(kde_datadir)/ksensors/pics/harddisk.png
+#>+ 1
+ $(INSTALL_DATA) $(srcdir)/harddisk.png $(DESTDIR)$(kde_datadir)/ksensors/pics/harddisk.png
+#>- $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+#>+ 1
+ $(mkinstalldirs) $(DESTDIR)$(kde_datadir)/ksensors/pics/
+#>- $(INSTALL_DATA) $(srcdir)/earth.png $(kde_datadir)/ksensors/pics/earth.png
+#>+ 1
+ $(INSTALL_DATA) $(srcdir)/earth.png $(DESTDIR)$(kde_datadir)/ksensors/pics/earth.png
+#>- $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+#>+ 1
+ $(mkinstalldirs) $(DESTDIR)$(kde_datadir)/ksensors/pics/
+#>- $(INSTALL_DATA) $(srcdir)/cooler.png $(kde_datadir)/ksensors/pics/cooler.png
+#>+ 1
+ $(INSTALL_DATA) $(srcdir)/cooler.png $(DESTDIR)$(kde_datadir)/ksensors/pics/cooler.png
+#>- $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+#>+ 1
+ $(mkinstalldirs) $(DESTDIR)$(kde_datadir)/ksensors/pics/
+#>- $(INSTALL_DATA) $(srcdir)/cooler18x18.png $(kde_datadir)/ksensors/pics/cooler18x18.png
+#>+ 1
+ $(INSTALL_DATA) $(srcdir)/cooler18x18.png $(DESTDIR)$(kde_datadir)/ksensors/pics/cooler18x18.png
+#>- $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+#>+ 1
+ $(mkinstalldirs) $(DESTDIR)$(kde_datadir)/ksensors/pics/
+#>- $(INSTALL_DATA) $(srcdir)/computers.png $(kde_datadir)/ksensors/pics/computers.png
+#>+ 1
+ $(INSTALL_DATA) $(srcdir)/computers.png $(DESTDIR)$(kde_datadir)/ksensors/pics/computers.png
+#>- $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+#>+ 1
+ $(mkinstalldirs) $(DESTDIR)$(kde_datadir)/ksensors/pics/
+#>- $(INSTALL_DATA) $(srcdir)/battery.png $(kde_datadir)/ksensors/pics/battery.png
+#>+ 1
+ $(INSTALL_DATA) $(srcdir)/battery.png $(DESTDIR)$(kde_datadir)/ksensors/pics/battery.png
+#>- $(mkinstalldirs) $(kde_datadir)/ksensors/pics/
+#>+ 1
+ $(mkinstalldirs) $(DESTDIR)$(kde_datadir)/ksensors/pics/
+#>- $(INSTALL_DATA) $(srcdir)/battery18x18.png $(kde_datadir)/ksensors/pics/battery18x18.png
+#>+ 1
+ $(INSTALL_DATA) $(srcdir)/battery18x18.png $(DESTDIR)$(kde_datadir)/ksensors/pics/battery18x18.png
+#>- $(mkinstalldirs) $(kde_icondir)/locolor/32x32/apps/
+#>+ 1
+ $(mkinstalldirs) $(DESTDIR)$(kde_icondir)/locolor/32x32/apps/
+#>- $(INSTALL_DATA) $(srcdir)/lo32-app-ksensors.png $(kde_icondir)/locolor/32x32/apps/ksensors.png
+#>+ 1
+ $(INSTALL_DATA) $(srcdir)/lo32-app-ksensors.png $(DESTDIR)$(kde_icondir)/locolor/32x32/apps/ksensors.png
+#>- $(mkinstalldirs) $(kde_icondir)/locolor/16x16/apps/
+#>+ 1
+ $(mkinstalldirs) $(DESTDIR)$(kde_icondir)/locolor/16x16/apps/
+#>- $(INSTALL_DATA) $(srcdir)/lo16-app-ksensors.png $(kde_icondir)/locolor/16x16/apps/ksensors.png
+#>+ 1
+ $(INSTALL_DATA) $(srcdir)/lo16-app-ksensors.png $(DESTDIR)$(kde_icondir)/locolor/16x16/apps/ksensors.png
+#>- $(mkinstalldirs) $(kde_icondir)/hicolor/32x32/apps/
+#>+ 1
+ $(mkinstalldirs) $(DESTDIR)$(kde_icondir)/hicolor/32x32/apps/
+#>- $(INSTALL_DATA) $(srcdir)/hi32-app-ksensors.png $(kde_icondir)/hicolor/32x32/apps/ksensors.png
+#>+ 1
+ $(INSTALL_DATA) $(srcdir)/hi32-app-ksensors.png $(DESTDIR)$(kde_icondir)/hicolor/32x32/apps/ksensors.png
+#>- $(mkinstalldirs) $(kde_icondir)/hicolor/16x16/apps/
+#>+ 1
+ $(mkinstalldirs) $(DESTDIR)$(kde_icondir)/hicolor/16x16/apps/
+#>- $(INSTALL_DATA) $(srcdir)/hi16-app-ksensors.png $(kde_icondir)/hicolor/16x16/apps/ksensors.png
+#>+ 1
+ $(INSTALL_DATA) $(srcdir)/hi16-app-ksensors.png $(DESTDIR)$(kde_icondir)/hicolor/16x16/apps/ksensors.png
+
+uninstall-local:
+#>- -rm -f $(kde_datadir)/ksensors/pics/thermometer.png
+#>+ 1
+ -rm -f $(DESTDIR)$(kde_datadir)/ksensors/pics/thermometer.png
+#>- -rm -f $(kde_datadir)/ksensors/pics/thermometer18x18.png
+#>+ 1
+ -rm -f $(DESTDIR)$(kde_datadir)/ksensors/pics/thermometer18x18.png
+#>- -rm -f $(kde_datadir)/ksensors/pics/motherboard.png
+#>+ 1
+ -rm -f $(DESTDIR)$(kde_datadir)/ksensors/pics/motherboard.png
+#>- -rm -f $(kde_datadir)/ksensors/pics/ksensorssplash.png
+#>+ 1
+ -rm -f $(DESTDIR)$(kde_datadir)/ksensors/pics/ksensorssplash.png
+#>- -rm -f $(kde_datadir)/ksensors/pics/ksensorsdocked.png
+#>+ 1
+ -rm -f $(DESTDIR)$(kde_datadir)/ksensors/pics/ksensorsdocked.png
+#>- -rm -f $(kde_datadir)/ksensors/pics/ksensorsbackground.png
+#>+ 1
+ -rm -f $(DESTDIR)$(kde_datadir)/ksensors/pics/ksensorsbackground.png
+#>- -rm -f $(kde_datadir)/ksensors/pics/harddisk.png
+#>+ 1
+ -rm -f $(DESTDIR)$(kde_datadir)/ksensors/pics/harddisk.png
+#>- -rm -f $(kde_datadir)/ksensors/pics/earth.png
+#>+ 1
+ -rm -f $(DESTDIR)$(kde_datadir)/ksensors/pics/earth.png
+#>- -rm -f $(kde_datadir)/ksensors/pics/cooler.png
+#>+ 1
+ -rm -f $(DESTDIR)$(kde_datadir)/ksensors/pics/cooler.png
+#>- -rm -f $(kde_datadir)/ksensors/pics/cooler18x18.png
+#>+ 1
+ -rm -f $(DESTDIR)$(kde_datadir)/ksensors/pics/cooler18x18.png
+#>- -rm -f $(kde_datadir)/ksensors/pics/computers.png
+#>+ 1
+ -rm -f $(DESTDIR)$(kde_datadir)/ksensors/pics/computers.png
+#>- -rm -f $(kde_datadir)/ksensors/pics/battery.png
+#>+ 1
+ -rm -f $(DESTDIR)$(kde_datadir)/ksensors/pics/battery.png
+#>- -rm -f $(kde_datadir)/ksensors/pics/battery18x18.png
+#>+ 1
+ -rm -f $(DESTDIR)$(kde_datadir)/ksensors/pics/battery18x18.png
+#>- -rm -f $(kde_icondir)/locolor/32x32/apps/ksensors.png
+#>+ 1
+ -rm -f $(DESTDIR)$(kde_icondir)/locolor/32x32/apps/ksensors.png
+#>- -rm -f $(kde_icondir)/locolor/16x16/apps/ksensors.png
+#>+ 1
+ -rm -f $(DESTDIR)$(kde_icondir)/locolor/16x16/apps/ksensors.png
+#>- -rm -f $(kde_icondir)/hicolor/32x32/apps/ksensors.png
+#>+ 1
+ -rm -f $(DESTDIR)$(kde_icondir)/hicolor/32x32/apps/ksensors.png
+#>- -rm -f $(kde_icondir)/hicolor/16x16/apps/ksensors.png
+#>+ 1
+ -rm -f $(DESTDIR)$(kde_icondir)/hicolor/16x16/apps/ksensors.png
+
+####### kdevelop will overwrite this part!!! (end)############
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
+
+
+#>+ 2
+docs-am:
+
+#>+ 6
+force-reedit:
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/pics/Makefile
+ cd $(top_srcdir) && perl admin/am_edit ksensors-0.7.3/src/pics/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-am
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXX) $(DEFS) -I. -I$(srcdir) -I$(top_builddir) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(KDE_CXXFLAGS) --dump-class-hierarchy $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 3
+final:
+ $(MAKE) all-am
+
+#>+ 3
+final-install:
+ $(MAKE) install-am
+
+#>+ 3
+no-final:
+ $(MAKE) all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) install-am
+
+#>+ 3
+cvs-clean:
+ $(MAKE) admindir=$(top_srcdir)/admin -f $(top_srcdir)/admin/Makefile.common cvs-clean
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/src/pics/battery.png b/src/pics/battery.png
new file mode 100644
index 0000000..b1c7fb1
--- /dev/null
+++ b/src/pics/battery.png
Binary files differ
diff --git a/src/pics/battery18x18.png b/src/pics/battery18x18.png
new file mode 100644
index 0000000..5042f64
--- /dev/null
+++ b/src/pics/battery18x18.png
Binary files differ
diff --git a/src/pics/computers.png b/src/pics/computers.png
new file mode 100644
index 0000000..cfa476a
--- /dev/null
+++ b/src/pics/computers.png
Binary files differ
diff --git a/src/pics/cooler.png b/src/pics/cooler.png
new file mode 100644
index 0000000..a7e900d
--- /dev/null
+++ b/src/pics/cooler.png
Binary files differ
diff --git a/src/pics/cooler18x18.png b/src/pics/cooler18x18.png
new file mode 100644
index 0000000..e68404c
--- /dev/null
+++ b/src/pics/cooler18x18.png
Binary files differ
diff --git a/src/pics/earth.png b/src/pics/earth.png
new file mode 100644
index 0000000..fc1dc36
--- /dev/null
+++ b/src/pics/earth.png
Binary files differ
diff --git a/src/pics/harddisk.png b/src/pics/harddisk.png
new file mode 100644
index 0000000..92ef478
--- /dev/null
+++ b/src/pics/harddisk.png
Binary files differ
diff --git a/src/pics/hi16-app-ksensors.png b/src/pics/hi16-app-ksensors.png
new file mode 100644
index 0000000..8b1574e
--- /dev/null
+++ b/src/pics/hi16-app-ksensors.png
Binary files differ
diff --git a/src/pics/hi32-app-ksensors.png b/src/pics/hi32-app-ksensors.png
new file mode 100644
index 0000000..f709b68
--- /dev/null
+++ b/src/pics/hi32-app-ksensors.png
Binary files differ
diff --git a/src/pics/ksensorsbackground.png b/src/pics/ksensorsbackground.png
new file mode 100644
index 0000000..21fb9ef
--- /dev/null
+++ b/src/pics/ksensorsbackground.png
Binary files differ
diff --git a/src/pics/ksensorsdocked.png b/src/pics/ksensorsdocked.png
new file mode 100644
index 0000000..510f604
--- /dev/null
+++ b/src/pics/ksensorsdocked.png
Binary files differ
diff --git a/src/pics/ksensorssplash.png b/src/pics/ksensorssplash.png
new file mode 100644
index 0000000..108bf0d
--- /dev/null
+++ b/src/pics/ksensorssplash.png
Binary files differ
diff --git a/src/pics/lo16-app-ksensors.png b/src/pics/lo16-app-ksensors.png
new file mode 100644
index 0000000..9eb33b0
--- /dev/null
+++ b/src/pics/lo16-app-ksensors.png
Binary files differ
diff --git a/src/pics/lo32-app-ksensors.png b/src/pics/lo32-app-ksensors.png
new file mode 100644
index 0000000..77866ae
--- /dev/null
+++ b/src/pics/lo32-app-ksensors.png
Binary files differ
diff --git a/src/pics/motherboard.png b/src/pics/motherboard.png
new file mode 100644
index 0000000..7f33fce
--- /dev/null
+++ b/src/pics/motherboard.png
Binary files differ
diff --git a/src/pics/thermometer.png b/src/pics/thermometer.png
new file mode 100644
index 0000000..3b83b3d
--- /dev/null
+++ b/src/pics/thermometer.png
Binary files differ
diff --git a/src/pics/thermometer18x18.png b/src/pics/thermometer18x18.png
new file mode 100644
index 0000000..3aeca31
--- /dev/null
+++ b/src/pics/thermometer18x18.png
Binary files differ
diff --git a/src/processexec.cpp b/src/processexec.cpp
new file mode 100644
index 0000000..a6137c0
--- /dev/null
+++ b/src/processexec.cpp
@@ -0,0 +1,58 @@
+/***************************************************************************
+ processexec.cpp - description
+ -------------------
+ begin : sb abr 27 2002
+ copyright : (C) 2002 by asdf
+ email : dsf
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#include <string.h>
+#include "processexec.h"
+
+ProcessExec::ProcessExec(): KProcess()
+{
+ clearData();
+ connect( this, SIGNAL(receivedStdout(KProcess *, char *, int)),this, SLOT(slotReceivedStdout(KProcess *, char *, int)) );
+ connect( this, SIGNAL(receivedStderr(KProcess *, char *, int)),this, SLOT(slotReceivedStderr(KProcess *, char *, int)) );
+}
+
+ProcessExec::~ProcessExec(){
+}
+
+bool ProcessExec::run()
+{
+ clearData();
+ return start( NotifyOnExit, Communication(Stdout | Stderr )); // | NoRead));
+}
+
+bool ProcessExec::runAndWait()
+{
+ clearData();
+ return start(Block,Communication(Stdout|Stderr));
+}
+
+void ProcessExec::slotReceivedStdout(KProcess *proc, char *buf, int len)
+{
+ if(bufLen+len>=bufMax) len= bufMax-bufLen;
+ if(len) {
+ memcpy(buffer+bufLen,buf,len);
+ bufLen+= len;
+ buffer[bufLen]=0;
+ }
+}
+
+void ProcessExec::slotReceivedStderr(KProcess *proc, char *buf, int len)
+{
+ fErrors= true;
+ slotReceivedStdout(proc,buf,len);
+}
+
diff --git a/src/processexec.h b/src/processexec.h
new file mode 100644
index 0000000..81c694e
--- /dev/null
+++ b/src/processexec.h
@@ -0,0 +1,55 @@
+/***************************************************************************
+ processexec.h - description
+ -------------------
+ begin : sb abr 27 2002
+ copyright : (C) 2002 by asdf
+ email : dsf
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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 PROCESSEXEC_H
+#define PROCESSEXEC_H
+
+#include <unistd.h>
+#include <kprocess.h>
+
+/**
+ *@author asdf
+ */
+
+class ProcessExec : public KProcess {
+Q_OBJECT
+public:
+ ProcessExec();
+ ~ProcessExec();
+
+ bool run();
+ bool runAndWait();
+ bool outputErrors() { return fErrors; };
+
+ inline char *getStdoutData() { return buffer; };
+ inline int getStdoutDataLen() { return bufLen; }
+ inline void clearData() { bufLen= 0; buffer[0]= 0; fErrors= false; };
+
+protected slots:
+
+ void slotReceivedStdout(KProcess *proc, char *buf, int len);
+ void slotReceivedStderr(KProcess *proc, char *buf, int len);
+
+private:
+
+ static const int bufMax= 1023;
+ char buffer[bufMax+1];
+ int bufLen;
+ bool fErrors;
+};
+
+#endif
diff --git a/src/procinfo.cpp b/src/procinfo.cpp
new file mode 100644
index 0000000..a84bf82
--- /dev/null
+++ b/src/procinfo.cpp
@@ -0,0 +1,156 @@
+/***************************************************************************
+ procinfo.c - description
+ -------------------
+ begin : Wed Jan 9 2002
+ copyright : (C) 2002 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. *
+ * *
+ ***************************************************************************/
+
+#include "procinfo.h"
+
+#include <stdio.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <string.h>
+#include <sys/stat.h>
+
+
+bool existsFile(const char *file)
+{
+struct stat buf;
+
+ return (stat((const char *)file,&buf)==0);
+}
+
+
+int read_file(const char *name, char *buf, int max)
+{
+ int fd = open(name, O_RDONLY);
+ if(fd >= 0) {
+ int r = read(fd, buf, max);
+ close(fd);
+ return r;
+ }
+ return -1;
+}
+
+
+// ***** Dell i8k sensors info *****
+//
+// $ cat /proc/i8k
+// 1.0 A17 2J59L02 52 2 1 8040 6420 1 2
+//
+//The fields read from /proc/18k are:
+//
+// 1.0 A17 2J59L02 52 2 1 8040 6420 1 2
+// | | | | | | | | | |
+// | | | | | | | | | +------- 10. buttons status
+// | | | | | | | | +--------- 9. ac status
+// | | | | | | | +-------------- 8. right fan rpm
+// | | | | | | +------------------- 7. left fan rpm
+// | | | | | +--------------------- 6. right fan status
+// | | | | +----------------------- 5. left fan status
+// | | | +-------------------------- 4. CPU temperature (Celsius)
+// | | +---------------------------------- 3. serial number
+// | +-------------------------------------- 2. BIOS version
+// +------------------------------------------ 1. /proc/i8k format version
+
+int getI8KInfo(double *cpuTemp, double *leftFan, double *rightFan)
+{
+double version;
+char buf[256];
+
+ if(read_file("/proc/i8k", buf, sizeof(buf)) <= 0) return -1;
+ if(sscanf(buf, "%lf %*s %*s %lf %*d %*d %lf %lf", &version, cpuTemp,leftFan,rightFan)!=4) return -2;
+ if(version!=1.0) return -3;
+ return 0;
+}
+
+
+// ************* Acpi temperature ************
+// cat /proc/acpi/thermal_zone/THRM/temperature
+// temperature: 61 C
+
+int getAcpiTemperature(double *cpuTemp)
+{
+char buf[128];
+
+ if(read_file("/proc/acpi/thermal_zone/THRM/temperature", buf, sizeof(buf))<= 0) return -1;
+
+ sscanf(buf, "temperature: %lf C", cpuTemp);
+
+ return 0;
+}
+
+
+int getMemInfo(int *RamTotal,int *RamUsed,int *SwapTotal, int *SwapUsed)
+{
+char buf[4096];
+int mem_free,mem_buffers,mem_cached;
+char *p;
+
+ // read memory info
+ if(read_file("/proc/meminfo", buf, sizeof(buf)) <= 0) return -1;
+
+ p = strstr(buf, "MemTotal:");
+ if(p) sscanf(p, "MemTotal: %d kB", RamTotal);
+ else *RamTotal= 0;
+
+ p = strstr(buf, "MemFree:");
+ if(p) sscanf(p, "MemFree: %d kB", &mem_free);
+ else mem_free= 0;
+
+ p = strstr(buf, "Buffers:");
+ if(p) sscanf(p, "Buffers: %d kB", &mem_buffers);
+ else mem_buffers= 0;
+
+ p = strstr(buf, "Cached:");
+ if(p) sscanf(p, "Cached: %d kB", &mem_cached);
+ else mem_cached= 0;
+
+ p = strstr(buf, "SwapTotal:");
+ if(p) sscanf(p, "SwapTotal: %d kB", SwapTotal);
+ else *SwapTotal= 0;
+
+ p = strstr(buf, "SwapFree:");
+ if(p) sscanf(p, "SwapFree: %d kB", SwapUsed);
+ else *SwapUsed= 0;
+
+ *SwapUsed= *SwapTotal - *SwapUsed;
+ *RamUsed = *RamTotal - mem_free - mem_buffers - mem_cached;
+
+ return 0;
+}
+
+
+bool getCpuTime(int *user,int *nice,int *system,int *idle)
+{
+char buf[512];
+
+ if(read_file("/proc/stat", buf, sizeof(buf)) <= 0) return false;
+
+ sscanf(buf, "cpu %u %u %u %u",user,nice,system,idle);
+
+ return true;
+}
+
+
+int getUpTime()
+{
+char buf[256];
+
+ if(read_file("/proc/uptime", buf, sizeof(buf)) < 0) return 0;
+ float uptime;
+ sscanf(buf, "%f", &uptime);
+ return (int)uptime;
+}
+
diff --git a/src/procinfo.h b/src/procinfo.h
new file mode 100644
index 0000000..713f644
--- /dev/null
+++ b/src/procinfo.h
@@ -0,0 +1,23 @@
+/***************************************************************************
+ procinfo.h - description
+ -------------------
+ begin : Wed Jan 9 2002
+ copyright : (C) 2002 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. *
+ * *
+ ***************************************************************************/
+
+
+int getMemInfo(int *RamTotal,int *RamUsed,int *SwapTotal, int *SwapUsed);
+bool getCpuTime(int *user,int *nice,int *system,int *idle);
+int getUpTime();
+int getI8KInfo(double *cpuTemp, double *leftFan, double *rightFan);
+int getAcpiTemperature(double *cpuTemp);
diff --git a/src/qbarmeter.cpp b/src/qbarmeter.cpp
new file mode 100644
index 0000000..bb0d400
--- /dev/null
+++ b/src/qbarmeter.cpp
@@ -0,0 +1,179 @@
+/***************************************************************************
+ qbarmeter.cpp - description
+ -------------------
+ begin : Mon Dec 3 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. *
+ * *
+ ***************************************************************************/
+
+#include "qbarmeter.h"
+
+QBarMeter::QBarMeter(QWidget *parent, const char *name): QWidget(parent,name)
+{
+ count = 1;
+ val[0] = 0;
+ valMax = 100;
+ color[0] = red;
+ maxColor = green;
+ useValMax= true;
+ dir = dirUp;
+ steps = 10;
+
+}
+
+QBarMeter::~QBarMeter()
+{
+}
+
+void QBarMeter::setDirection(Direction newDir)
+{
+ dir= newDir;
+ update();
+}
+
+void QBarMeter::useValueMax(bool flag)
+{
+ if(useValMax!=flag) {
+ useValMax= flag;
+ update();
+ }
+}
+
+void QBarMeter::setValueMax(double newVal)
+{
+ if(valMax!=newVal) {
+ valMax= newVal;
+ update();
+ }
+}
+
+void QBarMeter::setValueMaxColor(const QColor &newColor)
+{
+ maxColor= newColor;
+ update();
+}
+
+
+void QBarMeter::setValue(double newVal)
+{
+ if(val[0]!=newVal) {
+ val[0]= newVal;
+ update();
+ }
+}
+
+void QBarMeter::setValueColor(const QColor &newColor)
+{
+ color[0]= newColor;
+ update();
+}
+
+void QBarMeter::setValue(int index, double newVal)
+{
+ if(val[index]!=newVal) {
+ val[index]= newVal;
+ update();
+ }
+}
+
+void QBarMeter::setValueColor(int index, const QColor &newColor)
+{
+ if(color[index]!=newColor) {
+ color[index]= newColor;
+ update();
+ }
+
+}
+
+void QBarMeter::setValueCount(int newCount)
+{
+ if(count!=newCount) {
+ count= newCount;
+ update();
+ }
+}
+
+void QBarMeter::setSteps(int newSteps)
+{
+ steps= newSteps;
+ update();
+}
+
+void QBarMeter::paintEvent( QPaintEvent *)
+{
+ int x,y,lx,ly,sx,sy;
+ switch(dir) {
+ case dirUp : sx= 0;
+ sy= - height() / steps;
+ lx= width();
+ ly= - (sy * 3) / 4;
+ x = 0;
+ y = height() - ly;
+ break;
+ case dirDown : sx= 0;
+ sy= height() / steps;
+ lx= width();
+ ly= (sy * 3) / 4;
+ x = 0;
+ y = 0;
+ break;
+ case dirLeft : sx= - width() / steps;
+ sy= 0;
+ lx= - (sx * 3) / 4;
+ ly= height();
+ x = width() - lx;
+ y = 0;
+ break;
+ case dirRight: sx= width() / steps;
+ sy= 0;
+ lx= (sx * 3) / 4;
+ ly= height();
+ x = 0;
+ y = 0;
+ break;
+ default: return;
+ }
+
+ if(!useValMax) {
+ maxColor= color[count-1];
+ valMax= 0;
+ for(int i=0; i<count; i++)
+ valMax+= val[i];
+ }
+
+ int csteps= steps;
+ QPainter p(this);
+
+ for(int i= 0; i<count; i++) {
+ int v= (int) ( ((double)steps * val[i]) / valMax +0.5);
+ if(v==0 && csteps>0 && val[i]>0) v++;
+ csteps-= v;
+ while(v-->0) {
+ p.fillRect(x,y,lx,ly,color[i]);
+ x+= sx;
+ y+= sy;
+ }
+ }
+
+ if(csteps>0) {
+ do {
+ p.fillRect(x,y,lx,ly,maxColor);
+ x+= sx;
+ y+= sy;
+ } while(--csteps>0);
+ }
+
+}
+
+
+
+
diff --git a/src/qbarmeter.h b/src/qbarmeter.h
new file mode 100644
index 0000000..2dd13f3
--- /dev/null
+++ b/src/qbarmeter.h
@@ -0,0 +1,63 @@
+/***************************************************************************
+ qbarmeter.h - description
+ -------------------
+ begin : Mon Dec 3 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 QBARMETER_H
+#define QBARMETER_H
+
+#include <qpainter.h>
+#include <qwidget.h>
+#include <qcolor.h>
+
+/**
+ *@author Miguel Novas
+ */
+
+class QBarMeter: public QWidget {
+Q_OBJECT
+public:
+
+ enum Direction { dirLeft, dirRight ,dirUp, dirDown };
+
+ QBarMeter(QWidget *parent=0, const char *name=0);
+ ~QBarMeter();
+
+ void setDirection(Direction dir);
+ void setValueMax(double newVal);
+ void setValue(double newVal);
+ void setValueColor(const QColor &newColor);
+ void setValueMaxColor(const QColor &newColor);
+ void setSteps(int newSteps);
+
+ void setValue(int index, double newVal);
+ void setValueColor(int index, const QColor &newColor);
+ void setValueCount(int count);
+ void useValueMax(bool flag);
+
+protected:
+
+ double val[8];
+ QColor color[8];
+ bool useValMax;
+ double valMax;
+ QColor maxColor;
+ int count;
+ int steps;
+ Direction dir;
+ void paintEvent( QPaintEvent *);
+};
+
+#endif
diff --git a/src/qdialarc.cpp b/src/qdialarc.cpp
new file mode 100644
index 0000000..418d13b
--- /dev/null
+++ b/src/qdialarc.cpp
@@ -0,0 +1,352 @@
+/***************************************************************************
+ qdialarc.cpp - description
+ -------------------
+ begin : Wed Aug 1 2001
+ copyright : (C) 2001 by
+ email :
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+
+#include "qdialarc.h"
+
+#include <qpainter.h>
+#include <math.h>
+#include <stdlib.h>
+
+#define qdegreesToRadians(n) ((-(n))*M_PI*2/(360*16))
+
+#define valToQDegrees(n) (int)(((n)-valMin)*angleLen/(valMax-valMin)+angleStart+0.5)
+
+
+QDialArc::QDialArc(QWidget *parent, const char *name ) : QWidget(parent,name)
+{
+ val = 0;
+ valMin = 0;
+ valMax = 100;
+ valMinLimit = (valMax+valMin)/2;
+ valMaxLimit = (valMax+valMin)/2;
+ valMinLimitPercent= 0;
+ valMaxLimitPercent= 0;
+ angleStart = 0;
+ angleLen = 360*16;
+ fShowMarks = false;
+ fCalcParams = true;
+ colorMin = Qt::green;
+ colorMax = Qt::red;
+ arrowColor = foregroundColor();
+}
+
+QDialArc::~QDialArc(){
+}
+
+void QDialArc::setValue(double value)
+{
+ if(value>valMax) value= valMax;
+ else if(value<valMin) value= valMin;
+ if(val!=value) {
+ QPainter p(this);
+ p.setPen(backgroundColor());
+ drawArrow(&p,val);
+ val= value;
+ p.setPen(arrowColor);
+ drawArrow(&p,val);
+ }
+}
+
+
+void QDialArc::setValueMin(double value)
+{
+ valMin= value;
+ paramsChanged();
+}
+
+
+void QDialArc::setValueMax(double value)
+{
+ valMax= value;
+ paramsChanged();
+}
+
+
+void QDialArc::setValueRanges(double min,double max)
+{
+ valMin= min;
+ valMax= max;
+ paramsChanged();
+}
+
+
+void QDialArc::setValueLimitRanges (double min,double max)
+{
+ valMinLimit= min;
+ valMaxLimit= max;
+ update();
+}
+
+void QDialArc::setAngle(int value)
+{
+ angleStart= value*16;
+ paramsChanged();
+}
+
+void QDialArc::setAngleLen(int value)
+{
+ angleLen= value*16;
+ paramsChanged();
+}
+
+
+void QDialArc::setAngles(int angle,int len)
+{
+ angleStart= angle*16;
+ angleLen = len*16;
+ paramsChanged();
+}
+
+void QDialArc::setColorMin(const QColor &color)
+{
+ colorMin= color;
+ update();
+}
+
+void QDialArc::setColorMid(const QColor &color)
+{
+ colorMid= color;
+ update();
+}
+
+
+void QDialArc::setColorMax(const QColor &color)
+{
+ colorMax= color;
+ update();
+}
+
+void QDialArc::setColorRanges(const QColor &min,const QColor &mid,const QColor &max)
+{
+ colorMin= min;
+ colorMid= mid;
+ colorMax= max;
+ update();
+}
+
+void QDialArc::setValueMinLimit(double value, int percent)
+{
+ valMinLimit= value;
+ valMinLimitPercent= percent;
+ update();
+}
+
+void QDialArc::setValueMaxLimit(double value, int percent)
+{
+ valMaxLimit= value;
+ valMaxLimitPercent= percent;
+ update();
+}
+
+void QDialArc::setValueMinLimitPercent(int value)
+{
+ valMinLimitPercent=value;
+ update();
+}
+
+void QDialArc::setValueMaxLimitPercent(int value)
+{
+ valMaxLimitPercent=value;
+ update();
+}
+
+
+void QDialArc::setShowMarks (bool flag)
+{
+ fShowMarks= flag;
+ update();
+}
+
+void QDialArc::setArrowColor(const QColor &color)
+{
+ arrowColor= color;
+}
+
+
+//*****************************************************************
+
+void QDialArc::resizeEvent( QResizeEvent *)
+{
+ paramsChanged();
+}
+
+//*****************************************************************
+
+
+void QDialArc::drawMarks(QPainter *p,int l1,int l2)
+{
+int a;
+double r,co,se;
+
+ if(l1>l2) { a= l1; l1= l2; l2= a; } // swap(l1,l2)
+
+ a= (l1 / (360*16/32)) * (360*16/32);
+
+ while(a<l1) a+= 360*16/32;
+ while(a<=l2) {
+ r = qdegreesToRadians(a);
+ co= cos(r);
+ se= sin(r);
+ p->drawLine((int)(centerx+ co*(radius-1-radius/10)+0.5),
+ (int)(centery+ se*(radius-1-radius/10)+0.5),
+ (int)(centerx+ co*(radius-1) +0.5),
+ (int)(centery+ se*(radius-1) +0.5) );
+ a+= 360*16/32;
+ }
+}
+
+
+void QDialArc::drawArc(QPainter *p,int l1,int l2,const QColor &color)
+{
+ p->setPen(color);
+ p->drawArc(centerx-radius,centery-radius,radius*2,radius*2, l1, l2-l1+1);
+ if (fShowMarks) drawMarks(p,l1,l2);
+}
+
+
+void QDialArc::drawArrow(QPainter *p, double value)
+{
+double r= qdegreesToRadians(valToQDegrees(value));
+
+ p->drawLine(centerx,
+ centery,
+ (int)(centerx+ cos(r)*(radius-1-radius/4) +0.5),
+ (int)(centery+ sin(r)*(radius-1-radius/4) +0.5)
+ );
+}
+
+void QDialArc::paintEvent ( QPaintEvent *)
+{
+int l0,l1,l2,l3,l4,l5;
+QPainter p(this);
+
+ if(fCalcParams) calcParams();
+
+ l0= angleStart;
+ l1= valToQDegrees(valMinLimit);
+ l2= valToQDegrees(valMinLimit+(valMaxLimit-valMinLimit)*valMinLimitPercent/100);
+ l3= valToQDegrees(valMaxLimit-(valMaxLimit-valMinLimit)*valMaxLimitPercent/100);
+ l4= valToQDegrees(valMaxLimit);
+ l5= angleStart+angleLen;
+
+ drawArc(&p,l0,l1,colorMin);
+
+ drawArc(&p,l1,l2, QColor( (colorMin.red() +colorMid.red() )/2,
+ (colorMin.green()+colorMid.green())/2,
+ (colorMin.blue() +colorMid.blue() )/2 ) );
+
+ drawArc(&p,l2,l3,colorMid);
+
+ drawArc(&p,l3,l4, QColor( (colorMax.red() +colorMid.red() )/2,
+ (colorMax.green()+colorMid.green())/2,
+ (colorMax.blue() +colorMid.blue() )/2 ) );
+ drawArc(&p,l4,l5,colorMax);
+
+
+ p.setPen(arrowColor);
+ drawArrow(&p,val);
+}
+
+
+//*****************************************************************
+
+struct POINT2D { double x,y; };
+
+static void calcAngleMin(double a, POINT2D &m)
+{
+double x= cos(a);
+double y= sin(a);
+
+ if(x<m.x) m.x= x;
+ if(y<m.y) m.y= y;
+}
+
+static void calcAngleMax(double a, POINT2D &m)
+{
+double x= cos(a);
+double y= sin(a);
+
+ if(x>m.x) m.x= x;
+ if(y>m.y) m.y= y;
+}
+
+
+static bool angleIsInRange(int a,int a1,int len)
+{
+int a2=a1+len;
+
+ if(len>0) {
+ if(a2>360*16) return a>=a1 || a<=(a2-360*16);
+ else return a>=a1 && a<=a2;
+ } else {
+ if(a2<0) return a<=a1 || a>=(360*16+a2);
+ else return a>=a2 && a<=a1;
+ }
+}
+
+
+void QDialArc::calcParams()
+{
+double m,w,h;
+POINT2D p1,p2,d,a;
+
+ p1.x= p1.y= p2.x= p2.y= 0;
+ //
+ m= qdegreesToRadians(angleStart);
+ calcAngleMin( m, p1);
+ calcAngleMax( m, p2);
+ m= qdegreesToRadians(angleStart+angleLen);
+ calcAngleMin( m, p1);
+ calcAngleMax( m, p2);
+ //
+ if(angleIsInRange(0 ,angleStart,angleLen)) calcAngleMax( 0 , p2);
+ if(angleIsInRange(90*16 ,angleStart,angleLen)) calcAngleMin(-M_PI/2 , p1);
+ if(angleIsInRange(180*16,angleStart,angleLen)) calcAngleMin(-M_PI , p1);
+ if(angleIsInRange(270*16,angleStart,angleLen)) calcAngleMax(-M_PI*3/2, p2);
+ //
+ d.x= p2.x - p1.x;
+ d.y= p2.y - p1.y;
+ //
+ w= (double)width() -1;
+ h= (double)height()-1;
+ //
+ if( d.x/d.y > w/h ) {
+ m = w / d.x;
+ a.x= 0;
+ a.y= (h - d.y * m)/2;
+ } else {
+ m = h / d.y;
+ a.x= (w - d.x * m)/2;
+ a.y= 0;
+ }
+ radius = (int) (m);
+ centerx= (int) ((-p1.x) * m + a.x);
+ centery= (int) ((-p1.y) * m + a.y);
+ //
+ fCalcParams= false;
+}
+
+
+
+void QDialArc::paramsChanged()
+{
+ fCalcParams= true;
+ update();
+}
+
+//*****************************************************************
diff --git a/src/qdialarc.h b/src/qdialarc.h
new file mode 100644
index 0000000..a5db935
--- /dev/null
+++ b/src/qdialarc.h
@@ -0,0 +1,89 @@
+/***************************************************************************
+ qdialarc.h - description
+ -------------------
+ begin : Wed Aug 1 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 QDIALARC_H
+#define QDIALARC_H
+
+#include <qwidget.h>
+
+/**
+ *@author Miguel Novas
+ */
+
+class QDialArc : public QWidget {
+ Q_OBJECT
+public:
+ QDialArc(QWidget *parent=0, const char *name=0);
+ ~QDialArc();
+
+ void setValue (double value);
+ void setValueMin (double value);
+ void setValueMax (double value);
+ void setValueRanges (double min,double max);
+ void setValueLimitRanges (double min,double max);
+ void setValueMinLimit (double value, int percent= 15);
+ void setValueMaxLimit (double value, int percent= 15);
+ void setValueMaxLimitPercent(int value);
+ void setValueMinLimitPercent(int value);
+
+ void setAngle (int value);
+ void setAngleLen (int value);
+ void setAngles (int angle,int len);
+
+ void setShowMarks (bool flag);
+
+ void setColorMax(const QColor &color);
+ void setColorMid(const QColor &color);
+ void setColorMin(const QColor &color);
+ void setColorRanges(const QColor &min,const QColor &mid, const QColor &max);
+
+ void setArrowColor(const QColor &color);
+
+ inline double getValue() { return val; }
+
+protected:
+
+ void resizeEvent( QResizeEvent *);
+ void paintEvent ( QPaintEvent *);
+
+private:
+
+ double val;
+ double valMin;
+ double valMax;
+ double valMaxLimit,valMinLimit;
+ int valMaxLimitPercent,valMinLimitPercent;
+ int angleStart,angleLen;
+ //
+ int radius;
+ int centerx,centery;
+ bool fCalcParams;
+
+ QColor arrowColor;
+ QColor colorMin;
+ QColor colorMid;
+ QColor colorMax;
+ bool fShowMarks;
+
+ void calcParams();
+ void paramsChanged();
+ void drawMarks(QPainter *p,int l1,int l2);
+ void drawArc(QPainter *p,int l1,int l2,const QColor &color);
+ void drawArrow(QPainter *p, double value);
+};
+
+#endif
diff --git a/src/qlcddraw.h b/src/qlcddraw.h
new file mode 100644
index 0000000..c830066
--- /dev/null
+++ b/src/qlcddraw.h
@@ -0,0 +1,66 @@
+/***************************************************************************
+ lcddraw.h - description
+ -------------------
+ begin : Tue Nov 27 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 QLCDDRAW_H
+#define QLCDDRAW_H
+
+#include <qpainter.h>
+#include <qcolor.h>
+
+
+class QLcd {
+
+public:
+
+ enum Options {
+ alignLeft = 0x0000,
+ alignCenter = 0x0001,
+ alignRight = 0x0002,
+ alignJustify= 0x0003,
+
+ drawShadow = 0x0008,
+
+ drawNumber = 0x0010,
+
+ alignMask = 0x0007
+ };
+
+
+ static int draw(QPainter *painter,
+ int x, int y,
+ int w, int h,
+ const char *str,
+ int options=0,
+ const QColor *color=0,
+ const QColor *colorShadow=0);
+
+ static void draw(QPainter *p,int x,int y,int w,int h, char c);
+
+ static inline int charWidth(int height) { return (height * 3) / 4; };
+ static inline int strWidth(const char *str,int height) { return strlen(str)*charWidth(height); };
+
+private:
+
+ static const uint asciiSegments[128];
+ static const int segmentsCoords[32][8];
+
+ static void drawSegment(QPainter *p,const int *c, int x, int y, int w, int h);
+
+};
+
+#endif
diff --git a/src/qlcdraw.cpp b/src/qlcdraw.cpp
new file mode 100644
index 0000000..26c68d4
--- /dev/null
+++ b/src/qlcdraw.cpp
@@ -0,0 +1,275 @@
+/***************************************************************************
+ lcddraw.cpp - description
+ -------------------
+ begin : Tue Nov 27 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. *
+ * *
+ ***************************************************************************/
+
+#include "qlcddraw.h"
+
+
+const uint QLcd::asciiSegments[128]=
+ {
+ 0x00000000, // 0
+ 0x00000000, // 1 // From 1-31 maybe for future use (to draw symbols)
+ 0x00000000, // 2
+ 0x00000000, // 3
+ 0x00000000, // 4
+ 0x00000000, // 5
+ 0x00000000, // 6
+ 0x00000000, // 7
+ 0x00000000, // 8
+ 0x00000000, // 9
+ 0x00000000, // 10
+ 0x00000000, // 11
+ 0x00000000, // 12
+ 0x00000000, // 13
+ 0x00000000, // 14
+ 0x00000000, // 15
+ 0x00000000, // 16
+ 0x00000000, // 17
+ 0x00000000, // 18
+ 0x00000000, // 19
+ 0x00000000, // 20
+ 0x00000000, // 21
+ 0x00000000, // 22
+ 0x00000000, // 23
+ 0x00000000, // 24
+ 0x00000000, // 25
+ 0x00000000, // 26
+ 0x00000000, // 27
+ 0x00000000, // 28
+ 0x00000000, // 29
+ 0x00000000, // 30
+ 0x00000000, // 31
+ 0x00000000, // 32
+ 0x21C00000, // 33 !
+ 0x00400800, // 34 "
+ 0x01BC3618, // 35 #
+ 0x03C03CF3, // 36 $
+ 0x18028000, // 37 %
+ 0x00440801, // 38 &
+ 0x00400000, // 39 '
+ 0x03C00042, // 40 (
+ 0x03C00081, // 41 )
+ 0x03C3C000, // 42 *
+ 0x01803000, // 43 +
+ 0x00010000, // 44 ,
+ 0x00003000, // 45 -
+ 0x20000000, // 46 .
+ 0x00028000, // 47 /
+ 0x00000FFF, // 48 0
+ 0x0000003C, // 49 1
+ 0x000033CF, // 50 2
+ 0x000030FF, // 51 3
+ 0x00003C3C, // 52 4
+ 0x00003CF3, // 53 5
+ 0x00003FF3, // 54 6
+ 0x0000003F, // 55 7
+ 0x00003FFF, // 56 8
+ 0x00003CFF, // 57 9
+ 0x18000000, // 58 :
+ 0x18000000, // 59 ;
+ 0x00028000, // 60 <
+ 0x003C0000, // 61 =
+ 0x00024000, // 62 >
+ 0x2100200F, // 63 ?
+ 0x00882FCF, // 64 @
+ 0x00003F3F, // 65 A
+ 0x00003FFF, // 66 B
+ 0x00000FC3, // 67 C
+ 0x00000FFF, // 68 D
+ 0x00003FC3, // 69 E
+ 0x00001F03, // 70 F
+ 0x00002FF3, // 71 G
+ 0x00003F3C, // 72 H
+ 0x03C00000, // 73 I
+ 0x000001FC, // 74 J
+ 0x40000F00, // 75 K Especial segment bit 30 to draw <
+ 0x00000FC0, // 76 L
+ 0x0000CF3C, // 77 M
+ 0x00014F3C, // 78 N
+ 0x00000FFF, // 79 O
+ 0x00003F0F, // 80 P
+ 0x00010FFF, // 81 Q
+ 0x00013F0F, // 82 R
+ 0x00003CF3, // 83 S
+ 0x03C00003, // 84 T
+ 0x00000FFC, // 85 U
+ 0x80000000, // 86 V Especial segment bit 31 to draw this letter
+ 0x00030F3C, // 87 W
+ 0x0003C000, // 88 X
+ 0x0300C000, // 89 Y
+ 0x000280C3, // 90 Z
+ 0x03C00042, // 91 [
+ 0x00014000, // 92
+ 0x03C00081, // 93 ]
+ 0x00003C0F, // 94 ^
+ 0x000000C0, // 95 _
+ 0x00004000, // 96 `
+ 0x00003F3F, // 97 A
+ 0x00003FFF, // 98 B
+ 0x00000FC3, // 99 C
+ 0x00000FFF, //100 D
+ 0x00003FC3, //101 E
+ 0x00001F03, //102 F
+ 0x00002FF3, //103 G
+ 0x00003F3C, //104 H
+ 0x03C00000, //105 I
+ 0x000001FC, //106 J
+ 0x40000F00, //107 K Especial segment bit 30 to draw <
+ 0x00000FC0, //108 L
+ 0x0000CF3C, //109 M
+ 0x00014F3C, //110 N
+ 0x00000FFF, //111 O
+ 0x00003F0F, //112 P
+ 0x00010FFF, //113 Q
+ 0x00013F0F, //114 R
+ 0x00003CF3, //115 S
+ 0x03C00003, //116 T
+ 0x00000FFC, //117 U
+ 0x80000000, //118 V Especial segment bit 31 to draw this letter
+ 0x00030F3C, //119 W
+ 0x0003C000, //120 X
+ 0x0300C000, //121 Y
+ 0x000280C3, //122 Z
+ 0x03C00042, //123 {
+ 0x03C00000, //124 |
+ 0x03C00081, //125 }
+ 0x00000003, //126 ~
+ 0x003C0518 //127
+ };
+
+
+const int QLcd::segmentsCoords[32][8]=
+ {
+ { 0,0, 1,0, -1 }, // 00
+ { 1,0, 2,0, -1 },
+ { 2,0, 2,1, -1 },
+ { 2,1, 2,2, -1 },
+ { 2,2, 2,3, -1 },
+ { 2,3, 2,4, -1 },
+ { 2,4, 1,4, -1 },
+ { 1,4, 0,4, -1 },
+ { 0,4, 0,3, -1 },
+ { 0,3, 0,2, -1 },
+ { 0,2, 0,1, -1 },
+ { 0,1, 0,0, -1 },
+ { 0,2, 1,2, -1 },
+ { 1,2, 2,2, -1 },
+ { 0,0, 1,2, -1 },
+ { 2,0, 1,2, -1 },
+ { 2,4, 1,2, -1 }, // 16
+ { 0,4, 1,2, -1 },
+ { 0,1, 1,1, -1 },
+ { 1,1, 2,1, -1 },
+ { 0,3, 1,3, -1 },
+ { 1,3, 2,3, -1 },
+ { 1,0, 1,1, -1 },
+ { 1,1, 1,2, -1 },
+ { 1,2, 1,3, -1 },
+ { 1,3, 1,4, -1 },
+ { 1,0, 1,0, -1 },
+ { 1,1, 1,1, -1 },
+ { 1,3, 1,3, -1 },
+ { 2,4, 2,4, -1 },
+ { 2,0, 0,2, 2,4, -1 }, // 30 -> <
+ { 0,0, 1,4, 2,0, -1 } // 31 -> V
+ };
+
+
+
+void QLcd::drawSegment(QPainter *p,const int *c, int x, int y, int w, int h)
+{
+ h--;
+ p->moveTo( x+(c[0]*w)/2 , y+(c[1]*h)/4 );
+ c+= 2;
+ do {
+ p->lineTo( x+(c[0]*w)/2 , y+(c[1]*h)/4 );
+ c+= 2;
+ } while(*c>=0);
+}
+
+
+void QLcd::draw(QPainter *p,int x,int y,int w,int h, char c)
+{
+uint mask= asciiSegments[(uint)c&0x007F];
+
+ if (mask) {
+ int i= 0;
+ do {
+ if(mask&1) drawSegment(p, segmentsCoords[i & 0x001F], x,y,w,h);
+ mask>>= 1;
+ i++;
+ } while(mask);
+ }
+}
+
+
+
+int QLcd::draw(QPainter *painter,int x, int y, int w, int h,const char *str, int options, const QColor *color, const QColor *colorShadow)
+{
+ int len= strlen(str)<<1;
+
+ bool point= false;
+ if(options & drawNumber)
+ for(const char *ptr=str; *ptr!=0; ptr++)
+ if(*ptr=='.') { point= true; len--; break; }
+
+ int cww= charWidth(h);
+ int tww= cww*len;
+
+ if((options & alignMask)==alignJustify || tww>(w<<1)) {
+ cww= (w<<1)/len;
+ tww= cww*len;
+ }
+
+ len>>= 1;
+ tww>>= 1;
+
+ int sep= (cww+4)/4;
+ if(options & drawShadow) {
+ h--;
+ if(sep<=2) sep= 3;
+ }
+
+ int cw= cww - sep;
+
+ switch( options & alignMask ) {
+ case alignLeft : break;
+ case alignRight : x+= w - tww; break;
+ default : x+= (w - tww) / 2; break;
+ }
+
+ if(options & drawShadow) {
+ if(colorShadow) painter->setPen( *colorShadow );
+ int px = x+1;
+ int py = y+1;
+ const char *ptr= str;
+ while(*ptr) {
+ draw(painter,px,py,cw,h,*ptr++);
+ px+= (point && *ptr=='.') ? cww/2 : cww;
+ }
+ }
+
+ if(color) painter->setPen( *color );
+ while(*str) {
+ draw(painter,x,y,cw,h,*str++);
+ x+= (point && *str=='.') ? cww/2 : cww;
+ }
+
+ return x;
+}
+
+
+
diff --git a/src/qlcdstring.cpp b/src/qlcdstring.cpp
new file mode 100644
index 0000000..114c9dd
--- /dev/null
+++ b/src/qlcdstring.cpp
@@ -0,0 +1,114 @@
+/***************************************************************************
+ qlcdstring.cpp - description
+ -------------------
+ begin : Sat Jul 21 2001
+ copyright : (C) 2001 by Michael
+ 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. *
+ * *
+ ***************************************************************************/
+
+
+#include "qlcdstring.h"
+
+#include <qpalette.h>
+
+
+QLCDString::QLCDString( QWidget *parent, const char *name ): QWidget( parent, name )
+{
+ digitStr= "";
+ options= QLcd::alignCenter;
+
+ QColorGroup g= colorGroup();
+ forColor= g.foreground();
+ shaColor= g.shadow();
+}
+
+
+QLCDString::~QLCDString(){
+}
+
+void QLCDString::display( const QString &str )
+{
+ digitStr= str;
+ update();
+}
+
+
+void QLCDString::setAlign(Align newAlign)
+{
+ if( (options & QLcd::alignMask)!=newAlign ) {
+ options= (options & ~QLcd::alignMask ) | newAlign;
+ update();
+ }
+}
+
+const QColor& QLCDString::foreColor()
+{
+ return forColor;
+}
+
+const QColor& QLCDString::shadowColor()
+{
+ return shaColor;
+}
+
+
+void QLCDString::setForeColor(const QColor &fore)
+{
+ forColor= fore;
+ update();
+}
+
+void QLCDString::setShadowColor(const QColor &sha)
+{
+ shaColor= sha;
+ update();
+}
+
+
+void QLCDString::resizeEvent ( QResizeEvent *)
+{
+ update();
+}
+
+
+void QLCDString::setShadow(bool enable)
+{
+ if( (bool)(options & QLcd::drawShadow) != enable ) {
+ options^= QLcd::drawShadow;
+ update();
+ }
+}
+
+
+void QLCDString::setNumberDisplay(bool enable)
+{
+ if( (bool)(options & QLcd::drawNumber) != enable ) {
+ options^= QLcd::drawNumber;
+ update();
+ }
+}
+
+
+void QLCDString::paintEvent( QPaintEvent *e )
+{
+QPainter p(this);
+
+ QLcd::draw(&p,0,0,width(),height(),digitStr.latin1(),options,&forColor,&shaColor);
+}
+
+
+
+
+
+
+
+
diff --git a/src/qlcdstring.h b/src/qlcdstring.h
new file mode 100644
index 0000000..9db6b98
--- /dev/null
+++ b/src/qlcdstring.h
@@ -0,0 +1,76 @@
+/***************************************************************************
+ qlcdstring.h - description
+ -------------------
+ begin : Sat Jul 21 2001
+ copyright : (C) 2001 by Michael
+ 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 QLCDSTRING_H
+#define QLCDSTRING_H
+
+#include <qframe.h>
+#include <qpainter.h>
+#include <qcolor.h>
+#include <qstring.h>
+
+#include "qlcddraw.h"
+
+/**
+ *@author Miguel Novas
+ */
+
+#include <qpalette.h>
+
+class QLCDString : public QWidget {
+Q_OBJECT
+public:
+
+ enum Align {
+ alignLeft = 0x0000,
+ alignCenter = 0x0001,
+ alignRight = 0x0002,
+ alignJustify= 0x0003
+ };
+
+ QLCDString( QWidget *parent=0, const char *name=0 );
+ ~QLCDString();
+
+ void display( const QString &str );
+
+ void setShadow(bool enable);
+ bool getShadow() { return (bool)(options & QLcd::drawShadow); };
+
+ void setAlign(Align newAlign);
+
+ void setForeColor(const QColor &fore);
+ void setShadowColor(const QColor &sha);
+
+ void setNumberDisplay(bool enable);
+
+ const QColor& foreColor();
+ const QColor& shadowColor();
+
+protected:
+
+ void resizeEvent( QResizeEvent *);
+ void paintEvent ( QPaintEvent *);
+
+private:
+
+ QString digitStr;
+ int options;
+
+ QColor forColor,shaColor;
+};
+
+#endif
diff --git a/src/rampanel.cpp b/src/rampanel.cpp
new file mode 100644
index 0000000..b927ffb
--- /dev/null
+++ b/src/rampanel.cpp
@@ -0,0 +1,106 @@
+/***************************************************************************
+ rampanel.cpp - description
+ -------------------
+ begin : Fri Jan 11 2002
+ copyright : (C) 2002 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. *
+ * *
+ ***************************************************************************/
+
+#include "rampanel.h"
+
+#include "procinfo.h"
+
+RamPanel::RamPanel(QWidget *parent, const char *name, RamType type): Panel(parent,name)
+{
+ ramType= type;
+ memTotal= -1;
+ memUsed = -1;
+
+ arc = new QDialArc(this);
+ arc->installEventFilter(this);
+ arc->setAngles(180,-180);
+ arc->setGeometry( 6 , 64/4+9, 64-10, 64/2-8);
+ arc->setColorRanges(red,red,QColor(0,200,150)); // QColor(0,200,0));
+
+ lcd1= new QLCDString(this);
+ lcd1->setGeometry(6, 8,54,11);
+ lcd1->setShadow(true);
+ lcd1->setForeColor(getColorValue());
+ lcd1->setAlign(QLCDString::alignCenter);
+ lcd1->installEventFilter(this);
+
+ lcd2= new QLCDString(this);
+ lcd2->setGeometry(4, 52,58,8);
+ lcd2->setForeColor(getColorTitle());
+ lcd2->setAlign(QLCDString::alignCenter);
+ lcd2->installEventFilter(this);
+
+ updateInfo();
+}
+
+RamPanel::~RamPanel(){
+}
+
+
+void RamPanel::updateInfo()
+{
+ int newMemTotal,newMemUsed,newSwapTotal,newSwapUsed;
+
+ getMemInfo(&newMemTotal,&newMemUsed,&newSwapTotal,&newSwapUsed);
+
+ if(ramType==memSWAP) {
+ newMemTotal= newSwapTotal;
+ newMemUsed = newSwapUsed;
+ }
+
+ newMemUsed /=1024;
+ newMemTotal/=1024;
+
+ if(memTotal!=newMemTotal) {
+ arc->setValueRanges(0,newMemTotal);
+ QString str;
+ str.sprintf ( ramType==memSWAP ? "SWP %dM" : "RAM %dM", newMemTotal);
+ lcd2->display(str);
+ memTotal= newMemTotal;
+ }
+
+ if(memUsed!=newMemUsed) {
+ QString str;
+ str.sprintf ("%dM" , newMemUsed );
+ lcd1->display(str);
+ arc->setValue(newMemUsed);
+ arc->setValueLimitRanges(newMemUsed,newMemUsed);
+ memUsed = newMemUsed;
+ }
+
+}
+
+
+void RamPanel::paletteChange(const QPalette &oldPalette)
+{
+ lcd2->setForeColor(getColorTitle());
+ lcd1->setForeColor(getColorValue());
+ arc->setArrowColor(getColorValue());
+}
+
+void RamPanel::resizeEvent ( QResizeEvent *e )
+{
+ int w= width();
+ int h= height();
+
+ int i1= (h * 2) / 5;
+ int i2= (h * 4) / 5;
+
+ lcd1->setGeometry( 3 , h/8 , w -4 , h/4-h/16);
+ arc ->setGeometry( 3 , i1 , w -6 , i2-i1-2 );
+ lcd2->setGeometry( 3 , i2+1, w -6 , h-i2-h/11);
+}
diff --git a/src/rampanel.h b/src/rampanel.h
new file mode 100644
index 0000000..62edf45
--- /dev/null
+++ b/src/rampanel.h
@@ -0,0 +1,48 @@
+/***************************************************************************
+ rampanel.h - description
+ -------------------
+ begin : Fri Jan 11 2002
+ copyright : (C) 2002 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 RAMPANEL_H
+#define RAMPANEL_H
+
+#include <panel.h>
+#include <qdialarc.h>
+#include <qlcdstring.h>
+
+/**
+ *@author Miguel Novas
+ */
+
+class RamPanel : public Panel {
+public:
+
+ enum RamType { memRAM, memSWAP };
+
+ RamPanel(QWidget *parent=0, const char *name=0, RamType type= memRAM);
+ ~RamPanel();
+
+protected:
+
+ RamType ramType;
+ int memTotal,memUsed;
+ QDialArc *arc;
+ QLCDString *lcd1,*lcd2;
+ void updateInfo();
+ void paletteChange(const QPalette &oldPalette);
+ void resizeEvent ( QResizeEvent *e );
+};
+
+#endif
diff --git a/src/sensor.cpp b/src/sensor.cpp
new file mode 100644
index 0000000..9ada02a
--- /dev/null
+++ b/src/sensor.cpp
@@ -0,0 +1,189 @@
+/***************************************************************************
+ sensor.cpp - description
+ -------------------
+ begin : mi abr 24 2002
+ copyright : (C) 2002 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. *
+ * *
+ ***************************************************************************/
+
+#include <kglobal.h>
+
+#include "sensor.h"
+#include "sensorslist.h"
+
+
+
+Sensor::Sensor(SensorsList *parent,const char *name): QObject(parent,name)
+{
+ description = "";
+ compensation = 0;
+ multiplicator= 1;
+ monitorize = false;
+}
+
+
+Sensor::~Sensor(){
+}
+
+Sensor::SensorClass Sensor::getClass()
+{
+return ((SensorsList *)parent())->getClass();
+}
+
+QString Sensor::getPrintMask(bool addSufix)
+{
+ return getSensorPrintMask(type, addSufix, ((SensorsList*)parent())->getTempScale() );
+}
+
+const char *Sensor::getSensorPrintMask(int sensorType, bool addSufix, TempScale temp)
+{
+ if(addSufix) {
+ switch(sensorType) {
+ case Sensor::lmTemp:
+ switch(temp) {
+ case dgCelsius : return "%.0lf C";
+ case dgFahrenheit: return "%.0lf F";
+ case dgKelvin : return "%.0lf K";
+ }
+ break;
+ case Sensor::lmFan: return "%.0lf rpm";
+ case Sensor::lmVoltage: return "%.2lfV";
+ }
+ }
+ return sensorType==Sensor::lmVoltage ? ".2lf" : ".0lf";
+}
+
+bool Sensor::monitorized()
+{
+ return monitorize;
+}
+
+void Sensor::setMonitorized(bool enable)
+{
+ if( monitorize!=enable ) monitorize= enable;
+}
+
+void Sensor::setValueIdeal(double value, TempScale scale)
+{
+ valIdeal= toCelsius(value, scale);
+}
+
+void Sensor::setValueMax(double value, TempScale scale)
+{
+ valMax= toCelsius(value,scale);
+}
+
+void Sensor::setValueMin(double value, TempScale scale)
+{
+ valMin= toCelsius(value,scale);
+}
+
+void Sensor::setCompensation(double value, TempScale scale)
+{
+ compensation= toCelsiusDiff(value,scale);
+}
+
+void Sensor::setMultiplicator(double value)
+{
+ multiplicator= value;
+}
+
+void Sensor::setDescription(const QString &str)
+{
+ description= str;
+}
+
+
+void Sensor::setValue(double newVal, TempScale scale, bool ajust)
+{
+ newVal= toCelsius(newVal,scale);
+ if (ajust) newVal= adjustValue(newVal);
+ if(val!=newVal) {
+ valPrevious= val;
+ val = newVal;
+ emit valueChanged( celsiusTo(val) );
+ }
+}
+
+
+
+void Sensor::writeConfig()
+{
+KConfig *ksConfig= KGlobal::config();
+
+ if(ksConfig) {
+ ksConfig->setGroup( QString(name()) );
+ ksConfig->writeEntry("description" ,description);
+ ksConfig->writeEntry("valueIdeal" ,valIdeal);
+ ksConfig->writeEntry("valueMax" ,valMax);
+ ksConfig->writeEntry("valueMin" ,valMin);
+ ksConfig->writeEntry("compensation" ,compensation);
+ ksConfig->writeEntry("multiplicator",multiplicator);
+ ksConfig->writeEntry("monitorize" ,monitorize);
+ emit configChanged();
+ }
+}
+
+void Sensor::readConfig()
+{
+KConfig *ksConfig= KGlobal::config();
+
+ if(ksConfig) {
+ ksConfig->setGroup( QString(name()) );
+ valMax = ksConfig->readDoubleNumEntry("valueMax" ,valMax);
+ valMin = ksConfig->readDoubleNumEntry("valueMin" ,valMin);
+ compensation = ksConfig->readDoubleNumEntry("compensation" ,compensation);
+ multiplicator= ksConfig->readDoubleNumEntry("multiplicator",multiplicator);
+ description = ksConfig->readEntry ("description" ,description);
+ valIdeal = ksConfig->readDoubleNumEntry("valueIdeal" ,valIdeal);
+ setMonitorized( ksConfig->readBoolEntry ("monitorize" ,monitorize) );
+ }
+}
+
+double Sensor::toCelsius(double val, TempScale scale)
+{
+ if(type!=lmTemp) return val;
+ switch( scale == dgDefault ? getTempScale(): scale ) {
+ case dgCelsius : return val;
+ case dgFahrenheit: return (5.0/9.0)*(val-32.0);
+ }
+ return val - 273.16; // Kelvin to Celsius
+}
+
+double Sensor::celsiusTo(double val, TempScale scale)
+{
+ if(type!=lmTemp) return val;
+ switch( scale==dgDefault ? getTempScale() : scale ) {
+ case dgCelsius : return val;
+ case dgFahrenheit: return (9.0/5.0)*val+32.0;
+ }
+ return val + 273.16; // Celsius to Kelvin
+}
+
+double Sensor::toCelsiusDiff(double val, TempScale scale)
+{
+ if(scale==dgDefault) scale= getTempScale();
+ if(type!=lmTemp || scale!=dgFahrenheit ) return val;
+ return val*(5.0/9.0);
+}
+
+double Sensor::celsiusToDiff(double val, TempScale scale)
+{
+ if(scale==dgDefault) scale= getTempScale();
+ if(type!=lmTemp || scale!=dgFahrenheit ) return val;
+ return val*(9.0/5.0);
+}
+
+Sensor::TempScale Sensor::getTempScale()
+{
+ return ((SensorsList *)parent())->getTempScale();
+}
diff --git a/src/sensor.h b/src/sensor.h
new file mode 100644
index 0000000..6af1c79
--- /dev/null
+++ b/src/sensor.h
@@ -0,0 +1,113 @@
+/***************************************************************************
+ sensor.h - description
+ -------------------
+ begin : mi abr 24 2002
+ copyright : (C) 2002 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 SENSOR_H
+#define SENSOR_H
+
+#include <qobject.h>
+#include <kconfig.h>
+#include <qstring.h>
+#include <qcstring.h>
+
+/**
+ *@author Miguel Novas
+ */
+
+//
+
+class SensorsList;
+
+class Sensor : public QObject {
+ Q_OBJECT
+
+ friend class SensorsList;
+
+public:
+
+ enum SensorClass { lmSensor, hdSensor };
+
+ enum TempScale { dgCelsius, dgFahrenheit, dgKelvin, dgDefault };
+
+ enum SensorType { lmTemp, lmFan, lmVoltage };
+
+ Sensor(SensorsList *parent=0, const char *name=0);
+ ~Sensor();
+
+ inline void setType(SensorType newType) { type= newType; };
+ void setValue(double newVal, TempScale scale= dgDefault, bool ajust=true);
+
+ inline SensorType getType() { return type; };
+ inline const QString &getDescription() { return description; };
+ inline double getValue() { return celsiusTo(val); };
+ inline double getValuePrevious() { return celsiusTo(valPrevious); };
+ inline double getValueIdeal() { return celsiusTo(valIdeal); };
+ inline double getValueMax() { return celsiusTo(valMax); };
+ inline double getValueMin() { return celsiusTo(valMin); };
+ inline double getCompensation() { return celsiusToDiff(compensation); };
+ inline double getMultiplicator() { return multiplicator; };
+ inline bool getAlarm() { return (val<valMin || val>valMax); };
+ inline bool getAlarmPrevious() { return (valPrevious<valMin || valPrevious>valMax); };
+ inline bool getMonitorize() { return monitorize; };
+ inline bool isAlarmValue(double value) { value= toCelsius(value); return (value<valMin || value>valMax); };
+
+ bool monitorized();
+ void setMonitorized (bool enable);
+ void setDescription (const QString &str);
+ void setValueIdeal (double value, TempScale scale= dgDefault);
+ void setValueMax (double value, TempScale scale= dgDefault);
+ void setValueMin (double value, TempScale scale= dgDefault);
+ void setCompensation (double value, TempScale scale= dgDefault);
+ void setMultiplicator(double value);
+
+ SensorClass getClass();
+ TempScale getTempScale();
+ double toCelsius(double val, TempScale scale= dgDefault);
+ double celsiusTo(double val, TempScale scale= dgDefault);
+ double toCelsiusDiff(double val, TempScale scale= dgDefault);
+ double celsiusToDiff(double val, TempScale scale= dgDefault);
+
+ QString getPrintMask(bool addSufix);
+
+public slots:
+
+ void readConfig();
+ void writeConfig();
+
+signals:
+
+ void valueChanged(double);
+ void configChanged();
+
+private:
+
+ SensorType type;
+ QString description;
+ double val;
+ double valPrevious;
+ double compensation;
+ double multiplicator;
+ double valMax;
+ double valMin;
+ double valIdeal;
+ bool monitorize;
+
+ inline double adjustValue(double value) { return value * multiplicator + compensation; };
+ const char *getSensorPrintMask(int sensorType, bool addSufix, TempScale temp);
+
+};
+
+#endif
diff --git a/src/sensorslist.cpp b/src/sensorslist.cpp
new file mode 100644
index 0000000..57e6951
--- /dev/null
+++ b/src/sensorslist.cpp
@@ -0,0 +1,132 @@
+/***************************************************************************
+ sensorslist.cpp - description
+ -------------------
+ begin : mi abr 24 2002
+ copyright : (C) 2002 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. *
+ * *
+ ***************************************************************************/
+
+#include "sensorslist.h"
+
+#include <kglobal.h>
+
+SensorsList::SensorsList(QObject *parent, const char * name)
+ : QObject(parent,name)
+{
+ tempScale= Sensor::dgCelsius;
+ updateInterval= 5000;
+}
+
+SensorsList::~SensorsList()
+{
+}
+
+
+void SensorsList::setMonitorized(bool enable)
+{
+ if(monitorized!=enable) {
+ monitorized= enable;
+ if(enable) startTimer( updateInterval );
+ else killTimers();
+ }
+}
+
+void SensorsList::setUpdateInterval(int seconds)
+{
+ seconds= seconds*1000;
+ if(updateInterval!=seconds) {
+ updateInterval= seconds;
+ if(monitorized) {
+ setMonitorized(false);
+ setMonitorized(true);
+ }
+ }
+}
+
+void SensorsList::setTempScale(Sensor::TempScale scale)
+{
+ if(tempScale!=scale) {
+ tempScale= scale;
+ QObjectList *list= getSensors();
+ if(list)
+ for(Sensor *sensor=(Sensor*)list->first(); sensor!=0; sensor= (Sensor*)list->next())
+ if(sensor->getType()==Sensor::lmTemp)
+ emit sensor->configChanged();
+ }
+}
+
+
+void SensorsList::readConfig()
+{
+ KConfig *ksConfig= KGlobal::config();
+ ksConfig->setGroup( name() );
+ setUpdateInterval(ksConfig->readNumEntry("UpdateInterval",5));
+ QString str= ksConfig->readEntry("Scale" ,"C");
+ Sensor::TempScale tempScale;
+ if(str=="F") tempScale= Sensor::dgFahrenheit;
+ else if(str=="K") tempScale= Sensor::dgKelvin;
+ else tempScale= Sensor::dgCelsius;
+ setTempScale(tempScale);
+}
+
+
+void SensorsList::writeConfig()
+{
+ KConfig *ksConfig= KGlobal::config();
+ ksConfig->setGroup( name() );
+ ksConfig->writeEntry("UpdateInterval",updateInterval/1000);
+ QString str;
+ switch(tempScale) {
+ case Sensor::dgCelsius : str='C'; break;
+ case Sensor::dgKelvin : str='K'; break;
+ case Sensor::dgFahrenheit: str='F'; break;
+ }
+ ksConfig->writeEntry("Scale" ,str);
+}
+
+
+//****************************************************************************
+// Protected methods
+//****************************************************************************
+
+void SensorsList::timerEvent( QTimerEvent * )
+{
+ updateSensors();
+}
+
+//***************
+
+void SensorsList::childEvent ( QChildEvent *e )
+{
+ if(e->inserted()) {
+ connect((Sensor *)e->child(),SIGNAL(configChanged()),this,SLOT(slotConfigChanged()));
+ connect((Sensor *)e->child(),SIGNAL(valueChanged(double)) ,this,SLOT(slotValueChanged()));
+ }
+}
+
+//****************************************************************************
+// Protected slots
+//****************************************************************************
+
+
+void SensorsList::slotConfigChanged()
+{
+ emit configChanged( sender()->name() );
+}
+
+void SensorsList::slotValueChanged()
+{
+ emit valueChanged( (Sensor *)sender() );
+}
+
+
+/*********************************************************************************/
diff --git a/src/sensorslist.h b/src/sensorslist.h
new file mode 100644
index 0000000..2742879
--- /dev/null
+++ b/src/sensorslist.h
@@ -0,0 +1,92 @@
+/***************************************************************************
+ sensorslist.h - description
+ -------------------
+ begin : mi abr 24 2002
+ copyright : (C) 2002 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 SENSORSLIST_H
+#define SENSORSLIST_H
+
+#include <qobject.h>
+#include <qobjcoll.h>
+#include <kconfig.h>
+#include <qstringlist.h>
+
+#include <sensor.h>
+
+/**
+ *@author Miguel Novas
+ */
+
+class SensorsList : public QObject {
+Q_OBJECT
+
+ friend class Sensor;
+
+public:
+
+ SensorsList(QObject *parent=0, const char *name=0);
+ ~SensorsList();
+
+ void setMonitorized(bool enable);
+
+ const QString &getDescription() { return description; };
+ QObjectList *getSensors() { return (QObjectList *)children(); };
+ Sensor *getSensor(int index) { return children() ? (Sensor *)((QObjectList *)children())->at(index) : 0; }
+ Sensor *getSensor(const char *name) { return (Sensor *)child(name); }
+ int count() { return children() ? children()->count() : 0; }
+
+ void setTempScale(Sensor::TempScale scale);
+ Sensor::TempScale getTempScale() { return tempScale; }
+
+ void setUpdateInterval(int seconds);
+ int getUpdateInterval() { return updateInterval/1000; }
+
+ Sensor::SensorClass getClass() { return clas; };
+
+public slots:
+
+ virtual void updateSensors()= 0;
+ virtual void readConfig();
+ virtual void writeConfig();
+
+signals:
+
+ void valueChanged(Sensor *);
+ void configChanged(const char *name);
+
+protected slots:
+
+ void slotConfigChanged();
+ void slotValueChanged();
+
+protected:
+
+ void setDescription(const QString &name) { description= name; };
+ void setClass(Sensor::SensorClass newClass) { clas= newClass; }
+ void childEvent ( QChildEvent *e );
+
+private:
+
+ QString description;
+ Sensor::SensorClass clas;
+ bool monitorized;
+ int updateInterval;
+ KConfig *ksConfig;
+ Sensor::TempScale tempScale;
+
+ void timerEvent( QTimerEvent * );
+};
+
+#endif
diff --git a/src/sounds/Makefile.am b/src/sounds/Makefile.am
new file mode 100644
index 0000000..3662e47
--- /dev/null
+++ b/src/sounds/Makefile.am
@@ -0,0 +1,13 @@
+####### kdevelop will overwrite this part!!! (begin)##########
+
+INCLUDES = $(all_includes)
+
+EXTRA_DIST = ksensors_alert.wav
+
+install-data-local:
+ $(mkinstalldirs) $(kde_datadir)/sounds
+ $(INSTALL_DATA) $(srcdir)/ksensors_alert.wav $(kde_datadir)/sounds/ksensors_alert.wav
+uninstall-local:
+ -rm -f $(kde_datadir)/sounds/ksensors_alert.wav
+
+####### kdevelop will overwrite this part!!! (end)############
diff --git a/src/sounds/Makefile.in b/src/sounds/Makefile.in
new file mode 100644
index 0000000..ea88b3c
--- /dev/null
+++ b/src/sounds/Makefile.in
@@ -0,0 +1,478 @@
+# Makefile.in generated by automake 1.6.3 from Makefile.am.
+# KDE tags expanded automatically by am_edit - $Revision: 1.5 $
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+####### kdevelop will overwrite this part!!! (begin)##########
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+
+EXEEXT = @EXEEXT@
+OBJEXT = @OBJEXT@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+AMTAR = @AMTAR@
+ARTSCCONFIG = @ARTSCCONFIG@
+AS = @AS@
+AUTODIRS = @AUTODIRS@
+AWK = @AWK@
+BROCKENBORING = @BROCKENBORING@
+CC = @CC@
+CONF_FILES = @CONF_FILES@
+CPP = @CPP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+DCOPIDL = @DCOPIDL@
+DCOPIDL2CPP = @DCOPIDL2CPP@
+DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN = @DOXYGEN@
+DOXYGEN_PROJECT_NAME = @DOXYGEN_PROJECT_NAME@
+DOXYGEN_PROJECT_NUMBER = @DOXYGEN_PROJECT_NUMBER@
+DPMSINC = @DPMSINC@
+DPMSLIB = @DPMSLIB@
+ECHO = @ECHO@
+FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
+GLINC = @GLINC@
+GLLIB = @GLLIB@
+GMSGFMT = @GMSGFMT@
+IDL = @IDL@
+IDL_DEPENDENCIES = @IDL_DEPENDENCIES@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JAR = @JAR@
+JAVAC = @JAVAC@
+JAVAH = @JAVAH@
+JVMLIBS = @JVMLIBS@
+KDECONFIG = @KDECONFIG@
+KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
+KDE_HAS_DOXYGEN = @KDE_HAS_DOXYGEN@
+KDE_HAVE_DOT = @KDE_HAVE_DOT@
+KDE_INCLUDES = @KDE_INCLUDES@
+KDE_LDFLAGS = @KDE_LDFLAGS@
+KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
+KDE_MT_LIBS = @KDE_MT_LIBS@
+KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
+KDE_PLUGIN = @KDE_PLUGIN@
+KDE_RPATH = @KDE_RPATH@
+KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
+KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
+KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
+KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
+KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@
+KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@
+KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBBZ2 = @LIBBZ2@
+LIBCOMPAT = @LIBCOMPAT@
+LIBCRYPT = @LIBCRYPT@
+LIBDL = @LIBDL@
+LIBGEN = @LIBGEN@
+LIBJPEG = @LIBJPEG@
+LIBMICO = @LIBMICO@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPTHREAD = @LIBPTHREAD@
+LIBPYTHON = @LIBPYTHON@
+LIBQIMGIO = @LIBQIMGIO@
+LIBRESOLV = @LIBRESOLV@
+LIBSHADOW = @LIBSHADOW@
+LIBSM = @LIBSM@
+LIBSOCKET = @LIBSOCKET@
+LIBSSL = @LIBSSL@
+LIBTIFF = @LIBTIFF@
+LIBTOOL = @LIBTOOL@
+LIBUCB = @LIBUCB@
+LIBUTIL = @LIBUTIL@
+LIBZ = @LIBZ@
+LIB_JASPER = @LIB_JASPER@
+LIB_KAB = @LIB_KAB@
+LIB_KABC = @LIB_KABC@
+LIB_KDECORE = @LIB_KDECORE@
+LIB_KDEPRINT = @LIB_KDEPRINT@
+LIB_KDEUI = @LIB_KDEUI@
+LIB_KFILE = @LIB_KFILE@
+LIB_KFM = @LIB_KFM@
+LIB_KHTML = @LIB_KHTML@
+LIB_KIMGIO = @LIB_KIMGIO@
+LIB_KIO = @LIB_KIO@
+LIB_KPARTS = @LIB_KPARTS@
+LIB_KSPELL = @LIB_KSPELL@
+LIB_KSYCOCA = @LIB_KSYCOCA@
+LIB_POLL = @LIB_POLL@
+LIB_QPE = @LIB_QPE@
+LIB_QT = @LIB_QT@
+LIB_QTOPIA = @LIB_QTOPIA@
+LIB_SMB = @LIB_SMB@
+LIB_X11 = @LIB_X11@
+LIB_XEXT = @LIB_XEXT@
+LIB_XRENDER = @LIB_XRENDER@
+LN_S = @LN_S@
+MCOPIDL = @MCOPIDL@
+MEINPROC = @MEINPROC@
+MICO_INCLUDES = @MICO_INCLUDES@
+MICO_LDFLAGS = @MICO_LDFLAGS@
+MOC = @MOC@
+MSGFMT = @MSGFMT@
+NOOPT_CFLAGS = @NOOPT_CFLAGS@
+NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
+OBJC = @OBJC@
+OBJCFLAGS = @OBJCFLAGS@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+PAMLIBS = @PAMLIBS@
+PASSWDLIBS = @PASSWDLIBS@
+PYTHONINC = @PYTHONINC@
+PYTHONLIB = @PYTHONLIB@
+PYTHONMODDIR = @PYTHONMODDIR@
+QTDOCDIR = @QTDOCDIR@
+QTE_NORTTI = @QTE_NORTTI@
+QTOPIA_INCLUDES = @QTOPIA_INCLUDES@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LDFLAGS = @QT_LDFLAGS@
+RANLIB = @RANLIB@
+RC = @RC@
+SETUIDFLAGS = @SETUIDFLAGS@
+SSL_INCLUDES = @SSL_INCLUDES@
+SSL_LDFLAGS = @SSL_LDFLAGS@
+STRIP = @STRIP@
+TOPSUBDIRS = @TOPSUBDIRS@
+UIC = @UIC@
+UIC_TR = @UIC_TR@
+USER_INCLUDES = @USER_INCLUDES@
+USER_LDFLAGS = @USER_LDFLAGS@
+USE_EXCEPTIONS = @USE_EXCEPTIONS@
+USE_RTTI = @USE_RTTI@
+USE_THREADS = @USE_THREADS@
+VERSION = @VERSION@
+WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
+XGETTEXT = @XGETTEXT@
+XPMINC = @XPMINC@
+XPMLIB = @XPMLIB@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_INCLUDES = @X_INCLUDES@
+X_LDFLAGS = @X_LDFLAGS@
+X_PRE_LIBS = @X_PRE_LIBS@
+X_RPATH = @X_RPATH@
+all_includes = @all_includes@
+all_libraries = @all_libraries@
+am__include = @am__include@
+am__quote = @am__quote@
+idldir = @idldir@
+install_sh = @install_sh@
+jni_includes = @jni_includes@
+kde_appsdir = @kde_appsdir@
+kde_bindir = @kde_bindir@
+kde_confdir = @kde_confdir@
+kde_datadir = @kde_datadir@
+kde_htmldir = @kde_htmldir@
+kde_icondir = @kde_icondir@
+kde_includes = @kde_includes@
+kde_libraries = @kde_libraries@
+kde_libs_htmldir = @kde_libs_htmldir@
+kde_libs_prefix = @kde_libs_prefix@
+kde_locale = @kde_locale@
+kde_mimedir = @kde_mimedir@
+kde_moduledir = @kde_moduledir@
+kde_qtver = @kde_qtver@
+kde_servicesdir = @kde_servicesdir@
+kde_servicetypesdir = @kde_servicetypesdir@
+kde_sounddir = @kde_sounddir@
+kde_styledir = @kde_styledir@
+kde_templatesdir = @kde_templatesdir@
+kde_wallpaperdir = @kde_wallpaperdir@
+kde_widgetdir = @kde_widgetdir@
+kdeinitdir = @kdeinitdir@
+micodir = @micodir@
+qt_includes = @qt_includes@
+qt_libraries = @qt_libraries@
+x_includes = @x_includes@
+x_libraries = @x_libraries@
+xdg_appsdir = @xdg_appsdir@
+xdg_directorydir = @xdg_directorydir@
+
+INCLUDES = $(all_includes)
+
+EXTRA_DIST = ksensors_alert.wav
+subdir = src/sounds
+mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
+DIST_COMMON = Makefile.am Makefile.in
+#>- all: all-am
+#>+ 1
+all: docs-am all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+#>- cd $(top_srcdir) && \
+#>- $(AUTOMAKE) --gnu src/sounds/Makefile
+#>+ 3
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/sounds/Makefile
+ cd $(top_srcdir) && perl admin/am_edit ksensors-0.7.3/src/sounds/Makefile.in
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @list='$(DISTFILES)'; for file in $$list; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+
+installdirs:
+
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+#>- clean: clean-am
+#>+ 1
+clean: kde-rpo-clean clean-am
+
+#>- clean-am: clean-generic clean-libtool mostlyclean-am
+#>+ 1
+clean-am: clean-bcheck clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-generic distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+uninstall-am: uninstall-info-am uninstall-local
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am info info-am install install-am install-data \
+ install-data-am install-data-local install-exec install-exec-am \
+ install-info install-info-am install-man install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool uninstall uninstall-am uninstall-info-am \
+ uninstall-local
+
+
+install-data-local:
+#>- $(mkinstalldirs) $(kde_datadir)/sounds
+#>+ 1
+ $(mkinstalldirs) $(DESTDIR)$(kde_datadir)/sounds
+#>- $(INSTALL_DATA) $(srcdir)/ksensors_alert.wav $(kde_datadir)/sounds/ksensors_alert.wav
+#>+ 1
+ $(INSTALL_DATA) $(srcdir)/ksensors_alert.wav $(DESTDIR)$(kde_datadir)/sounds/ksensors_alert.wav
+uninstall-local:
+#>- -rm -f $(kde_datadir)/sounds/ksensors_alert.wav
+#>+ 1
+ -rm -f $(DESTDIR)$(kde_datadir)/sounds/ksensors_alert.wav
+
+####### kdevelop will overwrite this part!!! (end)############
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
+
+
+#>+ 2
+docs-am:
+
+#>+ 6
+force-reedit:
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/sounds/Makefile
+ cd $(top_srcdir) && perl admin/am_edit ksensors-0.7.3/src/sounds/Makefile.in
+
+
+#>+ 21
+clean-bcheck:
+ rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
+
+bcheck: bcheck-am
+
+bcheck-am:
+ @for i in ; do \
+ if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
+ echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
+ echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
+ echo "$$i"; \
+ if ! $(CXX) $(DEFS) -I. -I$(srcdir) -I$(top_builddir) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(KDE_CXXFLAGS) --dump-class-hierarchy $$i.bchecktest.cc; then \
+ rm -f $$i.bchecktest.cc; exit 1; \
+ fi ; \
+ echo "" >> $$i.bchecktest.cc.class; \
+ perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
+ rm -f a.out; \
+ fi ; \
+ done
+
+
+#>+ 3
+final:
+ $(MAKE) all-am
+
+#>+ 3
+final-install:
+ $(MAKE) install-am
+
+#>+ 3
+no-final:
+ $(MAKE) all-am
+
+#>+ 3
+no-final-install:
+ $(MAKE) install-am
+
+#>+ 3
+cvs-clean:
+ $(MAKE) admindir=$(top_srcdir)/admin -f $(top_srcdir)/admin/Makefile.common cvs-clean
+
+#>+ 3
+kde-rpo-clean:
+ -rm -f *.rpo
+
+#>+ 3
+nmcheck:
+nmcheck-am: nmcheck
diff --git a/src/sounds/ksensors_alert.wav b/src/sounds/ksensors_alert.wav
new file mode 100644
index 0000000..920b14a
--- /dev/null
+++ b/src/sounds/ksensors_alert.wav
Binary files differ
diff --git a/src/systemcfg.cpp b/src/systemcfg.cpp
new file mode 100644
index 0000000..69a1053
--- /dev/null
+++ b/src/systemcfg.cpp
@@ -0,0 +1,126 @@
+/***************************************************************************
+ systemcfg.cpp - description
+ -------------------
+ begin : vie may 17 2002
+ copyright : (C) 2002 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. *
+ * *
+ ***************************************************************************/
+
+#include <qlistbox.h>
+#include <qspinbox.h>
+#include <qpushbutton.h>
+#include <qgroupbox.h>
+#include <qcheckbox.h>
+#include <qlayout.h>
+#include <qtabwidget.h>
+#include <klocale.h>
+#include "systemcfg.h"
+
+#include "infopanels.h"
+
+
+SystemCfg::SystemCfg(LMSensors *lsensors, QWidget *parent, const char *name): SystemCfgDesign(parent,name)
+{
+ sensors= lsensors;
+
+ palPanelCfg= new PaletteCfg( boxPanelPalette );
+ boxPanelPalette->setColumnLayout(0, Qt::Vertical );
+ boxPanelPalette->layout()->setSpacing( 6 );
+ boxPanelPalette->layout()->setMargin( 12 );
+ QGridLayout *boxPanelPaletteLayout = new QGridLayout( boxPanelPalette->layout() );
+ boxPanelPaletteLayout->setAlignment( Qt::AlignTop );
+ boxPanelPaletteLayout->addWidget( palPanelCfg, 0, 0 );
+
+ connect( TabWidget ,SIGNAL(currentChanged(QWidget*)), this, SLOT(slotTabWidgetChanged(QWidget *)));
+ //connect( buttonApply ,SIGNAL(clicked()),this, SLOT(slotApplyChanges()));
+
+ listSensors->clear();
+ listSensors->insertItem( i18n("CPU Speed"));
+ listSensors->insertItem( i18n("CPU State"));
+ listSensors->insertItem( i18n("RAM Used"));
+ listSensors->insertItem( i18n("SWAP Used"));
+ listSensors->insertItem( i18n("Up Time"));
+ listSensors->setCurrentItem(0);
+ readSensorInfo(0);
+
+ connect( listSensors,SIGNAL(highlighted(int)),this,SLOT(slotCurrentSensorChanged(int)) );
+}
+
+SystemCfg::~SystemCfg(){
+}
+
+void SystemCfg::slotTabWidgetChanged(QWidget *)
+{
+ switch(TabWidget->currentPageIndex())
+ {
+ case 0: readSensorInfo(listSensors->currentItem()); break;
+ case 1: readPreferencesInfo(); break;
+ }
+}
+
+const char *SystemCfg::getPanelName(int index)
+{
+ switch(index) {
+ case 0: return "proc.CPUINFO";
+ case 1: return "proc.CPULOAD";
+ case 2: return "proc.RAMINFO";
+ case 3: return "proc.SWAPINFO";
+ case 4: return "proc.UPTIME";
+ }
+ return 0;
+}
+
+void SystemCfg::slotCurrentSensorChanged(int index)
+{
+ readSensorInfo(index);
+}
+
+void SystemCfg::readSensorInfo(int index)
+{
+const char *panelName= getPanelName(index);
+
+ checkShow->setChecked( Panel::readShow(panelName) );
+ palPanelCfg->readPalette(panelName);
+}
+
+void SystemCfg::readPreferencesInfo()
+{
+ SpinUpdateTime->setValue(InfoPanels::cfgReadUpdateInterval());
+}
+
+
+void SystemCfg::writeSensorInfo(int index)
+{
+const char *panelName= getPanelName(index);
+
+ Panel::writeShow(panelName,checkShow->isChecked());
+ palPanelCfg->savePalette();
+ sensors->emitConfigChanged(panelName);
+}
+
+void SystemCfg::writePreferencesInfo()
+{
+ InfoPanels::cfgWriteUpdateInterval(SpinUpdateTime->value());
+ sensors->emitConfigChanged("proc");
+}
+
+void SystemCfg::slotApplyChanges()
+{
+ if (!isVisible())
+ return;
+ switch(TabWidget->currentPageIndex())
+ {
+ case 0: writeSensorInfo(listSensors->currentItem()); break;
+ case 1: writePreferencesInfo(); break;
+ }
+}
+
diff --git a/src/systemcfg.h b/src/systemcfg.h
new file mode 100644
index 0000000..ab5f0d1
--- /dev/null
+++ b/src/systemcfg.h
@@ -0,0 +1,56 @@
+/***************************************************************************
+ systemcfg.h - description
+ -------------------
+ begin : vie may 17 2002
+ copyright : (C) 2002 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 SYSTEMCFG_H
+#define SYSTEMCFG_H
+
+#include <systemcfgdesign.h>
+
+#include <lmsensors.h>
+#include <palettecfg.h>
+/**
+ *@author Miguel Novas
+ */
+
+class SystemCfg : public SystemCfgDesign {
+Q_OBJECT
+public:
+ SystemCfg(LMSensors *lsensors, QWidget *parent=0, const char *name=0);
+ ~SystemCfg();
+
+protected slots:
+ void slotCurrentSensorChanged(int index);
+ void slotTabWidgetChanged(QWidget *);
+
+ void readSensorInfo(int index);
+ void readPreferencesInfo();
+ void writeSensorInfo(int index);
+ void writePreferencesInfo();
+
+public slots:
+ void slotApplyChanges();
+
+
+private:
+
+// int indexCurSensor;
+ LMSensors *sensors;
+ PaletteCfg *palPanelCfg;
+ const char *getPanelName(int index);
+};
+
+#endif
diff --git a/src/systemcfgdesign.cpp b/src/systemcfgdesign.cpp
new file mode 100644
index 0000000..2695218
--- /dev/null
+++ b/src/systemcfgdesign.cpp
@@ -0,0 +1,143 @@
+#include <klocale.h>
+/****************************************************************************
+** Form implementation generated from reading ui file './systemcfgdesign.ui'
+**
+** Created: mer aoû 18 23:39:06 2004
+** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#include "systemcfgdesign.h"
+
+#include <qvariant.h>
+#include <qpushbutton.h>
+#include <qtabwidget.h>
+#include <qlistbox.h>
+#include <qframe.h>
+#include <qgroupbox.h>
+#include <qcheckbox.h>
+#include <qspinbox.h>
+#include <qslider.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/*
+ * Constructs a SystemCfgDesign as a child of 'parent', with the
+ * name 'name' and widget flags set to 'f'.
+ */
+SystemCfgDesign::SystemCfgDesign( QWidget* parent, const char* name, WFlags fl )
+ : QWidget( parent, name, fl )
+{
+ if ( !name )
+ setName( "SystemCfgDesign" );
+ SystemCfgDesignLayout = new QGridLayout( this, 1, 1, 8, 4, "SystemCfgDesignLayout");
+
+ TabWidget = new QTabWidget( this, "TabWidget" );
+
+ tab = new QWidget( TabWidget, "tab" );
+ tabLayout = new QHBoxLayout( tab, 8, 8, "tabLayout");
+
+ listSensors = new QListBox( tab, "listSensors" );
+ listSensors->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, listSensors->sizePolicy().hasHeightForWidth() ) );
+ listSensors->setMinimumSize( QSize( 160, 0 ) );
+ listSensors->setMaximumSize( QSize( 160, 32767 ) );
+ listSensors->setFrameShape( QListBox::StyledPanel );
+ listSensors->setFrameShadow( QListBox::Sunken );
+ listSensors->setLineWidth( 2 );
+ listSensors->setColumnMode( QListBox::FixedNumber );
+ tabLayout->addWidget( listSensors );
+
+ framePanelCfg = new QFrame( tab, "framePanelCfg" );
+ framePanelCfg->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, framePanelCfg->sizePolicy().hasHeightForWidth() ) );
+ framePanelCfg->setFrameShape( QFrame::NoFrame );
+ framePanelCfg->setFrameShadow( QFrame::Raised );
+ framePanelCfgLayout = new QVBoxLayout( framePanelCfg, 0, 4, "framePanelCfgLayout");
+
+ GroupBox13 = new QGroupBox( framePanelCfg, "GroupBox13" );
+ GroupBox13->setMinimumSize( QSize( 0, 50 ) );
+ GroupBox13->setMaximumSize( QSize( 32767, 50 ) );
+ GroupBox13->setColumnLayout(0, Qt::Vertical );
+ GroupBox13->layout()->setSpacing( 6 );
+ GroupBox13->layout()->setMargin( 11 );
+ GroupBox13Layout = new QGridLayout( GroupBox13->layout() );
+ GroupBox13Layout->setAlignment( Qt::AlignTop );
+
+ checkShow = new QCheckBox( GroupBox13, "checkShow" );
+ checkShow->setCursor( QCursor( 0 ) );
+
+ GroupBox13Layout->addWidget( checkShow, 0, 0 );
+ framePanelCfgLayout->addWidget( GroupBox13 );
+
+ boxPanelPalette = new QGroupBox( framePanelCfg, "boxPanelPalette" );
+ boxPanelPalette->setMinimumSize( QSize( 0, 90 ) );
+ framePanelCfgLayout->addWidget( boxPanelPalette );
+ Spacer4_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ framePanelCfgLayout->addItem( Spacer4_2 );
+ tabLayout->addWidget( framePanelCfg );
+ TabWidget->insertTab( tab, QString("") );
+
+ tab_2 = new QWidget( TabWidget, "tab_2" );
+ tabLayout_2 = new QVBoxLayout( tab_2, 11, 6, "tabLayout_2");
+
+ GroupBox7 = new QGroupBox( tab_2, "GroupBox7" );
+ GroupBox7->setMinimumSize( QSize( 0, 0 ) );
+ GroupBox7->setColumnLayout(0, Qt::Vertical );
+ GroupBox7->layout()->setSpacing( 12 );
+ GroupBox7->layout()->setMargin( 12 );
+ GroupBox7Layout = new QHBoxLayout( GroupBox7->layout() );
+ GroupBox7Layout->setAlignment( Qt::AlignTop );
+
+ SpinUpdateTime = new QSpinBox( GroupBox7, "SpinUpdateTime" );
+ SpinUpdateTime->setMinValue( 1 );
+ SpinUpdateTime->setValue( 5 );
+ GroupBox7Layout->addWidget( SpinUpdateTime );
+
+ SliderUpdateTime = new QSlider( GroupBox7, "SliderUpdateTime" );
+ SliderUpdateTime->setMaxValue( 60 );
+ SliderUpdateTime->setValue( 5 );
+ SliderUpdateTime->setOrientation( QSlider::Horizontal );
+ SliderUpdateTime->setTickmarks( QSlider::Right );
+ SliderUpdateTime->setTickInterval( 1 );
+ GroupBox7Layout->addWidget( SliderUpdateTime );
+ tabLayout_2->addWidget( GroupBox7 );
+ Spacer18 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ tabLayout_2->addItem( Spacer18 );
+ TabWidget->insertTab( tab_2, QString("") );
+
+ SystemCfgDesignLayout->addWidget( TabWidget, 0, 0 );
+ languageChange();
+ resize( QSize(334, 240).expandedTo(minimumSizeHint()) );
+ clearWState( WState_Polished );
+
+ // signals and slots connections
+ connect( SliderUpdateTime, SIGNAL( valueChanged(int) ), SpinUpdateTime, SLOT( setValue(int) ) );
+ connect( SpinUpdateTime, SIGNAL( valueChanged(int) ), SliderUpdateTime, SLOT( setValue(int) ) );
+}
+
+/*
+ * Destroys the object and frees any allocated resources
+ */
+SystemCfgDesign::~SystemCfgDesign()
+{
+ // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ * Sets the strings of the subwidgets using the current
+ * language.
+ */
+void SystemCfgDesign::languageChange()
+{
+ setCaption( tr2i18n( "SystemCfgDesign" ) );
+ GroupBox13->setTitle( QString::null );
+ checkShow->setText( tr2i18n( "Visible" ) );
+ boxPanelPalette->setTitle( tr2i18n( "Colors" ) );
+ TabWidget->changeTab( tab, tr2i18n( "System Panels" ) );
+ GroupBox7->setTitle( tr2i18n( "Update interval" ) );
+ SpinUpdateTime->setSuffix( tr2i18n( "s" ) );
+ TabWidget->changeTab( tab_2, tr2i18n( "Preferences" ) );
+}
+
+#include "systemcfgdesign.moc"
diff --git a/src/systemcfgdesign.h b/src/systemcfgdesign.h
new file mode 100644
index 0000000..07c776e
--- /dev/null
+++ b/src/systemcfgdesign.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+** Form interface generated from reading ui file './systemcfgdesign.ui'
+**
+** Created: mer aoû 18 23:39:01 2004
+** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#ifndef SYSTEMCFGDESIGN_H
+#define SYSTEMCFGDESIGN_H
+
+#include <qvariant.h>
+#include <qwidget.h>
+
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QSpacerItem;
+class QTabWidget;
+class QListBox;
+class QListBoxItem;
+class QFrame;
+class QGroupBox;
+class QCheckBox;
+class QSpinBox;
+class QSlider;
+
+class SystemCfgDesign : public QWidget
+{
+ Q_OBJECT
+
+public:
+ SystemCfgDesign( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ ~SystemCfgDesign();
+
+ QTabWidget* TabWidget;
+ QWidget* tab;
+ QListBox* listSensors;
+ QFrame* framePanelCfg;
+ QGroupBox* GroupBox13;
+ QCheckBox* checkShow;
+ QGroupBox* boxPanelPalette;
+ QWidget* tab_2;
+ QGroupBox* GroupBox7;
+ QSpinBox* SpinUpdateTime;
+ QSlider* SliderUpdateTime;
+
+protected:
+ QGridLayout* SystemCfgDesignLayout;
+ QHBoxLayout* tabLayout;
+ QVBoxLayout* framePanelCfgLayout;
+ QSpacerItem* Spacer4_2;
+ QGridLayout* GroupBox13Layout;
+ QVBoxLayout* tabLayout_2;
+ QSpacerItem* Spacer18;
+ QHBoxLayout* GroupBox7Layout;
+
+protected slots:
+ virtual void languageChange();
+
+};
+
+#endif // SYSTEMCFGDESIGN_H
diff --git a/src/systemcfgdesign.ui b/src/systemcfgdesign.ui
new file mode 100644
index 0000000..3fe1e3a
--- /dev/null
+++ b/src/systemcfgdesign.ui
@@ -0,0 +1,316 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>SystemCfgDesign</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>SystemCfgDesign</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>334</width>
+ <height>240</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>SystemCfgDesign</string>
+ </property>
+ <property name="layoutMargin" stdset="0">
+ </property>
+ <property name="layoutSpacing" stdset="0">
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>8</number>
+ </property>
+ <property name="spacing">
+ <number>4</number>
+ </property>
+ <widget class="QTabWidget" row="0" column="0">
+ <property name="name">
+ <cstring>TabWidget</cstring>
+ </property>
+ <property name="layoutMargin" stdset="0">
+ </property>
+ <property name="layoutSpacing" stdset="0">
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>System Panels</string>
+ </attribute>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>8</number>
+ </property>
+ <property name="spacing">
+ <number>8</number>
+ </property>
+ <widget class="QListBox">
+ <property name="name">
+ <cstring>listSensors</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>160</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>160</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="frameShape">
+ <enum>StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="lineWidth">
+ <number>2</number>
+ </property>
+ <property name="columnMode">
+ <enum>FixedNumber</enum>
+ </property>
+ </widget>
+ <widget class="QFrame">
+ <property name="name">
+ <cstring>framePanelCfg</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Raised</enum>
+ </property>
+ <property name="layoutMargin" stdset="0">
+ </property>
+ <property name="layoutSpacing" stdset="0">
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>4</number>
+ </property>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>GroupBox13</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>50</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32767</width>
+ <height>50</height>
+ </size>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>checkShow</cstring>
+ </property>
+ <property name="cursor">
+ <cursor>0</cursor>
+ </property>
+ <property name="text">
+ <string>Visible</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>boxPanelPalette</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>90</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Colors</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer4_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Preferences</string>
+ </attribute>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>GroupBox7</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Update interval</string>
+ </property>
+ <property name="layoutMargin" stdset="0">
+ </property>
+ <property name="layoutSpacing" stdset="0">
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>12</number>
+ </property>
+ <property name="spacing">
+ <number>12</number>
+ </property>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>SpinUpdateTime</cstring>
+ </property>
+ <property name="suffix">
+ <string>s</string>
+ </property>
+ <property name="minValue">
+ <number>1</number>
+ </property>
+ <property name="value">
+ <number>5</number>
+ </property>
+ </widget>
+ <widget class="QSlider">
+ <property name="name">
+ <cstring>SliderUpdateTime</cstring>
+ </property>
+ <property name="maxValue">
+ <number>60</number>
+ </property>
+ <property name="value">
+ <number>5</number>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="tickmarks">
+ <enum>Right</enum>
+ </property>
+ <property name="tickInterval">
+ <number>1</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer18</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>SliderUpdateTime</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>SpinUpdateTime</receiver>
+ <slot>setValue(int)</slot>
+ </connection>
+ <connection>
+ <sender>SpinUpdateTime</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>SliderUpdateTime</receiver>
+ <slot>setValue(int)</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/uptimepanel.cpp b/src/uptimepanel.cpp
new file mode 100644
index 0000000..6852ff4
--- /dev/null
+++ b/src/uptimepanel.cpp
@@ -0,0 +1,75 @@
+/***************************************************************************
+ cpudisplay.cpp - description
+ -------------------
+ begin : Sun Nov 25 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. *
+ * *
+ ***************************************************************************/
+
+#include "uptimepanel.h"
+#include "procinfo.h"
+#include "qlcddraw.h"
+
+#include <qcolor.h>
+#include <qpainter.h>
+
+
+
+UpTimePanel::UpTimePanel(QWidget *parent, const char *name) : Panel(parent,name)
+{
+ lcd= new QLCDString(this);
+ lcd->setGeometry(6,25,52,15);
+ lcd->setShadow(true);
+ lcd->setForeColor(red);
+ lcd->setShadowColor(darkRed);
+ lcd->installEventFilter(this);
+ updateInfo();
+}
+
+UpTimePanel::~UpTimePanel()
+{
+}
+
+void UpTimePanel::updateInfo()
+{
+ int uptime= getUpTime();
+
+ int hours = uptime/ (60*60);
+ int minutes= (uptime % (60*60)) / 60;
+
+ QString str;
+ str.sprintf("%02d:%02d",hours,minutes);
+ lcd->display(str);
+ update();
+}
+
+void UpTimePanel::drawContents(QPainter *p)
+{
+ int w= width();
+ int h= height();
+
+ int i2= (h * 4) / 5;
+ int th= h-i2-h/11;
+
+ QLcd::draw(p, 2,h/10,w-4,th,"hh:mm",QLcd::alignCenter, &getColorTitle());
+ QLcd::draw(p, 2,i2+1,w-4,th,"Up Time",QLcd::alignCenter,&getColorTitle());
+}
+
+void UpTimePanel::resizeEvent ( QResizeEvent *e )
+{
+ int w= width();
+ int h= height();
+
+ int mw= w/10;
+
+ lcd->setGeometry(mw,h/3,w-mw*2,(h*2)/5);
+}
diff --git a/src/uptimepanel.h b/src/uptimepanel.h
new file mode 100644
index 0000000..b990312
--- /dev/null
+++ b/src/uptimepanel.h
@@ -0,0 +1,47 @@
+/***************************************************************************
+ cpudisplay.h - description
+ -------------------
+ begin : Sun Nov 25 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 UPTIMEPANEL_H
+#define UPTIMEPANEL_H
+
+#include "panel.h"
+#include "qlcdstring.h"
+
+#include <qstring.h>
+
+/**
+ *@author Miguel Novas
+ */
+
+class UpTimePanel : public Panel {
+Q_OBJECT
+public:
+ UpTimePanel(QWidget *parent=0, const char *name=0);
+ ~UpTimePanel();
+
+protected:
+
+ void updateInfo();
+ void drawContents ( QPainter *p );
+
+private:
+
+ QLCDString *lcd;
+ void resizeEvent ( QResizeEvent *e );
+};
+
+#endif