formatbox.h 1.77 KB
Newer Older
1
2
3
4
5
6
7
/**
 * \file formatbox.h
 * Group box containing format options.
 *
 * \b Project: Kid3
 * \author Urs Fleisch
 * \date 17 Sep 2003
8
 *
Urs Fleisch's avatar
Urs Fleisch committed
9
 * Copyright (C) 2003-2009  Urs Fleisch
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 *
 * This file is part of Kid3.
 *
 * Kid3 is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Kid3 is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
25
26
27
28
29
 */

#ifndef FORMATBOX_H
#define FORMATBOX_H

Urs Fleisch's avatar
Urs Fleisch committed
30
31
#include "qtcompatmac.h"
#if QT_VERSION >= 0x040000
32
#include <QGroupBox>
Urs Fleisch's avatar
Urs Fleisch committed
33
#else
34
#include <qgroupbox.h>
Urs Fleisch's avatar
Urs Fleisch committed
35
#endif
36
37
38
39
40

class QComboBox;
class QCheckBox;
class QString;
class FormatConfig;
Urs Fleisch's avatar
Urs Fleisch committed
41
class ConfigTable;
42
43
44
45

/**
 * Group box containing format options.
 */
46
class FormatBox : public QGroupBox
47
{
48
Q_OBJECT
49
50
51
52
53
54
55
public:
	/**
	 * Constructor.
	 *
	 * @param title  title
	 * @param parent parent widget
	 */
56
	FormatBox(const QString& title, QWidget* parent = 0);
Urs Fleisch's avatar
Urs Fleisch committed
57

58
59
60
61
	/**
	 * Destructor.
	 */
	~FormatBox();
Urs Fleisch's avatar
Urs Fleisch committed
62

63
64
65
66
67
	/**
	 * Set the values from a format configuration.
	 *
	 * @param cfg format configuration
	 */
Urs Fleisch's avatar
Urs Fleisch committed
68
	void fromFormatConfig(const FormatConfig* cfg);
Urs Fleisch's avatar
Urs Fleisch committed
69

70
71
72
73
74
	/**
	 * Store the values in a format configuration.
	 *
	 * @param cfg format configuration
	 */
Urs Fleisch's avatar
Urs Fleisch committed
75
	void toFormatConfig(FormatConfig* cfg) const;
Urs Fleisch's avatar
Urs Fleisch committed
76

77
private:
Urs Fleisch's avatar
Urs Fleisch committed
78
79
	QComboBox* m_caseConvComboBox;
	QCheckBox* m_strRepCheckBox;
Urs Fleisch's avatar
Urs Fleisch committed
80
	ConfigTable* m_strReplTable;
81
	QCheckBox* m_formatEditingCheckBox;
82
83
84
};

#endif