File indexing completed on 2023-05-30 11:30:47
0001 /** 0002 * Copyright (C) 2004 Michael Pyne <mpyne@kde.org> 0003 * 0004 * This program is free software; you can redistribute it and/or modify it under 0005 * the terms of the GNU General Public License as published by the Free Software 0006 * Foundation; either version 2 of the License, or (at your option) any later 0007 * version. 0008 * 0009 * This program is distributed in the hope that it will be useful, but WITHOUT ANY 0010 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 0011 * PARTICULAR PURPOSE. See the GNU General Public License for more details. 0012 * 0013 * You should have received a copy of the GNU General Public License along with 0014 * this program. If not, see <http://www.gnu.org/licenses/>. 0015 */ 0016 0017 #ifndef JUK_FILERENAMEROPTIONS_H 0018 #define JUK_FILERENAMEROPTIONS_H 0019 0020 #include <QDialog> 0021 0022 #include "ui_filerenameroptionsbase.h" 0023 #include "tagrenameroptions.h" 0024 0025 /** 0026 * Base widget implementing the options for a particular tag type. 0027 * 0028 * @author Michael Pyne <mpyne@kde.org> 0029 */ 0030 class FileRenamerTagOptions : public QWidget, public Ui::FileRenamerTagOptionsBase 0031 { 0032 Q_OBJECT 0033 public: 0034 FileRenamerTagOptions(QWidget *parent, const TagRenamerOptions &options); 0035 0036 const TagRenamerOptions &options() const { return m_options; } 0037 0038 protected slots: 0039 virtual void slotBracketsChanged(); 0040 virtual void slotTrackWidthChanged(); 0041 virtual void slotEmptyActionChanged(); 0042 0043 private: 0044 TagRenamerOptions m_options; 0045 }; 0046 0047 /** 0048 * This defines the dialog that actually gets the options from the user. 0049 * 0050 * @author Michael Pyne <mpyne@kde.org> 0051 */ 0052 class TagOptionsDialog : public QDialog 0053 { 0054 Q_OBJECT 0055 0056 public: 0057 TagOptionsDialog(QWidget *parent, const TagRenamerOptions &options, unsigned categoryNumber); 0058 0059 const TagRenamerOptions &options() const { return m_options; } 0060 0061 protected slots: 0062 virtual void accept() override; 0063 0064 private: 0065 0066 // Private methods 0067 0068 void loadConfig(); // Loads m_options from KConfig 0069 void saveConfig(); // Saves m_options to KConfig 0070 0071 // Private members 0072 0073 FileRenamerTagOptions *m_widget; 0074 TagRenamerOptions m_options; 0075 unsigned m_categoryNumber; 0076 }; 0077 0078 #endif /* JUK_FILERENAMEROPTIONS_H */ 0079 0080 // vim: set et sw=4 tw=0 sta: