4473
by Sebastian Trueg
Fixed signals and slots |
1 |
/*
|
2596
by Sebastian Trueg
New K3bAppDeviceManager which now does all the device actions like eject, mount and stuff. |
2 |
*
|
4277
by Sebastian Trueg
Two weeks of major K3b porting and still the job is not completely done. |
3 |
* Copyright (C) 2005-2008 Sebastian Trueg <trueg@k3b.org>
|
2596
by Sebastian Trueg
New K3bAppDeviceManager which now does all the device actions like eject, mount and stuff. |
4 |
*
|
5 |
* This file is part of the K3b project.
|
|
4277
by Sebastian Trueg
Two weeks of major K3b porting and still the job is not completely done. |
6 |
* Copyright (C) 1998-2008 Sebastian Trueg <trueg@k3b.org>
|
2596
by Sebastian Trueg
New K3bAppDeviceManager which now does all the device actions like eject, mount and stuff. |
7 |
*
|
8 |
* This program is free software; you can redistribute it and/or modify
|
|
9 |
* it under the terms of the GNU General Public License as published by
|
|
10 |
* the Free Software Foundation; either version 2 of the License, or
|
|
11 |
* (at your option) any later version.
|
|
12 |
* See the file "COPYING" for the exact licensing terms.
|
|
13 |
*/
|
|
14 |
||
15 |
#ifndef _K3B_APP_DEVICE_MANAGER_H_
|
|
16 |
#define _K3B_APP_DEVICE_MANAGER_H_
|
|
17 |
||
4704
by Sebastian Trueg
Let me get all that stuff in there that I worked on during my "holidays". |
18 |
#include "k3bdevicemanager.h" |
5596.1.29
by Michał Małek
Cleanup of include directives declarations |
19 |
|
5989
by Friedrich W. H. Kossebau
Remove module prefix from KF includes |
20 |
#include <KXMLGUIClient> |
5596.1.29
by Michał Małek
Cleanup of include directives declarations |
21 |
#include <Solid/SolidNamespace> |
22 |
||
4398
by Michal Malek
- merged duplicated code in K3bAppDeviceManager and K3bDeviceMenu |
23 |
|
4471
by Sebastian Trueg
I finally did it: I moved all K3b classes into the K3b namespace. Now this might sound like completely useless (and it actually is, too) |
24 |
namespace K3b { |
25 |
class MediaCache; |
|
26 |
}
|
|
2596
by Sebastian Trueg
New K3bAppDeviceManager which now does all the device actions like eject, mount and stuff. |
27 |
|
4471
by Sebastian Trueg
I finally did it: I moved all K3b classes into the K3b namespace. Now this might sound like completely useless (and it actually is, too) |
28 |
namespace Device { |
4277
by Sebastian Trueg
Two weeks of major K3b porting and still the job is not completely done. |
29 |
class Device; |
2596
by Sebastian Trueg
New K3bAppDeviceManager which now does all the device actions like eject, mount and stuff. |
30 |
}
|
31 |
||
32 |
/**
|
|
33 |
* Enhanced device manager which can do some additional actions
|
|
34 |
* and maintains a current device
|
|
35 |
*/
|
|
4471
by Sebastian Trueg
I finally did it: I moved all K3b classes into the K3b namespace. Now this might sound like completely useless (and it actually is, too) |
36 |
namespace K3b { |
4473
by Sebastian Trueg
Fixed signals and slots |
37 |
class AppDeviceManager : public Device::DeviceManager, public KXMLGUIClient |
38 |
{
|
|
39 |
Q_OBJECT
|
|
40 |
||
41 |
public: |
|
5950
by Yuri Chornoivan
Fix minor EBN issues |
42 |
explicit AppDeviceManager( QObject* parent = 0 ); |
5976
by Friedrich W. H. Kossebau
Use override |
43 |
~AppDeviceManager() override; |
4473
by Sebastian Trueg
Fixed signals and slots |
44 |
|
45 |
Device::Device* currentDevice() const; |
|
46 |
void setMediaCache( MediaCache* c ); |
|
47 |
||
48 |
Q_SIGNALS: |
|
49 |
void currentDeviceChanged( K3b::Device::Device* ); |
|
50 |
||
51 |
/**
|
|
52 |
* Emitted when starting to detect the diskinfo. This may be used to show some info
|
|
6031
by Yuri Chornoivan
Fix minor typos |
53 |
* to the user since detecting the diskinfo might take some time.
|
4473
by Sebastian Trueg
Fixed signals and slots |
54 |
*/
|
55 |
void detectingDiskInfo( K3b::Device::Device* ); |
|
56 |
||
57 |
void mountFinished( const QString& mountPoint ); |
|
58 |
void unmountFinished( bool success ); |
|
59 |
||
60 |
public Q_SLOTS: |
|
61 |
/**
|
|
6031
by Yuri Chornoivan
Fix minor typos |
62 |
* \reimplemented for internal reasons. The API is unaffected.
|
4473
by Sebastian Trueg
Fixed signals and slots |
63 |
*/
|
5976
by Friedrich W. H. Kossebau
Use override |
64 |
void clear() override; |
4473
by Sebastian Trueg
Fixed signals and slots |
65 |
|
66 |
void setCurrentDevice( K3b::Device::Device* ); |
|
67 |
||
68 |
void diskInfo(); |
|
69 |
void unlockDevice(); |
|
70 |
void lockDevice(); |
|
71 |
void mountDisk(); |
|
72 |
void unmountDisk(); |
|
73 |
void ejectDisk(); |
|
74 |
void loadDisk(); |
|
75 |
void setReadSpeed(); |
|
76 |
||
77 |
void diskInfo( K3b::Device::Device* ); |
|
78 |
void unlockDevice( K3b::Device::Device* ); |
|
79 |
void lockDevice( K3b::Device::Device* ); |
|
80 |
void mountDisk( K3b::Device::Device* ); |
|
81 |
void unmountDisk( K3b::Device::Device* ); |
|
82 |
void ejectDisk( K3b::Device::Device* ); |
|
83 |
void loadDisk( K3b::Device::Device* ); |
|
84 |
void setReadSpeed( K3b::Device::Device* ); |
|
85 |
||
86 |
private Q_SLOTS: |
|
87 |
void slotMediumChanged( K3b::Device::Device* dev ); |
|
88 |
void slotMountChanged( bool accessible, const QString& udi ); |
|
89 |
void slotMountFinished( Solid::ErrorType error, QVariant errorData, const QString& udi ); |
|
90 |
void slotUnmountFinished( Solid::ErrorType error, QVariant errorData, const QString& udi ); |
|
91 |
||
92 |
private: |
|
93 |
/**
|
|
6031
by Yuri Chornoivan
Fix minor typos |
94 |
* \reimplemented for internal reasons. The API is unaffected.
|
4473
by Sebastian Trueg
Fixed signals and slots |
95 |
*/
|
5976
by Friedrich W. H. Kossebau
Use override |
96 |
Device::Device* addDevice( const Solid::Device& solidDev ) override; |
97 |
void removeDevice( const Solid::Device& solidDev ) override; |
|
4473
by Sebastian Trueg
Fixed signals and slots |
98 |
|
99 |
class Private; |
|
100 |
Private* const d; |
|
101 |
};
|
|
4471
by Sebastian Trueg
I finally did it: I moved all K3b classes into the K3b namespace. Now this might sound like completely useless (and it actually is, too) |
102 |
}
|
2596
by Sebastian Trueg
New K3bAppDeviceManager which now does all the device actions like eject, mount and stuff. |
103 |
|
104 |
#endif
|