mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-10 06:39:49 +00:00
43 lines
851 B
C++
43 lines
851 B
C++
#ifndef CSM_PREFS_StringSetting_H
|
|
#define CSM_PREFS_StringSetting_H
|
|
|
|
#include "setting.hpp"
|
|
|
|
#include <string>
|
|
#include <utility>
|
|
|
|
class QLineEdit;
|
|
class QMutex;
|
|
class QObject;
|
|
class QWidget;
|
|
|
|
namespace CSMPrefs
|
|
{
|
|
class Category;
|
|
class StringSetting : public Setting
|
|
{
|
|
Q_OBJECT
|
|
|
|
std::string mTooltip;
|
|
std::string mDefault;
|
|
QLineEdit* mWidget;
|
|
|
|
public:
|
|
StringSetting(Category* parent, QMutex* mutex, const std::string& key, const std::string& label,
|
|
std::string_view default_);
|
|
|
|
StringSetting& setTooltip(const std::string& tooltip);
|
|
|
|
/// Return label, input widget.
|
|
std::pair<QWidget*, QWidget*> makeWidgets(QWidget* parent) override;
|
|
|
|
void updateWidget() override;
|
|
|
|
private slots:
|
|
|
|
void textChanged(const QString& text);
|
|
};
|
|
}
|
|
|
|
#endif
|