File indexing completed on 2024-05-12 16:15:48

0001 /*
0002   SPDX-FileCopyrightText: 2012-2023 Laurent Montel <montel@kde.org>
0003 
0004   SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "textaddonswidgets_export.h"
0010 
0011 #include <QDialog>
0012 
0013 namespace TextAddonsWidgets
0014 {
0015 class SelectSpecialCharDialogPrivate;
0016 /**
0017  * @brief The SelectSpecialCharDialog class
0018  * @author Laurent Montel <montel@kde.org>
0019  */
0020 class TEXTADDONSWIDGETS_EXPORT SelectSpecialCharDialog : public QDialog
0021 {
0022     Q_OBJECT
0023 public:
0024     explicit SelectSpecialCharDialog(QWidget *parent);
0025     ~SelectSpecialCharDialog() override;
0026 
0027     void setCurrentChar(QChar c);
0028     Q_REQUIRED_RESULT QChar currentChar() const;
0029 
0030     void setOkButtonText(const QString &text);
0031 
0032     void showSelectButton(bool show);
0033 
0034     /*
0035      * When we double click we call accept
0036      */
0037     void autoInsertChar();
0038 
0039 Q_SIGNALS:
0040     void charSelected(QChar);
0041 
0042 private:
0043     friend class SelectSpecialCharDialogPrivate;
0044     std::unique_ptr<SelectSpecialCharDialogPrivate> const d;
0045 };
0046 }