File indexing completed on 2025-01-19 03:56:58

0001 /* ============================================================
0002  *
0003  * This file is a part of the digikam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2017-01-01
0007  * Description : button for choosing time difference photo which accepts drag & drop
0008  *
0009  * SPDX-FileCopyrightText: 2017 by Markus Leuthold <kusi at forum dot titlis dot org>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_DET_BY_CLOCK_PHOTO_BUTTON_H
0016 #define DIGIKAM_DET_BY_CLOCK_PHOTO_BUTTON_H
0017 
0018 // Qt includes
0019 
0020 #include <QPushButton>
0021 #include <QDragEnterEvent>
0022 
0023 namespace Digikam
0024 {
0025 
0026 class DetByClockPhotoButton : public QPushButton
0027 {
0028     Q_OBJECT
0029 
0030 public:
0031 
0032     explicit DetByClockPhotoButton(const QString& text);
0033 
0034     void dragEnterEvent(QDragEnterEvent* event) override;
0035     void dragMoveEvent(QDragMoveEvent* event)   override;
0036     void dropEvent(QDropEvent* event)           override;
0037 
0038 Q_SIGNALS:
0039 
0040     void signalClockPhotoDropped(const QUrl&);
0041 
0042 private:
0043 
0044     // Disable
0045     DetByClockPhotoButton(QWidget*);
0046 };
0047 
0048 } // namespace Digikam
0049 
0050 #endif // DIGIKAM_DET_BY_CLOCK_PHOTO_BUTTON_H