File indexing completed on 2023-05-30 11:30:44
0001 /** 0002 * Copyright (C) 2003-2004 Scott Wheeler <wheeler@kde.org> 0003 * 0004 * This program is free software; you can redistribute it and/or modify it under 0005 * the terms of the GNU General Public License as published by the Free Software 0006 * Foundation; either version 2 of the License, or (at your option) any later 0007 * version. 0008 * 0009 * This program is distributed in the hope that it will be useful, but WITHOUT ANY 0010 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 0011 * PARTICULAR PURPOSE. See the GNU General Public License for more details. 0012 * 0013 * You should have received a copy of the GNU General Public License along with 0014 * this program. If not, see <http://www.gnu.org/licenses/>. 0015 */ 0016 0017 #ifndef ADVANCEDSEARCHDIALOG_H 0018 #define ADVANCEDSEARCHDIALOG_H 0019 0020 #include <QDialog> 0021 #include <QList> 0022 0023 #include "playlistsearch.h" 0024 0025 class QLineEdit; 0026 class QPushButton; 0027 class QRadioButton; 0028 class SearchLine; 0029 class QBoxLayout; 0030 0031 class AdvancedSearchDialog : public QDialog 0032 { 0033 Q_OBJECT 0034 0035 public: 0036 explicit AdvancedSearchDialog( 0037 const QString& defaultName, 0038 PlaylistSearch& defaultSearch, 0039 QWidget* parent = nullptr); 0040 0041 PlaylistSearch* resultSearch() const 0042 { 0043 return m_search; 0044 } 0045 0046 QString resultPlaylistName() const 0047 { 0048 return m_playlistName; 0049 } 0050 0051 protected slots: 0052 void accept() Q_DECL_OVERRIDE; 0053 void clearSearches(); 0054 void more(); 0055 void fewer(); 0056 0057 private: 0058 void updateButtons(); 0059 0060 QBoxLayout *m_criteriaLayout; 0061 PlaylistSearch* m_search; 0062 QString m_playlistName; 0063 QList<SearchLine *> m_searchLines; 0064 QLineEdit *m_playlistNameLineEdit; 0065 QRadioButton *m_matchAnyButton; 0066 QRadioButton *m_matchAllButton; 0067 QPushButton *m_moreButton; 0068 QPushButton *m_fewerButton; 0069 }; 0070 0071 #endif 0072 0073 // vim: set et sw=4 tw=0 sta: