File indexing completed on 2024-04-28 04:21:25

0001 // SPDX-FileCopyrightText: 2003-2022 Jesper K. Pedersen <blackie@kde.org>
0002 //
0003 // SPDX-License-Identifier: GPL-2.0-or-later
0004 
0005 #ifndef CATEGORYIMAGECONFIG_H
0006 #define CATEGORYIMAGECONFIG_H
0007 
0008 #include <DB/ImageInfoPtr.h>
0009 
0010 #include <QDialog>
0011 #include <QImage>
0012 #include <QLabel>
0013 
0014 class QComboBox;
0015 class QLabel;
0016 
0017 namespace DB
0018 {
0019 class ImageInfo;
0020 }
0021 
0022 namespace Viewer
0023 {
0024 class CategoryImageConfig : public QDialog
0025 {
0026     Q_OBJECT
0027 
0028 public:
0029     static CategoryImageConfig *instance();
0030     void setCurrentImage(const QImage &image, const DB::ImageInfoPtr &info);
0031     void show();
0032 
0033 protected Q_SLOTS:
0034     void groupChanged();
0035     void memberChanged();
0036     void slotSet();
0037 
0038 protected:
0039     QString currentGroup();
0040 
0041 private:
0042     static CategoryImageConfig *s_instance;
0043     CategoryImageConfig();
0044     QComboBox *m_group;
0045     QStringList m_categoryNames;
0046     QComboBox *m_member;
0047     QLabel *m_current;
0048     QImage m_image;
0049     QLabel *m_imageLabel;
0050     DB::ImageInfoPtr m_info;
0051 };
0052 }
0053 
0054 #endif /* CATEGORYIMAGECONFIG_H */
0055 
0056 // vi:expandtab:tabstop=4 shiftwidth=4: