File indexing completed on 2024-04-14 04:37:16

0001 /*
0002  * SPDX-FileCopyrightText: 2007-2008 Kare Sars <kare dot sars at iki dot fi>
0003  * SPDX-FileCopyrightText: 2014 Gregor Mitsch : port to KDE5 frameworks
0004  *
0005  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0006  */
0007 
0008 #ifndef KSANE_FIND_DEVICES_THREAD_H
0009 #define KSANE_FIND_DEVICES_THREAD_H
0010 
0011 #include "deviceinformation.h"
0012 #include "interface.h"
0013 
0014 #include <QThread>
0015 #include <QList>
0016 
0017 namespace KSaneCore
0018 {
0019 
0020 class FindSaneDevicesThread : public QThread
0021 {
0022     Q_OBJECT
0023 
0024 public:
0025     static FindSaneDevicesThread *getInstance();
0026     ~FindSaneDevicesThread() override;
0027     void run() override;
0028 
0029     QList<DeviceInformation *> devicesList() const;
0030     void setDeviceType(const Interface::DeviceType type);
0031 
0032 private:
0033     FindSaneDevicesThread();
0034 
0035     QList<DeviceInformation *> m_deviceList;
0036     Interface::DeviceType m_deviceType = Interface::AllDevices;
0037 };
0038 
0039 } // namespace KSaneCore
0040 
0041 #endif // KSANE_FIND_DEVICES_THREAD_H