File indexing completed on 2024-09-15 03:28:18
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 0021 class SearchStringInput : public QObject 0022 { 0023 Q_OBJECT 0024 0025 public: 0026 explicit SearchStringInput(Kiten *parent); 0027 0028 DictQuery getSearchQuery() const; 0029 void setDefaultsFromConfig(); 0030 void setSearchQuery(const DictQuery &query); 0031 void updateFontFromConfig(); 0032 0033 public Q_SLOTS: 0034 void test(); 0035 void focusInput(); 0036 0037 Q_SIGNALS: 0038 void search(); 0039 0040 private: 0041 KSelectAction *_actionFilterRare = nullptr; 0042 // Search exact/anywhere/beginning 0043 KSelectAction *_actionSearchSection = nullptr; 0044 KSelectAction *_actionSelectWordType = nullptr; 0045 KHistoryComboBox *_actionTextInput = nullptr; 0046 QAction *_actionFocusInput = nullptr; 0047 Kiten *_parent = nullptr; 0048 }; 0049 0050 #endif