├── .gitignore ├── Document ├── EVENT.md ├── Project.md ├── algorithm.md ├── chafen.md ├── course.md ├── gantt.md ├── log.out └── naming.md ├── LICENSE ├── Makefile ├── README.md ├── ap.cpp ├── ap.h ├── dot.cpp ├── dot.h ├── eventbutton.cpp ├── eventbutton.h ├── eventset.cpp ├── eventset.h ├── eventset.ui ├── graphicstest.cpp ├── graphicstest.h ├── graphicstest.ui ├── image ├── back.PNG ├── background.jpg ├── background_back.jpg ├── course.png ├── gantt.png ├── image.qrc ├── power.PNG └── screenshot │ └── event.png ├── introduce.cpp ├── introduce.h ├── introduce.ui ├── main.cpp ├── mainwindow.cpp ├── mainwindow.h ├── mainwindow.ui ├── moc_graphicstest.cpp ├── moc_mainwindow.cpp ├── moc_self_organize.cpp ├── moc_self_set.cpp ├── npm-debug.log ├── qrc_image.cpp ├── qt-son.pro ├── qt-son.pro.user ├── qt-son.pro.user.5b189d7 ├── qt-son.pro.user.a605338 ├── realwork.txt ├── self_optimize_set.cpp ├── self_optimize_set.h ├── self_optimize_set.ui ├── self_set.cpp ├── self_set.h ├── self_set.ui ├── self_youhua.cpp ├── self_youhua.h ├── set_algorithm.cpp ├── set_algorithm.h ├── task ├── timer.cpp ├── timer.h ├── ui_graphicstest.h ├── ui_mainwindow.h ├── ui_self_organize.h ├── ui_self_set.h ├── user.cpp └── user.h /.gitignore: -------------------------------------------------------------------------------- 1 | Document/task.md 2 | new.cpp 3 | greenhat.py 4 | -------------------------------------------------------------------------------- /Document/EVENT.md: -------------------------------------------------------------------------------- 1 | # 事件管理器 2 | 3 | --- 4 | 5 | >**服务器**:事件的添加,编辑,删除;处理异常,调配AP和用户节点 6 | >>**AP**: 将数据返回给服务器 7 | >>>**用户**:发送接收数据;模拟事件操作 8 | 9 | ---- 10 | ## 事件编辑: 11 | 12 | * 某区域内用户数量突然增加 13 | >影响: 负载增大,严重时触发容量自配置 14 | 15 | * 某区域内用户数量突然减少 16 | >影响: 负载减小,严重时触发容量自配置 17 | 18 | * 某区域内用户信号突然变差 19 | >影响:触发欠覆盖自优化 20 | 21 | * AP的频率异常改变 22 | >影响:触发频率自配置 23 | 24 | 25 | 26 | 27 | --- 28 | ## 处理算法: 29 | 30 | >还没有......... 31 | 32 | --- 33 | 34 | ## 使用方法: 35 | 为用户提供简单的图形界面和终端输入两种方式 36 | 37 | #### 1.图形界面: 38 | 一个简单时间线上设有多个时间块,每个方块能添加事件。 39 | 40 | ![事件管理器ui](https://github.com/rao1219/qt-SON/blob/master/image/screenshot/event.png) 41 | 42 | #### 2.终端输入: 43 | 44 | **添加事件:** 45 | 46 | ` 47 | usr event add [type] [start_time] [end_time] 48 | ` 49 | 50 | **删除事件:** 51 | 52 | ` 53 | usr event remove [type] [start_time] [end_time] 54 | ` 55 | 56 | (若时间段内没有相应事件将自动忽略) 57 | 58 | **查看已有事件:** 59 | 60 | ` 61 | usr event 62 | ` 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Document/Project.md: -------------------------------------------------------------------------------- 1 | # wifi网络自优化项目 2 | 3 | --- 4 | ## 项目进度 5 | 6 | | 日期 | 内容 | 7 | | -------- | -----: | 8 | |安卓app|[speedtest开源项目](http://www.gregbugaj.com/?attachment_id=70)| 9 | |10-15|[中期定级检查] | 10 | | 10-4 |[数据挖掘论文](http://aminer.org/search/Data%20Mining)| 11 | | 10-2 | [相关字段信息](https://github.com/rao1219/qt-SON/blob/master/Document/naming.md) | 12 | | 9-27 | [后续论文安排](https://github.com/rao1219/qt-SON/blob/master/Document/gantt.md) | 13 | | 9-1 | [事件管理器](https://github.com/rao1219/qt-SON/blob/master/Document/EVENT.md) | 14 | 15 | --- 16 | 17 | ## 论文安排 18 | 19 | | | | 20 | | ------------- |:-------------:| 21 | | 边缘检测算法 | [思路]() | 22 | | 差分进化 | [思路]() | 23 | | 自配置和自优化算法 | [思路](https://github.com/rao1219/qt-SON/blob/master/Document/algorithm.md) | 24 | 25 | 26 | ---- 27 | 28 | ## 项目工程 29 | 30 | [代码在这](https://github.com/rao1219/qt-SON) 31 | 32 | Very Simple qt server project 33 | 34 | | | | 35 | | ------------- |:-------------:| 36 | | UI优化 | [增加自配置页面鼠标提示](https://github.com/rao1219/qt-SON/commit/72e8ef763f1d9d2f527db4be03f77ec54262727f) | 37 | 38 | 39 | 40 | ##### version-1.0 2015-7-23 41 | ### 更新内容: 42 | > * 界面、框架 43 | > * 可视化格点 44 | > * 自配置算法调试完成 45 | 46 | --------- 47 | #### version-2.0 2015-8-12 48 | ### 更新内容: 49 | > * 加入自优化算法 50 | > * 加入事件管理器 51 | > * 修复了前端的一些bug 52 | 53 | ----- 54 | 55 | #### version-3.0 2015-8-30 56 | ### update: 57 | > * update eventbutton 58 | > * update ui-manager 59 | > * add new selfoptimizing 60 | > * fix bugs about event set 61 | 62 | 63 | 64 | --- 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /Document/algorithm.md: -------------------------------------------------------------------------------- 1 | # 自配置和自优化算法 2 | 3 | ---- 4 | 5 | 6 | >SINR:临界信干比 7 | RSRPo:通信最小信号强度 8 | RSRP:信号强度 9 | :覆盖率 10 | 11 | 12 | ##自配置 13 | >(前提:所有AP的功率都为P,求出最优的P,所有基站的位置按正六边形排列,并且满足两基站最小距离大于等于do) 14 | 路损模型: 15 | 16 | ### 1.求do(两个基站之间的最小距离,保证信干比满足条件) 17 | 18 | 19 | 20 | ### 2.覆盖率 21 | (1)假设AP的功率都为P,根据大数据得出了,最佳的P一般在48dB到50dB之间,所以以0.1为单元,带入试出满足覆盖率的功率集合,循环每一个小格 22 | (2)每个小格为圆心,额定半径r为半径寻找基站 23 | (3)半径内每个基站对该小格计算信号强度 24 | (4)在半径内所有基站对该小格算的信号强度中选出最大的信号强度RSRP 25 | (5)如果RSRP RSRPo,此时该小格有效覆盖,计入N 26 | (6)循环结束,满足 条件的功率P放入输出集合中 27 | ###3.能效比 28 | 29 | (自配置在满足覆盖率的条件下,找一个让能效比最大的功率) 30 | 31 | ,在第二步的基础上,在输出集合里找一个最大能效比的功率P 32 | ### 4.信干比 33 | (自配置在满足覆盖率的条件下,找一个让平均信干比最大的功率) 34 | ,在第二步的基础上,在输出集合里找一个平均信干比最大的功率 35 | ##二、自优化 36 | 每个用户通过app都会向服务器提交参数:接受功率,网速,信干比 37 | 38 | ### 5.欠覆盖自优化 39 | 当一个用户的接受功率小于110dB的时候,就认为这个用户不能正常通信,该用户不满意。 40 | 当某一个AP下所有用户中不满意的用户达到一定比例时就促发欠覆盖自优化。 41 | 假设用户不满意度达到20%,触发欠覆盖自优化,调整AP的功率使系统恢复正常。 42 | ### 6.干扰自优化 43 | 当一个用户的信干比小于10时,该用户无法正常通信,该用户不满意。 44 | 当某一个AP下所有用户中不满意的用户达到一定比例时就促发干扰自优化。 45 | 假设用户不满意度达到20%,触发干扰自优化,调整AP的功率和信道使系统恢复正常。 46 | ### 7.容量自优化 47 | 所有的AP都有网络容量的上限 48 | (1)先计算每个AP下的所有用户网速加起来的吞吐量 49 | (2)然后比较总吞吐量与AP网络容量上限,如果总吞吐量大于网络容量上限,那么该AP容量超载,促发容量自优化 50 | (3)挑选超载AP下信号强度最弱的用户为目标,提醒他切换到另一个AP,并传给他信息(其它AP的信号强度已经网络容量的剩余量) 51 | (4)用户选择切换AP,实现容量自优化 52 | 53 | -------------------------------------------------------------------------------- /Document/chafen.md: -------------------------------------------------------------------------------- 1 | # 差分进化算法 2 | --- 3 | 4 | -------------------------------------------------------------------------------- /Document/course.md: -------------------------------------------------------------------------------- 1 | # 课表 2 | ![](https://github.com/rao1219/qt-SON/blob/master/image/course.png) 3 | -------------------------------------------------------------------------------- /Document/gantt.md: -------------------------------------------------------------------------------- 1 | # 时间安排 2 | ----- 3 | ![gantt](https://github.com/rao1219/qt-SON/blob/master/image/gantt.png) 4 | 5 | ``` 6 | gantt 7 | title Project 8 | dateFormat YYYY-MM-DD 9 | section section-毕 10 | 论文-自配置算法优化 :a1, 2015-9-25, 30d 11 | ********** :after a1, 20d 12 | ********** :a2, 2015-10-30, 20d 13 | 14 | section section-张 15 | 论文-自配置算法优化 :a1, 2015-9-25, 30d 16 | ********** :after a1, 20d 17 | section session-杨 18 | 论文-差分算法 :2015-9-25, 30d 19 | ********** : 24d 20 | section session-许 21 | 论文-差分算法 :2015-9-25, 30d 22 | android客户端 : 24d 23 | section session-饶 24 | 跑实验,数据支持 :2015-9-25, 30d 25 | 完善事件管理器 :2015-9-25, 20d 26 | 论文+服务器完善 : 40d 27 | ``` 28 | -------------------------------------------------------------------------------- /Document/log.out: -------------------------------------------------------------------------------- 1 | commit efb44dde56ae68a4f1670a0ecf1e6b0f8a09575b 2 | Author: rao1219 <441718399@qq.com> 3 | Date: Wed Oct 7 14:35:02 2015 +0800 4 | 5 | add gitignore 6 | 7 | commit f5b1ed24dfa9ccbfc66e489b54ec52d8fdeabf40 8 | Author: rao1219 <441718399@qq.com> 9 | Date: Tue Oct 6 20:12:41 2015 +0800 10 | 11 | update log 12 | 13 | commit a0a2896e43fe17dabf4c2910cbd669ce33b0b4ee 14 | Author: rao1219 <441718399@qq.com> 15 | Date: Tue Oct 6 20:11:19 2015 +0800 16 | 17 | 自优化基站信息显示 18 | 19 | commit 44ad7da3a989091f7abd9abd86874a160491ebad 20 | Author: rao1219 <441718399@qq.com> 21 | Date: Tue Oct 6 18:36:11 2015 +0800 22 | 23 | 自配置基站信息显示 24 | 25 | commit bacbbe5ddc1632dd38aeba198c85df104a5024c8 26 | Author: rao1219 <441718399@qq.com> 27 | Date: Tue Oct 6 17:25:24 2015 +0800 28 | 29 | 基站信息的轮子 30 | 31 | commit 9c2197f442cdf9d88e3f3a5d462f780dc07a4fe6 32 | Author: rao1219 <441718399@qq.com> 33 | Date: Tue Oct 6 01:30:34 2015 +0800 34 | 35 | mainwindow下增加基站位置显示 36 | 37 | commit 5297946c56571929ba903e125c4016984c4ae558 38 | Author: rao1219 <441718399@qq.com> 39 | Date: Mon Oct 5 01:33:59 2015 +0800 40 | 41 | edit doc 42 | 43 | commit a4b4371b6fae2115f227826ed5aed27cee3151e4 44 | Author: rao1219 <441718399@qq.com> 45 | Date: Mon Oct 5 00:20:25 2015 +0800 46 | 47 | add paper-chafen 48 | 49 | commit 646221aa9656c542b0f90b16eec4476bb3ae7a77 50 | Author: rao1219 <441718399@qq.com> 51 | Date: Sun Oct 4 16:46:43 2015 +0800 52 | 53 | add LICENSE 54 | 55 | commit c4dbda50eb1ab1b9d39ffa5c6e97a9f189347734 56 | Author: rao1219 <441718399@qq.com> 57 | Date: Sun Oct 4 16:45:39 2015 +0800 58 | 59 | 添加LICENSE 60 | 61 | commit acf58bff9672bf66a4aca80ea3d91bc15911642f 62 | Author: rao1219 <441718399@qq.com> 63 | Date: Sun Oct 4 15:59:34 2015 +0800 64 | 65 | up 66 | 67 | commit 7daeaea9e32e032b93ddf6f5eb72d9af6a313759 68 | Author: rao1219 <441718399@qq.com> 69 | Date: Sun Oct 4 15:59:02 2015 +0800 70 | 71 | up 72 | 73 | commit 610ac6ce7a4a3d79f1b9b663868633a1bde5b477 74 | Author: rao1219 <441718399@qq.com> 75 | Date: Sun Oct 4 15:58:33 2015 +0800 76 | 77 | up 78 | 79 | commit 99d0355a40d7ee3ec29890cb8e95fe9f75e5e815 80 | Author: rao1219 <441718399@qq.com> 81 | Date: Sun Oct 4 15:57:57 2015 +0800 82 | 83 | del 84 | 85 | commit a61b18d6babfba475b6e8f3fd61f8f79079fdfa4 86 | Author: rao1219 <441718399@qq.com> 87 | Date: Sun Oct 4 15:56:51 2015 +0800 88 | 89 | up 90 | 91 | commit 744402b4cbc018c234936db11aba6375ba345b85 92 | Author: rao1219 <441718399@qq.com> 93 | Date: Sun Oct 4 15:55:37 2015 +0800 94 | 95 | 增加数据挖掘资料 96 | 97 | commit 1d45f47a9b2a0e768b8279188aace120c2a35132 98 | Author: rao1219 <441718399@qq.com> 99 | Date: Sat Oct 3 18:22:37 2015 +0800 100 | 101 | delete 102 | 103 | commit b09df07762b4e3b481361696da11eecb38110def 104 | Author: rao1219 <441718399@qq.com> 105 | Date: Sat Oct 3 17:58:05 2015 +0800 106 | 107 | 添加了wifi用户的数据文件 108 | 109 | commit 87c6efe17ef3301dfef8130ce676083e022e1532 110 | Author: raoqi <441718399@qq.com> 111 | Date: Sat Oct 3 13:26:55 2015 +0800 112 | 113 | Update Project.md 114 | 115 | commit 72e8ef763f1d9d2f527db4be03f77ec54262727f 116 | Author: rao1219 <441718399@qq.com> 117 | Date: Sat Oct 3 13:13:13 2015 +0800 118 | 119 | 增加自配置页面鼠标提示 120 | 121 | commit 246e15b6c9199e7ab612a2d14e6283215140a8b0 122 | Author: raoqi <441718399@qq.com> 123 | Date: Sat Oct 3 13:07:03 2015 +0800 124 | 125 | Update naming.md 126 | 127 | commit 463d08dc07fee2b9101a4563a5fcdc104baff989 128 | Author: raoqi <441718399@qq.com> 129 | Date: Sat Oct 3 13:05:41 2015 +0800 130 | 131 | Update naming.md 132 | 133 | commit fb6f529c0b720be703081afb1dcc5df9ce2ed8e5 134 | Author: raoqi <441718399@qq.com> 135 | Date: Sat Oct 3 13:00:01 2015 +0800 136 | 137 | Update naming.md 138 | 139 | commit 65911eaaaa40ab35bb744fb3b737d3df6cbb1d07 140 | Merge: 9e83e19 5d7b7a1 141 | Author: rao1219 <441718399@qq.com> 142 | Date: Fri Oct 2 01:15:48 2015 +0800 143 | 144 | Merge branch 'master' of github.com:rao1219/qt-SON into dev 145 | 146 | commit 9e83e197f67264dd0f44ed8958cc554156263ab3 147 | Author: rao1219 <441718399@qq.com> 148 | Date: Fri Oct 2 01:14:41 2015 +0800 149 | 150 | edit 151 | 152 | commit 5d7b7a1df31bfee5ac6c306277da67b06460f733 153 | Author: raoqi <441718399@qq.com> 154 | Date: Fri Oct 2 00:59:07 2015 +0800 155 | 156 | Update Project.md 157 | 158 | commit 5a5ad654835d396d90fca00f53a8cebe43f69f12 159 | Author: raoqi <441718399@qq.com> 160 | Date: Fri Oct 2 00:54:45 2015 +0800 161 | 162 | Create naming.md 163 | 164 | commit 4a7320d9d805b3b8c4350d52474222f6fec6f5d5 165 | Author: raoqi <441718399@qq.com> 166 | Date: Wed Sep 30 00:48:37 2015 +0800 167 | 168 | Update Project.md 169 | 170 | commit d78544d72d4c51ab8d09c985b3b916ce93e511f4 171 | Author: raoqi <441718399@qq.com> 172 | Date: Wed Sep 30 00:46:57 2015 +0800 173 | 174 | Create algorithm.md 175 | 176 | commit a65f2c59e5f83105e20ffed80dbc298e617af6f7 177 | Merge: f9ccdb8 f46ec85 178 | Author: rao1219 <441718399@qq.com> 179 | Date: Tue Sep 29 20:57:06 2015 +0800 180 | 181 | Merge branch 'master' of github.com:rao1219/qt-SON 182 | 183 | commit f9ccdb8a9dd3d11229c19a1a64760774d3a6c016 184 | Author: rao1219 <441718399@qq.com> 185 | Date: Tue Sep 29 20:56:44 2015 +0800 186 | 187 | edit data source 188 | 189 | commit f46ec859c3e496376ccc8da71515350351d6798b 190 | Author: raoqi <441718399@qq.com> 191 | Date: Sun Sep 27 21:04:21 2015 +0800 192 | 193 | Create Project.md 194 | 195 | commit fc389b778f8d99ed2c8bf5498373553ff91a269e 196 | Merge: 925d85b 8f7601e 197 | Author: rao1219 <441718399@qq.com> 198 | Date: Sun Sep 27 20:16:14 2015 +0800 199 | 200 | Merge branch 'master' of github.com:rao1219/qt-SON 201 | 202 | commit 925d85b0a3cdff00332d9feb1b60f12e64cd7dc0 203 | Author: rao1219 <441718399@qq.com> 204 | Date: Sun Sep 27 20:15:45 2015 +0800 205 | 206 | 解决json乱码 207 | 208 | commit 8f7601e5e9b25a22f39fbf4a6609c81a87fa80b0 209 | Author: raoqi <441718399@qq.com> 210 | Date: Fri Sep 25 21:07:26 2015 +0800 211 | 212 | Update gantt.md 213 | 214 | commit c70c262923430f41f3b59bc80b8df022659c997b 215 | Author: rao1219 <441718399@qq.com> 216 | Date: Fri Sep 25 21:05:24 2015 +0800 217 | 218 | add gantt 219 | 220 | commit ea156bab7c640d95c35727a8c83fc9bab57fe992 221 | Author: raoqi <441718399@qq.com> 222 | Date: Fri Sep 25 21:01:23 2015 +0800 223 | 224 | Update gantt.md 225 | 226 | commit 426aa4ac7b3fa24a92143707851c5d45beffff5b 227 | Author: raoqi <441718399@qq.com> 228 | Date: Fri Sep 25 20:36:12 2015 +0800 229 | 230 | Create gantt.md 231 | 232 | commit b2d7288dd754568d445b44e914a887e17e1b5d5e 233 | Author: rao1219 <441718399@qq.com> 234 | Date: Sun Sep 20 16:46:23 2015 +0800 235 | 236 | update event 237 | 238 | commit 67ff822249600e036ebbb4ea083d707a10517cca 239 | Author: rao1219 <441718399@qq.com> 240 | Date: Tue Sep 8 10:01:24 2015 +0800 241 | 242 | up 243 | 244 | commit c9b5c8bf6c878577e5b06efe26cc9f541fff1b6d 245 | Author: raoqi <441718399@qq.com> 246 | Date: Mon Sep 7 23:09:14 2015 +0800 247 | 248 | Update course.md 249 | 250 | commit b38307f6720c6493650a5e54f9a10543f2adc352 251 | Author: raoqi <441718399@qq.com> 252 | Date: Mon Sep 7 22:41:34 2015 +0800 253 | 254 | Update course.md 255 | 256 | commit 69a9d320195454a97769620b21edbab81fa72c8f 257 | Author: rao1219 <441718399@qq.com> 258 | Date: Mon Sep 7 22:40:10 2015 +0800 259 | 260 | add course 261 | 262 | commit b490930a004b45239d3e113f050ccc1d409c20b6 263 | Merge: b4b1d19 7c12373 264 | Author: rao1219 <441718399@qq.com> 265 | Date: Mon Sep 7 22:38:29 2015 +0800 266 | 267 | Merge branch 'master' of github.com:rao1219/qt-SON 268 | 269 | commit b4b1d19094b223d4fd47fda53ede1233908f2077 270 | Author: rao1219 <441718399@qq.com> 271 | Date: Mon Sep 7 22:38:13 2015 +0800 272 | 273 | add course 274 | 275 | commit 7c123737d737f9c3042645639f501e2ff8ee5b7b 276 | Author: raoqi <441718399@qq.com> 277 | Date: Sun Sep 6 23:43:00 2015 +0800 278 | 279 | Update EVENT.md 280 | 281 | commit 56c811b843ea908e147730cd67b753a151ebe654 282 | Author: raoqi <441718399@qq.com> 283 | Date: Sun Sep 6 22:50:53 2015 +0800 284 | 285 | Update EVENT.md 286 | 287 | commit 6b2fd9565e5836f73c4ac6abf0031fd1a0f6e008 288 | Author: rao1219 <441718399@qq.com> 289 | Date: Sun Sep 6 22:48:19 2015 +0800 290 | 291 | add image 292 | 293 | commit 76a751e177490ae56e465e0f8788783a04781175 294 | Author: rao1219 <441718399@qq.com> 295 | Date: Sun Sep 6 22:46:04 2015 +0800 296 | 297 | add resource 298 | 299 | commit 7a65597028ab5269994dd4e0e3ad293b0c7752c6 300 | Author: rao1219 <441718399@qq.com> 301 | Date: Sun Sep 6 22:32:02 2015 +0800 302 | 303 | add event doc 304 | 305 | commit 26f8ab1cb0ddc92d83f21a4cb5f0e42154cba8ac 306 | Author: rao1219 <441718399@qq.com> 307 | Date: Sun Sep 6 22:12:19 2015 +0800 308 | 309 | add event doc 310 | 311 | commit ce88320d20366c7c2a30f67dd569377c5f484bf9 312 | Author: rao1219 <441718399@qq.com> 313 | Date: Sat Sep 5 12:04:47 2015 +0800 314 | 315 | update timer 316 | 317 | commit ab22f428940e711ac40a90e88c9f2a44575d7c0e 318 | Author: rao1219 <441718399@qq.com> 319 | Date: Fri Sep 4 22:34:02 2015 +0800 320 | 321 | up 322 | 323 | commit 7e2d947eb2875c8429e9cac2e4f4b13747b20907 324 | Author: rao1219 <441718399@qq.com> 325 | Date: Thu Sep 3 16:29:50 2015 +0800 326 | 327 | up 328 | 329 | commit 1323df9183354012ddc6eb9fc8163218a911b9f4 330 | Author: rao1219 <441718399@qq.com> 331 | Date: Wed Sep 2 23:07:19 2015 +0800 332 | 333 | FUCKED a BUG 334 | 335 | commit 020e6ca1d4b27f5e745b0381c952017842fc6849 336 | Author: rao1219 <441718399@qq.com> 337 | Date: Wed Sep 2 20:49:01 2015 +0800 338 | 339 | Fucked a bug 340 | 341 | commit ab66969cf0c0a90c5457eac827bfd58ebeb98eed 342 | Author: rao1219 <441718399@qq.com> 343 | Date: Wed Sep 2 15:59:51 2015 +0800 344 | 345 | update eventbutton.cpp 346 | 347 | commit 4426300456e79014253378762115443ab0c8a9ac 348 | Author: rao1219 <441718399@qq.com> 349 | Date: Wed Sep 2 15:43:17 2015 +0800 350 | 351 | update eventbutton 352 | 353 | commit 4217b3a6f732e63ef905511fe544afeb7e9e534e 354 | Author: rao1219 <441718399@qq.com> 355 | Date: Wed Sep 2 13:32:13 2015 +0800 356 | 357 | delete 358 | 359 | commit 420bc540f4dd7cc730831ef18472ab5f01463ce7 360 | Author: rao1219 <441718399@qq.com> 361 | Date: Tue Sep 1 21:16:49 2015 +0800 362 | 363 | delete img 364 | 365 | commit 44cd6d984e3b0a41cdd9805cca374c30fbc2fd90 366 | Author: rao1219 <441718399@qq.com> 367 | Date: Tue Sep 1 00:03:24 2015 +0800 368 | 369 | update event num 370 | 371 | commit 8399a95873bcdf53744847291b3eb2b792bc6185 372 | Author: rao1219 <441718399@qq.com> 373 | Date: Mon Aug 31 23:34:05 2015 +0800 374 | 375 | bug fixed. finish eventmanager 376 | 377 | commit 568fdfea9f891b023619116abe0bc4f724ba7511 378 | Author: rao1219 <441718399@qq.com> 379 | Date: Mon Aug 31 20:03:16 2015 +0800 380 | 381 | event manager,still bug.. 382 | 383 | commit 3177b02709271782e0779a83ce95bc3a30c2400b 384 | Author: rao1219 <441718399@qq.com> 385 | Date: Mon Aug 31 18:53:23 2015 +0800 386 | 387 | add button event 388 | 389 | commit 5d6aa915db8a003f285bf4e632da1cb2edec9927 390 | Author: rao1219 <441718399@qq.com> 391 | Date: Mon Aug 31 14:51:05 2015 +0800 392 | 393 | update readme 394 | 395 | commit 36285bf13d35e6c370a65fa49ad583f9a6c43aa8 396 | Author: rao1219 <441718399@qq.com> 397 | Date: Mon Aug 31 14:32:36 2015 +0800 398 | 399 | upup 400 | 401 | commit 0b6fe116ae1d5c9575afe4211357ab0ebc80dfbc 402 | Author: rao1219 <441718399@qq.com> 403 | Date: Mon Aug 31 11:27:39 2015 +0800 404 | 405 | upup 406 | 407 | commit bd9c92a4dc6fe523f0b6b6f7591ffba13107ed73 408 | Author: rao1219 <441718399@qq.com> 409 | Date: Mon Aug 31 11:13:20 2015 +0800 410 | 411 | bug not happly 412 | 413 | commit a7fb96129ef3e74e54d46faea652456bbd445715 414 | Author: rao1219 <441718399@qq.com> 415 | Date: Mon Aug 31 00:42:10 2015 +0800 416 | 417 | update readme 418 | 419 | commit 7903e01583aac8cd2301c57b88dcc09b1e7457db 420 | Author: rao1219 <441718399@qq.com> 421 | Date: Sun Aug 30 15:11:40 2015 +0800 422 | 423 | delete tt 424 | 425 | commit d6b35606a29135fd10dfe2cd13eb2c015a9fb7a9 426 | Author: rao1219 <441718399@qq.com> 427 | Date: Sun Aug 30 15:10:50 2015 +0800 428 | 429 | tt third 430 | 431 | commit ac5afdd0e66bdf09e30b639bffa67fc12d9b24db 432 | Author: rao1219 <441718399@qq.com> 433 | Date: Sun Aug 30 15:09:46 2015 +0800 434 | 435 | second tt 436 | 437 | commit 7c1587a98810655cab66eed0dc6aaae00dc8ef07 438 | Author: rao1219 <441718399@qq.com> 439 | Date: Sun Aug 30 15:08:49 2015 +0800 440 | 441 | tttest 442 | 443 | commit fdb0ebc4d830349b0a763bc8b4f53706571e4954 444 | Author: rao1219 <441718399@qq.com> 445 | Date: Sun Aug 30 15:04:56 2015 +0800 446 | 447 | add event manager 448 | 449 | commit 6b9fce403b665e6822f0e7336d51d5884646aece 450 | Author: rao1219 <441718399@qq.com> 451 | Date: Sun Aug 30 14:54:44 2015 +0800 452 | 453 | update eventmanager 454 | 455 | commit 251b31105e691ff9e0734615e10c584612915e82 456 | Author: rao1219 <441718399@qq.com> 457 | Date: Sun Aug 30 10:55:36 2015 +0800 458 | 459 | upup 460 | 461 | commit a9f48ce821a6b827c2b07efff910d3f946c0d07e 462 | Author: rao1219 <441718399@qq.com> 463 | Date: Sun Aug 30 10:49:18 2015 +0800 464 | 465 | update readme 466 | 467 | commit 5968e77e137618a5c2fafae32bece9b1cf09fb21 468 | Author: rao1219 <441718399@qq.com> 469 | Date: Sun Aug 30 10:47:04 2015 +0800 470 | 471 | update 472 | 473 | commit 08ff292267d5927fd62a635bf347439978e26ea3 474 | Author: rao1219 <441718399@qq.com> 475 | Date: Sat Aug 29 21:11:32 2015 +0800 476 | 477 | update makefile 478 | 479 | commit 5545ba93091a3636b95f9ce9afcf4dde6fffbc71 480 | Author: rao1219 <441718399@qq.com> 481 | Date: Sat Aug 29 21:05:05 2015 +0800 482 | 483 | update button 484 | 485 | commit dd3fccbeddf1c9d395f66b9596dce08c7766a94a 486 | Author: rao1219 <441718399@qq.com> 487 | Date: Sat Aug 29 00:22:11 2015 +0800 488 | 489 | update readme 490 | 491 | commit 90109cb6b31efb997a17dd129bff8bbd17eb2202 492 | Author: rao1219 <441718399@qq.com> 493 | Date: Sat Aug 29 00:18:07 2015 +0800 494 | 495 | update readme 496 | 497 | commit 8475c1e1f1c3f577aaca9de78afecf68f78bdefe 498 | Author: rao1219 <441718399@qq.com> 499 | Date: Sat Aug 29 00:13:33 2015 +0800 500 | 501 | update readme 502 | 503 | commit 920e723caf7175a4b6044388bbbd437e116276c1 504 | Author: rao1219 <441718399@qq.com> 505 | Date: Fri Aug 28 17:08:30 2015 +0800 506 | 507 | add event manager 508 | 509 | commit d22ed0717d6d41ee423b1190f2ec8ddcfc510805 510 | Author: rao1219 <441718399@qq.com> 511 | Date: Fri Aug 28 09:02:18 2015 +0800 512 | 513 | bug fixed 514 | 515 | commit 49e1c17ca34fa9125fc6232a291d6318a1af36aa 516 | Author: rainbowrao <441718399@qq.com> 517 | Date: Mon Aug 10 16:18:01 2015 +0800 518 | 519 | 更新后期任务分工 520 | 521 | commit b47956c06b9a33bb16d670a544991be0bbf1e59c 522 | Author: rainbowrao <441718399@qq.com> 523 | Date: Mon Aug 10 00:30:06 2015 +0800 524 | 525 | bugfixed 526 | 527 | commit 53f2aee69a6cdf90fb8d1406910d3a8d125d9f83 528 | Author: rainbowrao <441718399@qq.com> 529 | Date: Sat Aug 8 01:23:42 2015 +0800 530 | 531 | 自优化三种算法更新 532 | 533 | commit f8aaf68de4ad4d593378a06844a4ace15775caf6 534 | Author: rainbowrao <441718399@qq.com> 535 | Date: Sat Aug 8 01:09:20 2015 +0800 536 | 537 | 三种自优化算法完成 538 | 539 | commit fbf9e200fdb50c46efeecabb5c1e59ccc28059e8 540 | Author: rainbowrao <441718399@qq.com> 541 | Date: Fri Aug 7 21:47:58 2015 +0800 542 | 543 | edit youhua 544 | 545 | commit b4fc292078e8c6592922e34e005e95dce1a448a4 546 | Author: rainbowrao <441718399@qq.com> 547 | Date: Fri Aug 7 21:45:22 2015 +0800 548 | 549 | edit youhua 550 | 551 | commit 811e97317afe7d5aae743a5c79c171346a615c9c 552 | Author: rainbowrao <441718399@qq.com> 553 | Date: Fri Aug 7 20:30:04 2015 +0800 554 | 555 | ~edit 556 | 557 | commit d897d77145b492953436cef8855d295f71047207 558 | Author: rainbowrao <441718399@qq.com> 559 | Date: Fri Aug 7 16:22:34 2015 +0800 560 | 561 | 开始自优化 562 | 563 | commit 2e61f0e2965c123f76dbdf008739014528e2995c 564 | Author: rainbowrao <441718399@qq.com> 565 | Date: Fri Aug 7 13:46:30 2015 +0800 566 | 567 | edit~ 568 | 569 | commit 85a221637a98e99f900ed46314e7de00f2cfbdb9 570 | Author: rainbowrao <441718399@qq.com> 571 | Date: Fri Aug 7 03:35:59 2015 +0800 572 | 573 | edit 574 | 575 | commit 6db50056ea89656bdb6101d008f9f2302bc17e83 576 | Author: rainbowrao <441718399@qq.com> 577 | Date: Fri Aug 7 00:00:45 2015 +0800 578 | 579 | ~~终端移植 580 | 581 | commit a4107dff7e807d823888baa728b0b361f40c77d0 582 | Author: rainbowrao <441718399@qq.com> 583 | Date: Thu Aug 6 22:37:54 2015 +0800 584 | 585 | ~~~更新自优化 586 | 587 | commit c4535a1869467888ce7747e230a80938a2db5db2 588 | Author: rainbowrao <441718399@qq.com> 589 | Date: Thu Aug 6 17:37:39 2015 +0800 590 | 591 | 更新功率结果提示框 592 | 593 | commit 24ee5d8720e0b220d87645c165ff1af2e5c03391 594 | Author: rainbowrao <441718399@qq.com> 595 | Date: Wed Aug 5 20:24:35 2015 +0800 596 | 597 | edit 598 | 599 | commit f737e8a6c67167392d7a755d4c446367aec06a52 600 | Author: rainbowrao <441718399@qq.com> 601 | Date: Wed Aug 5 14:18:15 2015 +0800 602 | 603 | delete a file 604 | 605 | commit e3f164f8b8a13f2cadb2d67ec8da548c1948acf7 606 | Merge: 6f8d0ea 119d7ab 607 | Author: rainbowrao <441718399@qq.com> 608 | Date: Wed Aug 5 13:54:22 2015 +0800 609 | 610 | Merge branch 'master' of https://github.com/rao1219/qt-SON 611 | 612 | commit 6f8d0ea21825dd55c05375a9ad3547d944457d10 613 | Author: rainbowrao <441718399@qq.com> 614 | Date: Wed Aug 5 13:53:22 2015 +0800 615 | 616 | second test 617 | 618 | commit bacbebc00b8a583a047142448ef8323c41837ad6 619 | Author: rainbowrao <441718399@qq.com> 620 | Date: Wed Aug 5 13:23:10 2015 +0800 621 | 622 | first commit 623 | 624 | commit 1bcd21efe707d04a6811b56629720bde1789c5e2 625 | Author: rainbowrao <441718399@qq.com> 626 | Date: Wed Aug 5 09:34:25 2015 +0800 627 | 628 | upup 629 | 630 | commit 119d7abc5a29468b5957ea859122ed9dfd183a73 631 | Author: rao1219 <441718399@qq.com> 632 | Date: Wed Aug 5 07:54:25 2015 +0800 633 | 634 | Update README.md 635 | 636 | commit 62b4adb78c28a0dab979ce12328cd4eb1d862282 637 | Author: rao1219 <441718399@qq.com> 638 | Date: Wed Aug 5 07:47:53 2015 +0800 639 | 640 | Create README.md 641 | 642 | commit b83cc5fa467c1bfdad3ff1a3ef77f686bf2e6602 643 | Author: rainbowrao <441718399@qq.com> 644 | Date: Wed Aug 5 07:22:55 2015 +0800 645 | 646 | 自配置完成 647 | -------------------------------------------------------------------------------- /Document/naming.md: -------------------------------------------------------------------------------- 1 | # tooltip 备注 2 | 3 | 4 | 数据存在state.json 5 | 6 | ---- 7 | # 字段信息: 8 | 9 | ## 相关背景介绍 10 | + 软件功能 11 | + 专业知识相关介绍 12 | + 项目背景介绍 13 | 14 | --- 15 | ## 自配置页面名词解释 16 | + 基站额定功率:基站在使用中可以调到的最大功率 17 | + 路损模型参数 L=algd+b,参数随着坏境的改变而改变 Label_4 18 | + a= 19 | + b= 20 | 21 | + 通信最小信号强度:满足用户正常通信的最小信号强度,当信号小于这个值时,用户不能正常通信,不同的业务有着不同的最小信号强度 Label2 22 | + RSRP0: Label5 23 | + 路损公式 24 | 25 | + 临界信噪比:满足用户正常通信的最小信干比 Label_14 26 | + SINR: 接收信号强度/干扰信号强度 Label_15 27 | 28 | + 覆盖率:可以通信区域的面积/总区域的面积 Label_11 29 | 30 | + 模式选择 31 | + 平均SINR最优:整个区域的平均SINR最小 radioButton 32 | + 能效比最高:能效比=S/P和 radioButton_2 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Qi RAO 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # wifi网络自优化项目 2 | 3 | --- 4 | ## 项目进度 5 | 6 | | 日期 | 内容 | 7 | | -------- | -----: | 8 | |11月 | 闲置orz.......| 9 | | 10-4 |[数据挖掘论文](http://aminer.org/search/Data%20Mining)| 10 | | 10-2 | [相关字段信息](https://github.com/rao1219/qt-SON/blob/master/Document/naming.md) | 11 | | 9-27 | [后续论文安排](https://github.com/rao1219/qt-SON/blob/master/Document/gantt.md) | 12 | | 9-1 | [事件管理器](https://github.com/rao1219/qt-SON/blob/master/Document/EVENT.md) | 13 | 14 | --- 15 | 16 | ## 论文安排 17 | 18 | | | | 19 | | ------------- |:-------------:| 20 | | 边缘检测算法 | [思路]() | 21 | | 差分进化 | [思路]() | 22 | | 自配置和自优化算法 | [思路](https://github.com/rao1219/qt-SON/blob/master/Document/algorithm.md) | 23 | 24 | 25 | ---- 26 | 27 | ## 项目工程 28 | 29 | [代码在这](https://github.com/rao1219/qt-SON) 30 | 31 | Very Simple qt server project 32 | 33 | | | | 34 | | ------------- |:-------------:| 35 | | UI优化 | [增加自配置页面鼠标提示](https://github.com/rao1219/qt-SON/commit/72e8ef763f1d9d2f527db4be03f77ec54262727f) | 36 | 37 | 38 | 39 | ##### version-1.0 2015-7-23 40 | ### 更新内容: 41 | > * 界面、框架 42 | > * 可视化格点 43 | > * 自配置算法调试完成 44 | 45 | --------- 46 | #### version-2.0 2015-8-12 47 | ### 更新内容: 48 | > * 加入自优化算法 49 | > * 加入事件管理器 50 | > * 修复了前端的一些bug 51 | 52 | ----- 53 | 54 | #### version-3.0 2015-8-30 55 | ### update: 56 | > * update eventbutton 57 | > * update ui-manager 58 | > * add new selfoptimizing 59 | > * fix bugs about event set 60 | 61 | 62 | 63 | --- 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /ap.cpp: -------------------------------------------------------------------------------- 1 | #include "ap.h" 2 | #include 3 | #include 4 | 5 | 6 | AP::AP(QGraphicsItem *parent) :QGraphicsItem (parent) 7 | { 8 | this->unsatisfiedNum=0; 9 | this->totalUser=0; 10 | this->total_wifiSpeed=2.0; 11 | } 12 | 13 | void AP::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) 14 | { 15 | //painter->drawEllipse(100,100,100); 16 | painter->setBrush(Qt::red); 17 | painter->drawRect(0,0,20,20); 18 | } 19 | 20 | QRectF AP::boundingRect() const 21 | { 22 | qreal penWidth=1; 23 | return QRectF(0-penWidth/2,0-penWidth/2,20+penWidth,20+penWidth); 24 | 25 | } 26 | 27 | 28 | -------------------------------------------------------------------------------- /ap.h: -------------------------------------------------------------------------------- 1 | #ifndef AP_H 2 | #define AP_H 3 | #include 4 | 5 | class AP : public QGraphicsItem 6 | { 7 | public: 8 | AP(QGraphicsItem *parent=0); 9 | void paint(QPainter *painter,const QStyleOptionGraphicsItem *option, 10 | QWidget *widget); 11 | QRectF boundingRect() const; 12 | int power; 13 | int frequency; 14 | 15 | double total_wifiSpeed; 16 | double rest_wifiSpeed; 17 | 18 | int unsatisfiedNum; 19 | int totalUser; 20 | 21 | private: 22 | struct position{ 23 | int x,y; 24 | }; 25 | 26 | }; 27 | 28 | #endif // AP_H 29 | -------------------------------------------------------------------------------- /dot.cpp: -------------------------------------------------------------------------------- 1 | #include "dot.h" 2 | #include 3 | 4 | Dot::Dot() 5 | { 6 | this->isValid=false; 7 | } 8 | 9 | 10 | -------------------------------------------------------------------------------- /dot.h: -------------------------------------------------------------------------------- 1 | #ifndef DOT_H 2 | #define DOT_H 3 | 4 | 5 | class Dot 6 | { 7 | public: 8 | Dot(); 9 | double receivePower; 10 | int c; 11 | int area; 12 | int x,y; 13 | bool isValid; 14 | int frequency; 15 | double ganraoPower; 16 | double SINR; 17 | 18 | private: 19 | 20 | }; 21 | 22 | #endif // DOT_H 23 | -------------------------------------------------------------------------------- /eventbutton.cpp: -------------------------------------------------------------------------------- 1 | #include "eventbutton.h" 2 | 3 | eventButton::eventButton(QWidget* parent) 4 | : QPushButton(parent) 5 | { 6 | setText("空闲"); 7 | setFixedSize(80, 80); 8 | setStyleSheet("QPushButton{background: green;}"); 9 | hasEvent=false; 10 | } 11 | 12 | void eventButton::reinit() 13 | { 14 | if(hasEvent) 15 | { 16 | setText(this->eventContent); 17 | setStyleSheet("QPushButton{background: red;}"); 18 | } 19 | else 20 | { 21 | setText("空闲"); 22 | setStyleSheet("QPushButton{background: green;}"); 23 | } 24 | } 25 | void eventButton::enterEvent(QEvent* e) 26 | { 27 | if(hasEvent) 28 | { 29 | setText(this->eventContent); 30 | setStyleSheet("QPushButton{background: red;}"); 31 | } 32 | else 33 | { 34 | setText("添加事件"); 35 | setStyleSheet("QPushButton{background: orange;}"); 36 | } 37 | } 38 | void eventButton::leaveEvent(QEvent* e) 39 | { 40 | if(hasEvent) 41 | { 42 | setText(this->eventContent); 43 | setStyleSheet("QPushButton{background: red;}"); 44 | } 45 | else 46 | { 47 | setText("空闲"); 48 | setStyleSheet("QPushButton{background: green;}"); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /eventbutton.h: -------------------------------------------------------------------------------- 1 | #ifndef EVENTBUTTON_H 2 | #define EVENTBUTTON_H 3 | 4 | 5 | #include 6 | 7 | class eventButton : public QPushButton 8 | { 9 | Q_OBJECT 10 | public: 11 | eventButton(QWidget *parent = 0); 12 | ~eventButton(){return;} 13 | bool hasEvent; 14 | void reinit(); 15 | QString eventContent; 16 | int serious; 17 | int eventType; 18 | 19 | protected: 20 | virtual void enterEvent(QEvent* e); 21 | virtual void leaveEvent(QEvent* e); 22 | }; 23 | 24 | #endif // EVENTBUTTON_H 25 | -------------------------------------------------------------------------------- /eventset.cpp: -------------------------------------------------------------------------------- 1 | #include "eventset.h" 2 | #include "ui_eventset.h" 3 | #include 4 | 5 | eventSet::eventSet(QWidget *parent) : 6 | QDialog(parent), 7 | ui(new Ui::eventSet) 8 | { 9 | ui->setupUi(this); 10 | QPalette bgpal = palette(); 11 | bgpal.setColor (QPalette::Background, QColor (29, 15, 29)); 12 | //bgpal.setColor (QPalette::Background, Qt::transparent); 13 | bgpal.setColor (QPalette::Foreground, QColor(255,255,255,255)); 14 | setPalette (bgpal); 15 | this->accepted=false; 16 | ui->comboBox->addItem("User number increases suddenly in some area."); 17 | ui->comboBox->addItem("User number decreases suddenly in some area."); 18 | ui->comboBox->addItem("Signals dies away suddenly in some area."); 19 | ui->comboBox->addItem("AP's frequency changes suddenly in some area"); 20 | 21 | ui->comboBox_2->addItem("轻微"); 22 | ui->comboBox_2->addItem("正常"); 23 | ui->comboBox_2->addItem("严重"); 24 | 25 | } 26 | 27 | eventSet::~eventSet() 28 | { 29 | delete ui; 30 | } 31 | 32 | void eventSet::on_buttonBox_accepted() 33 | { 34 | this->accepted=true; 35 | this->eventitem=ui->comboBox->currentText(); 36 | this->serious=ui->comboBox_2->currentIndex(); 37 | this->eventType=ui->comboBox->currentIndex(); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /eventset.h: -------------------------------------------------------------------------------- 1 | #ifndef EVENTSET_H 2 | #define EVENTSET_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class eventSet; 8 | } 9 | 10 | class eventSet : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit eventSet(QWidget *parent = 0); 16 | ~eventSet(); 17 | bool accepted; 18 | QString eventitem; 19 | int serious; 20 | int eventType; 21 | 22 | private slots: 23 | void on_buttonBox_accepted(); 24 | 25 | private: 26 | Ui::eventSet *ui; 27 | }; 28 | 29 | #endif // EVENTSET_H 30 | -------------------------------------------------------------------------------- /eventset.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | eventSet 4 | 5 | 6 | 7 | 0 8 | 0 9 | 532 10 | 206 11 | 12 | 13 | 14 | 添加事件 15 | 16 | 17 | 18 | 19 | 20 20 | 140 21 | 341 22 | 32 23 | 24 | 25 | 26 | Qt::Horizontal 27 | 28 | 29 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 30 | 31 | 32 | 33 | 34 | 35 | 19 36 | 51 37 | 321 38 | 41 39 | 40 | 41 | 42 | 43 | 44 | 45 | 370 46 | 50 47 | 131 48 | 41 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | buttonBox 57 | accepted() 58 | eventSet 59 | accept() 60 | 61 | 62 | 248 63 | 254 64 | 65 | 66 | 157 67 | 274 68 | 69 | 70 | 71 | 72 | buttonBox 73 | rejected() 74 | eventSet 75 | reject() 76 | 77 | 78 | 316 79 | 260 80 | 81 | 82 | 286 83 | 274 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /graphicstest.cpp: -------------------------------------------------------------------------------- 1 | #include "graphicstest.h" 2 | #include "ui_graphicstest.h" 3 | #include 4 | 5 | GraphicsTest::GraphicsTest(QWidget *parent) : 6 | QDialog(parent), 7 | ui(new Ui::GraphicsTest) 8 | { 9 | ui->setupUi(this); 10 | scene = new QGraphicsScene(this); 11 | ui->graphicsView->setScene(scene); 12 | 13 | QBrush redBrush(Qt::red); 14 | QBrush blueBrush(Qt::blue); 15 | QBrush yelloBrush(Qt::yellow); 16 | 17 | QPen blackPen(Qt::black); 18 | blackPen.setWidth(6); 19 | QPen bluePen(Qt::blue); 20 | bluePen.setWidth(0.5); 21 | srand((int)time(NULL)); 22 | for(int i=0;i<5;i++){ 23 | elipse[i] = scene->addEllipse(-200+i*100+rand()%30,10+rand()%30,100,100,blackPen,redBrush); 24 | elipse[i]->setFlag(QGraphicsItem::ItemIsMovable); 25 | } 26 | for(int i=5;i<11;i++){ 27 | elipse[i] = scene->addEllipse((i-5)*100+rand()%30,200+rand()%30,100,100,blackPen,yelloBrush); 28 | elipse[i]->setFlag(QGraphicsItem::ItemIsMovable); 29 | } 30 | for(int i=11;i<19;i++){ 31 | elipse[i] = scene->addEllipse((i-12)*100+rand()%30,400+rand()%30,100,100,blackPen,blueBrush); 32 | elipse[i]->setFlag(QGraphicsItem::ItemIsMovable); 33 | } 34 | for(int i=0;i<40;i++){ 35 | scene->addLine(-1000,-1000+50*i,1000,-1000+50*i,bluePen); 36 | scene->addLine(-1000+50*i,-1000,-1000+50*i,1000,bluePen); 37 | } 38 | 39 | rectangle = scene->addRect(100,100,100,100,blackPen,yelloBrush); 40 | rectangle->setX(100); 41 | rectangle->setY(100); 42 | rectangle->setFlag(QGraphicsItem::ItemIsMovable); 43 | 44 | } 45 | 46 | GraphicsTest::~GraphicsTest() 47 | { 48 | delete ui; 49 | } 50 | 51 | void GraphicsTest::on_pushButton_clicked() 52 | { 53 | ui->graphicsView->rotate(-10); 54 | } 55 | 56 | void GraphicsTest::on_pushButton_2_clicked() 57 | { 58 | ui->graphicsView->rotate(10); 59 | ui->graphicsView->scale(10,10); 60 | } 61 | 62 | void GraphicsTest::on_pushButton_3_clicked() 63 | { 64 | 65 | for(int i=0;i<19;i++){ 66 | qDebug()<x()<<" "<y()<x()<<" "<y()<x()<<" "<y()<graphicsView->scale(scale,scale); 77 | } 78 | -------------------------------------------------------------------------------- /graphicstest.h: -------------------------------------------------------------------------------- 1 | #ifndef GRAPHICSTEST_H 2 | #define GRAPHICSTEST_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | namespace Ui { 12 | class GraphicsTest; 13 | } 14 | 15 | class GraphicsTest : public QDialog 16 | { 17 | Q_OBJECT 18 | 19 | public: 20 | explicit GraphicsTest(QWidget *parent = 0); 21 | ~GraphicsTest(); 22 | 23 | private slots: 24 | void on_pushButton_clicked(); 25 | 26 | void on_pushButton_2_clicked(); 27 | 28 | void on_pushButton_3_clicked(); 29 | 30 | void on_horizontalSlider_valueChanged(int value); 31 | 32 | private: 33 | Ui::GraphicsTest *ui; 34 | QGraphicsScene *scene; 35 | QGraphicsEllipseItem *elipse[19]; 36 | QGraphicsRectItem *rectangle; 37 | }; 38 | 39 | #endif // GRAPHICSTEST_H 40 | -------------------------------------------------------------------------------- /graphicstest.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | GraphicsTest 4 | 5 | 6 | 7 | 0 8 | 0 9 | 1243 10 | 885 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 20 | 显示坐标 21 | 22 | 23 | 24 | 25 | 26 | 27 | 200 28 | 29 | 30 | 300 31 | 32 | 33 | 250 34 | 35 | 36 | Qt::Horizontal 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | +1 46 | 47 | 48 | 49 | 50 | 51 | 52 | -1 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 1080 63 | 800 64 | 65 | 66 | 67 | 68 | 0 69 | 0 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /image/back.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rao1219/qt-SON/b8a28c8358dda55c3e5e01d199f2276b71dc2646/image/back.PNG -------------------------------------------------------------------------------- /image/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rao1219/qt-SON/b8a28c8358dda55c3e5e01d199f2276b71dc2646/image/background.jpg -------------------------------------------------------------------------------- /image/background_back.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rao1219/qt-SON/b8a28c8358dda55c3e5e01d199f2276b71dc2646/image/background_back.jpg -------------------------------------------------------------------------------- /image/course.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rao1219/qt-SON/b8a28c8358dda55c3e5e01d199f2276b71dc2646/image/course.png -------------------------------------------------------------------------------- /image/gantt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rao1219/qt-SON/b8a28c8358dda55c3e5e01d199f2276b71dc2646/image/gantt.png -------------------------------------------------------------------------------- /image/image.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | background.jpg 4 | back.PNG 5 | 6 | 7 | -------------------------------------------------------------------------------- /image/power.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rao1219/qt-SON/b8a28c8358dda55c3e5e01d199f2276b71dc2646/image/power.PNG -------------------------------------------------------------------------------- /image/screenshot/event.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rao1219/qt-SON/b8a28c8358dda55c3e5e01d199f2276b71dc2646/image/screenshot/event.png -------------------------------------------------------------------------------- /introduce.cpp: -------------------------------------------------------------------------------- 1 | #include "introduce.h" 2 | #include "ui_introduce.h" 3 | 4 | introduce::introduce(QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::introduce) 7 | { 8 | QPalette bgpal = palette(); 9 | bgpal.setColor (QPalette::Background, QColor (29, 15, 29)); 10 | //bgpal.setColor (QPalette::Background, Qt::transparent); 11 | bgpal.setColor (QPalette::Foreground, QColor(255,255,255,255)); 12 | setPalette (bgpal); 13 | ui->setupUi(this); 14 | } 15 | 16 | introduce::~introduce() 17 | { 18 | delete ui; 19 | } 20 | -------------------------------------------------------------------------------- /introduce.h: -------------------------------------------------------------------------------- 1 | #ifndef INTRODUCE_H 2 | #define INTRODUCE_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class introduce; 8 | } 9 | 10 | class introduce : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit introduce(QWidget *parent = 0); 16 | ~introduce(); 17 | 18 | private: 19 | Ui::introduce *ui; 20 | }; 21 | 22 | #endif // INTRODUCE_H 23 | -------------------------------------------------------------------------------- /introduce.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | introduce 4 | 5 | 6 | 7 | 0 8 | 0 9 | 753 10 | 815 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 110 20 | 750 21 | 341 22 | 32 23 | 24 | 25 | 26 | Qt::Horizontal 27 | 28 | 29 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 30 | 31 | 32 | 33 | 34 | 35 | 60 36 | 140 37 | 221 38 | 91 39 | 40 | 41 | 42 | <html><head/><body><p><span style=" font-size:26pt;">功能介绍</span></p></body></html> 43 | 44 | 45 | 46 | 47 | 48 | 60 49 | 210 50 | 631 51 | 16 52 | 53 | 54 | 55 | Qt::Horizontal 56 | 57 | 58 | 59 | 60 | 61 | 70 62 | 220 63 | 611 64 | 251 65 | 66 | 67 | 68 | <html><head/><body><p><span style=" font-size:12pt; color:#936321;">本软件可以用来配置优化无线网络。首先基于19个AP以及要布置网络的区域</span></p><p><span style=" font-size:12pt; color:#936321;">进行SON自配置,确定AP的最优位置与功率,在满足一些条件的情况下,使整片</span></p><p><span style=" font-size:12pt; color:#936321;">区域的无线网络环境达到最佳,然后在自配置的基础上进行自优化,</span></p><p><span style=" font-size:12pt; color:#936321;">针对网络在运行中可能出现的一些问题,随时优化网络,使用户满意度一直保持优良。</span></p><p><span style=" font-size:12pt;"><br/></span></p><p><span style=" font-size:12pt;"><br/></span></p></body></html> 69 | 70 | 71 | 72 | 73 | 74 | 60 75 | 430 76 | 631 77 | 16 78 | 79 | 80 | 81 | Qt::Horizontal 82 | 83 | 84 | 85 | 86 | 87 | 70 88 | 360 89 | 221 90 | 91 91 | 92 | 93 | 94 | <html><head/><body><p><span style=" font-size:26pt;">专业背景</span></p></body></html> 95 | 96 | 97 | 98 | 99 | 100 | 60 101 | 460 102 | 611 103 | 71 104 | 105 | 106 | 107 | <html><head/><body><p><span style=" font-size:12pt; color:#936321;">(1) 基站的位置按照正六边形排列可以使网络环境和空间利用率达到最佳</span></p><p><span style=" font-size:12pt; color:#936321;">(2) 用户只有在信号强度,信干比,网络容量满足一定得条件下才能正常通信</span></p><p><span style=" font-size:12pt;"><br/></span></p><p><span style=" font-size:12pt;"><br/></span></p></body></html> 108 | 109 | 110 | 111 | 112 | 113 | 60 114 | 590 115 | 631 116 | 16 117 | 118 | 119 | 120 | Qt::Horizontal 121 | 122 | 123 | 124 | 125 | 126 | 70 127 | 520 128 | 221 129 | 91 130 | 131 | 132 | 133 | <html><head/><body><p><span style=" font-size:26pt;">项目背景</span></p></body></html> 134 | 135 | 136 | 137 | 138 | 139 | 60 140 | 630 141 | 611 142 | 101 143 | 144 | 145 | 146 | <html><head/><body><p><span style=" font-size:12pt; color:#936321;">以往的网络自配置涉及的AP较少,本项目基于19个基站进行无线网络自配置,适用于</span></p><p><span style=" font-size:12pt; color:#936321;">一些真实的商场,工作环境,并且针对以前需要人为进行优化调整的缺点设计了独特的</span></p><p><span style=" font-size:12pt; color:#936321;">自优化算法,软件根据网络中出现的问题会自行进行优化,保证用户的满意度。</span></p><p><span style=" font-size:12pt;"><br/></span></p><p><span style=" font-size:12pt;"><br/></span></p></body></html> 147 | 148 | 149 | 150 | 151 | 152 | 120 153 | 50 154 | 531 155 | 81 156 | 157 | 158 | 159 | <html><head/><body><p><span style=" font-size:26pt; color:#dfe7e8;">未来无线网络wifi自优化演示平台</span></p></body></html> 160 | 161 | 162 | 163 | 164 | 165 | 166 | buttonBox 167 | accepted() 168 | introduce 169 | accept() 170 | 171 | 172 | 248 173 | 254 174 | 175 | 176 | 157 177 | 274 178 | 179 | 180 | 181 | 182 | buttonBox 183 | rejected() 184 | introduce 185 | reject() 186 | 187 | 188 | 316 189 | 260 190 | 191 | 192 | 286 193 | 274 194 | 195 | 196 | 197 | 198 | 199 | -------------------------------------------------------------------------------- /main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | #include "timer.h" 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | QApplication a(argc, argv); 8 | MainWindow w; 9 | w.show(); 10 | 11 | 12 | return a.exec(); 13 | } 14 | -------------------------------------------------------------------------------- /mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include "ui_mainwindow.h" 3 | #include 4 | #include 5 | #include 6 | #include 7 | #define RD 0 8 | #define EXTRA 2*R+15 9 | #define DOT 10 10 | #define EXR 5.4 11 | #include "timer.h" 12 | 13 | 14 | MainWindow::MainWindow(QWidget *parent) : 15 | QMainWindow(parent), 16 | ui(new Ui::MainWindow) 17 | { 18 | QApplication::setStyle("macintosh"); 19 | 20 | ui->setupUi(this); 21 | // this->setStyleSheet("background-color:gray;"); 22 | this->setMinimumSize(1621,924); 23 | this->setMaximumSize(1621,924); 24 | 25 | QPen blackPen(Qt::black); 26 | blackPen.setWidth(0.5); 27 | 28 | scene = new QGraphicsScene(this); 29 | ui->graphicsView->setScene(scene); 30 | // this->_addLineGraph(); 31 | setYouhua = new self_youhua; 32 | hasSet=false; 33 | out = ""; 34 | m=1;n=0; 35 | qDebug()<<"---未来无线网络自优化演示软件平台---"<exec(); 45 | 46 | 47 | this->ui->graphicsView->setToolTip("test"); 48 | 49 | } 50 | 51 | MainWindow::~MainWindow() 52 | { 53 | delete ui; 54 | } 55 | void MainWindow::myslots() 56 | { 57 | qDebug()<<"myslots"; 58 | } 59 | 60 | void MainWindow::_addLineGraph() 61 | { 62 | QPen blackPen(Qt::black); 63 | blackPen.setWidth(0.5); 64 | for(int i=-200;i<200;i++){ 65 | scene->addLine(-200*(setAlgo->_x)+2*(setAlgo->ratio),i*(setAlgo->_y)+2*(setAlgo->ratio),200*(setAlgo->_x)+2*(setAlgo->ratio),i*(setAlgo->_y)+2*(setAlgo->ratio),blackPen); 66 | scene->addLine(i*(setAlgo->_x)+2*(setAlgo->ratio),200*(setAlgo->_y)+2*(setAlgo->ratio),i*(setAlgo->_x)+2*(setAlgo->ratio),-200*(setAlgo->_y)+2*(setAlgo->ratio),blackPen); 67 | } 68 | } 69 | 70 | void MainWindow::on_tab_destroyed() 71 | { 72 | 73 | } 74 | 75 | void MainWindow::on_pushButton_clicked() 76 | { 77 | this->scene->clear(); 78 | out="自配置\n"; 79 | this->ui->textEdit->setText(out); 80 | 81 | QBrush redBrush(Qt::red); 82 | QBrush blueBrush(Qt::blue); 83 | QBrush yellowBrush(Qt::yellow); 84 | 85 | QPen blackPen(Qt::black); 86 | blackPen.setWidth(0.5); 87 | QPen bluePen(Qt::blue); 88 | bluePen.setWidth(0.5); 89 | self_window = new self_set; 90 | qDebug()<<"Welcome!"<exec(); 92 | QDateTime time = QDateTime::currentDateTime();//获取系统现在的时间 93 | QString _time = time.toString("yyyy-MM-dd hh:mm:ss ddd"); //设置显示格式 94 | out=out+_time+"\n"; 95 | this->ui->textEdit->setText(out); 96 | 97 | qDebug()<self_window->_yes; 98 | setAlgo = new Set_algorithm; 99 | if(this->self_window->_yes==true){ 100 | this->ui->textEdit->setText(out); 101 | QString ch = (self_window->choice==1)? "平均SINR最高":"能效比最高"; 102 | out=out+"\n自配置参数预制如下:\n-----------------------\n"; 103 | out=out+"RESP0:"+QString::number(self_window->RESP0)+"\n"+ 104 | "优化标准:"+ch+"\n"+ 105 | "路损模型参数:\n"+"a="+QString::number(self_window->a)+" b="+QString::number(self_window->b)+"\n" 106 | +"覆盖率:"+QString::number(self_window->coverRate)+"%\n"+ 107 | "额定功率:"+QString::number(self_window->power)+"\n" 108 | +"临界信噪比:"+QString::number(self_window->SINR)+"\n"+ 109 | "-----------------------\n自配置开始......\n"; 110 | 111 | this->ui->textEdit->setText(out); 112 | 113 | setAlgo->RESP0=self_window->RESP0; 114 | setAlgo->choice=self_window->choice; 115 | setAlgo->coverRate=self_window->coverRate; 116 | setAlgo->power=self_window->power; 117 | setAlgo->SINR = self_window->SINR; 118 | setAlgo->a=self_window->a; 119 | setAlgo->b=self_window->b; 120 | 121 | qDebug()<resultPower = setAlgo->getResultPower(); 123 | 124 | QString resultPower=QString::number(setAlgo->resultPower)+"\n"; 125 | out=out+resultPower; 126 | 127 | qDebug()<ui->textEdit->setText(out); 129 | 130 | for(int i=0;iapList.size();i++){ 131 | AP *temp = setAlgo->apList.at(i); 132 | qDebug()<<"x,y:"<x()<<" "<y()<frequency==1) 136 | { 137 | tmp=this->scene->addEllipse(temp->x(),temp->y(),(setAlgo->ratio)*EXR,(setAlgo->ratio)*EXR,blackPen,blueBrush); 138 | apContent="

