File indexing completed on 2025-02-23 04:34:23
0001 /** 0002 * \file formatbox.h 0003 * Group box containing format options. 0004 * 0005 * \b Project: Kid3 0006 * \author Urs Fleisch 0007 * \date 17 Sep 2003 0008 * 0009 * Copyright (C) 2003-2024 Urs Fleisch 0010 * 0011 * This file is part of Kid3. 0012 * 0013 * Kid3 is free software; you can redistribute it and/or modify 0014 * it under the terms of the GNU General Public License as published by 0015 * the Free Software Foundation; either version 2 of the License, or 0016 * (at your option) any later version. 0017 * 0018 * Kid3 is distributed in the hope that it will be useful, 0019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0021 * GNU General Public License for more details. 0022 * 0023 * You should have received a copy of the GNU General Public License 0024 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0025 */ 0026 0027 #pragma once 0028 0029 #include <QGroupBox> 0030 0031 class QFormLayout; 0032 class QComboBox; 0033 class QCheckBox; 0034 class QString; 0035 class FormatConfig; 0036 class ConfigTable; 0037 class ConfigTableModel; 0038 0039 /** 0040 * Group box containing format options. 0041 */ 0042 class FormatBox : public QGroupBox { 0043 Q_OBJECT 0044 public: 0045 /** 0046 * Constructor. 0047 * 0048 * @param title title 0049 * @param parent parent widget 0050 */ 0051 explicit FormatBox(const QString& title, QWidget* parent = nullptr); 0052 0053 /** 0054 * Destructor. 0055 */ 0056 ~FormatBox() override = default; 0057 0058 /** 0059 * Set the values from a format configuration. 0060 * 0061 * @param cfg format configuration 0062 */ 0063 virtual void fromFormatConfig(const FormatConfig& cfg); 0064 0065 /** 0066 * Store the values in a format configuration. 0067 * 0068 * @param cfg format configuration 0069 */ 0070 virtual void toFormatConfig(FormatConfig& cfg) const; 0071 0072 protected: 0073 /** 0074 * Get form layout. 0075 * @return form layout. 0076 */ 0077 QFormLayout* getFormLayout() const { return m_formLayout; } 0078 0079 private: 0080 QFormLayout* m_formLayout; 0081 QComboBox* m_caseConvComboBox; 0082 QComboBox* m_localeComboBox; 0083 QCheckBox* m_strRepCheckBox; 0084 ConfigTable* m_strReplTable; 0085 ConfigTableModel* m_strReplTableModel; 0086 QCheckBox* m_formatEditingCheckBox; 0087 };