From 461314f5324d1bc680da3a13d20d59e3cc8cfc10 Mon Sep 17 00:00:00 2001 From: scottxu Date: Sun, 11 Jul 2021 12:12:58 +0800 Subject: [PATCH] Add the feature of displaying version information. --- rtsp_properties.cpp | 9 +++ rtsp_properties.ui | 173 +++++++++++++++++++++++++++----------------- 2 files changed, 116 insertions(+), 66 deletions(-) diff --git a/rtsp_properties.cpp b/rtsp_properties.cpp index 451b1764..b563db2d 100644 --- a/rtsp_properties.cpp +++ b/rtsp_properties.cpp @@ -48,6 +48,12 @@ RtspProperties::RtspProperties(std::string rtspOutputName, QWidget *parent) connect(this, &RtspProperties::setLabelMessageStatus, this, &RtspProperties::onLabelMessageStatusChanging); + //ui->lineEditUrlSuffix->setValidator(new QRegExpValidator(QRegExp("^([-A-Za-z0-9+&@#%=~_|]+)(\\/[-A-Za-z0-9+&@#%=~_|]+)*$"), this)); + +#ifdef VERSION_STRING + ui->labelVersion->setText(VERSION_STRING); +#endif + settings = rtspOutputHelper->GetSettings(); onButtonStatusChanging(!rtspOutputHelper->IsActive(), rtspOutputHelper->IsActive()); @@ -114,6 +120,9 @@ void RtspProperties::onSpinBoxPortValueChanged(int value) void RtspProperties::onLineEditUrlSuffixValueChanged(const QString value) { + //auto rx = QRegExp("^[-A-Za-z0-9+&@#%=~_|]+(/[-A-Za-z0-9+&@#%=~_|]+)*$"); + //if (!rx.exactMatch(value)) + //return; obs_data_set_string(settings, "url_suffix", value.toStdString().c_str()); } diff --git a/rtsp_properties.ui b/rtsp_properties.ui index 0ffb9041..b3f206c2 100644 --- a/rtsp_properties.ui +++ b/rtsp_properties.ui @@ -537,82 +537,123 @@ - - - - - 0 - 0 - + + + + 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 75 - 23 - - - - RtspServer.Properties.StartOutput - - - true - - - false - - - - - - - - 75 - 23 - - - - RtspServer.Properties.StopOutput - - - - 16 - 16 - + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + RtspServer.Properties.Version + + + Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing + + + + + + + + + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + + + + + + 0 + 0 + + + + + 0 - - true + + 0 - - true + + 0 - - false + + 0 - - - - + + + + + 75 + 23 + + + + RtspServer.Properties.StartOutput + + + true + + + false + + + + + + + + 75 + 23 + + + + RtspServer.Properties.StopOutput + + + + 16 + 16 + + + + true + + + true + + + false + + + + + + + groupBoxTarget groupBoxOption groupBoxAuthentication - widgetStartOrStop groupBoxStatus RtspPropertiesverSpacer