File indexing completed on 2025-01-26 03:29:46
0001 /*************************************************************************** 0002 * Copyright (C) 2005 by Joshua Keel <joshuakeel@gmail.com> * 0003 * Copyright (C) 2014 by Jeremy Whiting <jpwhiting@kde.org> * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify * 0006 * it under the terms of the GNU General Public License as published by * 0007 * the Free Software Foundation; either version 2 of the License, or * 0008 * (at your option) any later version. * 0009 * * 0010 * This program is distributed in the hope that it will be useful, * 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0013 * GNU General Public License for more details. * 0014 * * 0015 * You should have received a copy of the GNU General Public License * 0016 * along with this program; if not, write to the * 0017 * Free Software Foundation, Inc., * 0018 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 0019 ***************************************************************************/ 0020 0021 0022 #ifndef MAINSETTINGS_H 0023 #define MAINSETTINGS_H 0024 0025 #include "ui_mainsettingswidget.h" 0026 0027 /** user preferences page of the config dialog 0028 * allows choosing a hint hide time, 0029 * the language, and the sound settings*/ 0030 class MainSettings : public QWidget, Ui::MainSettingsWidget 0031 { 0032 Q_OBJECT 0033 public: 0034 /** default constructor */ 0035 explicit MainSettings(QWidget *parent); 0036 0037 /** default destructor */ 0038 ~MainSettings(); 0039 0040 /** save the language setting that has been chosen 0041 * @returns whether the language has changed 0042 */ 0043 bool saveLanguage(); 0044 0045 public Q_SLOTS: 0046 0047 /** toggle advanced settings */ 0048 void slotToggleAdvancedSettings(); 0049 0050 Q_SIGNALS: 0051 0052 /** signifies the language widget has been changed */ 0053 void widgetModified(); 0054 0055 private: 0056 0057 /** get languages from data folders 0058 * populate the language combobox with the names 0059 * also puts the folder name in the userData of the combobox for quick retrieval 0060 */ 0061 void populateLanguageBox(); 0062 }; 0063 0064 #endif 0065