aboutsummaryrefslogtreecommitdiffstats
path: root/kde2/plugins/plpprops.h
blob: eeb3d4db078e11fecf466259b9ee399937fb1bfe (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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
/* $Id$
 *
 * This file holds the definitions for all classes used to
 * display a Psion related properties dialog.
 */

#ifndef _PLPPROPS_H_
#define _PLPPROPS_H_

#include <qstring.h>
#include <qlist.h>
#include <qgroupbox.h>

#include <kurl.h>
#include <kfileitem.h>
#include <kdialogbase.h>
#include <kpropsdlg.h>

#include "pie3dwidget.h"

namespace KIO { class Job; }

class PlpPropsPlugin : public KPropsDlgPlugin {
	Q_OBJECT
 public:
	/**
	 * Constructor
	 */
	PlpPropsPlugin( KPropertiesDialog *_props );
	virtual ~PlpPropsPlugin();
	
	/**
	 * Applies all changes made.
	 */
	virtual void applyChanges();
	
	/**
	 * Tests whether the files specified by _items need a 'General' plugin.
	 */
	static bool supports(KFileItemList _items);

	/**
	 * Called after all plugins applied their changes
	 */
	void postApplyChanges();

 private:
	class PlpPropsPluginPrivate;
	PlpPropsPluginPrivate *d;
};

class PlpFileAttrPage : public KPropsDlgPlugin {
	Q_OBJECT
 public:
	/**
	 * Constructor
	 */
	PlpFileAttrPage(KPropertiesDialog *_props);
	virtual ~PlpFileAttrPage();

	virtual void applyChanges();

	static bool supports(KFileItemList _items);

 private:
	class PlpFileAttrPagePrivate;
	PlpFileAttrPagePrivate *d;
};

class PlpDriveAttrPage : public KPropsDlgPlugin {
	Q_OBJECT
 public:
	/**
	 * Constructor
	 */
	PlpDriveAttrPage(KPropertiesDialog *_props);
	virtual ~PlpDriveAttrPage();

	virtual void applyChanges();

	static bool supports(KFileItemList _items);

 private slots:
	void slotSpecialFinished(KIO::Job *job);

 private:
	class PlpDriveAttrPagePrivate;
	PlpDriveAttrPagePrivate *d;

	unsigned long total;
	unsigned long unused;

	QGroupBox   *gb;
	QLabel      *uidLabel;
	QLabel      *typeLabel;
	QLabel      *totalLabel;
	QLabel      *freeLabel;
	QColor      usedColor;
	QColor      freeColor;
	Pie3DWidget *pie;
};


/**
 * Used to view/edit machine info.
 */
class PlpMachinePage : public KPropsDlgPlugin {
	Q_OBJECT
 public:
	/**
	 * Constructor
	 */
	PlpMachinePage(KPropertiesDialog *_props);
	virtual ~PlpMachinePage();

	virtual void applyChanges();

	static bool supports(KFileItemList _items);

 private:
	class PlpMachinePagePrivate;
	PlpMachinePagePrivate *d;
};

/**
 * Used to view/edit owner info
 */
class PlpOwnerPage : public KPropsDlgPlugin {
	Q_OBJECT
 public:
	/**
	 * Constructor
	 */
	PlpOwnerPage(KPropertiesDialog *_props);
	virtual ~PlpOwnerPage();

	virtual void applyChanges();

	static bool supports(KFileItemList _items);

 private:
	class PlpOwnerPagePrivate;
	PlpOwnerPagePrivate *d;
};

#endif