File indexing completed on 2024-03-03 03:49:14

0001 /*
0002     This file is part of Kiten, a KDE Japanese Reference Tool...
0003     SPDX-FileCopyrightText: 2005 Paul Temple <paul.temple@gmx.net>
0004     SPDX-FileCopyrightText: 2006 Joseph Kerian <jkerian@gmail.com>
0005     SPDX-FileCopyrightText: 2006 Eric Kjeldergaard <kjelderg@gmail.com>
0006 
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 
0010 #ifndef CONFIGDICTIONARYSELECTOR_H
0011 #define CONFIGDICTIONARYSELECTOR_H
0012 
0013 #include "ui_configdictselect.h" //From the UI file
0014 
0015 #include <QWidget> //For the WindowFlags on the constructor
0016 
0017 class KConfigSkeleton;
0018 class QString;
0019 
0020 class ConfigDictionarySelector : public QWidget, public Ui::configDictSelect
0021 {
0022     Q_OBJECT
0023 
0024 public:
0025     explicit ConfigDictionarySelector(const QString &dictionaryName, QWidget *parent = nullptr, KConfigSkeleton *iconfig = nullptr, Qt::WindowFlags f = {});
0026 
0027 public Q_SLOTS:
0028     void addDictSlot();
0029     void deleteDictSlot();
0030     bool hasChanged();
0031     bool isDefault();
0032     void updateSettings();
0033     void updateWidgets();
0034     void updateWidgetsDefault();
0035 
0036 Q_SIGNALS:
0037     void widgetChanged();
0038 
0039 private:
0040     QString _dictName;
0041     KConfigSkeleton *_config = nullptr;
0042 };
0043 
0044 #endif