From be4fc77c294a41a0db46ba692fbe45b2045b66c3 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 19 Feb 2010 20:40:48 +0000 Subject: Added KDE3 version of kpowersave git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kpowersave@1092957 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/detaileddialog.h | 113 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 src/detaileddialog.h (limited to 'src/detaileddialog.h') diff --git a/src/detaileddialog.h b/src/detaileddialog.h new file mode 100644 index 0000000..3873030 --- /dev/null +++ b/src/detaileddialog.h @@ -0,0 +1,113 @@ +/*************************************************************************** + * Copyright (C) 2006 by Daniel Gollub * + * * + * Danny Kukawka * + * , * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of version 2 of the GNU General Public License * + * as published by the Free Software Foundation. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#ifndef DETAILEDDIALOG_H +#define DETAILEDDIALOG_H + +// own headers: +#include "detailed_Dialog.h" + +// KDE headers: +#include + +// other QT headers: +#include + +// own headers: +#include "hardware.h" +#include "hardware_cpu.h" +#include "settings.h" +#include "hardware_batteryCollection.h" + +/*! +* \file detaileddialog.h +* \brief Headerfile for detaileddialog.cpp and the class \ref detaileddialog. +*/ + /*! + * \class detaileddialog + * \brief The class for the detailed information dialog + * \author Daniel Gollub, + * \author Danny Kukawka, , + * \date 2006 + */ +class detaileddialog: public detailed_Dialog { + + Q_OBJECT + +public: + //! default constructor + detaileddialog(HardwareInfo *_hwinfo, QPixmap *_pixmap, Settings *_set, QWidget *parent = 0, const char *name = 0); + //! default destructor + ~detaileddialog(); + +private slots: + //! to close the dialog + void closeDetailedDlg(); + //! to setup the battery progress widgets + void setBattery(); + //! to setup the current power consumtion widgets + void setPowerConsumption(); + //! to setup the CPU progress widgets + void setProcessor(); + //! to setup the Throttling CPU progress widgets + void setProcessorThrottling(); + //! to set the state AC KLed + void setAC(); + //! to set all other information + void setInfos(); + +private: + //! pointer to class HardwareInfo to get cpu/battey/AC information + HardwareInfo *hwinfo; + //! pointer to class CPUInfo to get CPU information + CPUInfo *cpuInfo; + //! pointer to hardware information about the primary batteries. + BatteryCollection *primaryBatteries; + //! pointer to class settinfs to get the current settings + Settings *config; + + //! pointer to the kpowersave class + QPixmap *pixmap; + + //! the numbers of CPUs in the system + int numOfCPUs; + + //! list of progressbars for battery information + /*! + * This QValueList with type KProgress contains the list + * of battery progress widgets. Each element represent + * one battery or batteryslot + */ + QValueList BatteryPBar; + //! list of progressbars for CPU information + /*! + * This QValueList with type KProgress contains the list + * of CPU progress widgets. Each element represent one CPU. + */ + QValueList ProcessorPBar; + + //! QGridLayout for Battery progress widgets + QGridLayout* BatteryGridLayout; + //! QGridLayout for Processor progress widgets + QGridLayout* ProcessorGridLayout; +}; + +#endif -- cgit v1.2.1