File indexing completed on 2024-05-05 04:49:24
0001 /**************************************************************************************** 0002 * Copyright (c) 2010 Téo Mrnjavac <teo@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 TRANSCODING_OPTIONSSTACKEDWIDGET_H 0018 #define TRANSCODING_OPTIONSSTACKEDWIDGET_H 0019 0020 #include "core/transcoding/TranscodingFormat.h" 0021 #include "core/transcoding/TranscodingConfiguration.h" 0022 #include "TranscodingPropertyWidget.h" 0023 0024 #include <QMap> 0025 #include <QStackedWidget> 0026 0027 namespace Transcoding 0028 { 0029 0030 class OptionsStackedWidget : public QStackedWidget 0031 { 0032 Q_OBJECT 0033 public: 0034 explicit OptionsStackedWidget( QWidget *parent = nullptr ); 0035 0036 const Configuration configuration( const Configuration::TrackSelection trackSelection ) const; 0037 0038 Q_SIGNALS: 0039 void formatChanged( Encoder encoder ); 0040 0041 public Q_SLOTS: 0042 void switchPage( Encoder encoder ); 0043 0044 private: 0045 void initWelcomePage(); 0046 0047 /** 0048 * Initializes a transcoding format configuration page on the stacked widget. 0049 * @param encoder the encoder enum value. 0050 * @return the index of the page where the configuration widget was initialized. 0051 */ 0052 int initCodecPage( Format *format ); 0053 0054 QMap< Encoder, int > m_pagesMap; 0055 QMap< Encoder, QList< PropertyWidget * > > m_propertyWidgetsMap; 0056 }; 0057 0058 } //namespace Transcoding 0059 0060 #endif //TRANSCODING_OPTIONSSTACKEDWIDGET_H