File indexing completed on 2025-01-19 03:59:41

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2003-02-10
0007  * Description : Camera type selection dialog
0008  *
0009  * SPDX-FileCopyrightText: 2003-2005 by Renchi Raju <renchi dot raju at gmail dot com>
0010  * SPDX-FileCopyrightText: 2006-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_CAMERA_SELECTION_H
0017 #define DIGIKAM_CAMERA_SELECTION_H
0018 
0019 // Qt includes
0020 
0021 #include <QString>
0022 #include <QStringList>
0023 #include <QDialog>
0024 
0025 // Local includes
0026 
0027 #include "searchtextbar.h"
0028 
0029 class QTreeWidgetItem;
0030 
0031 namespace Digikam
0032 {
0033 
0034 class CameraSelection : public QDialog
0035 {
0036     Q_OBJECT
0037 
0038 public:
0039 
0040     explicit CameraSelection(QWidget* const parent = nullptr);
0041     ~CameraSelection() override;
0042 
0043     void setCamera(const QString& title, const QString& model,
0044                    const QString& port,  const QString& path);
0045 
0046     QString currentTitle()      const;
0047     QString currentModel()      const;
0048     QString currentPortPath()   const;
0049     QString currentCameraPath() const;
0050 
0051 Q_SIGNALS:
0052 
0053     void signalOkClicked(const QString& title, const QString& model,
0054                          const QString& port,  const QString& path);
0055 
0056 private:
0057 
0058     void getCameraList();
0059     void getSerialPortList();
0060 
0061 private Q_SLOTS:
0062 
0063     void slotHelp();
0064     void slotUMSCameraLinkUsed();
0065     void slotPTPCameraLinkUsed();
0066     void slotPTPIPCameraLinkUsed();
0067     void slotNetworkEditChanged(const QString& text);
0068     void slotSelectionChanged(QTreeWidgetItem*, int);
0069     void slotPortChanged();
0070     void slotOkClicked();
0071     void slotSearchTextChanged(const SearchTextSettings&);
0072 
0073 private:
0074 
0075     class Private;
0076     Private* const d;
0077 };
0078 
0079 } // namespace Digikam
0080 
0081 #endif // DIGIKAM_CAMERA_SELECTION_H