File indexing completed on 2024-04-28 04:48:28
0001 /* 0002 0003 Copyright (C) 2001 Carsten Duvenhorst <duvenhorst@m2.uni-hannover.de> 0004 Copyright (C) 2005 Benjamin Meyer <ben at meyerhome dot net> 0005 0006 This program is free software; you can redistribute it and/or modify 0007 it under the terms of the GNU General Public License as published by 0008 the Free Software Foundation; either version 2 of the License, or 0009 (at your option) any later version. 0010 0011 This program is distributed in the hope that it will be useful, 0012 but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0014 GNU General Public License for more details. 0015 0016 You should have received a copy of the GNU General Public License 0017 along with this program; if not, write to the Free Software 0018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 0019 USA. 0020 0021 Permission is also granted to link this program with the Qt 0022 library, treating Qt like a library that normally accompanies the 0023 operating system kernel, whether or not that is in fact the case. 0024 0025 */ 0026 0027 #ifndef KCMAUDIOCD_H 0028 #define KCMAUDIOCD_H 0029 0030 #include "kcoreaddons_version.h" 0031 #include <KCModule> 0032 #include <KConfig> 0033 #include <QList> 0034 0035 class KConfigDialogManager; 0036 0037 #include "ui_audiocdconfig.h" 0038 0039 class AudiocdConfig : public QWidget, public Ui::AudiocdConfig 0040 { 0041 public: 0042 explicit AudiocdConfig(QWidget *parent) 0043 : QWidget(parent) 0044 { 0045 setupUi(this); 0046 } 0047 }; 0048 0049 class KAudiocdModule : public KCModule 0050 { 0051 Q_OBJECT 0052 0053 public: 0054 explicit KAudiocdModule(QObject *parent, const KPluginMetaData &md); 0055 ~KAudiocdModule() override; 0056 0057 public Q_SLOTS: 0058 void defaults() override; 0059 void save() override; 0060 void load() override; 0061 0062 private Q_SLOTS: 0063 void updateExample(); 0064 void slotConfigChanged(); 0065 void slotEcEnable(); 0066 void slotModuleChanged(); 0067 0068 private: 0069 KConfig *config = nullptr; 0070 bool configChanged = false; 0071 0072 int getBitrateIndex(int value); 0073 0074 QList<KConfigDialogManager *> encoderSettings; 0075 AudiocdConfig *audioConfig = nullptr; 0076 }; 0077 0078 #endif // KCMAUDIOCD_H