File indexing completed on 2025-01-19 03:51:26

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2004-05-16
0007  * Description : dialog to set time stamp of picture files.
0008  *
0009  * SPDX-FileCopyrightText: 2012      by Smit Mehta <smit dot meh at gmail dot com>
0010  * SPDX-FileCopyrightText: 2003-2005 by Jesper Pedersen <blackie at kde dot org>
0011  * SPDX-FileCopyrightText: 2006-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0012  * SPDX-FileCopyrightText: 2018-2021 by Maik Qualmann <metzpinguin at gmail dot com>
0013  *
0014  * SPDX-License-Identifier: GPL-2.0-or-later
0015  *
0016  * ============================================================ */
0017 
0018 #ifndef DIGIKAM_TIME_ADJUST_DIALOG_H
0019 #define DIGIKAM_TIME_ADJUST_DIALOG_H
0020 
0021 // Qt includes
0022 
0023 #include <QUrl>
0024 
0025 // Local includes
0026 
0027 #include "dplugindialog.h"
0028 #include "timeadjustsettings.h"
0029 #include "dinfointerface.h"
0030 
0031 using namespace Digikam;
0032 
0033 namespace DigikamGenericTimeAdjustPlugin
0034 {
0035 
0036 class TimeAdjustDialog : public DPluginDialog
0037 {
0038     Q_OBJECT
0039 
0040 public:
0041 
0042     explicit TimeAdjustDialog(QWidget* const parent, DInfoInterface* const iface);
0043     ~TimeAdjustDialog() override;
0044 
0045 private Q_SLOTS:
0046 
0047     void setBusy(bool);
0048     void slotCancelThread();
0049     void slotThreadFinished();
0050     void slotDialogFinished();
0051     void slotProcessStarted(const QUrl&);
0052     void slotPreviewReady(const QUrl&, const QDateTime&, const QDateTime&);
0053     void slotProcessEnded(const QUrl&, const QDateTime&, const QDateTime&, int);
0054 
0055     void slotPreviewTimestamps();
0056     void slotUpdateTimestamps();
0057     void slotOkExitTimestamps();
0058 
0059     void slotPreviewTimer();
0060     void slotUpdateTimer();
0061 
0062 private:
0063 
0064     void readSettings();
0065     void saveSettings();
0066 
0067 protected:
0068 
0069     void closeEvent(QCloseEvent*) override;
0070 
0071 private:
0072 
0073     class Private;
0074     Private* const d;
0075 };
0076 
0077 } // namespace DigikamGenericTimeAdjustPlugin
0078 
0079 #endif // DIGIKAM_TIME_ADJUST_DIALOG_H