File indexing completed on 2023-05-30 10:42:10
0001 /* 0002 This file is part of Kiten, a KDE Japanese Reference Tool... 0003 SPDX-FileCopyrightText: 2006 Joseph Kerian <jkerian@gmail.com> 0004 SPDX-FileCopyrightText: 2011 Daniel E. Moctezuma <democtezuma@gmail.com> 0005 0006 SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #ifndef SEARCHSTRINGINPUT_H 0010 #define SEARCHSTRINGINPUT_H 0011 0012 #include <QObject> 0013 0014 #include "dictquery.h" 0015 0016 class QAction; 0017 class KHistoryComboBox; 0018 class KSelectAction; 0019 class Kiten; 0020 class WordType; 0021 0022 class SearchStringInput : public QObject 0023 { 0024 Q_OBJECT 0025 0026 public: 0027 explicit SearchStringInput(Kiten *parent); 0028 0029 DictQuery getSearchQuery() const; 0030 void setDefaultsFromConfig(); 0031 void setSearchQuery(const DictQuery &query); 0032 void updateFontFromConfig(); 0033 0034 public Q_SLOTS: 0035 void test(); 0036 void focusInput(); 0037 0038 Q_SIGNALS: 0039 void search(); 0040 0041 private: 0042 KSelectAction *_actionFilterRare = nullptr; 0043 // Search exact/anywhere/beginning 0044 KSelectAction *_actionSearchSection = nullptr; 0045 KSelectAction *_actionSelectWordType = nullptr; 0046 KHistoryComboBox *_actionTextInput = nullptr; 0047 QAction *_actionFocusInput = nullptr; 0048 Kiten *_parent = nullptr; 0049 }; 0050 0051 #endif