基站信息

基站频率:"+QString::number(temp->frequency)+"
基站功率:"+QString::number(setAlgo->resultPower)+"
网络容量:"+QString::number(temp->total_wifiSpeed)+"
用户容量:"+QString::number(temp->totalUser)+"
"; 139 | tmp->setToolTip(apContent); 140 | } 141 | else if(temp->frequency==6) 142 | { 143 | tmp=this->scene->addEllipse(temp->x(),temp->y(),(setAlgo->ratio)*EXR,(setAlgo->ratio)*EXR,blackPen,redBrush); 144 | apContent="

基站信息

基站频率:"+QString::number(temp->frequency)+"
基站功率:"+QString::number(setAlgo->resultPower)+"
网络容量:"+QString::number(temp->total_wifiSpeed)+"
用户容量:"+QString::number(temp->totalUser)+"
"; 145 | tmp->setToolTip(apContent); 146 | } 147 | else if(temp->frequency==11) 148 | { 149 | tmp=this->scene->addEllipse(temp->x(),temp->y(),(setAlgo->ratio)*EXR,(setAlgo->ratio)*EXR,blackPen,yellowBrush); 150 | apContent="

基站信息

基站频率:"+QString::number(temp->frequency)+"
基站功率:"+QString::number(setAlgo->resultPower)+"
网络容量:"+QString::number(temp->total_wifiSpeed)+"
用户容量:"+QString::number(temp->totalUser)+"
"; 151 | tmp->setToolTip(apContent); 152 | } 153 | } 154 | } 155 | _addLineGraph(); 156 | setYouhua->default_aplist = setAlgo->apList; 157 | setYouhua->defalt_ratio = setAlgo->ratio; 158 | hasSet=true; 159 | QString result = "配置结果 功率: "+QString::number(setAlgo->resultPower); 160 | this->ui->textEdit_2->setText(result+(setAlgo->suboutput)); 161 | } 162 | 163 | void MainWindow::on_pushButton_2_clicked() 164 | { 165 | this->scene->clear(); 166 | if(hasSet==false) 167 | { 168 | QMessageBox::information(this,"Error!","请先进行自配置!"); 169 | } 170 | else{ 171 | qDebug()<<"self_optimizing"<exec(); 174 | 175 | 176 | QBrush redBrush(Qt::red); 177 | QBrush blueBrush(Qt::blue); 178 | QBrush yellowBrush(Qt::yellow); 179 | 180 | QPen blackPen(Qt::black); 181 | blackPen.setWidth(0.5); 182 | QPen bluePen(Qt::blue); 183 | bluePen.setWidth(0.5); 184 | 185 | setYouhua->initUser(); 186 | int result = setYouhua->checkSituation(); 187 | qDebug()<default_aplist.size();i++){ 195 | AP *temp = setYouhua->default_aplist.at(i); 196 | // qDebug()<<"x,y:"<x()<<" "<y()<frequency==1) 201 | { 202 | tmp=this->scene->addEllipse(temp->x(),temp->y(),(setAlgo->ratio)*EXR,(setAlgo->ratio)*EXR,blackPen,blueBrush); 203 | apContent="

