File indexing completed on 2025-01-05 03:52:07
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2006-04-04 0007 * Description : a tool to generate HTML image galleries 0008 * 0009 * SPDX-FileCopyrightText: 2006-2010 by Aurelien Gateau <aurelien dot gateau at free dot fr> 0010 * SPDX-FileCopyrightText: 2012-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_INVISIBLE_BUTTON_GROUP_H 0017 #define DIGIKAM_INVISIBLE_BUTTON_GROUP_H 0018 0019 // Qt includes 0020 0021 #include <QWidget> 0022 0023 class QAbstractButton; 0024 0025 namespace DigikamGenericHtmlGalleryPlugin 0026 { 0027 0028 class InvisibleButtonGroup : public QWidget 0029 { 0030 Q_OBJECT 0031 Q_PROPERTY(int current READ selected WRITE setSelected) 0032 0033 public: 0034 0035 explicit InvisibleButtonGroup(QWidget* const parent); 0036 ~InvisibleButtonGroup() override; 0037 0038 int selected() const; 0039 0040 void addButton(QAbstractButton* button, int id); 0041 0042 public Q_SLOTS: 0043 0044 void setSelected(int id); 0045 0046 Q_SIGNALS: 0047 0048 void selectionChanged(int id); 0049 0050 private: 0051 0052 // Disable 0053 InvisibleButtonGroup() = delete; 0054 0055 private: 0056 0057 class Private; 0058 Private* const d; 0059 }; 0060 0061 } // namespace DigikamGenericHtmlGalleryPlugin 0062 0063 #endif // DIGIKAM_INVISIBLE_BUTTON_GROUP_H