File indexing completed on 2024-06-16 07:42:25

0001 /*
0002     SPDX-FileCopyrightText: 1998-2009 Sebastian Trueg <trueg@k3b.org>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 
0007 #ifndef K3B_DEVICE_SELECTION_DIALOG_H
0008 #define K3B_DEVICE_SELECTION_DIALOG_H
0009 
0010 
0011 #include "k3b_export.h"
0012 #include <QList>
0013 #include <QDialog>
0014 
0015 namespace K3b {
0016     namespace Device {
0017         class Device;
0018     }
0019 
0020 
0021     class LIBK3B_EXPORT DeviceSelectionDialog : public QDialog
0022     {
0023         Q_OBJECT
0024 
0025     public:
0026         explicit DeviceSelectionDialog( QWidget* parent = 0,
0027                                const QString& text = QString() );
0028         ~DeviceSelectionDialog() override;
0029 
0030         void addDevice( Device::Device* );
0031         void addDevices( const QList<Device::Device*>& );
0032 
0033         void setSelectedDevice( Device::Device* );
0034 
0035         Device::Device* selectedDevice() const;
0036 
0037         static Device::Device* selectWriter( QWidget* parent,
0038                                                   const QString& text = QString() );
0039         static Device::Device* selectDevice( QWidget* parent,
0040                                                   const QString& text = QString() );
0041         static Device::Device* selectDevice( QWidget* parent,
0042                                                   const QList<Device::Device*>& devices,
0043                                                   const QString& text = QString() );
0044 
0045     private:
0046         class Private;
0047         Private* d;
0048     };
0049 }
0050 
0051 #endif