File indexing completed on 2024-04-28 04:55:51
0001 /* 0002 This file is part of Choqok, the KDE micro-blogging client 0003 0004 SPDX-FileCopyrightText: 2011-2012 Mehrdad Momeny <mehrdad.momeny@gmail.com> 0005 SPDX-FileCopyrightText: 2011 Farhad Hedayati-Fard <hf.farhad@gmail.com> 0006 0007 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0008 */ 0009 0010 #ifndef QUICKFILTER_H 0011 #define QUICKFILTER_H 0012 0013 #include <QList> 0014 0015 #include "plugin.h" 0016 0017 class QAction; 0018 namespace Choqok 0019 { 0020 class Account; 0021 namespace UI 0022 { 0023 class PostWidget; 0024 } 0025 } 0026 0027 class QLineEdit; 0028 class QToolBar; 0029 0030 class QuickFilter : public Choqok::Plugin 0031 { 0032 Q_OBJECT 0033 public: 0034 QuickFilter(QObject *parent, const QList< QVariant > &args); 0035 ~QuickFilter(); 0036 0037 public Q_SLOTS: 0038 void createUiInterface(); 0039 void showAuthorFilterUiInterface(bool); 0040 void showContentFilterUiInterface(bool); 0041 void showAllPosts(); 0042 0043 protected Q_SLOTS: 0044 void filterByAuthor(); 0045 void filterByContent(); 0046 void filterNewPost(Choqok::UI::PostWidget *, Choqok::Account *, QString); 0047 0048 private Q_SLOTS: 0049 void updateUser(QString user); 0050 void updateContent(QString text); 0051 0052 private: 0053 QString m_filterUser; 0054 QString m_filterText; 0055 QLineEdit *m_aledit; 0056 QLineEdit *m_tledit; 0057 QToolBar *m_authorToolbar; 0058 QToolBar *m_textToolbar; 0059 QAction *m_authorAction; 0060 QAction *m_textAction; 0061 }; 0062 0063 #endif // QUICKFILTER_H