1 /* ScummVM Tools 2 * 3 * ScummVM Tools is the legal property of its developers, whose 4 * names are too numerous to list here. Please refer to the 5 * COPYRIGHT file distributed with this source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 */ 21 22 #ifndef GUI_CONFIGURATION_H 23 #define GUI_CONFIGURATION_H 24 25 #include <wx/filename.h> 26 27 #include "compress.h" // for AudioFormat 28 29 class ToolGUI; 30 31 /** 32 * Current state of the wizard 33 */ 34 struct Configuration { 35 Configuration(); 36 ~Configuration(); 37 38 /** 39 * Fills this config object with values loaded from the permanent storage method 40 */ 41 void load(); 42 43 /** 44 * Saves configuration to a more permanent storage 45 * (registry under unix, .ini like file under other OSes) 46 * 47 * @param all True if all parameters should be saved, including audio parameters. 48 */ 49 void save(bool all = true); 50 51 /** 52 * Returns a list of all supported (as in, we have some defaults for it) platforms 53 */ 54 static wxArrayString getTargetPlatforms(); 55 56 /** 57 * Sets all the compression members to default values based on the 'selectedPlatform' member 58 */ 59 void setPlatformDefaults(); 60 61 /** 62 * Utility functions that test the given lame path. 63 * 64 * @return false indicate that the given lame path does not point to a valid lame executable. 65 */ 66 static bool isLamePathValid(const wxString& mp3LamePath); 67 68 // While prepending with _ would be in line with the coding conventions 69 // this class is just a glorified map with different types, so it seems 70 // unnecessary. 71 72 /** If the user chose the advanced route from the start */ 73 bool advanced; 74 /** true if the user chose to compress, false if extract, undefined if advanced */ 75 bool compressing; 76 77 /** The platform the output files are going to be used on (compression only) */ 78 wxString selectedPlatform; 79 /** The tool the user chose to use, NULL if none has been chosen yet */ 80 const ToolGUI *selectedTool; 81 82 /** Input files selected */ 83 wxArrayString inputFilePaths; 84 /** Path to output to */ 85 wxString outputPath; 86 /** run on all files with the same extension **/ 87 bool multipleRuns; 88 89 /** Audio format selected */ 90 AudioFormat selectedAudioFormat; 91 /** true if the user wants to see the advanced audio options */ 92 bool advancedAudioSettings; 93 94 // mp3 settings 95 wxString mp3LamePath; 96 wxString mp3CompressionType; 97 wxString mp3MpegQuality; 98 wxString mp3ABRBitrate; 99 wxString mp3VBRMinBitrate; 100 wxString mp3VBRMaxBitrate; 101 wxString mp3VBRQuality; 102 103 // flac 104 wxString flacCompressionLevel; 105 wxString flacBlockSize; 106 107 // flac 108 bool useOggQuality; 109 wxString oggQuality; 110 wxString oggMinBitrate; 111 wxString oggAvgBitrate; 112 wxString oggMaxBitrate; 113 }; 114 115 #endif 116