1 /** @file cvarchoicewidget.h Console variable choice. 2 * 3 * @authors Copyright (c) 2013-2017 Jaakko Keränen <jaakko.keranen@iki.fi> 4 * 5 * @par License 6 * GPL: http://www.gnu.org/licenses/gpl.html 7 * 8 * <small>This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by the 10 * Free Software Foundation; either version 2 of the License, or (at your 11 * option) any later version. This program is distributed in the hope that it 12 * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty 13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 14 * Public License for more details. You should have received a copy of the GNU 15 * General Public License along with this program; if not, see: 16 * http://www.gnu.org/licenses</small> 17 */ 18 19 #ifndef DENG_CLIENT_CVARCHOICEWIDGET_H 20 #define DENG_CLIENT_CVARCHOICEWIDGET_H 21 22 #include <de/ChoiceWidget> 23 #include "icvarwidget.h" 24 25 /** 26 * Console variable choice for integer-type cvars with a limited number of 27 * valid settings. The choice items' user data is used as the cvar value. 28 */ 29 class CVarChoiceWidget : public de::ChoiceWidget, public ICVarWidget 30 { 31 Q_OBJECT 32 33 public: 34 CVarChoiceWidget(char const *cvarPath); 35 36 char const *cvarPath() const; 37 38 public slots: 39 void updateFromCVar(); 40 41 protected slots: 42 void setCVarValueFromWidget(); 43 44 private: 45 DENG2_PRIVATE(d) 46 }; 47 48 #endif // DENG_CLIENT_CVARCHOICEWIDGET_H 49