~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to kinfocenter/Modules/devinfo/soldevicetypes.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/*
 
3
 *  soldevicetypes.h
 
4
 *
 
5
 *  Copyright (C) 2009 David Hubner <hubnerd@ntlworld.com>
 
6
 *
 
7
 *  This program is free software; you can redistribute it and/or modify
 
8
 *  it under the terms of the GNU General Public License as published by
 
9
 *  the Free Software Foundation; either version 2 of the License, or
 
10
 *  (at your option) any later version.
 
11
 *
 
12
 *  This program is distributed in the hope that it will be useful,
 
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
 *  GNU General Public License for more details.
 
16
 *
 
17
 *  You should have received a copy of the GNU General Public License
 
18
 *  along with this program; if not, write to the Free Software
 
19
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
20
 *
 
21
 */
 
22
 
 
23
#ifndef SOLDEVICETYPES
 
24
#define SOLDEVICETYPES
 
25
 
 
26
//kde 
 
27
#include <kdiskfreespaceinfo.h>
 
28
 
 
29
#include "soldevice.h"
 
30
#include "infopanel.h"
 
31
 
 
32
class QVListLayout;
 
33
 
 
34
class SolProcessorDevice : public SolDevice
 
35
{
 
36
  
 
37
  public:
 
38
    SolProcessorDevice(const Solid::DeviceInterface::Type &);
 
39
    SolProcessorDevice(QTreeWidgetItem *, const Solid::Device &);
 
40
    QVListLayout *infoPanelLayout();
 
41
    
 
42
  private:
 
43
    void setDefaultDeviceText();
 
44
    void setDefaultListing(const Solid::DeviceInterface::Type &); 
 
45
};
 
46
 
 
47
 
 
48
class SolStorageDevice : public SolDevice
 
49
{
 
50
  
 
51
  public:   
 
52
    enum storageChildren { CREATECHILDREN , NOCHILDREN };
 
53
    
 
54
    SolStorageDevice(const Solid::DeviceInterface::Type &);
 
55
    SolStorageDevice(QTreeWidgetItem *, const Solid::Device &, const storageChildren & = CREATECHILDREN);
 
56
    QVListLayout *infoPanelLayout();
 
57
      
 
58
  private:
 
59
    void setDefaultDeviceText();
 
60
    void setDefaultListing(const Solid::DeviceInterface::Type &); 
 
61
};
 
62
 
 
63
class SolNetworkDevice : public SolDevice
 
64
{
 
65
  
 
66
  public:
 
67
    SolNetworkDevice(const Solid::DeviceInterface::Type &);
 
68
    SolNetworkDevice(QTreeWidgetItem *, const Solid::Device &);
 
69
    QVListLayout *infoPanelLayout();
 
70
    void refreshName();
 
71
    
 
72
  private:
 
73
    void setDefaultDeviceText();
 
74
    void setDefaultDeviceIcon();
 
75
    void setDefaultListing(const Solid::DeviceInterface::Type &); 
 
76
};
 
77
 
 
78
class SolVolumeDevice : public SolDevice 
 
79
{
 
80
 
 
81
  public:
 
82
    SolVolumeDevice(const Solid::DeviceInterface::Type &);
 
83
    SolVolumeDevice(QTreeWidgetItem *, const Solid::Device &);
 
84
    QVListLayout *infoPanelLayout();
 
85
    
 
86
  private:
 
87
    void setDefaultListing(const Solid::DeviceInterface::Type &);
 
88
};
 
89
 
 
90
class SolAudioDevice : public SolDevice 
 
91
{
 
92
 
 
93
  public:
 
94
    SolAudioDevice(const Solid::DeviceInterface::Type &);
 
95
    SolAudioDevice(QTreeWidgetItem *, const Solid::Device &);
 
96
    QVListLayout *infoPanelLayout();
 
97
    void addItem(Solid::Device);
 
98
    
 
99
  private:
 
100
    enum SubMenus { ALSA=0, OSS };
 
101
    
 
102
    void setDefaultListing(const Solid::DeviceInterface::Type &);
 
103
    void listOss();
 
104
    void listAlsa();
 
105
    void createSubItems(const SubMenus &);
 
106
    
 
107
    SolDevice *alsaSubItem;
 
108
    SolDevice *ossSubItem;
 
109
};
 
110
 
 
111
class SolButtonDevice : public SolDevice 
 
