~ubuntu-branches/ubuntu/wily/kid3/wily-proposed

« back to all changes in this revision

Viewing changes to kid3/filterdialog.h

  • Committer: Package Import Robot
  • Author(s): Ana Beatriz Guerrero Lopez, Patrick Matthäi, Ana Beatriz Guerrero Lopez
  • Date: 2011-11-13 16:34:13 UTC
  • mfrom: (1.1.13) (2.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20111113163413-5y0anlc4dqf511uh
Tags: 2.0.1-1
* New upstream release.

[ Patrick Matthäi ]
* Adjust build system.
* Add build dependency xsltproc.

[ Ana Beatriz Guerrero Lopez ]
* Some more adjustments to the build system taken from upstream's deb/
* directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 * \file filterdialog.h
3
 
 * Filter dialog.
4
 
 *
5
 
 * \b Project: Kid3
6
 
 * \author Urs Fleisch
7
 
 * \date 16 Jan 2008
8
 
 *
9
 
 * Copyright (C) 2008  Urs Fleisch
10
 
 *
11
 
 * This file is part of Kid3.
12
 
 *
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.
17
 
 *
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.
22
 
 *
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/>.
25
 
 */
26
 
 
27
 
#ifndef FILTERDIALOG_H
28
 
#define FILTERDIALOG_H
29
 
 
30
 
#include <qdialog.h>
31
 
#include <qstringlist.h>
32
 
#include <qtextedit.h>
33
 
#include "filefilter.h"
34
 
 
35
 
class QLineEdit;
36
 
class QComboBox;
37
 
class QPushButton;
38
 
 
39
 
/**
40
 
 * Filter dialog.
41
 
 */
42
 
class FilterDialog : public QDialog {
43
 
Q_OBJECT
44
 
 
45
 
public:
46
 
        /**
47
 
         * Constructor.
48
 
         *
49
 
         * @param parent parent widget
50
 
         */
51
 
        FilterDialog(QWidget* parent);
52
 
 
53
 
        /**
54
 
         * Destructor.
55
 
         */
56
 
        ~FilterDialog();
57
 
 
58
 
        /**
59
 
         * Read the local settings from the configuration.
60
 
         */
61
 
        void readConfig();
62
 
 
63
 
        /**
64
 
         * Display information in text view.
65
 
         *
66
 
         * @param text text to display
67
 
         */
68
 
        void showInformation(const QString& text) { m_edit->append(text); }
69
 
 
70
 
        /**
71
 
         * Clear abort flag.
72
 
         */
73
 
        void clearAbortFlag() { m_aborted = false; }
74
 
 
75
 
        /**
76
 
         * Check if dialog was aborted.
77
 
         * @return true if aborted.
78
 
         */
79
 
        bool getAbortFlag() { return m_aborted; }
80
 
 
81
 
signals:
82
 
        /**
83
 
         * Is triggered when the selected @a filter has to be applied.
84
 
         */
85
 
        void apply(FileFilter&);
86
 
 
87
 
public slots:
88
 
        /**
89
 
         * Set the filter lineedit to the filter selected in the combo box.
90
 
         *
91
 
         * @param index current index of the combo box
92
 
         */
93
 
        void setFilterLineEdit(int index);
94
 
 
95
 
private slots:
96
 
        /**
97
 
         * Save the local settings to the configuration.
98
 
         */
99
 
        void saveConfig();
100
 
 
101
 
        /**
102
 
         * Show help.
103
 
         */
104
 
        void showHelp();
105
 
 
106
 
        /**
107
 
         * Apply filter.
108
 
         */
109
 
        void applyFilter();
110
 
 
111
 
        /**
112
 
         * Set abort flag.
113
 
         */
114
 
        void setAbortFlag();
115
 
 
116
 
private:
117
 
        /**
118
 
         * Set the filter combo box and line edit from the configuration.
119
 
         */
120
 
        void setFiltersFromConfig();
121
 
 
122
 
  /** Text editor */
123
 
  QTextEdit* m_edit;
124
 
        /** cobobox with filter names */
125
 
        QComboBox* m_nameComboBox;
126
 
        /** LineEdit for filter expression */
127
 
        QLineEdit* m_filterLineEdit;
128
 
        /** Apply button */
129
 
        QPushButton* m_applyButton;
130
 
        /** filter names */
131
 
        QStringList m_filterNames;
132
 
        /** filter expressions */
133
 
        QStringList m_filterExpressions;
134
 
        /** file filter used */
135
 
        FileFilter m_fileFilter;
136
 
        /** abort flag */
137
 
        bool m_aborted;
138
 
};
139
 
 
140
 
#endif