File indexing completed on 2025-01-05 03:52:00

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2003-11-03
0007  * Description : calendar widget used to preview the active template.
0008  *
0009  * SPDX-FileCopyrightText: 2003-2005 by Renchi Raju <renchi dot raju at gmail dot com>
0010  * SPDX-FileCopyrightText: 2007-2008 by Orgad Shaneh <orgads at gmail dot com>
0011  * SPDX-FileCopyrightText: 2012-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0012  *
0013  * SPDX-License-Identifier: GPL-2.0-or-later
0014  *
0015  * ============================================================ */
0016 
0017 #ifndef DIGIKAM_CAL_WIDGET_H
0018 #define DIGIKAM_CAL_WIDGET_H
0019 
0020 // Qt includes
0021 
0022 #include <QWidget>
0023 
0024 class QPaintEvent;
0025 
0026 namespace DigikamGenericCalendarPlugin
0027 {
0028 
0029 class CalWidget : public QWidget
0030 {
0031     Q_OBJECT
0032 
0033 public:
0034 
0035     explicit CalWidget(QWidget* const parent);
0036     ~CalWidget()                    override;
0037 
0038     void setCurrent(int curr);
0039     int current() const;
0040 
0041 public Q_SLOTS:
0042 
0043     void recreate();
0044 
0045 protected:
0046 
0047     void paintEvent(QPaintEvent* e) override;
0048 
0049 protected:
0050 
0051     int m_current;
0052 };
0053 
0054 } // Namespace Digikam
0055 
0056 #endif // DIGIKAM_CAL_WIDGET_H