File indexing completed on 2024-09-15 03:28:21
0001 /* 0002 This file is part of Kiten, a KDE Japanese Reference Tool 0003 SPDX-FileCopyrightText: 2006 Joseph Kerian <jkerian@gmail.com> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #ifndef RADSELECTVIEW_H 0009 #define RADSELECTVIEW_H 0010 0011 // generated from the uic from radical_selector.ui (defines Ui::radical_selector) 0012 #include "ui_radical_selector.h" 0013 0014 #include <QList> 0015 #include <QWidget> 0016 0017 class ButtonGrid; 0018 class QListWidgetItem; 0019 class QString; 0020 0021 #include "radicalfile.h" //For Kanji/radicalFile definitions 0022 0023 class RadSelectView : public QWidget, public Ui::radical_selector 0024 { 0025 Q_OBJECT 0026 0027 public: 0028 explicit RadSelectView(QWidget *parent); 0029 ~RadSelectView() override; 0030 0031 // Load pre-determined search parameters 0032 void loadRadicals(const QString &radicals, int strokeMin, int strokeMax); 0033 void loadKanji(QString &kanji); 0034 0035 Q_SIGNALS: 0036 void signalChangeStatusbar(const QString &text); 0037 // Listen for this if you want to detect each minor change 0038 void searchModified(); 0039 // This is when they've actually pressed a kanji 0040 void kanjiSelected(const QStringList &kanjiList); 0041 0042 private Q_SLOTS: 0043 void loadSettings(); 0044 // Handles either of the stroke limiters moving 0045 void strokeLimitChanged(int newvalue); 0046 // Connected to any changes in searches, emits searchModified 0047 void changedSearch(); 0048 // Clear everything 0049 void clearSearch(); 0050 // Result is clicked 0051 void kanjiClicked(QListWidgetItem *item); 0052 // Result is double-clicked 0053 void kanjiDoubleClicked(QListWidgetItem *item); 0054 // Sets the list of visible Kanji 0055 void listPossibleKanji(const QList<Kanji> &list); 0056 // Copy text from lineedit to clipboard 0057 void toClipboard(); 0058 0059 private: 0060 RadicalFile *m_radicalInfo; 0061 ButtonGrid *m_buttongrid; 0062 QList<Kanji> m_possibleKanji; 0063 }; 0064 0065 #endif