File indexing completed on 2024-06-23 05:08:10
0001 /* 0002 This file is part of KOrganizer. 0003 0004 SPDX-FileCopyrightText: 2004 Till Adam <adam@kde.org> 0005 SPDX-FileCopyrightText: 2005 Rafal Rzepecki <divide@users.sourceforge.net> 0006 SPDX-FileCopyrightText: 2008 Thomas Thrainer <tom_t@gmx.at> 0007 0008 SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0 0009 */ 0010 0011 #pragma once 0012 0013 #include <QWidget> 0014 0015 namespace KPIM 0016 { 0017 class KCheckComboBox; 0018 } 0019 0020 namespace Akonadi 0021 { 0022 class TagSelectionComboBox; 0023 } 0024 0025 class QLineEdit; 0026 0027 class TodoViewQuickSearch : public QWidget 0028 { 0029 Q_OBJECT 0030 public: 0031 TodoViewQuickSearch(QWidget *parent); 0032 0033 Q_SIGNALS: 0034 void searchTextChanged(const QString &); 0035 0036 /** 0037 * The string list contains the new categories which are set on the filter. 0038 * All values belong to the Qt::UserRole of the combo box, not the Qt::DisplayRole, 0039 * so, if someone checks a subcategory, the value will be "ParentCategory:subCategory" 0040 * and not " subcategory". 0041 * */ 0042 void filterCategoryChanged(const QStringList &); 0043 void filterPriorityChanged(const QStringList &); 0044 0045 public Q_SLOTS: 0046 void reset(); 0047 0048 private: 0049 /** Helper method for the filling of the priority combo. */ 0050 void fillPriorities(); 0051 0052 QLineEdit *const mSearchLine; 0053 Akonadi::TagSelectionComboBox *const mCategoryCombo; 0054 KPIM::KCheckComboBox *const mPriorityCombo; 0055 };