File indexing completed on 2025-01-05 05:19:42

0001 /*
0002     SPDX-FileCopyrightText: 2022 Waqar Ahmed <waqar.17a@gmail.com>
0003     SPDX-License-Identifier: LGPL-2.0-or-later
0004 */
0005 #pragma once
0006 
0007 #include <KLocalizedString>
0008 #include <KTextEditor/ConfigPage>
0009 #include <QIcon>
0010 
0011 class FormatConfigPage final : public KTextEditor::ConfigPage
0012 {
0013     Q_OBJECT
0014 public:
0015     explicit FormatConfigPage(class FormatPlugin *plugin, QWidget *parent = nullptr);
0016 
0017     QString name() const override
0018     {
0019         return i18n("Formatting");
0020     }
0021 
0022     QString fullName() const override
0023     {
0024         return i18n("Formatting Settings");
0025     }
0026 
0027     QIcon icon() const override
0028     {
0029         return QIcon::fromTheme(QStringLiteral("format-indent-less"));
0030     }
0031 
0032     void apply() override;
0033     void reset() override;
0034 
0035     void defaults() override
0036     {
0037     }
0038 
0039 private:
0040     class FormatPlugin *const m_plugin;
0041     class QTabWidget *const m_tabWidget;
0042     class QPlainTextEdit *m_defaultConfigEdit;
0043     class UserConfigEdit *m_userConfigEdit;
0044 };