1 /*************************************************************************** 2 * Copyright (C) 2005 by Joshua Keel <joshuakeel@gmail.com> * 3 * Copyright (C) 2014 by Jeremy Whiting <jpwhiting@kde.org> * 4 * * 5 * This program is free software; you can redistribute it and/or modify * 6 * it under the terms of the GNU General Public License as published by * 7 * the Free Software Foundation; either version 2 of the License, or * 8 * (at your option) any later version. * 9 * * 10 * This program is distributed in the hope that it will be useful, * 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 * GNU General Public License for more details. * 14 * * 15 * You should have received a copy of the GNU General Public License * 16 * along with this program; if not, write to the * 17 * Free Software Foundation, Inc., * 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 19 ***************************************************************************/ 20 21 22 #ifndef MAINSETTINGS_H 23 #define MAINSETTINGS_H 24 25 #include "ui_mainsettingswidget.h" 26 27 /** user preferences page of the config dialog 28 * allows choosing a hint hide time, 29 * the language, and the sound settings*/ 30 class MainSettings : public QWidget, Ui::MainSettingsWidget 31 { 32 Q_OBJECT 33 public: 34 /** default constructor */ 35 explicit MainSettings(QWidget *parent); 36 37 /** default destructor */ 38 ~MainSettings(); 39 40 /** save the language setting that has been chosen 41 * @returns whether the language has changed 42 */ 43 bool saveLanguage(); 44 45 public slots: 46 47 /** toggle advanced settings */ 48 void slotToggleAdvancedSettings(); 49 50 signals: 51 52 /** signifies the language widget has been changed */ 53 void widgetModified(); 54 55 private: 56 57 /** get languages from data folders 58 * populate the language combobox with the names 59 * also puts the folder name in the userData of the combobox for quick retrieval 60 */ 61 void populateLanguageBox(); 62 }; 63 64 #endif 65 66