Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Obs Studio
提交
724690d7
O
Obs Studio
项目概览
小白菜888
/
Obs Studio
通知
4
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Obs Studio
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
724690d7
编写于
3月 24, 2015
作者:
P
Palana
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UI: Update window titles on source name change
上级
946b9d01
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
27 addition
and
0 deletion
+27
-0
obs/window-basic-interaction.cpp
obs/window-basic-interaction.cpp
+11
-0
obs/window-basic-interaction.hpp
obs/window-basic-interaction.hpp
+2
-0
obs/window-basic-properties.cpp
obs/window-basic-properties.cpp
+12
-0
obs/window-basic-properties.hpp
obs/window-basic-properties.hpp
+2
-0
未找到文件。
obs/window-basic-interaction.cpp
浏览文件 @
724690d7
...
...
@@ -35,6 +35,8 @@ OBSBasicInteraction::OBSBasicInteraction(QWidget *parent, OBSSource source_)
source
(
source_
),
removedSignal
(
obs_source_get_signal_handler
(
source
),
"remove"
,
OBSBasicInteraction
::
SourceRemoved
,
this
),
renamedSignal
(
obs_source_get_signal_handler
(
source
),
"rename"
,
OBSBasicInteraction
::
SourceRenamed
,
this
),
eventFilter
(
BuildEventFilter
())
{
int
cx
=
(
int
)
config_get_int
(
App
()
->
GlobalConfig
(),
"InteractionWindow"
,
...
...
@@ -115,6 +117,15 @@ void OBSBasicInteraction::SourceRemoved(void *data, calldata_t *params)
UNUSED_PARAMETER
(
params
);
}
void
OBSBasicInteraction
::
SourceRenamed
(
void
*
data
,
calldata_t
*
params
)
{
const
char
*
name
=
calldata_string
(
params
,
"new_name"
);
QString
title
=
QTStr
(
"Basic.InteractionWindow"
).
arg
(
QT_UTF8
(
name
));
QMetaObject
::
invokeMethod
(
static_cast
<
OBSBasicProperties
*>
(
data
),
"setWindowTitle"
,
Q_ARG
(
QString
,
title
));
}
void
OBSBasicInteraction
::
DrawPreview
(
void
*
data
,
uint32_t
cx
,
uint32_t
cy
)
{
OBSBasicInteraction
*
window
=
static_cast
<
OBSBasicInteraction
*>
(
data
);
...
...
obs/window-basic-interaction.hpp
浏览文件 @
724690d7
...
...
@@ -42,9 +42,11 @@ private:
OBSSource
source
;
OBSDisplay
display
;
OBSSignal
removedSignal
;
OBSSignal
renamedSignal
;
std
::
unique_ptr
<
OBSEventFilter
>
eventFilter
;
static
void
SourceRemoved
(
void
*
data
,
calldata_t
*
params
);
static
void
SourceRenamed
(
void
*
data
,
calldata_t
*
params
);
static
void
DrawPreview
(
void
*
data
,
uint32_t
cx
,
uint32_t
cy
);
bool
GetSourceRelativeXY
(
int
mouseX
,
int
mouseY
,
int
&
x
,
int
&
y
);
...
...
obs/window-basic-properties.cpp
浏览文件 @
724690d7
...
...
@@ -38,6 +38,9 @@ OBSBasicProperties::OBSBasicProperties(QWidget *parent, OBSSource source_)
removedSignal
(
obs_source_get_signal_handler
(
source
),
"remove"
,
OBSBasicProperties
::
SourceRemoved
,
this
),
renamedSignal
(
obs_source_get_signal_handler
(
source
),
"rename"
,
OBSBasicProperties
::
SourceRenamed
,
this
),
oldSettings
(
obs_data_create
()),
buttonBox
(
new
QDialogButtonBox
(
this
))
{
...
...
@@ -107,6 +110,15 @@ void OBSBasicProperties::SourceRemoved(void *data, calldata_t *params)
UNUSED_PARAMETER
(
params
);
}
void
OBSBasicProperties
::
SourceRenamed
(
void
*
data
,
calldata_t
*
params
)
{
const
char
*
name
=
calldata_string
(
params
,
"new_name"
);
QString
title
=
QTStr
(
"Basic.PropertiesWindow"
).
arg
(
QT_UTF8
(
name
));
QMetaObject
::
invokeMethod
(
static_cast
<
OBSBasicProperties
*>
(
data
),
"setWindowTitle"
,
Q_ARG
(
QString
,
title
));
}
void
OBSBasicProperties
::
UpdateProperties
(
void
*
data
,
calldata_t
*
)
{
QMetaObject
::
invokeMethod
(
static_cast
<
OBSBasicProperties
*>
(
data
)
->
view
,
...
...
obs/window-basic-properties.hpp
浏览文件 @
724690d7
...
...
@@ -40,12 +40,14 @@ private:
OBSSource
source
;
OBSDisplay
display
;
OBSSignal
removedSignal
;
OBSSignal
renamedSignal
;
OBSSignal
updatePropertiesSignal
;
OBSData
oldSettings
;
OBSPropertiesView
*
view
;
QDialogButtonBox
*
buttonBox
;
static
void
SourceRemoved
(
void
*
data
,
calldata_t
*
params
);
static
void
SourceRenamed
(
void
*
data
,
calldata_t
*
params
);
static
void
UpdateProperties
(
void
*
data
,
calldata_t
*
params
);
static
void
DrawPreview
(
void
*
data
,
uint32_t
cx
,
uint32_t
cy
);
bool
ConfirmQuit
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录