| 1 | /* |
| 2 | Copyright (C) 2005-2014 Mario Stephan <[email protected]> |
| 3 | |
| 4 | This library is free software; you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as published |
| 6 | by the Free Software Foundation; either version 2.1 of the License, or |
| 7 | (at your option) any later version. |
| 8 | |
| 9 | This program is distributed in the hope that it will be useful, |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | GNU General Public License for more details. |
| 13 | |
| 14 | You should have received a copy of the GNU Lesser General Public License |
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ |
| 17 | |
| 18 | #ifndef DJFILTERWIDGET_H |
| 19 | #define DJFILTERWIDGET_H |
| 20 | |
| 21 | #include "filter.h" |
| 22 | #include <QTimer> |
| 23 | #include <QWidget> |
| 24 | |
| 25 | namespace Ui { |
| 26 | class DjFilterWidget; |
| 27 | } |
| 28 | |
| 29 | class DjFilterWidget : public QWidget { |
| 30 | Q_OBJECT |
| 31 | public: |
| 32 | DjFilterWidget(QWidget* parent = nullptr); |
| 33 | ~DjFilterWidget(); |
| 34 | |
| 35 | void setFilter(Filter* filter); |
| 36 | Filter* filter(); |
| 37 | void setID(QString value); |
| 38 | void slideCloseWidget(bool open); |
| 39 | void setAllGenres(QStringList& values); |
| 40 | void setAllArtists(QStringList values); |
| 41 | |
| 42 | protected: |
| 43 | void changeEvent(QEvent* event); |
| 44 | void mousePressEvent(QMouseEvent* event); |
| 45 | void keyPressEvent(QKeyEvent* e); |
| 46 | |
| 47 | Q_SIGNALS: |
| 48 | void deleted(); |
| 49 | |
| 50 | private: |
| 51 | Ui::DjFilterWidget* ui; |
| 52 | QTimer* timer; |
| 53 | struct DjFilterWidgetPrivate* p; |
| 54 | |
| 55 | private slots: |
| 56 | void on_pushActivate_clicked(); |
| 57 | void on_txtPath_textChanged(QString); |
| 58 | void on_cmbGenres_editTextChanged(QString); |
| 59 | void on_cmbArtists_editTextChanged(QString); |
| 60 | void on_sliFilterValue_valueChanged(int value); |
| 61 | void slotSetFilter(); |
| 62 | void onFilterStatusChanged(bool b); |
| 63 | void onFilterCountChanged(); |
| 64 | void onFilterUsageChanged(); |
| 65 | void onFilterMaxUsageChanged(); |
| 66 | void on_lbl1_linkActivated(const QString& link); |
| 67 | void timerSlide_timeOut(); |
| 68 | void on_pushClose_clicked(); |
| 69 | }; |
| 70 | |
| 71 | #endif // DJFILTERWIDGET_H |