基站信息

基站频率:"+QString::number(temp->frequency)+"
基站功率:"+QString::number(temp->power)+"
网络容量:"+QString::number(temp->total_wifiSpeed)+"
用户容量:"+QString::number(temp->totalUser)+"
"; 204 | tmp->setToolTip(apContent); 205 | } 206 | else if(temp->frequency==6) 207 | { 208 | tmp=this->scene->addEllipse(temp->x(),temp->y(),(setAlgo->ratio)*EXR,(setAlgo->ratio)*EXR,blackPen,redBrush); 209 | apContent="

基站信息

基站频率:"+QString::number(temp->frequency)+"
基站功率:"+QString::number(temp->power)+"
网络容量:"+QString::number(temp->total_wifiSpeed)+"
用户容量:"+QString::number(temp->totalUser)+"
"; 210 | tmp->setToolTip(apContent); 211 | } 212 | else if(temp->frequency==11) 213 | { 214 | tmp=this->scene->addEllipse(temp->x(),temp->y(),(setAlgo->ratio)*EXR,(setAlgo->ratio)*EXR,blackPen,yellowBrush); 215 | apContent="

基站信息

基站频率:"+QString::number(temp->frequency)+"
基站功率:"+QString::number(temp->power)+"
网络容量:"+QString::number(temp->total_wifiSpeed)+"
用户容量:"+QString::number(temp->totalUser)+"
"; 216 | tmp->setToolTip(apContent); 217 | } 218 | } 219 | 220 | _addLineGraph(); 221 | 222 | for(int i=0;i<7;i++){ 223 | 224 | if(self_organizeWindow->event[i]->hasEvent == true){ 225 | mytime[i].eventType=self_organizeWindow->event[i]->eventType; 226 | mytime[i].eventContent=self_organizeWindow->event[i]->eventContent; 227 | qDebug()<exec(); 241 | } 242 | 243 | void MainWindow::on_action_2_triggered() 244 | { 245 | self_organizeWindow = new self_optimize_set; 246 | self_organizeWindow->exec(); 247 | } 248 | 249 | void MainWindow::on_action_3_triggered() 250 | { 251 | self_window = new self_set; 252 | self_window->exec(); 253 | } 254 | 255 | void MainWindow::on_action_8_triggered() 256 | { 257 | self_window = new self_set; 258 | self_window->exec(); 259 | } 260 | 261 | void MainWindow::setupMainGraph(int M,int N) 262 | { 263 | this->_cleanTheList(); 264 | 265 | QBrush redBrush(Qt::red); 266 | QBrush blueBrush(Qt::blue); 267 | QBrush yellowBrush(Qt::yellow); 268 | 269 | QPen blackPen(Qt::black); 270 | blackPen.setWidth(0.5); 271 | QPen bluePen(Qt::blue); 272 | bluePen.setWidth(0.5); 273 | srand((int)time(NULL)); 274 | /* 275 | for(int i=0;i<5;i++){ 276 | elipse[i] = scene->addEllipse(-200+i*100+rand()%30,-110+rand()%30,-100,100,blackPen,redBrush); 277 | elipse[i]->setFlag(QGraphicsItem::ItemIsMovable); 278 | } 279 | for(int i=6;i<11;i++){ 280 | elipse[i] = scene->addEllipse(-200+(i-5)*100+rand()%30,100+rand()%30,-100,100,blackPen,yelloBrush); 281 | elipse[i]->setFlag(QGraphicsItem::ItemIsMovable); 282 | } 283 | for(int i=12;i<19;i++){ 284 | elipse[i] = scene->addEllipse(-200+(i-12)*100+rand()%30,300+rand()%30,-100,100,blackPen,blueBrush); 285 | elipse[i]->setFlag(QGraphicsItem::ItemIsMovable); 286 | } 287 | 288 | */ 289 | 290 | 291 | srand((int)time(NULL)); 292 | for(int j=-N;j<=N;j++){ 293 | for(int i=-M;i<=M;i++){ 294 | blue = new QGraphicsEllipseItem; 295 | blue = scene->addEllipse(2*sqrt(3)*R*i+RD,6*R*j+RD,2*R+EXTRA,2*R+EXTRA,blackPen,blueBrush); 296 | blue->setX(2*sqrt(3)*R*i+RD); 297 | blue ->setY(6*R*j+RD); 298 | blueElipse.append(blue); 299 | } 300 | } 301 | 302 | for(int j=-N;j<=N;j++){ 303 | for(int i=-M;i<=M;i++){ 304 | blue = new QGraphicsEllipseItem; 305 | blue = scene->addEllipse(-sqrt(3)*R+2*sqrt(3)*R*i+RD,-3*R+6*R*j+RD,2*R+EXTRA,2*R+EXTRA,blackPen,blueBrush); 306 | blue->setX(-sqrt(3)*R+2*sqrt(3)*R*i+RD); 307 | blue->setY(-3*R+6*R*j+RD); 308 | blueElipse.append(blue); 309 | } 310 | } 311 | 312 | for(int j=-N;j<=N;j++){ 313 | for(int i=-M;i<=M;i++){ 314 | red = new QGraphicsEllipseItem; 315 | red = scene->addEllipse(2*sqrt(3)*R*i+RD,2*R+6*R*j+RD,2*R+EXTRA,2*R+EXTRA,blackPen,redBrush); 316 | red->setX(2*sqrt(3)*R*i+RD); 317 | red->setY(2*R+6*R*j+RD); 318 | redElipse.append(red); 319 | } 320 | } 321 | 322 | for(int j=-N;j<=N;j++){ 323 | for(int i=-M;i<=M;i++){ 324 | red = new QGraphicsEllipseItem; 325 | red = scene->addEllipse(-sqrt(3)*R+2*sqrt(3)*R*i+RD,-R+6*R*j+RD,2*R+EXTRA,2*R+EXTRA,blackPen,redBrush); 326 | red->setX(-sqrt(3)*R+2*sqrt(3)*R*i+RD); 327 | red->setY(-R+6*R*j+RD); 328 | redElipse.append(red); 329 | } 330 | } 331 | for(int j=-N;j<=N;j++){ 332 | for(int i=-M;i<=M;i++){ 333 | yellow = new QGraphicsEllipseItem; 334 | yellow = scene->addEllipse(-sqrt(3)*R+2*sqrt(3)*R*i+RD,R+6*R*j+RD,2*R+EXTRA,2*R+EXTRA,blackPen,yellowBrush); 335 | yellow->setX(-sqrt(3)*R+2*sqrt(3)*R*i+RD); 336 | yellow->setY(R+6*R*j+RD); 337 | yellowElipse.append(yellow); 338 | } 339 | } 340 | 341 | for(int j=-N;j<=N;j++){ 342 | for(int i=-M;i<=M;i++){ 343 | yellow = new QGraphicsEllipseItem; 344 | yellow = scene->addEllipse(2*sqrt(3)*R*i+RD,-2*R+6*R*j+RD,2*R+EXTRA,2*R+EXTRA,blackPen,yellowBrush); 345 | yellow ->setX(2*sqrt(3)*R*i+RD); 346 | yellow ->setY(-2*R+6*R*j+RD); 347 | yellowElipse.append(yellow); 348 | } 349 | } 350 | 351 | qDebug()<setFlag(QGraphicsItem::ItemIsMovable); 355 | qDebug()<x()<<" "<y()<setFlag(QGraphicsItem::ItemIsMovable); 361 | qDebug()<x()<<" "<y()<setFlag(QGraphicsItem::ItemIsMovable); 365 | qDebug()<x()<<" "<y()<_addLineGraph(); 368 | } 369 | 370 | 371 | void MainWindow::on_pushButton_4_clicked() 372 | { 373 | scene->clear(); 374 | MainWindow::setupMainGraph(m,n); 375 | m++;n++; 376 | } 377 | 378 | void MainWindow::on_pushButton_5_clicked() 379 | { 380 | scene->clear(); 381 | this->_cleanTheList(); 382 | this->_addLineGraph(); 383 | m=1;n=0; 384 | } 385 | 386 | void MainWindow::_cleanTheList() 387 | { 388 | redElipse.clear(); 389 | yellowElipse.clear(); 390 | blueElipse.clear(); 391 | } 392 | 393 | void MainWindow::on_graphicsView_rubberBandChanged(const QRect &viewportRect, const QPointF &fromScenePoint, const QPointF &toScenePoint) 394 | { 395 | 396 | } 397 | 398 | void MainWindow::on_pushButton_6_clicked() 399 | { 400 | out=""; 401 | ui->textEdit->setText(out); 402 | } 403 | 404 | void MainWindow::on_horizontalScrollBar_valueChanged(int value) 405 | { 406 | double change=value*1.0/100; 407 | ui->graphicsView->scale(change,change); 408 | } 409 | -------------------------------------------------------------------------------- /mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include "timer.h" 11 | #include "ap.h" 12 | #include "dot.h" 13 | #include "set_algorithm.h" 14 | #include "self_youhua.h" 15 | #include "self_optimize_set.h" 16 | #include "introduce.h" 17 | 18 | #define R 30 19 | using namespace std; 20 | 21 | namespace Ui { 22 | class MainWindow; 23 | } 24 | 25 | class MainWindow : public QMainWindow 26 | { 27 | Q_OBJECT 28 | 29 | public: 30 | explicit MainWindow(QWidget *parent = 0); 31 | ~MainWindow(); 32 | self_set *self_window; 33 | self_optimize_set *self_organizeWindow; 34 | GraphicsTest *graTest; 35 | bool hasSet; 36 | timer mytime[10]; 37 | QGraphicsEllipseItem *tmp; 38 | introduce *introwindow; 39 | 40 | public slots: 41 | void myslots(); 42 | 43 | private slots: 44 | void on_tab_destroyed(); 45 | 46 | void on_pushButton_clicked(); 47 | 48 | void on_pushButton_2_clicked(); 49 | 50 | void on_pushButton_3_clicked(); 51 | 52 | void on_action_2_triggered(); 53 | 54 | void on_action_3_triggered(); 55 | 56 | void on_action_8_triggered(); 57 | 58 | void on_graphicsView_rubberBandChanged(const QRect &viewportRect, const QPointF &fromScenePoint, const QPointF &toScenePoint); 59 | 60 | void on_pushButton_4_clicked(); 61 | void setupMainGraph(int m,int n); 62 | void _addLineGraph(); 63 | void _cleanTheList(); 64 | 65 | void on_pushButton_5_clicked(); 66 | 67 | void on_pushButton_6_clicked(); 68 | 69 | void on_horizontalScrollBar_valueChanged(int value); 70 | 71 | private: 72 | Ui::MainWindow *ui; 73 | QGraphicsScene *scene; 74 | QGraphicsEllipseItem *red; 75 | QGraphicsEllipseItem *blue; 76 | QGraphicsEllipseItem *yellow; 77 | 78 | int m,n; 79 | QString out; 80 | Set_algorithm *setAlgo; 81 | self_youhua *setYouhua; 82 | 83 | QList redElipse; 84 | QList blueElipse; 85 | QList yellowElipse; 86 | 87 | 88 | QGraphicsRectItem *rectangle; 89 | }; 90 | 91 | #endif // MAINWINDOW_H 92 | -------------------------------------------------------------------------------- /mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 1621 10 | 924 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | background-color: rgb(29, 15, 29); 18 | 19 | 20 | 21 | 22 | 23 | 100 24 | 10 25 | 1351 26 | 91 27 | 28 | 29 | 30 | background-image: url(:/new/prefix1/background.jpg); 31 | 32 | 33 | QFrame::StyledPanel 34 | 35 | 36 | QFrame::Raised 37 | 38 | 39 | 40 | 41 | 42 | 220 43 | 110 44 | 1301 45 | 621 46 | 47 | 48 | 49 | 50 | 0 51 | 0 52 | 53 | 54 | 55 | <html><head/><body><p><span style=" font-size:14pt; font-weight:600;">地图</span></p></body></html> 56 | 57 | 58 | background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 0, 255), stop:1 rgba(255, 255, 255, 255)); 59 | gridline-color: rgb(236, 27, 27); 60 | color: rgb(17, 7, 7); 61 | selection-background-color: rgb(20, 20, 20); 62 | 63 | 64 | 0 65 | 66 | 67 | 68 | 69 | 16777215 70 | 16777215 71 | 72 | 73 | 74 | Qt::DefaultContextMenu 75 | 76 | 77 | 地图 78 | 79 | 80 | 81 | 82 | 0 83 | 0 84 | 171 85 | 211 86 | 87 | 88 | 89 | background-color: rgb(29, 15, 29); 90 | color: rgb(255, 255, 255); 91 | 92 | 93 | QFrame::StyledPanel 94 | 95 | 96 | QFrame::Raised 97 | 98 | 99 | 100 | 101 | 22 102 | 20 103 | 131 104 | 171 105 | 106 | 107 | 108 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 109 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 110 | p, li { white-space: pre-wrap; } 111 | </style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> 112 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">配置结果:</p></body></html> 113 | 114 | 115 | 116 | 117 | 118 | 119 | 0 120 | 0 121 | 1301 122 | 591 123 | 124 | 125 | 126 | <html><head/><body><p><span style=" color:#cc2626;">tt</span></p></body></html> 127 | 128 | 129 | 130 | 131 | 132 | 1009 133 | 550 134 | 231 135 | 20 136 | 137 | 138 | 139 | 200 140 | 141 | 142 | 0 143 | 144 | 145 | 100 146 | 147 | 148 | Qt::Horizontal 149 | 150 | 151 | graphicsView 152 | frame_4 153 | horizontalScrollBar 154 | 155 | 156 | 157 | X-map图 158 | 159 | 160 | 161 | 162 | 0 163 | 0 164 | 171 165 | 211 166 | 167 | 168 | 169 | background-color: rgb(128, 128, 128); 170 | 171 | 172 | QFrame::StyledPanel 173 | 174 | 175 | QFrame::Raised 176 | 177 | 178 | 179 | 180 | 0 181 | 20 182 | 91 183 | 17 184 | 185 | 186 | 187 | 覆盖情况: 188 | 189 | 190 | 191 | 192 | 193 | 0 194 | 170 195 | 67 196 | 17 197 | 198 | 199 | 200 | 能效比: 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 10 210 | 740 211 | 1511 212 | 101 213 | 214 | 215 | 216 | background-color: rgb(29, 15, 29); 217 | color: rgb(255, 255, 255); 218 | 219 | 220 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 221 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 222 | p, li { white-space: pre-wrap; } 223 | </style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> 224 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">控制台输出</p></body></html> 225 | 226 | 227 | 228 | 229 | 230 | 30 231 | 120 232 | 181 233 | 601 234 | 235 | 236 | 237 | 238 | 0 239 | 0 240 | 241 | 242 | 243 | QFrame::StyledPanel 244 | 245 | 246 | QFrame::Raised 247 | 248 | 249 | 250 | 251 | 10 252 | 0 253 | 161 254 | 591 255 | 256 | 257 | 258 | color: rgb(255, 255, 255); 259 | border-color: rgb(255, 255, 255); 260 | 261 | 262 | 0 263 | 264 | 265 | 266 | 267 | 0 268 | 0 269 | 161 270 | 489 271 | 272 | 273 | 274 | 基本设置 275 | 276 | 277 | 278 | 279 | 20 280 | 30 281 | 111 282 | 331 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | font: 16pt "Ubuntu"; 291 | 292 | 293 | 294 | 自配置 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | font: 16pt "Ubuntu"; 303 | 304 | 305 | 306 | 自优化 307 | 308 | 309 | 310 | 311 | 312 | 313 | test 314 | 315 | 316 | 317 | 318 | 319 | 320 | 清空消息框 321 | 322 | 323 | 324 | 325 | pushButton 326 | pushButton_3 327 | pushButton_6 328 | pushButton_2 329 | 330 | 331 | 332 | 333 | 334 | 0 335 | 0 336 | 161 337 | 489 338 | 339 | 340 | 341 | 网络节点管理 342 | 343 | 344 | 345 | 346 | 30 347 | 50 348 | 89 349 | 25 350 | 351 | 352 | 353 | 增量 354 | 355 | 356 | 357 | 358 | 359 | 30 360 | 110 361 | 89 362 | 25 363 | 364 | 365 | 366 | reset 367 | 368 | 369 | 370 | 371 | 372 | 373 | 0 374 | 0 375 | 161 376 | 489 377 | 378 | 379 | 380 | 其他设置 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 0 390 | 0 391 | 1621 392 | 25 393 | 394 | 395 | 396 | 397 | 功能 398 | 399 | 400 | 401 | 自配置 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 文件 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | TopToolBarArea 425 | 426 | 427 | false 428 | 429 | 430 | 431 | 432 | 433 | 自优化 434 | 435 | 436 | 437 | 438 | 负载均衡 439 | 440 | 441 | 442 | 443 | 睡眠模式 444 | 445 | 446 | 447 | 448 | 载入 449 | 450 | 451 | 452 | 453 | 保存 454 | 455 | 456 | 457 | 458 | 频率自配置 459 | 460 | 461 | 462 | 463 | 功率自配置 464 | 465 | 466 | 467 | 468 | 469 | pushButton 470 | tabWidget 471 | pushButton_2 472 | textEdit 473 | 474 | 475 | 476 | 477 | -------------------------------------------------------------------------------- /moc_graphicstest.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** Meta object code from reading C++ file 'graphicstest.h' 3 | ** 4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.5.0) 5 | ** 6 | ** WARNING! All changes made in this file will be lost! 7 | *****************************************************************************/ 8 | 9 | #include "../qt-son/graphicstest.h" 10 | #include 11 | #include 12 | #if !defined(Q_MOC_OUTPUT_REVISION) 13 | #error "The header file 'graphicstest.h' doesn't include ." 14 | #elif Q_MOC_OUTPUT_REVISION != 67 15 | #error "This file was generated using the moc from 5.5.0. It" 16 | #error "cannot be used with the include files from this version of Qt." 17 | #error "(The moc has changed too much.)" 18 | #endif 19 | 20 | QT_BEGIN_MOC_NAMESPACE 21 | struct qt_meta_stringdata_GraphicsTest_t { 22 | QByteArrayData data[7]; 23 | char stringdata0[123]; 24 | }; 25 | #define QT_MOC_LITERAL(idx, ofs, len) \ 26 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ 27 | qptrdiff(offsetof(qt_meta_stringdata_GraphicsTest_t, stringdata0) + ofs \ 28 | - idx * sizeof(QByteArrayData)) \ 29 | ) 30 | static const qt_meta_stringdata_GraphicsTest_t qt_meta_stringdata_GraphicsTest = { 31 | { 32 | QT_MOC_LITERAL(0, 0, 12), // "GraphicsTest" 33 | QT_MOC_LITERAL(1, 13, 21), // "on_pushButton_clicked" 34 | QT_MOC_LITERAL(2, 35, 0), // "" 35 | QT_MOC_LITERAL(3, 36, 23), // "on_pushButton_2_clicked" 36 | QT_MOC_LITERAL(4, 60, 23), // "on_pushButton_3_clicked" 37 | QT_MOC_LITERAL(5, 84, 32), // "on_horizontalSlider_valueChanged" 38 | QT_MOC_LITERAL(6, 117, 5) // "value" 39 | 40 | }, 41 | "GraphicsTest\0on_pushButton_clicked\0\0" 42 | "on_pushButton_2_clicked\0on_pushButton_3_clicked\0" 43 | "on_horizontalSlider_valueChanged\0value" 44 | }; 45 | #undef QT_MOC_LITERAL 46 | 47 | static const uint qt_meta_data_GraphicsTest[] = { 48 | 49 | // content: 50 | 7, // revision 51 | 0, // classname 52 | 0, 0, // classinfo 53 | 4, 14, // methods 54 | 0, 0, // properties 55 | 0, 0, // enums/sets 56 | 0, 0, // constructors 57 | 0, // flags 58 | 0, // signalCount 59 | 60 | // slots: name, argc, parameters, tag, flags 61 | 1, 0, 34, 2, 0x08 /* Private */, 62 | 3, 0, 35, 2, 0x08 /* Private */, 63 | 4, 0, 36, 2, 0x08 /* Private */, 64 | 5, 1, 37, 2, 0x08 /* Private */, 65 | 66 | // slots: parameters 67 | QMetaType::Void, 68 | QMetaType::Void, 69 | QMetaType::Void, 70 | QMetaType::Void, QMetaType::Int, 6, 71 | 72 | 0 // eod 73 | }; 74 | 75 | void GraphicsTest::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) 76 | { 77 | if (_c == QMetaObject::InvokeMetaMethod) { 78 | GraphicsTest *_t = static_cast(_o); 79 | Q_UNUSED(_t) 80 | switch (_id) { 81 | case 0: _t->on_pushButton_clicked(); break; 82 | case 1: _t->on_pushButton_2_clicked(); break; 83 | case 2: _t->on_pushButton_3_clicked(); break; 84 | case 3: _t->on_horizontalSlider_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; 85 | default: ; 86 | } 87 | } 88 | } 89 | 90 | const QMetaObject GraphicsTest::staticMetaObject = { 91 | { &QDialog::staticMetaObject, qt_meta_stringdata_GraphicsTest.data, 92 | qt_meta_data_GraphicsTest, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} 93 | }; 94 | 95 | 96 | const QMetaObject *GraphicsTest::metaObject() const 97 | { 98 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; 99 | } 100 | 101 | void *GraphicsTest::qt_metacast(const char *_clname) 102 | { 103 | if (!_clname) return Q_NULLPTR; 104 | if (!strcmp(_clname, qt_meta_stringdata_GraphicsTest.stringdata0)) 105 | return static_cast(const_cast< GraphicsTest*>(this)); 106 | return QDialog::qt_metacast(_clname); 107 | } 108 | 109 | int GraphicsTest::qt_metacall(QMetaObject::Call _c, int _id, void **_a) 110 | { 111 | _id = QDialog::qt_metacall(_c, _id, _a); 112 | if (_id < 0) 113 | return _id; 114 | if (_c == QMetaObject::InvokeMetaMethod) { 115 | if (_id < 4) 116 | qt_static_metacall(this, _c, _id, _a); 117 | _id -= 4; 118 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { 119 | if (_id < 4) 120 | *reinterpret_cast(_a[0]) = -1; 121 | _id -= 4; 122 | } 123 | return _id; 124 | } 125 | QT_END_MOC_NAMESPACE 126 | 127 | 128 | -------------------------------------------------------------------------------- /moc_mainwindow.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** Meta object code from reading C++ file 'mainwindow.h' 3 | ** 4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.5.0) 5 | ** 6 | ** WARNING! All changes made in this file will be lost! 7 | *****************************************************************************/ 8 | 9 | #include "../qt-son/mainwindow.h" 10 | #include 11 | #include 12 | #if !defined(Q_MOC_OUTPUT_REVISION) 13 | #error "The header file 'mainwindow.h' doesn't include ." 14 | #elif Q_MOC_OUTPUT_REVISION != 67 15 | #error "This file was generated using the moc from 5.5.0. It" 16 | #error "cannot be used with the include files from this version of Qt." 17 | #error "(The moc has changed too much.)" 18 | #endif 19 | 20 | QT_BEGIN_MOC_NAMESPACE 21 | struct qt_meta_stringdata_MainWindow_t { 22 | QByteArrayData data[23]; 23 | char stringdata0[401]; 24 | }; 25 | #define QT_MOC_LITERAL(idx, ofs, len) \ 26 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ 27 | qptrdiff(offsetof(qt_meta_stringdata_MainWindow_t, stringdata0) + ofs \ 28 | - idx * sizeof(QByteArrayData)) \ 29 | ) 30 | static const qt_meta_stringdata_MainWindow_t qt_meta_stringdata_MainWindow = { 31 | { 32 | QT_MOC_LITERAL(0, 0, 10), // "MainWindow" 33 | QT_MOC_LITERAL(1, 11, 16), // "on_tab_destroyed" 34 | QT_MOC_LITERAL(2, 28, 0), // "" 35 | QT_MOC_LITERAL(3, 29, 21), // "on_pushButton_clicked" 36 | QT_MOC_LITERAL(4, 51, 23), // "on_pushButton_2_clicked" 37 | QT_MOC_LITERAL(5, 75, 23), // "on_pushButton_3_clicked" 38 | QT_MOC_LITERAL(6, 99, 21), // "on_action_2_triggered" 39 | QT_MOC_LITERAL(7, 121, 21), // "on_action_3_triggered" 40 | QT_MOC_LITERAL(8, 143, 21), // "on_action_8_triggered" 41 | QT_MOC_LITERAL(9, 165, 33), // "on_graphicsView_rubberBandCha..." 42 | QT_MOC_LITERAL(10, 199, 12), // "viewportRect" 43 | QT_MOC_LITERAL(11, 212, 14), // "fromScenePoint" 44 | QT_MOC_LITERAL(12, 227, 12), // "toScenePoint" 45 | QT_MOC_LITERAL(13, 240, 23), // "on_pushButton_4_clicked" 46 | QT_MOC_LITERAL(14, 264, 14), // "setupMainGraph" 47 | QT_MOC_LITERAL(15, 279, 1), // "m" 48 | QT_MOC_LITERAL(16, 281, 1), // "n" 49 | QT_MOC_LITERAL(17, 283, 13), // "_addLineGraph" 50 | QT_MOC_LITERAL(18, 297, 13), // "_cleanTheList" 51 | QT_MOC_LITERAL(19, 311, 23), // "on_pushButton_5_clicked" 52 | QT_MOC_LITERAL(20, 335, 23), // "on_pushButton_6_clicked" 53 | QT_MOC_LITERAL(21, 359, 35), // "on_horizontalScrollBar_valueC..." 54 | QT_MOC_LITERAL(22, 395, 5) // "value" 55 | 56 | }, 57 | "MainWindow\0on_tab_destroyed\0\0" 58 | "on_pushButton_clicked\0on_pushButton_2_clicked\0" 59 | "on_pushButton_3_clicked\0on_action_2_triggered\0" 60 | "on_action_3_triggered\0on_action_8_triggered\0" 61 | "on_graphicsView_rubberBandChanged\0" 62 | "viewportRect\0fromScenePoint\0toScenePoint\0" 63 | "on_pushButton_4_clicked\0setupMainGraph\0" 64 | "m\0n\0_addLineGraph\0_cleanTheList\0" 65 | "on_pushButton_5_clicked\0on_pushButton_6_clicked\0" 66 | "on_horizontalScrollBar_valueChanged\0" 67 | "value" 68 | }; 69 | #undef QT_MOC_LITERAL 70 | 71 | static const uint qt_meta_data_MainWindow[] = { 72 | 73 | // content: 74 | 7, // revision 75 | 0, // classname 76 | 0, 0, // classinfo 77 | 15, 14, // methods 78 | 0, 0, // properties 79 | 0, 0, // enums/sets 80 | 0, 0, // constructors 81 | 0, // flags 82 | 0, // signalCount 83 | 84 | // slots: name, argc, parameters, tag, flags 85 | 1, 0, 89, 2, 0x08 /* Private */, 86 | 3, 0, 90, 2, 0x08 /* Private */, 87 | 4, 0, 91, 2, 0x08 /* Private */, 88 | 5, 0, 92, 2, 0x08 /* Private */, 89 | 6, 0, 93, 2, 0x08 /* Private */, 90 | 7, 0, 94, 2, 0x08 /* Private */, 91 | 8, 0, 95, 2, 0x08 /* Private */, 92 | 9, 3, 96, 2, 0x08 /* Private */, 93 | 13, 0, 103, 2, 0x08 /* Private */, 94 | 14, 2, 104, 2, 0x08 /* Private */, 95 | 17, 0, 109, 2, 0x08 /* Private */, 96 | 18, 0, 110, 2, 0x08 /* Private */, 97 | 19, 0, 111, 2, 0x08 /* Private */, 98 | 20, 0, 112, 2, 0x08 /* Private */, 99 | 21, 1, 113, 2, 0x08 /* Private */, 100 | 101 | // slots: parameters 102 | QMetaType::Void, 103 | QMetaType::Void, 104 | QMetaType::Void, 105 | QMetaType::Void, 106 | QMetaType::Void, 107 | QMetaType::Void, 108 | QMetaType::Void, 109 | QMetaType::Void, QMetaType::QRect, QMetaType::QPointF, QMetaType::QPointF, 10, 11, 12, 110 | QMetaType::Void, 111 | QMetaType::Void, QMetaType::Int, QMetaType::Int, 15, 16, 112 | QMetaType::Void, 113 | QMetaType::Void, 114 | QMetaType::Void, 115 | QMetaType::Void, 116 | QMetaType::Void, QMetaType::Int, 22, 117 | 118 | 0 // eod 119 | }; 120 | 121 | void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) 122 | { 123 | if (_c == QMetaObject::InvokeMetaMethod) { 124 | MainWindow *_t = static_cast(_o); 125 | Q_UNUSED(_t) 126 | switch (_id) { 127 | case 0: _t->on_tab_destroyed(); break; 128 | case 1: _t->on_pushButton_clicked(); break; 129 | case 2: _t->on_pushButton_2_clicked(); break; 130 | case 3: _t->on_pushButton_3_clicked(); break; 131 | case 4: _t->on_action_2_triggered(); break; 132 | case 5: _t->on_action_3_triggered(); break; 133 | case 6: _t->on_action_8_triggered(); break; 134 | case 7: _t->on_graphicsView_rubberBandChanged((*reinterpret_cast< const QRect(*)>(_a[1])),(*reinterpret_cast< const QPointF(*)>(_a[2])),(*reinterpret_cast< const QPointF(*)>(_a[3]))); break; 135 | case 8: _t->on_pushButton_4_clicked(); break; 136 | case 9: _t->setupMainGraph((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break; 137 | case 10: _t->_addLineGraph(); break; 138 | case 11: _t->_cleanTheList(); break; 139 | case 12: _t->on_pushButton_5_clicked(); break; 140 | case 13: _t->on_pushButton_6_clicked(); break; 141 | case 14: _t->on_horizontalScrollBar_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; 142 | default: ; 143 | } 144 | } 145 | } 146 | 147 | const QMetaObject MainWindow::staticMetaObject = { 148 | { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow.data, 149 | qt_meta_data_MainWindow, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} 150 | }; 151 | 152 | 153 | const QMetaObject *MainWindow::metaObject() const 154 | { 155 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; 156 | } 157 | 158 | void *MainWindow::qt_metacast(const char *_clname) 159 | { 160 | if (!_clname) return Q_NULLPTR; 161 | if (!strcmp(_clname, qt_meta_stringdata_MainWindow.stringdata0)) 162 | return static_cast(const_cast< MainWindow*>(this)); 163 | return QMainWindow::qt_metacast(_clname); 164 | } 165 | 166 | int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) 167 | { 168 | _id = QMainWindow::qt_metacall(_c, _id, _a); 169 | if (_id < 0) 170 | return _id; 171 | if (_c == QMetaObject::InvokeMetaMethod) { 172 | if (_id < 15) 173 | qt_static_metacall(this, _c, _id, _a); 174 | _id -= 15; 175 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { 176 | if (_id < 15) 177 | *reinterpret_cast(_a[0]) = -1; 178 | _id -= 15; 179 | } 180 | return _id; 181 | } 182 | QT_END_MOC_NAMESPACE 183 | 184 | 185 | -------------------------------------------------------------------------------- /moc_self_organize.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** Meta object code from reading C++ file 'self_organize.h' 3 | ** 4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.5.0) 5 | ** 6 | ** WARNING! All changes made in this file will be lost! 7 | *****************************************************************************/ 8 | 9 | #include "../qt-son/self_organize.h" 10 | #include 11 | #include 12 | #if !defined(Q_MOC_OUTPUT_REVISION) 13 | #error "The header file 'self_organize.h' doesn't include ." 14 | #elif Q_MOC_OUTPUT_REVISION != 67 15 | #error "This file was generated using the moc from 5.5.0. It" 16 | #error "cannot be used with the include files from this version of Qt." 17 | #error "(The moc has changed too much.)" 18 | #endif 19 | 20 | QT_BEGIN_MOC_NAMESPACE 21 | struct qt_meta_stringdata_self_organize_t { 22 | QByteArrayData data[3]; 23 | char stringdata0[37]; 24 | }; 25 | #define QT_MOC_LITERAL(idx, ofs, len) \ 26 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ 27 | qptrdiff(offsetof(qt_meta_stringdata_self_organize_t, stringdata0) + ofs \ 28 | - idx * sizeof(QByteArrayData)) \ 29 | ) 30 | static const qt_meta_stringdata_self_organize_t qt_meta_stringdata_self_organize = { 31 | { 32 | QT_MOC_LITERAL(0, 0, 13), // "self_organize" 33 | QT_MOC_LITERAL(1, 14, 21), // "on_buttonBox_accepted" 34 | QT_MOC_LITERAL(2, 36, 0) // "" 35 | 36 | }, 37 | "self_organize\0on_buttonBox_accepted\0" 38 | "" 39 | }; 40 | #undef QT_MOC_LITERAL 41 | 42 | static const uint qt_meta_data_self_organize[] = { 43 | 44 | // content: 45 | 7, // revision 46 | 0, // classname 47 | 0, 0, // classinfo 48 | 1, 14, // methods 49 | 0, 0, // properties 50 | 0, 0, // enums/sets 51 | 0, 0, // constructors 52 | 0, // flags 53 | 0, // signalCount 54 | 55 | // slots: name, argc, parameters, tag, flags 56 | 1, 0, 19, 2, 0x08 /* Private */, 57 | 58 | // slots: parameters 59 | QMetaType::Void, 60 | 61 | 0 // eod 62 | }; 63 | 64 | void self_organize::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) 65 | { 66 | if (_c == QMetaObject::InvokeMetaMethod) { 67 | self_organize *_t = static_cast(_o); 68 | Q_UNUSED(_t) 69 | switch (_id) { 70 | case 0: _t->on_buttonBox_accepted(); break; 71 | default: ; 72 | } 73 | } 74 | Q_UNUSED(_a); 75 | } 76 | 77 | const QMetaObject self_organize::staticMetaObject = { 78 | { &QDialog::staticMetaObject, qt_meta_stringdata_self_organize.data, 79 | qt_meta_data_self_organize, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} 80 | }; 81 | 82 | 83 | const QMetaObject *self_organize::metaObject() const 84 | { 85 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; 86 | } 87 | 88 | void *self_organize::qt_metacast(const char *_clname) 89 | { 90 | if (!_clname) return Q_NULLPTR; 91 | if (!strcmp(_clname, qt_meta_stringdata_self_organize.stringdata0)) 92 | return static_cast(const_cast< self_organize*>(this)); 93 | return QDialog::qt_metacast(_clname); 94 | } 95 | 96 | int self_organize::qt_metacall(QMetaObject::Call _c, int _id, void **_a) 97 | { 98 | _id = QDialog::qt_metacall(_c, _id, _a); 99 | if (_id < 0) 100 | return _id; 101 | if (_c == QMetaObject::InvokeMetaMethod) { 102 | if (_id < 1) 103 | qt_static_metacall(this, _c, _id, _a); 104 | _id -= 1; 105 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { 106 | if (_id < 1) 107 | *reinterpret_cast(_a[0]) = -1; 108 | _id -= 1; 109 | } 110 | return _id; 111 | } 112 | QT_END_MOC_NAMESPACE 113 | 114 | 115 | -------------------------------------------------------------------------------- /moc_self_set.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** Meta object code from reading C++ file 'self_set.h' 3 | ** 4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.5.0) 5 | ** 6 | ** WARNING! All changes made in this file will be lost! 7 | *****************************************************************************/ 8 | 9 | #include "../qt-son/self_set.h" 10 | #include 11 | #include 12 | #if !defined(Q_MOC_OUTPUT_REVISION) 13 | #error "The header file 'self_set.h' doesn't include ." 14 | #elif Q_MOC_OUTPUT_REVISION != 67 15 | #error "This file was generated using the moc from 5.5.0. It" 16 | #error "cannot be used with the include files from this version of Qt." 17 | #error "(The moc has changed too much.)" 18 | #endif 19 | 20 | QT_BEGIN_MOC_NAMESPACE 21 | struct qt_meta_stringdata_self_set_t { 22 | QByteArrayData data[11]; 23 | char stringdata0[188]; 24 | }; 25 | #define QT_MOC_LITERAL(idx, ofs, len) \ 26 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ 27 | qptrdiff(offsetof(qt_meta_stringdata_self_set_t, stringdata0) + ofs \ 28 | - idx * sizeof(QByteArrayData)) \ 29 | ) 30 | static const qt_meta_stringdata_self_set_t qt_meta_stringdata_self_set = { 31 | { 32 | QT_MOC_LITERAL(0, 0, 8), // "self_set" 33 | QT_MOC_LITERAL(1, 9, 21), // "on_buttonBox_accepted" 34 | QT_MOC_LITERAL(2, 31, 0), // "" 35 | QT_MOC_LITERAL(3, 32, 20), // "on_self_set_accepted" 36 | QT_MOC_LITERAL(4, 53, 32), // "on_horizontalSlider_valueChanged" 37 | QT_MOC_LITERAL(5, 86, 5), // "value" 38 | QT_MOC_LITERAL(6, 92, 20), // "on_dial_valueChanged" 39 | QT_MOC_LITERAL(7, 113, 23), // "on_lineEdit_textChanged" 40 | QT_MOC_LITERAL(8, 137, 4), // "arg1" 41 | QT_MOC_LITERAL(9, 142, 23), // "on_spinBox_valueChanged" 42 | QT_MOC_LITERAL(10, 166, 21) // "on_pushButton_clicked" 43 | 44 | }, 45 | "self_set\0on_buttonBox_accepted\0\0" 46 | "on_self_set_accepted\0" 47 | "on_horizontalSlider_valueChanged\0value\0" 48 | "on_dial_valueChanged\0on_lineEdit_textChanged\0" 49 | "arg1\0on_spinBox_valueChanged\0" 50 | "on_pushButton_clicked" 51 | }; 52 | #undef QT_MOC_LITERAL 53 | 54 | static const uint qt_meta_data_self_set[] = { 55 | 56 | // content: 57 | 7, // revision 58 | 0, // classname 59 | 0, 0, // classinfo 60 | 7, 14, // methods 61 | 0, 0, // properties 62 | 0, 0, // enums/sets 63 | 0, 0, // constructors 64 | 0, // flags 65 | 0, // signalCount 66 | 67 | // slots: name, argc, parameters, tag, flags 68 | 1, 0, 49, 2, 0x08 /* Private */, 69 | 3, 0, 50, 2, 0x08 /* Private */, 70 | 4, 1, 51, 2, 0x08 /* Private */, 71 | 6, 1, 54, 2, 0x08 /* Private */, 72 | 7, 1, 57, 2, 0x08 /* Private */, 73 | 9, 1, 60, 2, 0x08 /* Private */, 74 | 10, 0, 63, 2, 0x08 /* Private */, 75 | 76 | // slots: parameters 77 | QMetaType::Void, 78 | QMetaType::Void, 79 | QMetaType::Void, QMetaType::Int, 5, 80 | QMetaType::Void, QMetaType::Int, 5, 81 | QMetaType::Void, QMetaType::QString, 8, 82 | QMetaType::Void, QMetaType::Int, 8, 83 | QMetaType::Void, 84 | 85 | 0 // eod 86 | }; 87 | 88 | void self_set::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) 89 | { 90 | if (_c == QMetaObject::InvokeMetaMethod) { 91 | self_set *_t = static_cast(_o); 92 | Q_UNUSED(_t) 93 | switch (_id) { 94 | case 0: _t->on_buttonBox_accepted(); break; 95 | case 1: _t->on_self_set_accepted(); break; 96 | case 2: _t->on_horizontalSlider_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; 97 | case 3: _t->on_dial_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; 98 | case 4: _t->on_lineEdit_textChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; 99 | case 5: _t->on_spinBox_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break; 100 | case 6: _t->on_pushButton_clicked(); break; 101 | default: ; 102 | } 103 | } 104 | } 105 | 106 | const QMetaObject self_set::staticMetaObject = { 107 | { &QDialog::staticMetaObject, qt_meta_stringdata_self_set.data, 108 | qt_meta_data_self_set, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} 109 | }; 110 | 111 | 112 | const QMetaObject *self_set::metaObject() const 113 | { 114 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; 115 | } 116 | 117 | void *self_set::qt_metacast(const char *_clname) 118 | { 119 | if (!_clname) return Q_NULLPTR; 120 | if (!strcmp(_clname, qt_meta_stringdata_self_set.stringdata0)) 121 | return static_cast(const_cast< self_set*>(this)); 122 | return QDialog::qt_metacast(_clname); 123 | } 124 | 125 | int self_set::qt_metacall(QMetaObject::Call _c, int _id, void **_a) 126 | { 127 | _id = QDialog::qt_metacall(_c, _id, _a); 128 | if (_id < 0) 129 | return _id; 130 | if (_c == QMetaObject::InvokeMetaMethod) { 131 | if (_id < 7) 132 | qt_static_metacall(this, _c, _id, _a); 133 | _id -= 7; 134 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { 135 | if (_id < 7) 136 | *reinterpret_cast(_a[0]) = -1; 137 | _id -= 7; 138 | } 139 | return _id; 140 | } 141 | QT_END_MOC_NAMESPACE 142 | 143 | 144 | -------------------------------------------------------------------------------- /npm-debug.log: -------------------------------------------------------------------------------- 1 | 0 info it worked if it ends with ok 2 | 1 verbose cli [ 'node', '/usr/local/bin/npm', 'install' ] 3 | 2 info using npm@2.14.2 4 | 3 info using node@v0.10.25 5 | 4 verbose node symlink /usr/bin/node 6 | 5 verbose readDependencies loading dependencies from /home/rao/desk/package.json 7 | 6 error install Couldn't read dependencies 8 | 7 verbose stack Error: ENOENT, open '/home/rao/desk/package.json' 9 | 8 verbose cwd /home/rao/desk/QT/qt-son 10 | 9 error Linux 3.16.0-48-generic 11 | 10 error argv "node" "/usr/local/bin/npm" "install" 12 | 11 error node v0.10.25 13 | 12 error npm v2.14.2 14 | 13 error path /home/rao/desk/package.json 15 | 14 error code ENOPACKAGEJSON 16 | 15 error errno 34 17 | 16 error package.json ENOENT, open '/home/rao/desk/package.json' 18 | 16 error package.json This is most likely not a problem with npm itself. 19 | 16 error package.json npm can't find a package.json file in your current directory. 20 | 17 verbose exit [ 34, true ] 21 | -------------------------------------------------------------------------------- /qt-son.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2015-07-19T14:36:51 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui 8 | 9 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 10 | 11 | TARGET = qt-son 12 | TEMPLATE = app 13 | 14 | 15 | SOURCES += main.cpp\ 16 | mainwindow.cpp \ 17 | self_set.cpp \ 18 | graphicstest.cpp \ 19 | set_algorithm.cpp \ 20 | ap.cpp \ 21 | dot.cpp \ 22 | user.cpp \ 23 | self_youhua.cpp \ 24 | self_optimize_set.cpp \ 25 | eventbutton.cpp \ 26 | eventset.cpp \ 27 | timer.cpp \ 28 | introduce.cpp 29 | 30 | HEADERS += mainwindow.h \ 31 | self_set.h \ 32 | graphicstest.h \ 33 | set_algorithm.h \ 34 | ap.h \ 35 | dot.h \ 36 | user.h \ 37 | self_youhua.h \ 38 | self_optimize_set.h \ 39 | eventbutton.h \ 40 | eventset.h \ 41 | timer.h \ 42 | introduce.h 43 | 44 | FORMS += mainwindow.ui \ 45 | self_set.ui \ 46 | graphicstest.ui \ 47 | self_optimize_set.ui \ 48 | eventset.ui \ 49 | introduce.ui 50 | 51 | 52 | RESOURCES += \ 53 | image/image.qrc 54 | 55 | 56 | -------------------------------------------------------------------------------- /realwork.txt: -------------------------------------------------------------------------------- 1 | Wed Apr 20 00:00:00 2016 -0400563951 2 | -------------------------------------------------------------------------------- /self_optimize_set.cpp: -------------------------------------------------------------------------------- 1 | #include "self_optimize_set.h" 2 | #include "ui_self_optimize_set.h" 3 | #include 4 | #include 5 | #include "timer.h" 6 | 7 | 8 | self_optimize_set::self_optimize_set(QWidget *parent) : 9 | QDialog(parent), 10 | ui(new Ui::self_optimize_set) 11 | { 12 | ui->setupUi(this); 13 | QPalette bgpal = palette(); 14 | bgpal.setColor (QPalette::Background, QColor (29, 15, 29)); 15 | //bgpal.setColor (QPalette::Background, Qt::transparent); 16 | bgpal.setColor (QPalette::Foreground, QColor(255,255,255,255)); 17 | setPalette (bgpal); 18 | for(int i=0;i<9;i++){ 19 | event[i] = new eventButton; 20 | 21 | } 22 | ui->verticalLayout->addWidget(event[0]); 23 | ui->verticalLayout_2->addWidget(event[1]); 24 | ui->verticalLayout_3->addWidget(event[2]); 25 | ui->verticalLayout_4->addWidget(event[3]); 26 | ui->verticalLayout_5->addWidget(event[4]); 27 | ui->verticalLayout_6->addWidget(event[5]); 28 | ui->verticalLayout_7->addWidget(event[6]); 29 | 30 | connect(event[0], SIGNAL(clicked()), this, SLOT(clickevent_1())); 31 | connect(event[1], SIGNAL(clicked()), this, SLOT(clickevent_2())); 32 | connect(event[2], SIGNAL(clicked()), this, SLOT(clickevent_3())); 33 | connect(event[3], SIGNAL(clicked()), this, SLOT(clickevent_4())); 34 | connect(event[4], SIGNAL(clicked()), this, SLOT(clickevent_5())); 35 | connect(event[5], SIGNAL(clicked()), this, SLOT(clickevent_6())); 36 | connect(event[6], SIGNAL(clicked()), this, SLOT(clickevent_7())); 37 | 38 | qDebug()<<"timer start"; 39 | timer mytime; 40 | 41 | } 42 | 43 | self_optimize_set::~self_optimize_set() 44 | { 45 | delete ui; 46 | } 47 | 48 | void self_optimize_set::clickevent_1() 49 | { 50 | int curr=0; 51 | if(event[curr]->hasEvent==true){ 52 | QMessageBox::information(this,"Error!","不能重复添加事件!"); 53 | } 54 | else{ 55 | qDebug()<<"confirm event: "<exec(); 58 | 59 | if (eventwindow->accepted == true) 60 | { 61 | event[curr]->hasEvent=true; 62 | event[curr]->eventContent=eventwindow->eventitem; 63 | event[curr]->serious=eventwindow->serious; 64 | event[curr]->eventType=eventwindow->eventType; 65 | event[curr]->reinit(); 66 | } 67 | } 68 | } 69 | void self_optimize_set::clickevent_2() 70 | { 71 | int curr=1; 72 | if(event[curr]->hasEvent==true){ 73 | QMessageBox::information(this,"Error!","不能重复添加事件!"); 74 | } 75 | else{ 76 | qDebug()<<"confirm event: "<exec(); 79 | 80 | if (eventwindow->accepted == true) 81 | { 82 | event[curr]->hasEvent=true; 83 | event[curr]->eventContent=eventwindow->eventitem; 84 | event[curr]->serious=eventwindow->serious; 85 | event[curr]->eventType=eventwindow->eventType; 86 | event[curr]->reinit(); 87 | } 88 | } 89 | } 90 | void self_optimize_set::clickevent_3() 91 | { 92 | int curr=2; 93 | if(event[curr]->hasEvent==true){ 94 | QMessageBox::information(this,"Error!","不能重复添加事件!"); 95 | } 96 | else{ 97 | qDebug()<<"confirm event: "<exec(); 100 | 101 | if (eventwindow->accepted == true) 102 | { 103 | event[curr]->hasEvent=true; 104 | event[curr]->eventContent=eventwindow->eventitem; 105 | event[curr]->serious=eventwindow->serious; 106 | event[curr]->eventType=eventwindow->eventType; 107 | event[curr]->reinit(); 108 | } 109 | } 110 | } 111 | void self_optimize_set::clickevent_4() 112 | { 113 | int curr=3; 114 | if(event[curr]->hasEvent==true){ 115 | QMessageBox::information(this,"Error!","不能重复添加事件!"); 116 | } 117 | else{ 118 | qDebug()<<"confirm event: "<exec(); 121 | 122 | if (eventwindow->accepted == true) 123 | { 124 | event[curr]->hasEvent=true; 125 | event[curr]->eventContent=eventwindow->eventitem; 126 | event[curr]->serious=eventwindow->serious; 127 | event[curr]->eventType=eventwindow->eventType; 128 | event[curr]->reinit(); 129 | } 130 | } 131 | } 132 | void self_optimize_set::clickevent_5() 133 | { 134 | int curr=4; 135 | if(event[curr]->hasEvent==true){ 136 | QMessageBox::information(this,"Error!","不能重复添加事件!"); 137 | } 138 | else{ 139 | qDebug()<<"confirm event: "<exec(); 142 | 143 | if (eventwindow->accepted == true) 144 | { 145 | event[curr]->hasEvent=true; 146 | event[curr]->eventContent=eventwindow->eventitem; 147 | event[curr]->serious=eventwindow->serious; 148 | event[curr]->eventType=eventwindow->eventType; 149 | event[curr]->reinit(); 150 | } 151 | } 152 | } 153 | void self_optimize_set::clickevent_6() 154 | { 155 | int curr=5; 156 | if(event[curr]->hasEvent==true){ 157 | QMessageBox::information(this,"Error!","不能重复添加事件!"); 158 | } 159 | else{ 160 | qDebug()<<"confirm event: "<exec(); 163 | 164 | if (eventwindow->accepted == true) 165 | { 166 | event[curr]->hasEvent=true; 167 | event[curr]->eventContent=eventwindow->eventitem; 168 | event[curr]->serious=eventwindow->serious; 169 | event[curr]->eventType=eventwindow->eventType; 170 | event[curr]->reinit(); 171 | } 172 | } 173 | } 174 | void self_optimize_set::clickevent_7() 175 | { 176 | int curr=6; 177 | if(event[curr]->hasEvent==true){ 178 | QMessageBox::information(this,"Error!","不能重复添加事件!"); 179 | } 180 | else{ 181 | qDebug()<<"confirm event: "<exec(); 184 | 185 | if (eventwindow->accepted == true) 186 | { 187 | event[curr]->hasEvent=true; 188 | event[curr]->eventContent=eventwindow->eventitem; 189 | event[curr]->serious=eventwindow->serious; 190 | event[curr]->eventType=eventwindow->eventType; 191 | event[curr]->reinit(); 192 | } 193 | } 194 | } 195 | -------------------------------------------------------------------------------- /self_optimize_set.h: -------------------------------------------------------------------------------- 1 | #ifndef SELF_OPTIMIZE_SET_H 2 | #define SELF_OPTIMIZE_SET_H 3 | 4 | #include 5 | #include "eventbutton.h" 6 | #include "eventset.h" 7 | 8 | namespace Ui { 9 | class self_optimize_set; 10 | } 11 | 12 | class self_optimize_set : public QDialog 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit self_optimize_set(QWidget *parent = 0); 18 | ~self_optimize_set(); 19 | eventSet *eventwindow; 20 | int currentEvent; 21 | eventButton *event[10]; 22 | 23 | private slots: 24 | void clickevent_1(); 25 | void clickevent_2(); 26 | void clickevent_3(); 27 | void clickevent_4(); 28 | void clickevent_5(); 29 | void clickevent_6(); 30 | void clickevent_7(); 31 | 32 | 33 | private: 34 | Ui::self_optimize_set *ui; 35 | 36 | 37 | }; 38 | 39 | #endif // SELF_OPTIMIZE_SET_H 40 | -------------------------------------------------------------------------------- /self_optimize_set.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | self_optimize_set 4 | 5 | 6 | 7 | 0 8 | 0 9 | 1363 10 | 363 11 | 12 | 13 | 14 | 自优化时间轴 15 | 16 | 17 | 18 | 19 | 540 20 | 310 21 | 181 22 | 32 23 | 24 | 25 | 26 | Qt::Horizontal 27 | 28 | 29 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 30 | 31 | 32 | 33 | 34 | 35 | 30 36 | 170 37 | 1321 38 | 20 39 | 40 | 41 | 42 | color: rgb(255, 255, 255); 43 | 44 | 45 | Qt::Horizontal 46 | 47 | 48 | 49 | 50 | 51 | 74 52 | 131 53 | 61 54 | 21 55 | 56 | 57 | 58 | 59 | 16 60 | 61 | 62 | 63 | 8:00 64 | 65 | 66 | 67 | 68 | 69 | 241 70 | 132 71 | 61 72 | 21 73 | 74 | 75 | 76 | 77 | 16 78 | 79 | 80 | 81 | 10:00 82 | 83 | 84 | 85 | 86 | 87 | 406 88 | 131 89 | 61 90 | 21 91 | 92 | 93 | 94 | 95 | 16 96 | 97 | 98 | 99 | 12:00 100 | 101 | 102 | 103 | 104 | 105 | 572 106 | 132 107 | 61 108 | 21 109 | 110 | 111 | 112 | 113 | 16 114 | 115 | 116 | 117 | 14:00 118 | 119 | 120 | 121 | 122 | 123 | 738 124 | 132 125 | 61 126 | 21 127 | 128 | 129 | 130 | 131 | 16 132 | 133 | 134 | 135 | 16:00 136 | 137 | 138 | 139 | 140 | 141 | 904 142 | 131 143 | 61 144 | 21 145 | 146 | 147 | 148 | 149 | 16 150 | 151 | 152 | 153 | 18:00 154 | 155 | 156 | 157 | 158 | 159 | 1070 160 | 132 161 | 61 162 | 21 163 | 164 | 165 | 166 | 167 | 16 168 | 169 | 170 | 171 | 20:00 172 | 173 | 174 | 175 | 176 | 177 | 1237 178 | 135 179 | 61 180 | 21 181 | 182 | 183 | 184 | 185 | 16 186 | 187 | 188 | 189 | 22:00 190 | 191 | 192 | 193 | 194 | 195 | 140 196 | 140 197 | 101 198 | 80 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 310 207 | 140 208 | 101 209 | 80 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 100 218 | 160 219 | 1171 220 | 41 221 | 222 | 223 | 224 | 225 | 226 | 227 | Qt::Vertical 228 | 229 | 230 | 231 | 232 | 233 | 234 | Qt::Horizontal 235 | 236 | 237 | 238 | 88 239 | 20 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | Qt::Vertical 248 | 249 | 250 | 251 | 252 | 253 | 254 | Qt::Horizontal 255 | 256 | 257 | 258 | 88 259 | 20 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | Qt::Vertical 268 | 269 | 270 | 271 | 272 | 273 | 274 | Qt::Horizontal 275 | 276 | 277 | 278 | 88 279 | 20 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | Qt::Vertical 288 | 289 | 290 | 291 | 292 | 293 | 294 | Qt::Horizontal 295 | 296 | 297 | 298 | 88 299 | 20 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | Qt::Vertical 308 | 309 | 310 | 311 | 312 | 313 | 314 | Qt::Horizontal 315 | 316 | 317 | 318 | 88 319 | 20 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | Qt::Vertical 328 | 329 | 330 | 331 | 332 | 333 | 334 | Qt::Horizontal 335 | 336 | 337 | 338 | 88 339 | 20 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | Qt::Vertical 348 | 349 | 350 | 351 | 352 | 353 | 354 | Qt::Horizontal 355 | 356 | 357 | 358 | 88 359 | 20 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | Qt::Vertical 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 473 377 | 140 378 | 101 379 | 80 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 640 388 | 141 389 | 101 390 | 80 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 806 399 | 143 400 | 101 401 | 80 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 972 410 | 143 411 | 101 412 | 80 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 1139 421 | 140 422 | 101 423 | 80 424 | 425 | 426 | 427 | 428 | buttonBox 429 | line 430 | layoutWidget 431 | label 432 | label_2 433 | label_3 434 | label_4 435 | label_5 436 | label_6 437 | label_7 438 | label_8 439 | verticalLayoutWidget 440 | verticalLayoutWidget_2 441 | verticalLayoutWidget_3 442 | verticalLayoutWidget_4 443 | verticalLayoutWidget_5 444 | verticalLayoutWidget_6 445 | verticalLayoutWidget_7 446 | 447 | 448 | 449 | 450 | buttonBox 451 | accepted() 452 | self_optimize_set 453 | accept() 454 | 455 | 456 | 248 457 | 254 458 | 459 | 460 | 157 461 | 274 462 | 463 | 464 | 465 | 466 | buttonBox 467 | rejected() 468 | self_optimize_set 469 | reject() 470 | 471 | 472 | 316 473 | 260 474 | 475 | 476 | 286 477 | 274 478 | 479 | 480 | 481 | 482 | 483 | -------------------------------------------------------------------------------- /self_set.cpp: -------------------------------------------------------------------------------- 1 | #include "self_set.h" 2 | #include "ui_self_set.h" 3 | #include 4 | #include 5 | 6 | self_set::self_set(QWidget *parent) : 7 | QDialog(parent), 8 | ui(new Ui::self_set) 9 | { 10 | ui->setupUi(this); 11 | // this->setStyleSheet("background-color:gray;"); 12 | this->setStyleSheet("color:white;"); 13 | this->_yes=false; 14 | /* 15 | QPalette palette = ui->PARAMETERA->palette(); 16 | palette.setBrush(QPalette::Background,QBrush(Qt::red)); 17 | ui->PARAMETERA->setPalette(palette); 18 | ui->PARAMETERA->setAutoFillBackground(true); 19 | */ 20 | 21 | //注意要先调用setAutoFillBackground 22 | ui->line->setAutoFillBackground(true); 23 | QPalette palette; 24 | //设置QTextEdit文字颜色 25 | palette.setBrush(QPalette::Active, QPalette::Text, QBrush(Qt::yellow)); 26 | //设置QTextEdit背景色 27 | palette.setBrush(QPalette::Active, QPalette::Base, QBrush(Qt::red)); 28 | ui->line->setPalette(palette); 29 | ui->label_4->setToolTip("testtool"); 30 | ui->label->setToolTip("基站在使用中可以调到的最大功率"); 31 | ui->label_2->setToolTip("满足用户正常通信的最小信号强度,当信号小于这个值时,用户不能正常通信,不同的业务有着不同的最小信号强度"); 32 | ui->label_14->setToolTip("满足用户正常通信的最小信干比"); 33 | ui->label_15->setToolTip("接收信号强度/干扰信号强度"); 34 | ui->label_11->setToolTip("可以通信区域的面积/总区域的面积"); 35 | ui->radioButton->setToolTip("整个区域的平均SINR最小"); 36 | ui->radioButton_2->setToolTip("能效比=S/P和"); 37 | } 38 | 39 | self_set::~self_set() 40 | { 41 | delete ui; 42 | } 43 | 44 | void self_set::on_buttonBox_accepted() 45 | { 46 | this->power=(ui->spinBox->value()); 47 | this->PARAMETER_A=ui->PARAMETERA->value(); 48 | this->PARAMETER_B=ui->PARAMETERB->value(); 49 | this->RESP0=ui->RSRP0->value(); 50 | this->choice=(ui->radioButton->isChecked())?1:2; 51 | this->coverRate = ui->COVERRATE->value(); 52 | this->SINR = ui->SINRSPIN->value(); 53 | this->a=ui->PARAMETERA->value(); 54 | this->b=ui->PARAMETERB->value(); 55 | this->_yes=true; 56 | } 57 | 58 | void self_set::on_self_set_accepted() 59 | { 60 | 61 | } 62 | 63 | 64 | void self_set::on_dial_valueChanged(int value) 65 | { 66 | ui->spinBox->setValue(value); 67 | } 68 | 69 | void self_set::on_horizontalSlider_valueChanged(int value) 70 | { 71 | 72 | } 73 | 74 | void self_set::on_lineEdit_textChanged(const QString &arg1) 75 | { 76 | ui->dial->setValue(arg1.toInt()); 77 | } 78 | 79 | void self_set::on_spinBox_valueChanged(int arg1) 80 | { 81 | ui->dial->setValue(arg1); 82 | } 83 | 84 | void self_set::on_pushButton_clicked() 85 | { 86 | ui->COVERRATE->setValue(95); 87 | ui->PARAMETERA->setValue(20); 88 | ui->PARAMETERB->setValue(32.4); 89 | ui->spinBox->setValue(50); 90 | ui->RSRP0->setValue(-85); 91 | ui->SINRSPIN->setValue(10.00); 92 | } 93 | -------------------------------------------------------------------------------- /self_set.h: -------------------------------------------------------------------------------- 1 | #ifndef SELF_SET_H 2 | #define SELF_SET_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class self_set; 9 | } 10 | 11 | class self_set : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit self_set(QWidget *parent = 0); 17 | ~self_set(); 18 | int power; 19 | bool _yes; 20 | double PARAMETER_A; 21 | double PARAMETER_B; 22 | int RESP0; 23 | int coverRate; 24 | int choice; 25 | double SINR; 26 | double a,b; 27 | 28 | private slots: 29 | void on_buttonBox_accepted(); 30 | 31 | void on_self_set_accepted(); 32 | 33 | void on_horizontalSlider_valueChanged(int value); 34 | 35 | void on_dial_valueChanged(int value); 36 | 37 | void on_lineEdit_textChanged(const QString &arg1); 38 | 39 | void on_spinBox_valueChanged(int arg1); 40 | 41 | void on_pushButton_clicked(); 42 | 43 | private: 44 | Ui::self_set *ui; 45 | QPushButton *colorBtn; 46 | QFrame *colorFrame; 47 | }; 48 | 49 | 50 | 51 | #endif // SELF_SET_H 52 | -------------------------------------------------------------------------------- /self_set.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | self_set 4 | 5 | 6 | 7 | 0 8 | 0 9 | 709 10 | 786 11 | 12 | 13 | 14 | 自配置 15 | 16 | 17 | background-color: rgb(29, 15, 29); 18 | 19 | 20 | 21 | 22 | 310 23 | 730 24 | 341 25 | 32 26 | 27 | 28 | 29 | color: rgb(255, 255, 255); 30 | 31 | 32 | Qt::Horizontal 33 | 34 | 35 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 36 | 37 | 38 | 39 | 40 | 41 | 30 42 | 40 43 | 651 44 | 671 45 | 46 | 47 | 48 | color: rgb(255, 255, 255); 49 | background-color: rgb(87, 16, 16); 50 | 51 | 52 | 53 | 54 | 55 | 参数设置 56 | 57 | 58 | 59 | 60 | 300 61 | 30 62 | 50 63 | 64 64 | 65 | 66 | 67 | 50 68 | 69 | 70 | 50 71 | 72 | 73 | 74 | 75 | 76 | 60 77 | 90 78 | 341 79 | 16 80 | 81 | 82 | 83 | color: rgb(255, 255, 255); 84 | 85 | 86 | Qt::Horizontal 87 | 88 | 89 | 90 | 91 | 92 | 60 93 | 210 94 | 341 95 | 16 96 | 97 | 98 | 99 | Qt::Horizontal 100 | 101 | 102 | 103 | 104 | 105 | 60 106 | 230 107 | 141 108 | 17 109 | 110 | 111 | 112 | testtool 113 | 114 | 115 | 1 116 | 117 | 118 | test status 119 | 120 | 121 | 通信最小信号强度: 122 | 123 | 124 | 125 | 126 | 127 | 300 128 | 250 129 | 50 130 | 64 131 | 132 | 133 | 134 | -99 135 | 136 | 137 | -85 138 | 139 | 140 | 141 | 142 | 143 | 110 144 | 310 145 | 141 146 | 17 147 | 148 | 149 | 150 | (Lr(路损)=alog(d)+b) 151 | 152 | 153 | 154 | 155 | 156 | 60 157 | 340 158 | 341 159 | 16 160 | 161 | 162 | 163 | false 164 | 165 | 166 | color: rgb(255, 255, 255); 167 | 168 | 169 | Qt::Horizontal 170 | 171 | 172 | 173 | 174 | 175 | 80 176 | 360 177 | 67 178 | 17 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 68 189 | 440 190 | 67 191 | 17 192 | 193 | 194 | 195 | 覆盖率: 196 | 197 | 198 | 199 | 200 | 201 | 70 202 | 560 203 | 120 204 | 60 205 | 206 | 207 | 208 | 209 | 210 | 211 | 平均SINR最优 212 | 213 | 214 | true 215 | 216 | 217 | 218 | 219 | 220 | 221 | 能效比最高 222 | 223 | 224 | false 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 70 234 | 520 235 | 171 236 | 16 237 | 238 | 239 | 240 | 95 241 | 242 | 243 | Qt::Horizontal 244 | 245 | 246 | 247 | 248 | 249 | 60 250 | 110 251 | 105 252 | 20 253 | 254 | 255 | 256 | test tool tip 257 | 258 | 259 | 路损模型参数: 260 | 261 | 262 | 263 | 264 | 265 | 130 266 | 140 267 | 93 268 | 62 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | a= 278 | 279 | 280 | 281 | 282 | 283 | 284 | false 285 | 286 | 287 | border-image: url(:/new/prefix1/back.PNG); 288 | 289 | 290 | 20.000000000000000 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | b= 302 | 303 | 304 | 305 | 306 | 307 | 308 | false 309 | 310 | 311 | border-image: url(:/new/prefix1/back.PNG); 312 | 313 | 314 | 32.399999999999999 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 70 326 | 270 327 | 165 328 | 27 329 | 330 | 331 | 332 | 333 | 334 | 335 | RSRP0= 336 | 337 | 338 | 339 | 340 | 341 | 342 | border-image: url(:/new/prefix1/back.PNG); 343 | 344 | 345 | -200 346 | 347 | 348 | -85 349 | 350 | 351 | 352 | 353 | 354 | 355 | dBm 356 | 357 | 358 | 359 | 360 | 361 | 362 | background-color: rgb(85, 16, 16); 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 60 375 | 50 376 | 192 377 | 27 378 | 379 | 380 | 381 | 382 | 383 | 384 | 基站额定功率= 385 | 386 | 387 | 388 | 389 | 390 | 391 | border-image: url(:/new/prefix1/back.PNG); 392 | 393 | 394 | 50 395 | 396 | 397 | 50 398 | 399 | 400 | 401 | 402 | 403 | 404 | dBm 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 130 414 | 480 415 | 65 416 | 27 417 | 418 | 419 | 420 | 421 | 422 | 423 | border-image: url(:/new/prefix1/back.PNG); 424 | 425 | 426 | 95 427 | 428 | 429 | 430 | 431 | 432 | 433 | % 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 300 443 | 458 444 | 50 445 | 64 446 | 447 | 448 | 449 | 450 | 16777215 451 | 16777211 452 | 453 | 454 | 455 | 0 456 | 457 | 458 | 95 459 | 460 | 461 | 462 | 463 | 464 | 530 465 | 620 466 | 89 467 | 25 468 | 469 | 470 | 471 | 恢复默认 472 | 473 | 474 | 475 | 476 | 477 | 63 478 | 350 479 | 111 480 | 17 481 | 482 | 483 | 484 | 临界信噪比: 485 | 486 | 487 | 488 | 489 | 490 | 119 491 | 392 492 | 114 493 | 27 494 | 495 | 496 | 497 | 498 | 499 | 500 | SINR= 501 | 502 | 503 | 504 | 505 | 506 | 507 | border-image: url(:/new/prefix1/back.PNG); 508 | 509 | 510 | 10.000000000000000 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | buttonBox 522 | accepted() 523 | self_set 524 | accept() 525 | 526 | 527 | 528 528 | 744 529 | 530 | 531 | 157 532 | 274 533 | 534 | 535 | 536 | 537 | buttonBox 538 | rejected() 539 | self_set 540 | reject() 541 | 542 | 543 | 596 544 | 750 545 | 546 | 547 | 286 548 | 274 549 | 550 | 551 | 552 | 553 | dial_2 554 | valueChanged(int) 555 | RSRP0 556 | setValue(int) 557 | 558 | 559 | 351 560 | 318 561 | 562 | 563 | 180 564 | 324 565 | 566 | 567 | 568 | 569 | RSRP0 570 | valueChanged(int) 571 | dial_2 572 | setValue(int) 573 | 574 | 575 | 178 576 | 329 577 | 578 | 579 | 356 580 | 347 581 | 582 | 583 | 584 | 585 | horizontalSlider 586 | valueChanged(int) 587 | COVERRATE 588 | setValue(int) 589 | 590 | 591 | 184 592 | 564 593 | 594 | 595 | 183 596 | 541 597 | 598 | 599 | 600 | 601 | COVERRATE 602 | valueChanged(int) 603 | horizontalSlider 604 | setValue(int) 605 | 606 | 607 | 171 608 | 541 609 | 610 | 611 | 163 612 | 563 613 | 614 | 615 | 616 | 617 | COVERRATE 618 | valueChanged(int) 619 | dial_3 620 | setValue(int) 621 | 622 | 623 | 192 624 | 536 625 | 626 | 627 | 348 628 | 546 629 | 630 | 631 | 632 | 633 | dial_3 634 | valueChanged(int) 635 | COVERRATE 636 | setValue(int) 637 | 638 | 639 | 365 640 | 554 641 | 642 | 643 | 175 644 | 529 645 | 646 | 647 | 648 | 649 | 650 | -------------------------------------------------------------------------------- /self_youhua.cpp: -------------------------------------------------------------------------------- 1 | #include "self_youhua.h" 2 | #include 3 | #include 4 | #include 5 | 6 | self_youhua::self_youhua() 7 | { 8 | 9 | } 10 | void self_youhua::initUser() 11 | { 12 | userList.clear(); 13 | srand((int)time(NULL)); 14 | User *tempUser; 15 | for(int j=0;j<10;j++){ 16 | for (int i=0;i<10;i++) 17 | { 18 | tempUser= new User(); 19 | tempUser->init(j,-110+rand()%10,5+rand()%10,(100+rand()%100)*1.0/100); 20 | userList.append(tempUser); 21 | } 22 | } 23 | } 24 | 25 | int self_youhua::checkSituation() 26 | { 27 | for(int i=0;iap_label:"<ap_label<ap_label)->totalUser++; 31 | if(userList.at(i)->receivePower<-110) 32 | { 33 | userList.at(i)->satisfied=false; 34 | default_aplist.at(userList.at(i)->ap_label)->unsatisfiedNum++; 35 | } 36 | } 37 | 38 | for(int i=0;itotalUser==0){ 42 | unsatisfy_rate=0; 43 | } 44 | else{ 45 | unsatisfy_rate = default_aplist.at(i)->unsatisfiedNum*1.0 / default_aplist.at(i)->totalUser; 46 | } 47 | qDebug()<<"default_aplist.at(i)->totalUser"<totalUser<0.2) 50 | { 51 | qDebug()<<"--触发欠覆盖自优化--"<unsatisfiedNum=0; 60 | if(userList.at(i)->SINR<10) 61 | { 62 | userList.at(i)->satisfied=false; 63 | default_aplist.at(userList.at(i)->ap_label)->unsatisfiedNum++; 64 | } 65 | } 66 | 67 | for(int i=0;itotalUser==0){ 71 | unsatisfy_rate=0; 72 | } 73 | else{ 74 | unsatisfy_rate = default_aplist.at(i)->unsatisfiedNum*1.0 / default_aplist.at(i)->totalUser; 75 | } 76 | qDebug()<<"unsatisfy: "<0.2) 78 | { 79 | qDebug()<<"--触发干扰自优化--"< overLabel; 85 | for(int i=0;iap_label==i) 91 | { 92 | totalSpeed+=userList.at(j)->receivePower; 93 | } 94 | } 95 | if(totalSpeed>default_aplist.at(i)->total_wifiSpeed) 96 | { 97 | overLabel.append(i); 98 | } 99 | } 100 | 101 | for(int i=0;iap_label==search) 109 | { 110 | if(userList.at(j)->receivePowerreceivePower; 113 | userLabel=j; 114 | } 115 | } 116 | } 117 | if(overLabel.size()!=0) 118 | { 119 | qDebug()<<"--触发容量自配置--"< 4 | #include "ap.h" 5 | #include "dot.h" 6 | #include "user.h" 7 | 8 | 9 | class self_youhua 10 | { 11 | public: 12 | self_youhua(); 13 | void initUser(); 14 | int checkSituation(); 15 | QList default_aplist; 16 | double defalt_ratio; 17 | QList userList; 18 | }; 19 | 20 | #endif // SELF_YOUHUA_H 21 | -------------------------------------------------------------------------------- /set_algorithm.cpp: -------------------------------------------------------------------------------- 1 | #include "set_algorithm.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #define ADAPT 23 8 | 9 | using namespace std; 10 | Set_algorithm::Set_algorithm() 11 | { 12 | 13 | } 14 | double Set_algorithm::getResultPower() 15 | { 16 | double resultPower; 17 | Dot mapDot[400][400]; 18 | QString suboutput=""; 19 | /* 20 | qDebug()<<"choice"<choice<coverRate<power<RESP0<a<d0=this->getD0(this->a,this->b,this->SINR,this->RESP0,this->power); 27 | this->l0=this->getL0(); 28 | qDebug()<<"l0: "<l0<d0<frequency=1; 48 | newAP->setX(0);newAP->setY(i*sqrt(3)*l0); 49 | apList.append(newAP); 50 | blueList.append(newAP); 51 | } 52 | 53 | 54 | 55 | for(int i=-1;i<=1;i=i+2){ 56 | for(int j=-1;j<=1;j=j+2){ 57 | newAP = new AP(); 58 | newAP->frequency=1; 59 | newAP->setX(-3.0/2*i*l0);newAP->setY(j*0.5*sqrt(3)*l0); 60 | apList.append(newAP); 61 | blueList.append(newAP); 62 | } 63 | } 64 | 65 | newAP = new AP(); 66 | newAP->frequency=6; 67 | newAP->setX(-2*l0);newAP->setY(0); 68 | apList.append(newAP); 69 | redList.append(newAP); 70 | 71 | for(int j=-1;j<=1;j=j+2){ 72 | newAP = new AP(); 73 | newAP->frequency=6; 74 | newAP->setX(-1.0/2*l0);newAP->setY(j*0.5*sqrt(3)*l0); 75 | qDebug()<x(); 76 | apList.append(newAP); 77 | redList.append(newAP); 78 | } 79 | 80 | for(int j=-1;j<=1;j++){ 81 | newAP = new AP(); 82 | newAP->frequency=6; 83 | newAP->setX(l0);newAP->setY(j*sqrt(3)*l0); 84 | apList.append(newAP); 85 | redList.append(newAP); 86 | } 87 | 88 | newAP = new AP(); 89 | newAP->frequency=11; 90 | newAP->setX(2*l0);newAP->setY(0); 91 | apList.append(newAP); 92 | yellowList.append(newAP); 93 | 94 | for(int j=-1;j<=1;j=j+2){ 95 | newAP = new AP(); 96 | newAP->frequency=11; 97 | newAP->setX(1.0/2*l0);newAP->setY(j*0.5*sqrt(3)*l0); 98 | apList.append(newAP); 99 | yellowList.append(newAP); 100 | } 101 | 102 | for(int j=-1;j<=1;j++){ 103 | newAP = new AP(); 104 | newAP->frequency=11; 105 | newAP->setX(-1*l0);newAP->setY(j*sqrt(3)*l0); 106 | apList.append(newAP); 107 | yellowList.append(newAP); 108 | } 109 | 110 | qDebug()<<"_x _y: "<<_x<<" "<<_y< validPower; 116 | QList labelNum; 117 | QList eerList; 118 | int notValid=0; 119 | for(double po=this->power;po>=this->power-2;po=po-0.1) 120 | { 121 | for(int k=0;k<400;k++){ 122 | for(int j=0;j<400;j++){ 123 | for(int m=0;mx())*(mapDot[k][j].x-currentAp->x())+(mapDot[k][j].y-currentAp->y())*(mapDot[k][j].y-currentAp->y())); 126 | mapDot[k][j].receivePower=po-this->a*log(dis)-this->b; 127 | if(mapDot[k][j].receivePower>=(this->RESP0)-ADAPT){ 128 | mapDot[k][j].isValid=true; 129 | } 130 | 131 | } 132 | } 133 | } 134 | int total_label=0; 135 | for(int k=0;k<400;k++){ 136 | for(int j=0;j<400;j++){ 137 | if(mapDot[k][j].isValid==true) 138 | total_label++; 139 | } 140 | } 141 | double label_rate = total_label*1.0/(400*400); 142 | qDebug()<<"覆盖数:"<=(this->coverRate*1.0)/100) 152 | { 153 | qDebug()<<"有效功率:"<maxEEr){ 169 | maxEEr=eer; 170 | maxEErlabel=i; 171 | } 172 | eerList.append(eer); 173 | } 174 | this->resultEEr = maxEEr; 175 | suboutput = "\n能效比:"+QString::number(maxEEr); 176 | resultPower = validPower.at(maxEErlabel); 177 | qDebug()<<"result:"<choice==1) 180 | { 181 | double dis; 182 | QList validPower; 183 | QList labelNum; 184 | QList SINRList; 185 | int notValid=0; 186 | for(double po=this->power;po>=this->power-1;po=po-0.1) 187 | { 188 | for(int k=0;k<400;k++){ 189 | for(int j=0;j<400;j++){ 190 | mapDot[k][j].ganraoPower=0; 191 | double temp=-111111111111; 192 | for(int m=0;mx())*(mapDot[k][j].x-currentAp->x())+(mapDot[k][j].y-currentAp->y())*(mapDot[k][j].y-currentAp->y())); 196 | temp=po-this->a*log(dis)-this->b; 197 | if(temp>mapDot[k][j].receivePower){ 198 | mapDot[k][j].receivePower=temp; 199 | mapDot[k][j].frequency=apList.at(m)->frequency; 200 | 201 | } 202 | 203 | if(mapDot[k][j].receivePower>=(this->RESP0)-ADAPT){ 204 | mapDot[k][j].isValid=true; 205 | } 206 | } 207 | for(int m=0;mx())*(mapDot[k][j].x-currentAp->x())+(mapDot[k][j].y-currentAp->y())*(mapDot[k][j].y-currentAp->y())); 211 | temp=po-this->a*log(dis)-this->b; 212 | if(temp>mapDot[k][j].receivePower){ 213 | mapDot[k][j].receivePower=temp; 214 | mapDot[k][j].frequency=apList.at(m)->frequency; 215 | } 216 | 217 | if(mapDot[k][j].receivePower>=(this->RESP0)-ADAPT){ 218 | mapDot[k][j].isValid=true; 219 | } 220 | 221 | } 222 | temp=0; 223 | for(int m=0;mfrequency==fre) 227 | { 228 | dis=sqrt((mapDot[k][j].x-currentAp->x())*(mapDot[k][j].x-currentAp->x())+(mapDot[k][j].y-currentAp->y())*(mapDot[k][j].y-currentAp->y())); 229 | temp+=po-this->a*log(dis)-this->b; 230 | } 231 | } 232 | temp=temp-mapDot[k][j].receivePower; 233 | mapDot[k][j].ganraoPower=temp; 234 | mapDot[k][j].SINR=(mapDot[k][j].receivePower-mapDot[k][j].ganraoPower)/40; 235 | 236 | } 237 | //cerr<=(this->coverRate*1.0)/100) 263 | { 264 | qDebug()<<"有效功率:"<maxSINR){ 279 | maxSINR=SINRList.at(i); 280 | label=i; 281 | } 282 | } 283 | resultPower=validPower.at(label); 284 | suboutput = "\nSINR: "+QString::number(maxSINR); 285 | qDebug()<<"result:"<resultPower = resultPower; 289 | this->suboutput=suboutput; 290 | getRatio(); 291 | return resultPower; 292 | } 293 | 294 | double Set_algorithm::getRatio() 295 | { 296 | qDebug()<<"result power:"<resultPower<ratio=exp((this->resultPower-this->RESP0-this->b)*1.0/this->a); 298 | } 299 | 300 | double Set_algorithm::getD0(double a,double b,double SINR,int RESP0,int power) 301 | { 302 | ratio = exp((power-RESP0-b)*1.0/a); 303 | // qDebug< 6 | 7 | class Set_algorithm 8 | { 9 | public: 10 | Set_algorithm(); 11 | int power; 12 | int RESP0; 13 | int coverRate; 14 | int choice; 15 | double resultPower; 16 | double _x,_y; 17 | double a,b; 18 | double SINR; 19 | QList apList; 20 | QList redList; 21 | QList yellowList; 22 | QList blueList; 23 | AP * newAP; 24 | double ratio; 25 | double resultEEr; 26 | QString suboutput; 27 | 28 | double getResultPower(); 29 | double getD0(double a,double b,double SINR,int RESP0,int power); 30 | double getL0(); 31 | double getRatio(); 32 | private: 33 | 34 | double d0; 35 | double l0; 36 | 37 | }; 38 | 39 | #endif // SET_ALGORITHM_H 40 | -------------------------------------------------------------------------------- /task: -------------------------------------------------------------------------------- 1 | rao 7500 0.0 0.0 22648 3004 pts/0 R+ 15:00 0:00 ps aux 2 | rao@ubuntu:~/Desktop$ cd ~/Desktop/ 3 | rao@ubuntu:~/Desktop$ ui task 4 | 5 | alis : task_string1="服务器" 6 | task_string2="论文" 7 | task_string3="安卓" 8 | task_string4="算法" 9 | task_string5="IOS" 10 | 11 | member={'饶琪',‘毕正然’,'张安琦','杨昊','许博健'} 12 | @root $git status https://github.com/rao1219/qt-SON/wiki/DOC 13 | 14 | +------------------------------------------------------------------------------------------+ 15 | +------+ |服务器:继续调试服务器的自配置和自优化算法,修复一些bug;完成仿真版事件模拟器等后续功能; | 16 | +-------> 饶琪 +-------->论文:为论文提供算法模拟的结论和数据支持; | 17 | | +------+ |通信:解决Linux和客户端之间的数据传输; | 18 | | +------------------------------------------------------------------------------------------+ 19 | | 20 | | 21 | | 22 | | +--------------------------------+ 23 | | +------+ |论文:小区的边缘探测; | 24 | +------->毕正然+-------->完善服务器算法; | 25 | | +------+ |解决路由器频率、功率的调控问题;| 26 | | +--------------------------------+ 27 | | 28 | | 29 | +------------+ | +-----------------------+ 30 | | @root | | +------+ |论文:none | 31 | |项目工作安排+----------+------->张安琦+-------->安卓:app客户端的开发; | 32 | +------------+ | +------+ +-----------------------+ 33 | | 34 | | 35 | | 36 | | 37 | | +------+ +-----------------------+ 38 | +-------> 杨昊 +-------->论文:none | 39 | | +------+ |IOS:app开发; | 40 | | +-----------------------+ 41 | | 42 | | 43 | | 44 | | +------+ +-----------------------+ 45 | +-------+许博健+-------->论文:none | 46 | +------+ |安卓:app客户端的开发; | 47 | +-----------------------+ 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /timer.cpp: -------------------------------------------------------------------------------- 1 | #include "timer.h" 2 | #include 3 | #include 4 | 5 | timer::timer() 6 | { 7 | _timer = new QTimer(); 8 | connect(_timer,SIGNAL(timeout()),this,SLOT(mySlots())); 9 | qDebug()<<"timer start"; 10 | 11 | } 12 | 13 | void timer::mySlots() //还需要加入相应的处理模块 14 | { 15 | QTextStream qout(stdout); 16 | switch(eventType) 17 | { 18 | case 0: 19 | qout << "\033[0;32m"+eventContent+"\033[0;0m\n"; 20 | qDebug()<<"负载增大,触发容量自配置"; 21 | // here+自优化 22 | break; 23 | case 1: 24 | qout<< "\033[0;31m"+eventContent+"\033[0;0m\n"; 25 | qDebug()<<"负载减小,触发容量自配置"; 26 | break; 27 | case 2: 28 | qout<< "\033[0;34m"+eventContent+"\033[0;0m\n"; 29 | qDebug()<<"触发欠覆盖自优化"; 30 | break; 31 | case 3: 32 | qout<< "\033[0;31m"+eventContent+"\033[0;0m\n"; 33 | qDebug()<<"触发频率自配置"; 34 | break; 35 | case 4: 36 | qout<< "\033[0;31m"+eventContent+"\033[0;0m\n"; 37 | qDebug()<<"触发容量自配置"; 38 | break; 39 | 40 | } 41 | // qDebug()<<"\033[32m"+eventContent; 42 | 43 | } 44 | 45 | void timer::start_timer() 46 | { 47 | _timer->start(6000); 48 | } 49 | -------------------------------------------------------------------------------- /timer.h: -------------------------------------------------------------------------------- 1 | #ifndef TIMER_H 2 | #define TIMER_H 3 | #include 4 | #include 5 | 6 | class timer : public QObject 7 | { 8 | Q_OBJECT 9 | public: 10 | timer(); 11 | QString eventContent; 12 | int eventType; 13 | 14 | QTimer *_timer; 15 | void start_timer(); 16 | public slots: 17 | void mySlots(); 18 | }; 19 | 20 | #endif // TIMER_H 21 | -------------------------------------------------------------------------------- /ui_graphicstest.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'graphicstest.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 5.5.0 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_GRAPHICSTEST_H 10 | #define UI_GRAPHICSTEST_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | QT_BEGIN_NAMESPACE 25 | 26 | class Ui_GraphicsTest 27 | { 28 | public: 29 | QVBoxLayout *verticalLayout; 30 | QPushButton *pushButton_3; 31 | QSlider *horizontalSlider; 32 | QHBoxLayout *horizontalLayout; 33 | QPushButton *pushButton; 34 | QPushButton *pushButton_2; 35 | QGraphicsView *graphicsView; 36 | 37 | void setupUi(QDialog *GraphicsTest) 38 | { 39 | if (GraphicsTest->objectName().isEmpty()) 40 | GraphicsTest->setObjectName(QStringLiteral("GraphicsTest")); 41 | GraphicsTest->resize(1243, 885); 42 | verticalLayout = new QVBoxLayout(GraphicsTest); 43 | verticalLayout->setObjectName(QStringLiteral("verticalLayout")); 44 | pushButton_3 = new QPushButton(GraphicsTest); 45 | pushButton_3->setObjectName(QStringLiteral("pushButton_3")); 46 | 47 | verticalLayout->addWidget(pushButton_3); 48 | 49 | horizontalSlider = new QSlider(GraphicsTest); 50 | horizontalSlider->setObjectName(QStringLiteral("horizontalSlider")); 51 | horizontalSlider->setMinimum(200); 52 | horizontalSlider->setMaximum(300); 53 | horizontalSlider->setValue(250); 54 | horizontalSlider->setOrientation(Qt::Horizontal); 55 | 56 | verticalLayout->addWidget(horizontalSlider); 57 | 58 | horizontalLayout = new QHBoxLayout(); 59 | horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); 60 | pushButton = new QPushButton(GraphicsTest); 61 | pushButton->setObjectName(QStringLiteral("pushButton")); 62 | 63 | horizontalLayout->addWidget(pushButton); 64 | 65 | pushButton_2 = new QPushButton(GraphicsTest); 66 | pushButton_2->setObjectName(QStringLiteral("pushButton_2")); 67 | 68 | horizontalLayout->addWidget(pushButton_2); 69 | 70 | 71 | verticalLayout->addLayout(horizontalLayout); 72 | 73 | graphicsView = new QGraphicsView(GraphicsTest); 74 | graphicsView->setObjectName(QStringLiteral("graphicsView")); 75 | graphicsView->setMinimumSize(QSize(1080, 800)); 76 | graphicsView->setBaseSize(QSize(0, 0)); 77 | 78 | verticalLayout->addWidget(graphicsView); 79 | 80 | 81 | retranslateUi(GraphicsTest); 82 | 83 | QMetaObject::connectSlotsByName(GraphicsTest); 84 | } // setupUi 85 | 86 | void retranslateUi(QDialog *GraphicsTest) 87 | { 88 | GraphicsTest->setWindowTitle(QApplication::translate("GraphicsTest", "Dialog", 0)); 89 | pushButton_3->setText(QApplication::translate("GraphicsTest", "\346\230\276\347\244\272\345\235\220\346\240\207", 0)); 90 | pushButton->setText(QApplication::translate("GraphicsTest", "+1", 0)); 91 | pushButton_2->setText(QApplication::translate("GraphicsTest", "-1", 0)); 92 | } // retranslateUi 93 | 94 | }; 95 | 96 | namespace Ui { 97 | class GraphicsTest: public Ui_GraphicsTest {}; 98 | } // namespace Ui 99 | 100 | QT_END_NAMESPACE 101 | 102 | #endif // UI_GRAPHICSTEST_H 103 | 104 | 105 | -------------------------------------------------------------------------------- /ui_mainwindow.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'mainwindow.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 5.5.0 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_MAINWINDOW_H 10 | #define UI_MAINWINDOW_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | QT_BEGIN_NAMESPACE 35 | 36 | class Ui_MainWindow 37 | { 38 | public: 39 | QAction *action_2; 40 | QAction *action_3; 41 | QAction *action_4; 42 | QAction *action_5; 43 | QAction *action_6; 44 | QAction *action_8; 45 | QAction *action_9; 46 | QWidget *centralWidget; 47 | QFrame *frame; 48 | QTabWidget *tabWidget; 49 | QWidget *tab; 50 | QFrame *frame_4; 51 | QTextEdit *textEdit_2; 52 | QGraphicsView *graphicsView; 53 | QScrollBar *horizontalScrollBar; 54 | QWidget *tab_4; 55 | QFrame *frame_2; 56 | QLabel *label; 57 | QLabel *label_2; 58 | QTextEdit *textEdit; 59 | QFrame *frame_3; 60 | QToolBox *toolBox; 61 | QWidget *page; 62 | QWidget *layoutWidget; 63 | QVBoxLayout *verticalLayout; 64 | QPushButton *pushButton; 65 | QPushButton *pushButton_2; 66 | QPushButton *pushButton_3; 67 | QPushButton *pushButton_6; 68 | QWidget *page_2; 69 | QPushButton *pushButton_4; 70 | QPushButton *pushButton_5; 71 | QWidget *page_3; 72 | QMenuBar *menuBar; 73 | QMenu *menu; 74 | QMenu *menu_3; 75 | QMenu *menu_2; 76 | QToolBar *mainToolBar; 77 | QStatusBar *statusBar; 78 | 79 | void setupUi(QMainWindow *MainWindow) 80 | { 81 | if (MainWindow->objectName().isEmpty()) 82 | MainWindow->setObjectName(QStringLiteral("MainWindow")); 83 | MainWindow->resize(1621, 924); 84 | MainWindow->setStyleSheet(QStringLiteral("background-color: rgb(29, 15, 29);")); 85 | action_2 = new QAction(MainWindow); 86 | action_2->setObjectName(QStringLiteral("action_2")); 87 | action_3 = new QAction(MainWindow); 88 | action_3->setObjectName(QStringLiteral("action_3")); 89 | action_4 = new QAction(MainWindow); 90 | action_4->setObjectName(QStringLiteral("action_4")); 91 | action_5 = new QAction(MainWindow); 92 | action_5->setObjectName(QStringLiteral("action_5")); 93 | action_6 = new QAction(MainWindow); 94 | action_6->setObjectName(QStringLiteral("action_6")); 95 | action_8 = new QAction(MainWindow); 96 | action_8->setObjectName(QStringLiteral("action_8")); 97 | action_9 = new QAction(MainWindow); 98 | action_9->setObjectName(QStringLiteral("action_9")); 99 | centralWidget = new QWidget(MainWindow); 100 | centralWidget->setObjectName(QStringLiteral("centralWidget")); 101 | frame = new QFrame(centralWidget); 102 | frame->setObjectName(QStringLiteral("frame")); 103 | frame->setGeometry(QRect(100, 10, 1351, 91)); 104 | frame->setStyleSheet(QStringLiteral("background-image: url(:/new/prefix1/background.jpg);")); 105 | frame->setFrameShape(QFrame::StyledPanel); 106 | frame->setFrameShadow(QFrame::Raised); 107 | tabWidget = new QTabWidget(centralWidget); 108 | tabWidget->setObjectName(QStringLiteral("tabWidget")); 109 | tabWidget->setGeometry(QRect(220, 110, 1301, 621)); 110 | tabWidget->setBaseSize(QSize(0, 0)); 111 | tabWidget->setStyleSheet(QLatin1String("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 0, 255), stop:1 rgba(255, 255, 255, 255));\n" 112 | "gridline-color: rgb(236, 27, 27);\n" 113 | "color: rgb(17, 7, 7);\n" 114 | "selection-background-color: rgb(20, 20, 20);")); 115 | tab = new QWidget(); 116 | tab->setObjectName(QStringLiteral("tab")); 117 | tab->setMaximumSize(QSize(16777215, 16777215)); 118 | tab->setContextMenuPolicy(Qt::DefaultContextMenu); 119 | frame_4 = new QFrame(tab); 120 | frame_4->setObjectName(QStringLiteral("frame_4")); 121 | frame_4->setGeometry(QRect(0, 0, 171, 211)); 122 | frame_4->setStyleSheet(QLatin1String("background-color: rgb(29, 15, 29);\n" 123 | "color: rgb(255, 255, 255);")); 124 | frame_4->setFrameShape(QFrame::StyledPanel); 125 | frame_4->setFrameShadow(QFrame::Raised); 126 | textEdit_2 = new QTextEdit(frame_4); 127 | textEdit_2->setObjectName(QStringLiteral("textEdit_2")); 128 | textEdit_2->setGeometry(QRect(22, 20, 131, 171)); 129 | graphicsView = new QGraphicsView(tab); 130 | graphicsView->setObjectName(QStringLiteral("graphicsView")); 131 | graphicsView->setGeometry(QRect(0, 0, 1301, 591)); 132 | horizontalScrollBar = new QScrollBar(tab); 133 | horizontalScrollBar->setObjectName(QStringLiteral("horizontalScrollBar")); 134 | horizontalScrollBar->setGeometry(QRect(1009, 550, 231, 20)); 135 | horizontalScrollBar->setMaximum(200); 136 | horizontalScrollBar->setSingleStep(0); 137 | horizontalScrollBar->setValue(100); 138 | horizontalScrollBar->setOrientation(Qt::Horizontal); 139 | tabWidget->addTab(tab, QString()); 140 | graphicsView->raise(); 141 | frame_4->raise(); 142 | horizontalScrollBar->raise(); 143 | tab_4 = new QWidget(); 144 | tab_4->setObjectName(QStringLiteral("tab_4")); 145 | frame_2 = new QFrame(tab_4); 146 | frame_2->setObjectName(QStringLiteral("frame_2")); 147 | frame_2->setGeometry(QRect(0, 0, 171, 211)); 148 | frame_2->setStyleSheet(QStringLiteral("background-color: rgb(128, 128, 128);")); 149 | frame_2->setFrameShape(QFrame::StyledPanel); 150 | frame_2->setFrameShadow(QFrame::Raised); 151 | label = new QLabel(frame_2); 152 | label->setObjectName(QStringLiteral("label")); 153 | label->setGeometry(QRect(0, 20, 91, 17)); 154 | label_2 = new QLabel(frame_2); 155 | label_2->setObjectName(QStringLiteral("label_2")); 156 | label_2->setGeometry(QRect(0, 170, 67, 17)); 157 | tabWidget->addTab(tab_4, QString()); 158 | textEdit = new QTextEdit(centralWidget); 159 | textEdit->setObjectName(QStringLiteral("textEdit")); 160 | textEdit->setGeometry(QRect(10, 740, 1511, 101)); 161 | textEdit->setStyleSheet(QLatin1String("background-color: rgb(29, 15, 29);\n" 162 | "color: rgb(255, 255, 255);")); 163 | frame_3 = new QFrame(centralWidget); 164 | frame_3->setObjectName(QStringLiteral("frame_3")); 165 | frame_3->setGeometry(QRect(30, 120, 181, 601)); 166 | frame_3->setBaseSize(QSize(0, 0)); 167 | frame_3->setFrameShape(QFrame::StyledPanel); 168 | frame_3->setFrameShadow(QFrame::Raised); 169 | toolBox = new QToolBox(frame_3); 170 | toolBox->setObjectName(QStringLiteral("toolBox")); 171 | toolBox->setGeometry(QRect(10, 0, 161, 591)); 172 | toolBox->setStyleSheet(QLatin1String("color: rgb(255, 255, 255);\n" 173 | "border-color: rgb(255, 255, 255);")); 174 | page = new QWidget(); 175 | page->setObjectName(QStringLiteral("page")); 176 | page->setGeometry(QRect(0, 0, 161, 489)); 177 | layoutWidget = new QWidget(page); 178 | layoutWidget->setObjectName(QStringLiteral("layoutWidget")); 179 | layoutWidget->setGeometry(QRect(20, 30, 111, 331)); 180 | verticalLayout = new QVBoxLayout(layoutWidget); 181 | verticalLayout->setSpacing(6); 182 | verticalLayout->setContentsMargins(11, 11, 11, 11); 183 | verticalLayout->setObjectName(QStringLiteral("verticalLayout")); 184 | verticalLayout->setContentsMargins(0, 0, 0, 0); 185 | pushButton = new QPushButton(layoutWidget); 186 | pushButton->setObjectName(QStringLiteral("pushButton")); 187 | pushButton->setStyleSheet(QLatin1String("\n" 188 | "font: 16pt \"Ubuntu\";\n" 189 | "")); 190 | 191 | verticalLayout->addWidget(pushButton); 192 | 193 | pushButton_2 = new QPushButton(layoutWidget); 194 | pushButton_2->setObjectName(QStringLiteral("pushButton_2")); 195 | pushButton_2->setStyleSheet(QLatin1String("\n" 196 | "font: 16pt \"Ubuntu\";\n" 197 | "")); 198 | 199 | verticalLayout->addWidget(pushButton_2); 200 | 201 | pushButton_3 = new QPushButton(layoutWidget); 202 | pushButton_3->setObjectName(QStringLiteral("pushButton_3")); 203 | 204 | verticalLayout->addWidget(pushButton_3); 205 | 206 | pushButton_6 = new QPushButton(layoutWidget); 207 | pushButton_6->setObjectName(QStringLiteral("pushButton_6")); 208 | 209 | verticalLayout->addWidget(pushButton_6); 210 | 211 | toolBox->addItem(page, QString::fromUtf8("\345\237\272\346\234\254\350\256\276\347\275\256")); 212 | page_2 = new QWidget(); 213 | page_2->setObjectName(QStringLiteral("page_2")); 214 | page_2->setGeometry(QRect(0, 0, 161, 489)); 215 | pushButton_4 = new QPushButton(page_2); 216 | pushButton_4->setObjectName(QStringLiteral("pushButton_4")); 217 | pushButton_4->setGeometry(QRect(30, 50, 89, 25)); 218 | pushButton_5 = new QPushButton(page_2); 219 | pushButton_5->setObjectName(QStringLiteral("pushButton_5")); 220 | pushButton_5->setGeometry(QRect(30, 110, 89, 25)); 221 | toolBox->addItem(page_2, QString::fromUtf8("\347\275\221\347\273\234\350\212\202\347\202\271\347\256\241\347\220\206")); 222 | page_3 = new QWidget(); 223 | page_3->setObjectName(QStringLiteral("page_3")); 224 | page_3->setGeometry(QRect(0, 0, 161, 489)); 225 | toolBox->addItem(page_3, QString::fromUtf8("\345\205\266\344\273\226\350\256\276\347\275\256")); 226 | MainWindow->setCentralWidget(centralWidget); 227 | menuBar = new QMenuBar(MainWindow); 228 | menuBar->setObjectName(QStringLiteral("menuBar")); 229 | menuBar->setGeometry(QRect(0, 0, 1621, 25)); 230 | menu = new QMenu(menuBar); 231 | menu->setObjectName(QStringLiteral("menu")); 232 | menu_3 = new QMenu(menu); 233 | menu_3->setObjectName(QStringLiteral("menu_3")); 234 | menu_2 = new QMenu(menuBar); 235 | menu_2->setObjectName(QStringLiteral("menu_2")); 236 | MainWindow->setMenuBar(menuBar); 237 | mainToolBar = new QToolBar(MainWindow); 238 | mainToolBar->setObjectName(QStringLiteral("mainToolBar")); 239 | MainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar); 240 | statusBar = new QStatusBar(MainWindow); 241 | statusBar->setObjectName(QStringLiteral("statusBar")); 242 | MainWindow->setStatusBar(statusBar); 243 | QWidget::setTabOrder(pushButton, tabWidget); 244 | QWidget::setTabOrder(tabWidget, pushButton_2); 245 | QWidget::setTabOrder(pushButton_2, textEdit); 246 | 247 | menuBar->addAction(menu_2->menuAction()); 248 | menuBar->addAction(menu->menuAction()); 249 | menu->addAction(menu_3->menuAction()); 250 | menu->addAction(action_2); 251 | menu->addAction(action_3); 252 | menu->addAction(action_4); 253 | menu_3->addSeparator(); 254 | menu_3->addAction(action_8); 255 | menu_3->addAction(action_9); 256 | menu_2->addAction(action_5); 257 | menu_2->addAction(action_6); 258 | 259 | retranslateUi(MainWindow); 260 | 261 | tabWidget->setCurrentIndex(0); 262 | toolBox->setCurrentIndex(0); 263 | 264 | 265 | QMetaObject::connectSlotsByName(MainWindow); 266 | } // setupUi 267 | 268 | void retranslateUi(QMainWindow *MainWindow) 269 | { 270 | MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", 0)); 271 | action_2->setText(QApplication::translate("MainWindow", "\350\207\252\344\274\230\345\214\226", 0)); 272 | action_3->setText(QApplication::translate("MainWindow", "\350\264\237\350\275\275\345\235\207\350\241\241", 0)); 273 | action_4->setText(QApplication::translate("MainWindow", "\347\235\241\347\234\240\346\250\241\345\274\217", 0)); 274 | action_5->setText(QApplication::translate("MainWindow", "\350\275\275\345\205\245", 0)); 275 | action_6->setText(QApplication::translate("MainWindow", "\344\277\235\345\255\230", 0)); 276 | action_8->setText(QApplication::translate("MainWindow", "\351\242\221\347\216\207\350\207\252\351\205\215\347\275\256", 0)); 277 | action_9->setText(QApplication::translate("MainWindow", "\345\212\237\347\216\207\350\207\252\351\205\215\347\275\256", 0)); 278 | #ifndef QT_NO_TOOLTIP 279 | tabWidget->setToolTip(QApplication::translate("MainWindow", "

\345\234\260\345\233\276

", 0)); 280 | #endif // QT_NO_TOOLTIP 281 | textEdit_2->setHtml(QApplication::translate("MainWindow", "\n" 282 | "\n" 285 | "

\351\205\215\347\275\256\347\273\223\346\236\234\357\274\232

", 0)); 286 | tabWidget->setTabText(tabWidget->indexOf(tab), QApplication::translate("MainWindow", "\345\234\260\345\233\276", 0)); 287 | label->setText(QApplication::translate("MainWindow", "\350\246\206\347\233\226\346\203\205\345\206\265\357\274\232", 0)); 288 | label_2->setText(QApplication::translate("MainWindow", "\350\203\275\346\225\210\346\257\224\357\274\232", 0)); 289 | tabWidget->setTabText(tabWidget->indexOf(tab_4), QApplication::translate("MainWindow", "X-map\345\233\276", 0)); 290 | textEdit->setHtml(QApplication::translate("MainWindow", "\n" 291 | "\n" 294 | "

\346\216\247\345\210\266\345\217\260\350\276\223\345\207\272

", 0)); 295 | pushButton->setText(QApplication::translate("MainWindow", "\350\207\252\351\205\215\347\275\256", 0)); 296 | pushButton_2->setText(QApplication::translate("MainWindow", "\350\207\252\344\274\230\345\214\226", 0)); 297 | pushButton_3->setText(QApplication::translate("MainWindow", "test", 0)); 298 | pushButton_6->setText(QApplication::translate("MainWindow", "\346\270\205\347\251\272\346\266\210\346\201\257\346\241\206", 0)); 299 | toolBox->setItemText(toolBox->indexOf(page), QApplication::translate("MainWindow", "\345\237\272\346\234\254\350\256\276\347\275\256", 0)); 300 | pushButton_4->setText(QApplication::translate("MainWindow", "\345\242\236\351\207\217", 0)); 301 | pushButton_5->setText(QApplication::translate("MainWindow", "reset", 0)); 302 | toolBox->setItemText(toolBox->indexOf(page_2), QApplication::translate("MainWindow", "\347\275\221\347\273\234\350\212\202\347\202\271\347\256\241\347\220\206", 0)); 303 | toolBox->setItemText(toolBox->indexOf(page_3), QApplication::translate("MainWindow", "\345\205\266\344\273\226\350\256\276\347\275\256", 0)); 304 | menu->setTitle(QApplication::translate("MainWindow", "\345\212\237\350\203\275", 0)); 305 | menu_3->setTitle(QApplication::translate("MainWindow", "\350\207\252\351\205\215\347\275\256", 0)); 306 | menu_2->setTitle(QApplication::translate("MainWindow", "\346\226\207\344\273\266", 0)); 307 | } // retranslateUi 308 | 309 | }; 310 | 311 | 312 | namespace Ui { 313 | class MainWindow: public Ui_MainWindow {}; 314 | } // namespace Ui 315 | 316 | QT_END_NAMESPACE 317 | 318 | #endif // UI_MAINWINDOW_H 319 | 320 | 321 | -------------------------------------------------------------------------------- /ui_self_organize.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'self_organize.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 5.5.0 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_SELF_ORGANIZE_H 10 | #define UI_SELF_ORGANIZE_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | QT_BEGIN_NAMESPACE 21 | 22 | class Ui_self_organize 23 | { 24 | public: 25 | QDialogButtonBox *buttonBox; 26 | 27 | void setupUi(QDialog *self_organize) 28 | { 29 | if (self_organize->objectName().isEmpty()) 30 | self_organize->setObjectName(QStringLiteral("self_organize")); 31 | self_organize->resize(400, 300); 32 | self_organize->setAcceptDrops(false); 33 | self_organize->setStyleSheet(QStringLiteral("background-color: rgb(29, 15, 29);")); 34 | buttonBox = new QDialogButtonBox(self_organize); 35 | buttonBox->setObjectName(QStringLiteral("buttonBox")); 36 | buttonBox->setGeometry(QRect(30, 240, 341, 32)); 37 | buttonBox->setOrientation(Qt::Horizontal); 38 | buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); 39 | 40 | retranslateUi(self_organize); 41 | QObject::connect(buttonBox, SIGNAL(accepted()), self_organize, SLOT(accept())); 42 | QObject::connect(buttonBox, SIGNAL(rejected()), self_organize, SLOT(reject())); 43 | 44 | QMetaObject::connectSlotsByName(self_organize); 45 | } // setupUi 46 | 47 | void retranslateUi(QDialog *self_organize) 48 | { 49 | self_organize->setWindowTitle(QApplication::translate("self_organize", "\350\207\252\344\274\230\345\214\226", 0)); 50 | } // retranslateUi 51 | 52 | }; 53 | 54 | namespace Ui { 55 | class self_organize: public Ui_self_organize {}; 56 | } // namespace Ui 57 | 58 | QT_END_NAMESPACE 59 | 60 | #endif // UI_SELF_ORGANIZE_H 61 | 62 | 63 | -------------------------------------------------------------------------------- /ui_self_set.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'self_set.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 5.5.0 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_SELF_SET_H 10 | #define UI_SELF_SET_H 11 | 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | QT_BEGIN_NAMESPACE 34 | 35 | class Ui_self_set 36 | { 37 | public: 38 | QDialogButtonBox *buttonBox; 39 | QGroupBox *groupBox; 40 | QDial *dial; 41 | QFrame *line; 42 | QFrame *line_2; 43 | QLabel *label_2; 44 | QDial *dial_2; 45 | QLabel *label_9; 46 | QFrame *line_3; 47 | QLabel *label_10; 48 | QLabel *label_11; 49 | QWidget *layoutWidget; 50 | QVBoxLayout *verticalLayout_2; 51 | QRadioButton *radioButton; 52 | QRadioButton *radioButton_2; 53 | QSlider *horizontalSlider; 54 | QLabel *label_4; 55 | QWidget *layoutWidget1; 56 | QVBoxLayout *verticalLayout; 57 | QHBoxLayout *horizontalLayout_3; 58 | QLabel *label_3; 59 | QDoubleSpinBox *PARAMETERA; 60 | QHBoxLayout *horizontalLayout_6; 61 | QLabel *label_6; 62 | QDoubleSpinBox *PARAMETERB; 63 | QWidget *layoutWidget2; 64 | QHBoxLayout *horizontalLayout_2; 65 | QLabel *label_5; 66 | QSpinBox *RSRP0; 67 | QLabel *label_8; 68 | QLabel *label_13; 69 | QWidget *layoutWidget3; 70 | QHBoxLayout *horizontalLayout; 71 | QLabel *label; 72 | QSpinBox *spinBox; 73 | QLabel *label_7; 74 | QWidget *layoutWidget4; 75 | QHBoxLayout *horizontalLayout_4; 76 | QSpinBox *COVERRATE; 77 | QLabel *label_12; 78 | QDial *dial_3; 79 | QPushButton *pushButton; 80 | QLabel *label_14; 81 | QWidget *layoutWidget5; 82 | QHBoxLayout *horizontalLayout_5; 83 | QLabel *label_15; 84 | QDoubleSpinBox *SINRSPIN; 85 | 86 | void setupUi(QDialog *self_set) 87 | { 88 | if (self_set->objectName().isEmpty()) 89 | self_set->setObjectName(QStringLiteral("self_set")); 90 | self_set->resize(709, 786); 91 | self_set->setStyleSheet(QStringLiteral("background-color: rgb(29, 15, 29);")); 92 | buttonBox = new QDialogButtonBox(self_set); 93 | buttonBox->setObjectName(QStringLiteral("buttonBox")); 94 | buttonBox->setGeometry(QRect(310, 730, 341, 32)); 95 | buttonBox->setStyleSheet(QStringLiteral("color: rgb(255, 255, 255);")); 96 | buttonBox->setOrientation(Qt::Horizontal); 97 | buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); 98 | groupBox = new QGroupBox(self_set); 99 | groupBox->setObjectName(QStringLiteral("groupBox")); 100 | groupBox->setGeometry(QRect(30, 40, 651, 671)); 101 | groupBox->setStyleSheet(QLatin1String("color: rgb(255, 255, 255);\n" 102 | "background-color: rgb(87, 16, 16);\n" 103 | "\n" 104 | "\n" 105 | "")); 106 | dial = new QDial(groupBox); 107 | dial->setObjectName(QStringLiteral("dial")); 108 | dial->setGeometry(QRect(300, 30, 50, 64)); 109 | dial->setMaximum(50); 110 | dial->setValue(50); 111 | line = new QFrame(groupBox); 112 | line->setObjectName(QStringLiteral("line")); 113 | line->setGeometry(QRect(60, 90, 341, 16)); 114 | line->setStyleSheet(QStringLiteral("color: rgb(255, 255, 255);")); 115 | line->setFrameShape(QFrame::HLine); 116 | line->setFrameShadow(QFrame::Sunken); 117 | line_2 = new QFrame(groupBox); 118 | line_2->setObjectName(QStringLiteral("line_2")); 119 | line_2->setGeometry(QRect(60, 210, 341, 16)); 120 | line_2->setFrameShape(QFrame::HLine); 121 | line_2->setFrameShadow(QFrame::Sunken); 122 | label_2 = new QLabel(groupBox); 123 | label_2->setObjectName(QStringLiteral("label_2")); 124 | label_2->setGeometry(QRect(60, 230, 141, 17)); 125 | dial_2 = new QDial(groupBox); 126 | dial_2->setObjectName(QStringLiteral("dial_2")); 127 | dial_2->setGeometry(QRect(300, 250, 50, 64)); 128 | dial_2->setMinimum(-99); 129 | dial_2->setValue(-85); 130 | label_9 = new QLabel(groupBox); 131 | label_9->setObjectName(QStringLiteral("label_9")); 132 | label_9->setGeometry(QRect(110, 310, 141, 17)); 133 | line_3 = new QFrame(groupBox); 134 | line_3->setObjectName(QStringLiteral("line_3")); 135 | line_3->setGeometry(QRect(60, 340, 341, 16)); 136 | line_3->setAutoFillBackground(false); 137 | line_3->setStyleSheet(QStringLiteral("color: rgb(255, 255, 255);")); 138 | line_3->setFrameShape(QFrame::HLine); 139 | line_3->setFrameShadow(QFrame::Sunken); 140 | label_10 = new QLabel(groupBox); 141 | label_10->setObjectName(QStringLiteral("label_10")); 142 | label_10->setGeometry(QRect(80, 360, 67, 17)); 143 | label_11 = new QLabel(groupBox); 144 | label_11->setObjectName(QStringLiteral("label_11")); 145 | label_11->setGeometry(QRect(68, 440, 67, 17)); 146 | layoutWidget = new QWidget(groupBox); 147 | layoutWidget->setObjectName(QStringLiteral("layoutWidget")); 148 | layoutWidget->setGeometry(QRect(70, 560, 120, 60)); 149 | verticalLayout_2 = new QVBoxLayout(layoutWidget); 150 | verticalLayout_2->setObjectName(QStringLiteral("verticalLayout_2")); 151 | verticalLayout_2->setContentsMargins(0, 0, 0, 0); 152 | radioButton = new QRadioButton(layoutWidget); 153 | radioButton->setObjectName(QStringLiteral("radioButton")); 154 | radioButton->setChecked(true); 155 | 156 | verticalLayout_2->addWidget(radioButton); 157 | 158 | radioButton_2 = new QRadioButton(layoutWidget); 159 | radioButton_2->setObjectName(QStringLiteral("radioButton_2")); 160 | radioButton_2->setChecked(false); 161 | 162 | verticalLayout_2->addWidget(radioButton_2); 163 | 164 | horizontalSlider = new QSlider(groupBox); 165 | horizontalSlider->setObjectName(QStringLiteral("horizontalSlider")); 166 | horizontalSlider->setGeometry(QRect(70, 520, 171, 16)); 167 | horizontalSlider->setValue(95); 168 | horizontalSlider->setOrientation(Qt::Horizontal); 169 | label_4 = new QLabel(groupBox); 170 | label_4->setObjectName(QStringLiteral("label_4")); 171 | label_4->setGeometry(QRect(60, 110, 105, 20)); 172 | layoutWidget1 = new QWidget(groupBox); 173 | layoutWidget1->setObjectName(QStringLiteral("layoutWidget1")); 174 | layoutWidget1->setGeometry(QRect(130, 140, 93, 62)); 175 | verticalLayout = new QVBoxLayout(layoutWidget1); 176 | verticalLayout->setObjectName(QStringLiteral("verticalLayout")); 177 | verticalLayout->setContentsMargins(0, 0, 0, 0); 178 | horizontalLayout_3 = new QHBoxLayout(); 179 | horizontalLayout_3->setObjectName(QStringLiteral("horizontalLayout_3")); 180 | label_3 = new QLabel(layoutWidget1); 181 | label_3->setObjectName(QStringLiteral("label_3")); 182 | 183 | horizontalLayout_3->addWidget(label_3); 184 | 185 | PARAMETERA = new QDoubleSpinBox(layoutWidget1); 186 | PARAMETERA->setObjectName(QStringLiteral("PARAMETERA")); 187 | PARAMETERA->setAutoFillBackground(false); 188 | PARAMETERA->setStyleSheet(QStringLiteral("border-image: url(:/new/prefix1/back.PNG);")); 189 | PARAMETERA->setValue(20); 190 | 191 | horizontalLayout_3->addWidget(PARAMETERA); 192 | 193 | 194 | verticalLayout->addLayout(horizontalLayout_3); 195 | 196 | horizontalLayout_6 = new QHBoxLayout(); 197 | horizontalLayout_6->setObjectName(QStringLiteral("horizontalLayout_6")); 198 | label_6 = new QLabel(layoutWidget1); 199 | label_6->setObjectName(QStringLiteral("label_6")); 200 | 201 | horizontalLayout_6->addWidget(label_6); 202 | 203 | PARAMETERB = new QDoubleSpinBox(layoutWidget1); 204 | PARAMETERB->setObjectName(QStringLiteral("PARAMETERB")); 205 | PARAMETERB->setAutoFillBackground(false); 206 | PARAMETERB->setStyleSheet(QStringLiteral("border-image: url(:/new/prefix1/back.PNG);")); 207 | PARAMETERB->setValue(32.4); 208 | 209 | horizontalLayout_6->addWidget(PARAMETERB); 210 | 211 | 212 | verticalLayout->addLayout(horizontalLayout_6); 213 | 214 | layoutWidget2 = new QWidget(groupBox); 215 | layoutWidget2->setObjectName(QStringLiteral("layoutWidget2")); 216 | layoutWidget2->setGeometry(QRect(70, 270, 165, 27)); 217 | horizontalLayout_2 = new QHBoxLayout(layoutWidget2); 218 | horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2")); 219 | horizontalLayout_2->setContentsMargins(0, 0, 0, 0); 220 | label_5 = new QLabel(layoutWidget2); 221 | label_5->setObjectName(QStringLiteral("label_5")); 222 | 223 | horizontalLayout_2->addWidget(label_5); 224 | 225 | RSRP0 = new QSpinBox(layoutWidget2); 226 | RSRP0->setObjectName(QStringLiteral("RSRP0")); 227 | RSRP0->setStyleSheet(QStringLiteral("border-image: url(:/new/prefix1/back.PNG);")); 228 | RSRP0->setMinimum(-200); 229 | RSRP0->setValue(-85); 230 | 231 | horizontalLayout_2->addWidget(RSRP0); 232 | 233 | label_8 = new QLabel(layoutWidget2); 234 | label_8->setObjectName(QStringLiteral("label_8")); 235 | 236 | horizontalLayout_2->addWidget(label_8); 237 | 238 | label_13 = new QLabel(layoutWidget2); 239 | label_13->setObjectName(QStringLiteral("label_13")); 240 | label_13->setStyleSheet(QStringLiteral("background-color: rgb(85, 16, 16);")); 241 | 242 | horizontalLayout_2->addWidget(label_13); 243 | 244 | layoutWidget3 = new QWidget(groupBox); 245 | layoutWidget3->setObjectName(QStringLiteral("layoutWidget3")); 246 | layoutWidget3->setGeometry(QRect(60, 50, 192, 27)); 247 | horizontalLayout = new QHBoxLayout(layoutWidget3); 248 | horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); 249 | horizontalLayout->setContentsMargins(0, 0, 0, 0); 250 | label = new QLabel(layoutWidget3); 251 | label->setObjectName(QStringLiteral("label")); 252 | 253 | horizontalLayout->addWidget(label); 254 | 255 | spinBox = new QSpinBox(layoutWidget3); 256 | spinBox->setObjectName(QStringLiteral("spinBox")); 257 | spinBox->setStyleSheet(QStringLiteral("border-image: url(:/new/prefix1/back.PNG);")); 258 | spinBox->setMaximum(50); 259 | spinBox->setValue(50); 260 | 261 | horizontalLayout->addWidget(spinBox); 262 | 263 | label_7 = new QLabel(layoutWidget3); 264 | label_7->setObjectName(QStringLiteral("label_7")); 265 | 266 | horizontalLayout->addWidget(label_7); 267 | 268 | layoutWidget4 = new QWidget(groupBox); 269 | layoutWidget4->setObjectName(QStringLiteral("layoutWidget4")); 270 | layoutWidget4->setGeometry(QRect(130, 480, 65, 27)); 271 | horizontalLayout_4 = new QHBoxLayout(layoutWidget4); 272 | horizontalLayout_4->setObjectName(QStringLiteral("horizontalLayout_4")); 273 | horizontalLayout_4->setContentsMargins(0, 0, 0, 0); 274 | COVERRATE = new QSpinBox(layoutWidget4); 275 | COVERRATE->setObjectName(QStringLiteral("COVERRATE")); 276 | COVERRATE->setStyleSheet(QStringLiteral("border-image: url(:/new/prefix1/back.PNG);")); 277 | COVERRATE->setValue(95); 278 | 279 | horizontalLayout_4->addWidget(COVERRATE); 280 | 281 | label_12 = new QLabel(layoutWidget4); 282 | label_12->setObjectName(QStringLiteral("label_12")); 283 | 284 | horizontalLayout_4->addWidget(label_12); 285 | 286 | dial_3 = new QDial(groupBox); 287 | dial_3->setObjectName(QStringLiteral("dial_3")); 288 | dial_3->setGeometry(QRect(300, 458, 50, 64)); 289 | dial_3->setMaximumSize(QSize(16777215, 16777211)); 290 | dial_3->setMinimum(0); 291 | dial_3->setValue(95); 292 | pushButton = new QPushButton(groupBox); 293 | pushButton->setObjectName(QStringLiteral("pushButton")); 294 | pushButton->setGeometry(QRect(530, 620, 89, 25)); 295 | label_14 = new QLabel(groupBox); 296 | label_14->setObjectName(QStringLiteral("label_14")); 297 | label_14->setGeometry(QRect(63, 350, 111, 17)); 298 | layoutWidget5 = new QWidget(groupBox); 299 | layoutWidget5->setObjectName(QStringLiteral("layoutWidget5")); 300 | layoutWidget5->setGeometry(QRect(119, 392, 114, 27)); 301 | horizontalLayout_5 = new QHBoxLayout(layoutWidget5); 302 | horizontalLayout_5->setObjectName(QStringLiteral("horizontalLayout_5")); 303 | horizontalLayout_5->setContentsMargins(0, 0, 0, 0); 304 | label_15 = new QLabel(layoutWidget5); 305 | label_15->setObjectName(QStringLiteral("label_15")); 306 | 307 | horizontalLayout_5->addWidget(label_15); 308 | 309 | SINRSPIN = new QDoubleSpinBox(layoutWidget5); 310 | SINRSPIN->setObjectName(QStringLiteral("SINRSPIN")); 311 | SINRSPIN->setStyleSheet(QStringLiteral("border-image: url(:/new/prefix1/back.PNG);")); 312 | SINRSPIN->setValue(10); 313 | 314 | horizontalLayout_5->addWidget(SINRSPIN); 315 | 316 | 317 | retranslateUi(self_set); 318 | QObject::connect(buttonBox, SIGNAL(accepted()), self_set, SLOT(accept())); 319 | QObject::connect(buttonBox, SIGNAL(rejected()), self_set, SLOT(reject())); 320 | QObject::connect(dial_2, SIGNAL(valueChanged(int)), RSRP0, SLOT(setValue(int))); 321 | QObject::connect(RSRP0, SIGNAL(valueChanged(int)), dial_2, SLOT(setValue(int))); 322 | QObject::connect(horizontalSlider, SIGNAL(valueChanged(int)), COVERRATE, SLOT(setValue(int))); 323 | QObject::connect(COVERRATE, SIGNAL(valueChanged(int)), horizontalSlider, SLOT(setValue(int))); 324 | QObject::connect(COVERRATE, SIGNAL(valueChanged(int)), dial_3, SLOT(setValue(int))); 325 | QObject::connect(dial_3, SIGNAL(valueChanged(int)), COVERRATE, SLOT(setValue(int))); 326 | 327 | QMetaObject::connectSlotsByName(self_set); 328 | } // setupUi 329 | 330 | void retranslateUi(QDialog *self_set) 331 | { 332 | self_set->setWindowTitle(QApplication::translate("self_set", "\350\207\252\351\205\215\347\275\256", 0)); 333 | groupBox->setTitle(QApplication::translate("self_set", "\345\217\202\346\225\260\350\256\276\347\275\256", 0)); 334 | label_2->setText(QApplication::translate("self_set", "\351\200\232\344\277\241\346\234\200\345\260\217\344\277\241\345\217\267\345\274\272\345\272\246\357\274\232", 0)); 335 | label_9->setText(QApplication::translate("self_set", "(Lr(\350\267\257\346\215\237)=alog(d)+b)", 0)); 336 | label_10->setText(QString()); 337 | label_11->setText(QApplication::translate("self_set", "\350\246\206\347\233\226\347\216\207\357\274\232", 0)); 338 | radioButton->setText(QApplication::translate("self_set", "\345\271\263\345\235\207SINR\346\234\200\344\274\230", 0)); 339 | radioButton_2->setText(QApplication::translate("self_set", "\350\203\275\346\225\210\346\257\224\346\234\200\351\253\230", 0)); 340 | label_4->setText(QApplication::translate("self_set", "\350\267\257\346\215\237\346\250\241\345\236\213\345\217\202\346\225\260\357\274\232", 0)); 341 | label_3->setText(QApplication::translate("self_set", "a=", 0)); 342 | label_6->setText(QApplication::translate("self_set", "b=", 0)); 343 | label_5->setText(QApplication::translate("self_set", "RSRP0=", 0)); 344 | label_8->setText(QApplication::translate("self_set", "dBm", 0)); 345 | label_13->setText(QString()); 346 | label->setText(QApplication::translate("self_set", "\345\237\272\347\253\231\351\242\235\345\256\232\345\212\237\347\216\207=", 0)); 347 | label_7->setText(QApplication::translate("self_set", "dBm", 0)); 348 | label_12->setText(QApplication::translate("self_set", "%", 0)); 349 | pushButton->setText(QApplication::translate("self_set", "\346\201\242\345\244\215\351\273\230\350\256\244", 0)); 350 | label_14->setText(QApplication::translate("self_set", "\344\270\264\347\225\214\344\277\241\345\231\252\346\257\224\357\274\232", 0)); 351 | label_15->setText(QApplication::translate("self_set", "SINR=", 0)); 352 | } // retranslateUi 353 | 354 | }; 355 | 356 | namespace Ui { 357 | class self_set: public Ui_self_set {}; 358 | } // namespace Ui 359 | 360 | QT_END_NAMESPACE 361 | 362 | #endif // UI_SELF_SET_H 363 | -------------------------------------------------------------------------------- /user.cpp: -------------------------------------------------------------------------------- 1 | #include "user.h" 2 | 3 | User::User() 4 | { 5 | 6 | } 7 | void User::init(int ap_label,double receivePower,double SINR,double wifiSpeed) 8 | { 9 | this->ap_label = ap_label; 10 | this->receivePower = receivePower; 11 | this->SINR = SINR; 12 | this->wifiSpeed = wifiSpeed; 13 | this->satisfied=true; 14 | } 15 | -------------------------------------------------------------------------------- /user.h: -------------------------------------------------------------------------------- 1 | #ifndef USER_H 2 | #define USER_H 3 | 4 | 5 | class User 6 | { 7 | public: 8 | User(); 9 | int ap_label; 10 | double receivePower; 11 | double SINR; 12 | double wifiSpeed; 13 | bool satisfied; 14 | void init(int ap_label,double receivePower,double SINR,double wifiSpeed); 15 | 16 | 17 | }; 18 | 19 | #endif // USER_H 20 | --------------------------------------------------------------------------------