mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-20 17:40:12 +00:00
27 lines
543 B
C++
27 lines
543 B
C++
#include "textOpt_ui.hpp"
|
|
|
|
TextOptUi::TextOptUi(Settings *settings, const std::string &opt) :
|
|
WidgetUi(settings, opt)
|
|
{
|
|
registerCallback();
|
|
}
|
|
|
|
void TextOptUi::textEdited(const QString &str){
|
|
settings->getOption(opt).setValue(str.toStdString());
|
|
emit changed();
|
|
}
|
|
|
|
void TextOptUi::optChangeCallback(Option &changedOpt, bool /*suboption*/){
|
|
if(changedOpt.getName() == opt){
|
|
updateUiState(changedOpt.getValue());
|
|
}
|
|
}
|
|
|
|
std::string TextOptUi::getOptValue(){
|
|
if(opt.empty()){
|
|
return "";
|
|
}
|
|
|
|
return settings->getOption(opt).getValue();
|
|
}
|