summaryrefslogtreecommitdiffstats
path: root/src/detaileddialog.h
blob: f914c0c90a2988a058c3e53b8371087287647b66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/***************************************************************************
 *   Copyright (C) 2006 by Daniel Gollub                                   *
 *                            <dgollub@suse.de>                            *
 *                         Danny Kukawka                                   *
 *                            <dkukawka@suse.de>, <danny.kukawka@web.de>   *
 *                                                                         *
 *   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 <kprogress.h>

// other QT headers:
#include <tqpixmap.h>

// 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, <dgollub@suse.de>
 *  \author 	Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
 *  \date    	2006
 */
class detaileddialog: public detailed_Dialog { 

	Q_OBJECT
  TQ_OBJECT

public:
	//! default constructor
	detaileddialog(HardwareInfo *_hwinfo, TQPixmap *_pixmap, Settings *_set, TQWidget *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
	TQPixmap *pixmap;

	//! the numbers of CPUs in the system
	int numOfCPUs;

	//! list of progressbars for battery information
	/*!
	 * This TQValueList with type KProgress contains the list
	 * of battery progress widgets. Each element represent
	 * one battery or batteryslot
	 */
	TQValueList<KProgress *> BatteryPBar;
	//! list of progressbars for CPU information
	/*!
	 * This TQValueList with type KProgress contains the list
	 * of CPU progress widgets. Each element represent one CPU.
	 */
	TQValueList<KProgress *> ProcessorPBar;

	//! TQGridLayout for Battery progress widgets
	TQGridLayout* BatteryGridLayout;
	//! TQGridLayout for Processor progress widgets
	TQGridLayout* ProcessorGridLayout;
};

#endif