112
{
 
113
 
 
114
  public:
 
115
    SolButtonDevice(const Solid::DeviceInterface::Type &);
 
116
    SolButtonDevice(QTreeWidgetItem *, const Solid::Device &);
 
117
    QVListLayout *infoPanelLayout();
 
118
    
 
119
  private:
 
120
    void setDefaultDeviceIcon();
 
121
    void setDefaultListing(const Solid::DeviceInterface::Type &);
 
122
};
 
123
 
 
124
class SolMediaPlayerDevice : public SolDevice 
 
125
{
 
126
 
 
127
  public:
 
128
    SolMediaPlayerDevice(const Solid::DeviceInterface::Type &);
 
129
    SolMediaPlayerDevice(QTreeWidgetItem *, const Solid::Device &);
 
130
    QVListLayout *infoPanelLayout();
 
131
 
 
132
  private:
 
133
    void setDefaultListing(const Solid::DeviceInterface::Type &);
 
134
};
 
135
 
 
136
class SolCameraDevice : public SolDevice 
 
137
{
 
138
 
 
139
  public:
 
140
    SolCameraDevice(const Solid::DeviceInterface::Type &);
 
141
    SolCameraDevice(QTreeWidgetItem *, const Solid::Device &);
 
142
    QVListLayout *infoPanelLayout();
 
143
    
 
144
  private:
 
145
    void setDefaultListing(const Solid::DeviceInterface::Type &);
 
146
};
 
147
 
 
148
class SolBatteryDevice : public SolDevice 
 
149
{
 
150
 
 
151
  public:
 
152
    SolBatteryDevice(const Solid::DeviceInterface::Type &);
 
153
    SolBatteryDevice(QTreeWidgetItem *, const Solid::Device &);
 
154
    QVListLayout *infoPanelLayout();
 
155
    
 
156
  private:
 
157
    void setDefaultListing(const Solid::DeviceInterface::Type &);
 
158
};
 
159
 
 
160
class SolAcAdapterDevice : public SolDevice 
 
161
{
 
162
 
 
163
  public:
 
164
    SolAcAdapterDevice(const Solid::DeviceInterface::Type &);
 
165
    SolAcAdapterDevice(QTreeWidgetItem *, const Solid::Device &);
 
166
    QVListLayout *infoPanelLayout();
 
167
    
 
168
  private:
 
169
    void setDefaultListing(const Solid::DeviceInterface::Type &);
 
170
};
 
171
 
 
172
class SolDvbDevice : public SolDevice 
 
173
{
 
174
 
 
175
  public:
 
176
    SolDvbDevice(const Solid::DeviceInterface::Type &);
 
177
    SolDvbDevice(QTreeWidgetItem *, const Solid::Device &);
 
178
    QVListLayout *infoPanelLayout();
 
179
    
 
180
  private:
 
181
    void setDefaultListing(const Solid::DeviceInterface::Type &);
 
182
};
 
183
 
 
184
class SolSerialDevice : public SolDevice 
 
185
{
 
186
 
 
187
  public:
 
188
    SolSerialDevice(const Solid::DeviceInterface::Type &);
 
189
    SolSerialDevice(QTreeWidgetItem *, const Solid::Device &);
 
190
    QVListLayout *infoPanelLayout();
 
191
 
 
192
  private:
 
193
    void setDefaultListing(const Solid::DeviceInterface::Type &);
 
194
};
 
195
 
 
196
class SolSmartCardDevice : public SolDevice 
 
197
{
 
198
 
 
199
  public:
 
200
    SolSmartCardDevice(const Solid::DeviceInterface::Type &);
 
201
    SolSmartCardDevice(QTreeWidgetItem *, const Solid::Device &);
 
202
    QVListLayout *infoPanelLayout();
 
203
    
 
204
  private:
 
205
    void setDefaultListing(const Solid::DeviceInterface::Type &);
 
206
};
 
207
 
 
208
class SolVideoDevice : public SolDevice 
 
209
{
 
210
 
 
211
  public:
 
212
    SolVideoDevice(const Solid::DeviceInterface::Type &);
 
213
    SolVideoDevice(QTreeWidgetItem *, const Solid::Device &);
 
214
    QVListLayout *infoPanelLayout();
 
215
    
 
216
  private:
 
217
    void setDefaultListing(const Solid::DeviceInterface::Type &);
 
218
};
 
219
 
 
220
 
 
221
#endif //SOLDEVICETYPES