summaryrefslogtreecommitdiffstats
path: root/src/detaileddialog.h
blob: c897936bfea8754c8de86b40e5f1fb1d223be965 (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                                   *
 *                            <[email protected]>                            *
 *                         Danny Kukawka                                   *
 *                            <[email protected]>, <[email protected]>   *
 *                                                                         *
 *   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, <[email protected]>
 *  \author 	Danny Kukawka, <[email protected]>, <[email protected]>
 *  \date    	2006
 */
class detaileddialog: public detailed_Dialog { 

	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 tdepowersave 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