File indexing completed on 2024-05-19 04:56:04
0001 /** 0002 * \file iframeeditor.h 0003 * Interface for editor of frame fields. 0004 * 0005 * \b Project: Kid3 0006 * \author Urs Fleisch 0007 * \date 18 Jul 2011 0008 * 0009 * Copyright (C) 2011-2018 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 "kid3api.h" 0030 #include "frame.h" 0031 0032 class QObject; 0033 class TaggedFile; 0034 0035 /** 0036 * Interface for editor of frame fields. 0037 */ 0038 class KID3_CORE_EXPORT IFrameEditor { 0039 public: 0040 /** 0041 * Destructor. 0042 */ 0043 virtual ~IFrameEditor(); 0044 0045 /** 0046 * Let user edit a frame and then update the fields 0047 * when the edits are accepted. 0048 * frameEdited() is emitted when the edit dialog is closed with the edited 0049 * frame as a parameter if it was accepted. 0050 * 0051 * @param frame frame to edit 0052 * @param taggedFile tagged file where frame has to be set 0053 */ 0054 virtual void editFrameOfTaggedFile(const Frame* frame, 0055 TaggedFile* taggedFile) = 0; 0056 0057 /** 0058 * Let user select a frame type. 0059 * frameSelected() is emitted when the edit dialog is closed with the selected 0060 * frame as a parameter if a frame is selected. 0061 * 0062 * @param frame is filled with the selected frame 0063 * @param taggedFile tagged file for which frame has to be selected 0064 */ 0065 virtual void selectFrame(Frame* frame, const TaggedFile* taggedFile) = 0; 0066 0067 /** 0068 * Return object which emits frameSelected(), frameEdited() signals. 0069 * 0070 * @return object which emits signals. 0071 */ 0072 virtual QObject* qobject() = 0; 0073 0074 /** 0075 * Get the tag number of the edited frame. 0076 * @return tag number. 0077 */ 0078 virtual Frame::TagNumber tagNumber() const = 0; 0079 0080 /** 0081 * Set the tag number of the edited frame. 0082 * @param tagNr tag number 0083 */ 0084 virtual void setTagNumber(Frame::TagNumber tagNr) = 0; 0085 };