9
* Copyright (C) 2008 Urs Fleisch
11
* This file is part of Kid3.
13
* Kid3 is free software; you can redistribute it and/or modify
14
* it under the terms of the GNU General Public License as published by
15
* the Free Software Foundation; either version 2 of the License, or
16
* (at your option) any later version.
18
* Kid3 is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU General Public License for more details.
23
* You should have received a copy of the GNU General Public License
24
* along with this program. If not, see <http://www.gnu.org/licenses/>.
27
#ifndef FILTERDIALOG_H
28
#define FILTERDIALOG_H
31
#include <qstringlist.h>
32
#include <qtextedit.h>
33
#include "filefilter.h"
42
class FilterDialog : public QDialog {
49
* @param parent parent widget
51
FilterDialog(QWidget* parent);
59
* Read the local settings from the configuration.
64
* Display information in text view.
66
* @param text text to display
68
void showInformation(const QString& text) { m_edit->append(text); }
73
void clearAbortFlag() { m_aborted = false; }
76
* Check if dialog was aborted.
77
* @return true if aborted.
79
bool getAbortFlag() { return m_aborted; }
83
* Is triggered when the selected @a filter has to be applied.
85
void apply(FileFilter&);
89
* Set the filter lineedit to the filter selected in the combo box.
91
* @param index current index of the combo box
93
void setFilterLineEdit(int index);
97
* Save the local settings to the configuration.
118
* Set the filter combo box and line edit from the configuration.
120
void setFiltersFromConfig();
124
/** cobobox with filter names */
125
QComboBox* m_nameComboBox;
126
/** LineEdit for filter expression */
127
QLineEdit* m_filterLineEdit;
129
QPushButton* m_applyButton;
131
QStringList m_filterNames;
132
/** filter expressions */
133
QStringList m_filterExpressions;
134
/** file filter used */
135
FileFilter m_fileFilter;