1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00
OpenMW/apps/opencs/model/prefs/stringsetting.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
834 B
C++
Raw Normal View History

#ifndef CSM_PREFS_StringSetting_H
#define CSM_PREFS_StringSetting_H
#include "setting.hpp"
2022-10-19 19:02:00 +02:00
#include <string>
#include <utility>
class QLineEdit;
2022-10-19 19:02:00 +02:00
class QMutex;
class QObject;
class QWidget;
namespace CSMPrefs
{
2022-10-19 19:02:00 +02:00
class Category;
2023-11-12 00:52:09 +01:00
class StringSetting final : public TypedSetting<std::string>
{
Q_OBJECT
std::string mTooltip;
QLineEdit* mWidget;
public:
2023-11-12 00:52:09 +01:00
explicit StringSetting(
Category* parent, QMutex* mutex, const std::string& key, const QString& label, Settings::Index& index);
StringSetting& setTooltip(const std::string& tooltip);
/// Return label, input widget.
SettingWidgets makeWidgets(QWidget* parent) override;
void updateWidget() override;
private slots:
void textChanged(const QString& text);
};
}
#endif