From 50b48aec6ddd451a6d1709c0942477b503457663 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 3 Feb 2010 02:15:56 +0000 Subject: Added abandoned KDE3 version of K3B git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k3b@1084400 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/k3bappdevicemanager.h | 119 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 src/k3bappdevicemanager.h (limited to 'src/k3bappdevicemanager.h') diff --git a/src/k3bappdevicemanager.h b/src/k3bappdevicemanager.h new file mode 100644 index 0000000..419a8b3 --- /dev/null +++ b/src/k3bappdevicemanager.h @@ -0,0 +1,119 @@ +/* + * + * $Id: sourceheader 380067 2005-01-19 13:03:46Z trueg $ + * Copyright (C) 2005 Sebastian Trueg + * + * This file is part of the K3b project. + * Copyright (C) 1998-2007 Sebastian Trueg + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * See the file "COPYING" for the exact licensing terms. + */ + +#ifndef _K3B_APP_DEVICE_MANAGER_H_ +#define _K3B_APP_DEVICE_MANAGER_H_ + +class KActionCollection; +class KAction; +class K3bMediaCache; + +namespace K3bDevice { + class Device; + class DiskInfo; + class DiskInfoDetector; +} + +namespace KIO { + class Job; +} + +#include + + +/** + * Enhanced device manager which can do some additional actions + * and maintains a current device + */ +class K3bAppDeviceManager : public K3bDevice::DeviceManager +{ + Q_OBJECT + + public: + K3bAppDeviceManager( QObject* parent = 0, const char* name = 0 ); + ~K3bAppDeviceManager(); + + K3bDevice::Device* currentDevice() const; + KActionCollection* actionCollection() const { return m_actionCollection; } + void setMediaCache( K3bMediaCache* c ); + + signals: + void currentDeviceChanged( K3bDevice::Device* ); + + /** + * Emitted when starting to detect the diskinfo. This may be used to show some info + * to the user since deteting the diskinfo might take some time. + */ + void detectingDiskInfo( K3bDevice::Device* ); + void diskInfoReady( K3bDevice::DiskInfoDetector* ); + + void mountFinished( const QString& mountPoint ); + void unmountFinished( bool success ); + + public slots: + /** + * \reimplemeted for internal reasons. The API is unaffected. + */ + void clear(); + + /** + * \reimplemeted for internal reasons. The API is unaffected. + */ + void removeDevice( const QString& ); + + /** + * \reimplemeted for internal reasons. The API is unaffected. + */ + int scanBus(); + + void setCurrentDevice( K3bDevice::Device* ); + + void diskInfo(); + void unlockDevice(); + void lockDevice(); + void mountDisk(); + void unmountDisk(); + void ejectDisk(); + void loadDisk(); + void setReadSpeed(); + + void diskInfo( K3bDevice::Device* ); + void unlockDevice( K3bDevice::Device* ); + void lockDevice( K3bDevice::Device* ); + void mountDisk( K3bDevice::Device* ); + void unmountDisk( K3bDevice::Device* ); + void ejectDisk( K3bDevice::Device* ); + void loadDisk( K3bDevice::Device* ); + void setReadSpeed( K3bDevice::Device* ); + + private slots: + void slotMediumChanged( K3bDevice::Device* dev ); + + private: + KAction* m_actionDiskInfo; + KAction* m_actionUnmount; + KAction* m_actionMount; + KAction* m_actionEject; + KAction* m_actionLoad; + KAction* m_actionSetReadSpeed; + + mutable K3bDevice::Device* m_currentDevice; + KActionCollection* m_actionCollection; + K3bDevice::DiskInfoDetector* m_diskInfoDetector; + + bool m_ejectRequested; +}; + +#endif -- cgit v1.2.3