Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
杨家三木
qtcpp_demo
提交
6472d068
qtcpp_demo
项目概览
杨家三木
/
qtcpp_demo
与 Fork 源项目一致
Fork自
colorEagleStdio / qtcpp_demo
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
qtcpp_demo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
6472d068
编写于
2月 06, 2021
作者:
D
dev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Qt5 old version compablity
上级
55fc0d96
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
19 addition
and
6 deletion
+19
-6
uhd_cpp/uhd_spectrum/qtgui/bookmarks.cpp
uhd_cpp/uhd_spectrum/qtgui/bookmarks.cpp
+10
-5
uhd_cpp/uhd_spectrum/qtgui/freqctrl.cpp
uhd_cpp/uhd_spectrum/qtgui/freqctrl.cpp
+4
-0
uhd_cpp/uhd_spectrum/qtgui/plotter.cpp
uhd_cpp/uhd_spectrum/qtgui/plotter.cpp
+5
-1
未找到文件。
uhd_cpp/uhd_spectrum/qtgui/bookmarks.cpp
浏览文件 @
6472d068
...
...
@@ -35,6 +35,11 @@ const QColor TagInfo::DefaultColor(Qt::lightGray);
const
QString
TagInfo
::
strUntagged
(
"Untagged"
);
Bookmarks
*
Bookmarks
::
m_pThis
=
0
;
#if QT_VERSION < 0x051500
#define ENDL endl
#else
#define ENDL Qt::endl
#endif
Bookmarks
::
Bookmarks
()
{
TagInfo
tag
(
TagInfo
::
strUntagged
);
...
...
@@ -155,7 +160,7 @@ bool Bookmarks::save()
QTextStream
stream
(
&
file
);
stream
<<
QString
(
"# Tag name"
).
leftJustified
(
20
)
+
"; "
+
QString
(
" color"
)
<<
Qt
::
endl
;
QString
(
" color"
)
<<
ENDL
;
QSet
<
TagInfo
*>
usedTags
;
for
(
int
iBookmark
=
0
;
iBookmark
<
m_BookmarkList
.
size
();
iBookmark
++
)
...
...
@@ -171,16 +176,16 @@ bool Bookmarks::save()
for
(
QSet
<
TagInfo
*>::
iterator
i
=
usedTags
.
begin
();
i
!=
usedTags
.
end
();
i
++
)
{
TagInfo
&
info
=
**
i
;
stream
<<
info
.
name
.
leftJustified
(
20
)
+
"; "
+
info
.
color
.
name
()
<<
Qt
::
endl
;
stream
<<
info
.
name
.
leftJustified
(
20
)
+
"; "
+
info
.
color
.
name
()
<<
ENDL
;
}
stream
<<
Qt
::
endl
;
stream
<<
ENDL
;
stream
<<
QString
(
"# Frequency"
).
leftJustified
(
12
)
+
"; "
+
QString
(
"Name"
).
leftJustified
(
25
)
+
"; "
+
QString
(
"Modulation"
).
leftJustified
(
20
)
+
"; "
+
QString
(
"Bandwidth"
).
rightJustified
(
10
)
+
"; "
+
QString
(
"Tags"
)
<<
Qt
::
endl
;
QString
(
"Tags"
)
<<
ENDL
;
for
(
int
i
=
0
;
i
<
m_BookmarkList
.
size
();
i
++
)
{
...
...
@@ -199,7 +204,7 @@ bool Bookmarks::save()
line
.
append
(
tag
.
name
);
}
stream
<<
line
<<
Qt
::
endl
;
stream
<<
line
<<
ENDL
;
}
file
.
close
();
...
...
uhd_cpp/uhd_spectrum/qtgui/freqctrl.cpp
浏览文件 @
6472d068
...
...
@@ -471,7 +471,11 @@ void CFreqCtrl::mousePressEvent(QMouseEvent *event)
void
CFreqCtrl
::
wheelEvent
(
QWheelEvent
*
event
)
{
#if QT_VERSION >=0x051500
QPointF
pt
=
event
->
position
();
#else
QPoint
pt
=
event
->
pos
();
#endif
int
numDegrees
=
(
event
->
angleDelta
().
x
()
+
event
->
angleDelta
().
y
()
)
/
8
;
int
numSteps
=
numDegrees
/
15
;
...
...
uhd_cpp/uhd_spectrum/qtgui/plotter.cpp
浏览文件 @
6472d068
...
...
@@ -827,7 +827,11 @@ void CPlotter::zoomOnXAxis(double level)
// Called when a mouse wheel is turned
void
CPlotter
::
wheelEvent
(
QWheelEvent
*
event
)
{
QPointF
pt
=
event
->
position
();
#if QT_VERSION >=0x051500
QPointF
pt
=
event
->
position
();
#else
QPoint
pt
=
event
->
pos
();
#endif
pt
.
setX
(
pt
.
x
()
/
pixRatio
()
+
.5
);
pt
.
setY
(
pt
.
y
()
/
pixRatio
()
+
.5
);
int
numDegrees
=
(
event
->
angleDelta
().
x
()
+
event
->
angleDelta
().
y
())
/
8
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录