File indexing completed on 2024-10-13 04:22:11

0001 /*
0002     SPDX-FileCopyrightText: 1998-2007 Sebastian Trueg <trueg@k3b.org>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef _K3B_LSOF_WRAPPER_DIALOG_H_
0007 #define _K3B_LSOF_WRAPPER_DIALOG_H_
0008 
0009 #include <QDialog>
0010 
0011 class QLabel;
0012 
0013 namespace K3b {
0014 
0015     namespace Device {
0016         class Device;
0017     }
0018 
0019     class LsofWrapperDialog : public QDialog
0020     {
0021         Q_OBJECT
0022 
0023     public:
0024         ~LsofWrapperDialog() override;
0025 
0026         /**
0027          * Check if other applications are currently using the device and if so
0028          * warn the user and provide a quick solution to shut down these other
0029          * applications.
0030          *
0031          * If the device is not in use this method simply returns.
0032          */
0033         static void checkDevice( Device::Device* dev, QWidget* parent = 0 );
0034 
0035     private Q_SLOTS:
0036         bool slotCheckDevice();
0037         void slotQuitOtherApps();
0038 
0039     private:
0040         explicit LsofWrapperDialog( QWidget* parent );
0041 
0042         Device::Device* m_device;
0043         QLabel* m_label;
0044     };
0045 }
0046 
0047 #endif