File indexing completed on 2024-04-28 04:20:48
0001 // SPDX-FileCopyrightText: 2016-2022 Tobias Leupold <tl at stonemx dot de> 0002 // 0003 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0004 0005 #ifndef AREATAGSELECTDIALOG_H 0006 #define AREATAGSELECTDIALOG_H 0007 0008 // Qt includes 0009 #include <QDialog> 0010 #include <QSet> 0011 #include <QString> 0012 0013 // Qt classes 0014 class QLabel; 0015 class QPaintEvent; 0016 0017 namespace AnnotationDialog 0018 { 0019 0020 class Dialog; 0021 class ListSelect; 0022 class ResizableFrame; 0023 0024 /** 0025 * @brief The AreaTagSelectDialog is the dialog that pops up when 0026 * a new area is drawn on the ImagePreview. 0027 */ 0028 class AreaTagSelectDialog : public QDialog 0029 { 0030 Q_OBJECT 0031 0032 public: 0033 explicit AreaTagSelectDialog(ResizableFrame *area, 0034 ListSelect *ls, 0035 QPixmap areaImage, 0036 Dialog *dialog); 0037 void moveToArea(QPoint areaTopLeft); 0038 0039 protected: 0040 void paintEvent(QPaintEvent *) override; 0041 0042 private Q_SLOTS: 0043 void slotSetTag(const QString &tag); 0044 void slotValidateTag(const QString &tag); 0045 void slotFinished(); 0046 0047 private: 0048 QLabel *m_areaImageLabel; 0049 ResizableFrame *m_area; 0050 ListSelect *m_listSelect; 0051 Dialog *m_dialog; 0052 QLabel *m_messageLabel; 0053 const QSet<QString> m_usedTags; 0054 }; 0055 0056 } 0057 0058 #endif // AREATAGSELECTDIALOG_H 0059 0060 // vi:expandtab:tabstop=4 shiftwidth=4: