diff --git a/0snap/base64.png b/0snap/base64.png deleted file mode 100644 index 6de5e2c..0000000 Binary files a/0snap/base64.png and /dev/null differ diff --git a/0snap/battery.gif b/0snap/battery.gif deleted file mode 100644 index 62c4e9f..0000000 Binary files a/0snap/battery.gif and /dev/null differ diff --git a/0snap/bgdemo.gif b/0snap/bgdemo.gif deleted file mode 100644 index 3d6059f..0000000 Binary files a/0snap/bgdemo.gif and /dev/null differ diff --git a/0snap/colorwidget.gif b/0snap/colorwidget.gif deleted file mode 100644 index 0bc619d..0000000 Binary files a/0snap/colorwidget.gif and /dev/null differ diff --git a/0snap/comtool.jpg b/0snap/comtool.jpg deleted file mode 100644 index 09920f5..0000000 Binary files a/0snap/comtool.jpg and /dev/null differ diff --git a/0snap/countcode.gif b/0snap/countcode.gif deleted file mode 100644 index 593e8b0..0000000 Binary files a/0snap/countcode.gif and /dev/null differ diff --git a/0snap/dbpage.png b/0snap/dbpage.png deleted file mode 100644 index a88e4fc..0000000 Binary files a/0snap/dbpage.png and /dev/null differ diff --git a/0snap/designer.png b/0snap/designer.png deleted file mode 100644 index c17b2ae..0000000 Binary files a/0snap/designer.png and /dev/null differ diff --git a/0snap/devicebutton.gif b/0snap/devicebutton.gif deleted file mode 100644 index dbdfac1..0000000 Binary files a/0snap/devicebutton.gif and /dev/null differ diff --git a/0snap/devicesizetable.gif b/0snap/devicesizetable.gif deleted file mode 100644 index b104ea5..0000000 Binary files a/0snap/devicesizetable.gif and /dev/null differ diff --git a/0snap/echartgauge.gif b/0snap/echartgauge.gif deleted file mode 100644 index 47bd702..0000000 Binary files a/0snap/echartgauge.gif and /dev/null differ diff --git a/0snap/emailtool.jpg b/0snap/emailtool.jpg deleted file mode 100644 index 19ff5b8..0000000 Binary files a/0snap/emailtool.jpg and /dev/null differ diff --git a/0snap/ffmpegdemo.png b/0snap/ffmpegdemo.png deleted file mode 100644 index e31e65e..0000000 Binary files a/0snap/ffmpegdemo.png and /dev/null differ diff --git a/0snap/flatui.gif b/0snap/flatui.gif deleted file mode 100644 index 0fcff72..0000000 Binary files a/0snap/flatui.gif and /dev/null differ diff --git a/0snap/frameless.gif b/0snap/frameless.gif deleted file mode 100644 index fe07065..0000000 Binary files a/0snap/frameless.gif and /dev/null differ diff --git a/0snap/framelesswidget.gif b/0snap/framelesswidget.gif deleted file mode 100644 index 72791f0..0000000 Binary files a/0snap/framelesswidget.gif and /dev/null differ diff --git a/0snap/gifwidget.gif b/0snap/gifwidget.gif deleted file mode 100644 index 3d624e6..0000000 Binary files a/0snap/gifwidget.gif and /dev/null differ diff --git a/0snap/hotkey.gif b/0snap/hotkey.gif deleted file mode 100644 index 6cf51ab..0000000 Binary files a/0snap/hotkey.gif and /dev/null differ diff --git a/0snap/imageswitch.gif b/0snap/imageswitch.gif deleted file mode 100644 index 767bcf4..0000000 Binary files a/0snap/imageswitch.gif and /dev/null differ diff --git a/0snap/ipaddress.gif b/0snap/ipaddress.gif deleted file mode 100644 index bb130ac..0000000 Binary files a/0snap/ipaddress.gif and /dev/null differ diff --git a/0snap/key.png b/0snap/key.png deleted file mode 100644 index 90be902..0000000 Binary files a/0snap/key.png and /dev/null differ diff --git a/0snap/lightbutton.gif b/0snap/lightbutton.gif deleted file mode 100644 index efcc22d..0000000 Binary files a/0snap/lightbutton.gif and /dev/null differ diff --git a/0snap/lineeditnext.gif b/0snap/lineeditnext.gif deleted file mode 100644 index b18470f..0000000 Binary files a/0snap/lineeditnext.gif and /dev/null differ diff --git a/0snap/live.png b/0snap/live.png deleted file mode 100644 index b09a677..0000000 Binary files a/0snap/live.png and /dev/null differ diff --git a/0snap/lunarcalendarwidget.gif b/0snap/lunarcalendarwidget.gif deleted file mode 100644 index 4d6eeb8..0000000 Binary files a/0snap/lunarcalendarwidget.gif and /dev/null differ diff --git a/0snap/maskwidget.gif b/0snap/maskwidget.gif deleted file mode 100644 index 616b342..0000000 Binary files a/0snap/maskwidget.gif and /dev/null differ diff --git a/0snap/miniblink.jpg b/0snap/miniblink.jpg deleted file mode 100644 index 4644e5c..0000000 Binary files a/0snap/miniblink.jpg and /dev/null differ diff --git a/0snap/moneytool.jpg b/0snap/moneytool.jpg deleted file mode 100644 index 34cc5fa..0000000 Binary files a/0snap/moneytool.jpg and /dev/null differ diff --git a/0snap/mouseline.gif b/0snap/mouseline.gif deleted file mode 100644 index 46af9f2..0000000 Binary files a/0snap/mouseline.gif and /dev/null differ diff --git a/0snap/movewidget.gif b/0snap/movewidget.gif deleted file mode 100644 index b98ab44..0000000 Binary files a/0snap/movewidget.gif and /dev/null differ diff --git a/0snap/navbutton.gif b/0snap/navbutton.gif deleted file mode 100644 index fb04281..0000000 Binary files a/0snap/navbutton.gif and /dev/null differ diff --git a/0snap/netserver.jpg b/0snap/netserver.jpg deleted file mode 100644 index 63c0b23..0000000 Binary files a/0snap/netserver.jpg and /dev/null differ diff --git a/0snap/nettool.gif b/0snap/nettool.gif deleted file mode 100644 index ec14cdf..0000000 Binary files a/0snap/nettool.gif and /dev/null differ diff --git a/0snap/ntpclient.gif b/0snap/ntpclient.gif deleted file mode 100644 index 156709f..0000000 Binary files a/0snap/ntpclient.gif and /dev/null differ diff --git a/0snap/pngtool.gif b/0snap/pngtool.gif deleted file mode 100644 index 1252993..0000000 Binary files a/0snap/pngtool.gif and /dev/null differ diff --git a/0snap/qwt.png b/0snap/qwt.png deleted file mode 100644 index 8ebecc4..0000000 Binary files a/0snap/qwt.png and /dev/null differ diff --git a/0snap/qwtdemo.jpg b/0snap/qwtdemo.jpg deleted file mode 100644 index 4ad0321..0000000 Binary files a/0snap/qwtdemo.jpg and /dev/null differ diff --git a/0snap/savelog.jpg b/0snap/savelog.jpg deleted file mode 100644 index 8dadec0..0000000 Binary files a/0snap/savelog.jpg and /dev/null differ diff --git a/0snap/saveruntime.jpg b/0snap/saveruntime.jpg deleted file mode 100644 index 4b5dae4..0000000 Binary files a/0snap/saveruntime.jpg and /dev/null differ diff --git a/0snap/screenwidget.gif b/0snap/screenwidget.gif deleted file mode 100644 index b45871a..0000000 Binary files a/0snap/screenwidget.gif and /dev/null differ diff --git a/0snap/smoothcurve.gif b/0snap/smoothcurve.gif deleted file mode 100644 index c84e542..0000000 Binary files a/0snap/smoothcurve.gif and /dev/null differ diff --git a/0snap/styledemo_flatwhite.png b/0snap/styledemo_flatwhite.png deleted file mode 100644 index ff9f670..0000000 Binary files a/0snap/styledemo_flatwhite.png and /dev/null differ diff --git a/0snap/styledemo_lightblue.png b/0snap/styledemo_lightblue.png deleted file mode 100644 index c9f6f53..0000000 Binary files a/0snap/styledemo_lightblue.png and /dev/null differ diff --git a/0snap/styledemo_psblack.png b/0snap/styledemo_psblack.png deleted file mode 100644 index 90cd9e5..0000000 Binary files a/0snap/styledemo_psblack.png and /dev/null differ diff --git a/0snap/videopanel.gif b/0snap/videopanel.gif deleted file mode 100644 index 1b545c2..0000000 Binary files a/0snap/videopanel.gif and /dev/null differ diff --git a/0snap/videowidget.gif b/0snap/videowidget.gif deleted file mode 100644 index be5609f..0000000 Binary files a/0snap/videowidget.gif and /dev/null differ diff --git a/0snap/vlcdemo.png b/0snap/vlcdemo.png deleted file mode 100644 index 195c640..0000000 Binary files a/0snap/vlcdemo.png and /dev/null differ diff --git a/0snap/zhtopy.gif b/0snap/zhtopy.gif deleted file mode 100644 index d6c5467..0000000 Binary files a/0snap/zhtopy.gif and /dev/null differ diff --git a/QWidgetDemo.pro b/QWidgetDemo.pro index 71cc575..ca5f42b 100644 --- a/QWidgetDemo.pro +++ b/QWidgetDemo.pro @@ -1,69 +1,10 @@ TEMPLATE = subdirs -#定义了ordered表示子项目按照添加的顺序来编译 -CONFIG += ordered - -#挨个添加子项目 -SUBDIRS += lightbutton #高亮按钮控件 -SUBDIRS += movewidget #通用控件移动类 -SUBDIRS += flatui #模仿flatui类 -SUBDIRS += countcode #代码统计组件 -SUBDIRS += gifwidget #屏幕录制控件 -SUBDIRS += comtool #串口调试助手 -SUBDIRS += nettool #网络调试助手 -SUBDIRS += devicesizetable #硬盘容量控件 -SUBDIRS += styledemo #高仿PS黑色+扁平白色+淡蓝色风格主题 -SUBDIRS += navbutton #导航按钮控件 -SUBDIRS += videopanel #视频监控画面分割demo -SUBDIRS += framelesswidget #跨平台无边框窗体 -SUBDIRS += ipaddress #IP地址输入控件 -SUBDIRS += bgdemo #无边框背景透明窗体 -SUBDIRS += dbpage #通用数据库翻页查询 -SUBDIRS += pngtool #PNG图片警告去除工具 -SUBDIRS += savelog #日志重定向输出类 -SUBDIRS += saveruntime #运行时间记录类 -SUBDIRS += colorwidget #颜色拾取器 -SUBDIRS += maskwidget #遮罩层窗体 -SUBDIRS += battery #电池电量控件 -SUBDIRS += lineeditnext #文本框回车焦点下移 -SUBDIRS += zhtopy #汉字转拼音 -SUBDIRS += devicebutton #设备按钮地图效果 -SUBDIRS += mouseline #鼠标定位十字线 -SUBDIRS += emailtool #邮件发送工具 -SUBDIRS += ntpclient #NTP服务器时间同步 -SUBDIRS += lunarcalendarwidget#农历控件 -SUBDIRS += videowidget #通用视频控件 -SUBDIRS += screenwidget #屏幕截图控件 -SUBDIRS += imageswitch #图片开关控件 -SUBDIRS += netserver #网络中转服务器 -SUBDIRS += base64helper #图片文字base64互换 -SUBDIRS += smoothcurve #平滑曲线 -SUBDIRS += moneytool #存款计算器 -SUBDIRS += hotkey #全局热键示例 目前只支持Qt5 - -#限定windows系统加载下面的项目 -win32 { -SUBDIRS += ffmpegdemo #视频流播放ffmpeg内核 -SUBDIRS += vlcdemo #视频流播放vlc内核 -SUBDIRS += mpvdemo #视频流播放mpv内核 -SUBDIRS += miniblink #miniblink示例 -} - -#如果你电脑对应的Qt版本有webkit或者webengine组件可以自行打开 -#SUBDIRS += echartgauge #echart仪表盘含交互支持webkit及webengine - -#这个项目依赖QtDesigner模块,一般在arm上默认没有这个模块需要自行编译 -#所以arm上如果没有QtDesigner模块不要加载下面这个子项目 -lessThan(QT_MAJOR_VERSION, 5) { -SUBDIRS += designer #QtDesigner4源码 -} - -#qwt项目需要等官方适配了 qwt 组件才能适配 -lessThan(QT_MAJOR_VERSION, 6) { -SUBDIRS += qwtdemo #qwt的源码版本,无需插件,直接源码集成到你的项目即可 -} - -#6.0到6.2之间的版本还有点问题等待正式发布的时候再试试 -greaterThan(QT_MAJOR_VERSION, 5) { -SUBDIRS -= emailtool -SUBDIRS -= hotkey -} +SUBDIRS += control +SUBDIRS += tool +SUBDIRS += video +SUBDIRS += widget +SUBDIRS += ui +SUBDIRS += other +SUBDIRS += third +#网友提交的可能很多Qt版本不支持需要自行打开验证 +#SUBDIRS += netfriend diff --git a/README.md b/README.md index ac416cf..c030b54 100644 --- a/README.md +++ b/README.md @@ -1,109 +1,42 @@ -#### 一、目录说明 +#### 一、特别说明 1. **可以选择打开QWidgetDemo.pro一次性编译所有的,也可以进入到目录下打开pro进行编译。** -2. **如果发现有些子项目没有加载请打开QWidgetDemo.pro仔细看里面的注释。** +2. **如果发现有些子项目没有加载请打开对应目录下的.pro仔细看里面的注释。** 3. **编译好的可执行文件在源码同级目录下的bin目录。** 4. **亲测Qt4.6到Qt6.2所有版本,亲测win、linux、mac、uos等系统。** 5. **本项目开源的是下面表格中描述的内容,并未开源左侧的树状导航菜单控件,只是方便演示效果图直接用的自定义控件大全的效果图,懒得重新截图。** 6. **建议用git命令行下载,压缩包下载后重新解压文件可能会有问题,不知为何。** -| 编号 | 文件夹 | 描述 | -| :------ | :------ | :------ | -| 1 | lightbutton | 高亮按钮控件 | -| 2 | movewidget | 通用控件移动类 | -| 3 | flatui | 模仿flatui类 | -| 4 | countcode | 代码统计组件 | -| 5 | gifwidget | 屏幕录制控件 | -| 6 | comtool | 串口调试助手 | -| 7 | nettool | 网络调试助手 | -| 8 | devicesizetable | 硬盘容量控件 | -| 9 | styledemo | 高仿PS黑色+扁平白色+淡蓝色风格主题 | -| 10 | navbutton | 导航按钮控件 | -| 11 | videopanel | 视频监控画面分割demo | -| 12 | framelesswidget | 跨平台无边框窗体 | -| 13 | ipaddress | IP地址输入控件 | -| 14 | bgdemo | 无边框背景透明窗体 | -| 15 | dbpage | 通用数据库翻页查询 | -| 16 | pngtool | PNG图片警告去除工具 | -| 17 | savelog | 日志重定向输出类 | -| 18 | saveruntime | 运行时间记录类 | -| 19 | colorwidget | 颜色拾取器 | -| 20 | maskwidget | 遮罩层窗体 | -| 21 | battery | 电池电量控件 | -| 22 | lineeditnext | 文本框回车焦点下移 | -| 23 | zhtopy | 汉字转拼音 | -| 24 | qwtdemo | qwt的源码版本,无需插件,直接源码集成到你的项目即可 | -| 25 | devicebutton | 设备按钮地图效果 | -| 26 | mouseline | 鼠标定位十字线 | -| 27 | emailtool | 邮件发送工具 | -| 28 | ntpclient | NTP服务器时间同步 | -| 29 | lunarcalendarwidget | 农历控件 | -| 30 | videowidget | 通用视频控件 | -| 31 | screenwidget | 屏幕截图控件 | -| 32 | imageswitch | 图片开关控件 | -| 33 | echartgauge | echart仪表盘含交互支持webkit及webengine | -| 34 | ffmpegdemo | 视频流播放ffmpeg内核 | -| 35 | vlcdemo | 视频流播放vlc内核 | -| 36 | key | 秘钥生成器 | -| 37 | live | 程序守护进程 | -| 38 | designer | QtDesigner4源码 | -| 39 | netserver | 网络中转服务器 | -| 40 | mpvdemo | 视频流播放mpv内核 | -| 41 | miniblink | miniblink示例 | -| 42 | base64 | 图片文字base64互换 | -| 43 | smoothcurve | 平滑曲线 | -| 44 | moneytool | 存款计算器 | -| 45 | hotkey | 全局热键示例 | +#### 二、目录说明 +| 目录 | 类别 | 名称 | 描述 | +| :------ | :------ | :------ | :------ | +| control | 控件类别 | battery | 电池电量 | +| control | 控件类别 | devicebutton | 设备按钮 | +| control | 控件类别 | devicesizetable | 磁盘容量 | -#### 二、学习群 + + +#### 三、学习群 1. **Qt交流大会群 853086607(雨田哥)** 2. **Qt技术交流群 46679801(3000人群)** 3. **Qt进阶之路群 734623697(武威的涛哥)** -#### 三、效果图 -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/lightbutton.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/movewidget.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/flatui.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/countcode.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/gifwidget.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/comtool.jpg) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/nettool.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/devicesizetable.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/styledemo_psblack.png) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/styledemo_lightblue.png) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/styledemo_flatwhite.png) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/navbutton.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/videopanel.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/framelesswidget.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/ipaddress.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/bgdemo.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/dbpage.png) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/pngtool.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/savelog.jpg) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/saveruntime.jpg) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/colorwidget.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/maskwidget.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/battery.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/lineeditnext.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/zhtopy.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/qwtdemo.jpg) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/devicebutton.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/mouseline.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/emailtool.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/ntpclient.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/lunarcalendarwidget.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/videowidget.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/screenwidget.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/echartgauge.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/imageswitch.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/ffmpegdemo.png) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/vlcdemo.png) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/key.png) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/live.png) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/netserver.jpg) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/designer.png) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/miniblink.jpg) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/base64.png) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/smoothcurve.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/frameless.gif) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/moneytool.jpg) -![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/0snap/hotkey.gif) \ No newline at end of file +#### 四、效果图 +##### 4.1、控件类别 +![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/control/0snap/battery.jpg) +![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/control/0snap/devicebutton.jpg) +![avatar](https://gitee.com/feiyangqingyun/QWidgetDemo/raw/master/control/0snap/devicesizetable.jpg) + +##### 4.2、工具类别 + +##### 4.3、视频类别 + +##### 4.4、窗体类别 + +##### 4.5、界面类别 + +##### 4.6、其他类别 + +##### 4.7、第三方组件 + +##### 4.8、网友提供 + diff --git a/comtool/api/api.pri b/comtool/api/api.pri deleted file mode 100644 index ede42b8..0000000 --- a/comtool/api/api.pri +++ /dev/null @@ -1,7 +0,0 @@ -HEADERS += \ - $$PWD/appconfig.h \ - $$PWD/appdata.h - -SOURCES += \ - $$PWD/appconfig.cpp \ - $$PWD/appdata.cpp diff --git a/control/0snap/battery.jpg b/control/0snap/battery.jpg new file mode 100644 index 0000000..545c6d3 Binary files /dev/null and b/control/0snap/battery.jpg differ diff --git a/control/0snap/devicebutton.jpg b/control/0snap/devicebutton.jpg new file mode 100644 index 0000000..8889fb2 Binary files /dev/null and b/control/0snap/devicebutton.jpg differ diff --git a/control/0snap/devicesizetable.jpg b/control/0snap/devicesizetable.jpg new file mode 100644 index 0000000..76d6037 Binary files /dev/null and b/control/0snap/devicesizetable.jpg differ diff --git a/control/0snap/imageswitch.jpg b/control/0snap/imageswitch.jpg new file mode 100644 index 0000000..dec7adb Binary files /dev/null and b/control/0snap/imageswitch.jpg differ diff --git a/control/0snap/ipaddress.jpg b/control/0snap/ipaddress.jpg new file mode 100644 index 0000000..c1ffc40 Binary files /dev/null and b/control/0snap/ipaddress.jpg differ diff --git a/control/0snap/lightbutton.jpg b/control/0snap/lightbutton.jpg new file mode 100644 index 0000000..ee0d4a3 Binary files /dev/null and b/control/0snap/lightbutton.jpg differ diff --git a/control/0snap/navbutton.jpg b/control/0snap/navbutton.jpg new file mode 100644 index 0000000..8e22868 Binary files /dev/null and b/control/0snap/navbutton.jpg differ diff --git a/control/0snap/savelog.jpg b/control/0snap/savelog.jpg new file mode 100644 index 0000000..1419d72 Binary files /dev/null and b/control/0snap/savelog.jpg differ diff --git a/control/0snap/saveruntime.jpg b/control/0snap/saveruntime.jpg new file mode 100644 index 0000000..328c767 Binary files /dev/null and b/control/0snap/saveruntime.jpg differ diff --git a/control/0snap/smoothcurve.jpg b/control/0snap/smoothcurve.jpg new file mode 100644 index 0000000..dbb1a88 Binary files /dev/null and b/control/0snap/smoothcurve.jpg differ diff --git a/control/0snap/zhtopy.jpg b/control/0snap/zhtopy.jpg new file mode 100644 index 0000000..4281eea Binary files /dev/null and b/control/0snap/zhtopy.jpg differ diff --git a/battery/battery.cpp b/control/battery/battery.cpp similarity index 100% rename from battery/battery.cpp rename to control/battery/battery.cpp diff --git a/battery/battery.h b/control/battery/battery.h similarity index 100% rename from battery/battery.h rename to control/battery/battery.h diff --git a/battery/battery.pro b/control/battery/battery.pro similarity index 100% rename from battery/battery.pro rename to control/battery/battery.pro diff --git a/battery/frmbattery.cpp b/control/battery/frmbattery.cpp similarity index 100% rename from battery/frmbattery.cpp rename to control/battery/frmbattery.cpp diff --git a/battery/frmbattery.h b/control/battery/frmbattery.h similarity index 100% rename from battery/frmbattery.h rename to control/battery/frmbattery.h diff --git a/battery/frmbattery.ui b/control/battery/frmbattery.ui similarity index 100% rename from battery/frmbattery.ui rename to control/battery/frmbattery.ui diff --git a/battery/main.cpp b/control/battery/main.cpp similarity index 100% rename from battery/main.cpp rename to control/battery/main.cpp diff --git a/control/control.pro b/control/control.pro new file mode 100644 index 0000000..76f2427 --- /dev/null +++ b/control/control.pro @@ -0,0 +1,12 @@ +TEMPLATE = subdirs +SUBDIRS += battery +SUBDIRS += devicebutton +SUBDIRS += devicesizetable +SUBDIRS += imageswitch +SUBDIRS += ipaddress +SUBDIRS += lightbutton +SUBDIRS += navbutton +SUBDIRS += savelog +SUBDIRS += saveruntime +SUBDIRS += smoothcurve +SUBDIRS += zhtopy diff --git a/devicebutton/devicebutton.cpp b/control/devicebutton/devicebutton.cpp similarity index 100% rename from devicebutton/devicebutton.cpp rename to control/devicebutton/devicebutton.cpp diff --git a/devicebutton/devicebutton.h b/control/devicebutton/devicebutton.h similarity index 100% rename from devicebutton/devicebutton.h rename to control/devicebutton/devicebutton.h diff --git a/devicebutton/devicebutton.pro b/control/devicebutton/devicebutton.pro similarity index 100% rename from devicebutton/devicebutton.pro rename to control/devicebutton/devicebutton.pro diff --git a/devicebutton/frmdevicebutton.cpp b/control/devicebutton/frmdevicebutton.cpp similarity index 100% rename from devicebutton/frmdevicebutton.cpp rename to control/devicebutton/frmdevicebutton.cpp diff --git a/devicebutton/frmdevicebutton.h b/control/devicebutton/frmdevicebutton.h similarity index 100% rename from devicebutton/frmdevicebutton.h rename to control/devicebutton/frmdevicebutton.h diff --git a/devicebutton/frmdevicebutton.ui b/control/devicebutton/frmdevicebutton.ui similarity index 100% rename from devicebutton/frmdevicebutton.ui rename to control/devicebutton/frmdevicebutton.ui diff --git a/devicebutton/image/bg_call.jpg b/control/devicebutton/image/bg_call.jpg similarity index 100% rename from devicebutton/image/bg_call.jpg rename to control/devicebutton/image/bg_call.jpg diff --git a/devicebutton/image/devicebutton/devicebutton_black_bubble.png b/control/devicebutton/image/devicebutton/devicebutton_black_bubble.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_black_bubble.png rename to control/devicebutton/image/devicebutton/devicebutton_black_bubble.png diff --git a/devicebutton/image/devicebutton/devicebutton_black_bubble2.png b/control/devicebutton/image/devicebutton/devicebutton_black_bubble2.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_black_bubble2.png rename to control/devicebutton/image/devicebutton/devicebutton_black_bubble2.png diff --git a/devicebutton/image/devicebutton/devicebutton_black_circle.png b/control/devicebutton/image/devicebutton/devicebutton_black_circle.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_black_circle.png rename to control/devicebutton/image/devicebutton/devicebutton_black_circle.png diff --git a/devicebutton/image/devicebutton/devicebutton_black_msg.png b/control/devicebutton/image/devicebutton/devicebutton_black_msg.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_black_msg.png rename to control/devicebutton/image/devicebutton/devicebutton_black_msg.png diff --git a/devicebutton/image/devicebutton/devicebutton_black_msg2.png b/control/devicebutton/image/devicebutton/devicebutton_black_msg2.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_black_msg2.png rename to control/devicebutton/image/devicebutton/devicebutton_black_msg2.png diff --git a/devicebutton/image/devicebutton/devicebutton_black_police.png b/control/devicebutton/image/devicebutton/devicebutton_black_police.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_black_police.png rename to control/devicebutton/image/devicebutton/devicebutton_black_police.png diff --git a/devicebutton/image/devicebutton/devicebutton_blue_bubble.png b/control/devicebutton/image/devicebutton/devicebutton_blue_bubble.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_blue_bubble.png rename to control/devicebutton/image/devicebutton/devicebutton_blue_bubble.png diff --git a/devicebutton/image/devicebutton/devicebutton_blue_bubble2.png b/control/devicebutton/image/devicebutton/devicebutton_blue_bubble2.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_blue_bubble2.png rename to control/devicebutton/image/devicebutton/devicebutton_blue_bubble2.png diff --git a/devicebutton/image/devicebutton/devicebutton_blue_circle.png b/control/devicebutton/image/devicebutton/devicebutton_blue_circle.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_blue_circle.png rename to control/devicebutton/image/devicebutton/devicebutton_blue_circle.png diff --git a/devicebutton/image/devicebutton/devicebutton_blue_msg.png b/control/devicebutton/image/devicebutton/devicebutton_blue_msg.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_blue_msg.png rename to control/devicebutton/image/devicebutton/devicebutton_blue_msg.png diff --git a/devicebutton/image/devicebutton/devicebutton_blue_msg2.png b/control/devicebutton/image/devicebutton/devicebutton_blue_msg2.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_blue_msg2.png rename to control/devicebutton/image/devicebutton/devicebutton_blue_msg2.png diff --git a/devicebutton/image/devicebutton/devicebutton_blue_police.png b/control/devicebutton/image/devicebutton/devicebutton_blue_police.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_blue_police.png rename to control/devicebutton/image/devicebutton/devicebutton_blue_police.png diff --git a/devicebutton/image/devicebutton/devicebutton_gray_bubble.png b/control/devicebutton/image/devicebutton/devicebutton_gray_bubble.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_gray_bubble.png rename to control/devicebutton/image/devicebutton/devicebutton_gray_bubble.png diff --git a/devicebutton/image/devicebutton/devicebutton_gray_bubble2.png b/control/devicebutton/image/devicebutton/devicebutton_gray_bubble2.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_gray_bubble2.png rename to control/devicebutton/image/devicebutton/devicebutton_gray_bubble2.png diff --git a/devicebutton/image/devicebutton/devicebutton_gray_circle.png b/control/devicebutton/image/devicebutton/devicebutton_gray_circle.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_gray_circle.png rename to control/devicebutton/image/devicebutton/devicebutton_gray_circle.png diff --git a/devicebutton/image/devicebutton/devicebutton_gray_msg.png b/control/devicebutton/image/devicebutton/devicebutton_gray_msg.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_gray_msg.png rename to control/devicebutton/image/devicebutton/devicebutton_gray_msg.png diff --git a/devicebutton/image/devicebutton/devicebutton_gray_msg2.png b/control/devicebutton/image/devicebutton/devicebutton_gray_msg2.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_gray_msg2.png rename to control/devicebutton/image/devicebutton/devicebutton_gray_msg2.png diff --git a/devicebutton/image/devicebutton/devicebutton_gray_police.png b/control/devicebutton/image/devicebutton/devicebutton_gray_police.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_gray_police.png rename to control/devicebutton/image/devicebutton/devicebutton_gray_police.png diff --git a/devicebutton/image/devicebutton/devicebutton_green_bubble.png b/control/devicebutton/image/devicebutton/devicebutton_green_bubble.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_green_bubble.png rename to control/devicebutton/image/devicebutton/devicebutton_green_bubble.png diff --git a/devicebutton/image/devicebutton/devicebutton_green_bubble2.png b/control/devicebutton/image/devicebutton/devicebutton_green_bubble2.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_green_bubble2.png rename to control/devicebutton/image/devicebutton/devicebutton_green_bubble2.png diff --git a/devicebutton/image/devicebutton/devicebutton_green_circle.png b/control/devicebutton/image/devicebutton/devicebutton_green_circle.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_green_circle.png rename to control/devicebutton/image/devicebutton/devicebutton_green_circle.png diff --git a/devicebutton/image/devicebutton/devicebutton_green_msg.png b/control/devicebutton/image/devicebutton/devicebutton_green_msg.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_green_msg.png rename to control/devicebutton/image/devicebutton/devicebutton_green_msg.png diff --git a/devicebutton/image/devicebutton/devicebutton_green_msg2.png b/control/devicebutton/image/devicebutton/devicebutton_green_msg2.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_green_msg2.png rename to control/devicebutton/image/devicebutton/devicebutton_green_msg2.png diff --git a/devicebutton/image/devicebutton/devicebutton_green_police.png b/control/devicebutton/image/devicebutton/devicebutton_green_police.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_green_police.png rename to control/devicebutton/image/devicebutton/devicebutton_green_police.png diff --git a/devicebutton/image/devicebutton/devicebutton_purple_bubble.png b/control/devicebutton/image/devicebutton/devicebutton_purple_bubble.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_purple_bubble.png rename to control/devicebutton/image/devicebutton/devicebutton_purple_bubble.png diff --git a/devicebutton/image/devicebutton/devicebutton_purple_bubble2.png b/control/devicebutton/image/devicebutton/devicebutton_purple_bubble2.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_purple_bubble2.png rename to control/devicebutton/image/devicebutton/devicebutton_purple_bubble2.png diff --git a/devicebutton/image/devicebutton/devicebutton_purple_circle.png b/control/devicebutton/image/devicebutton/devicebutton_purple_circle.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_purple_circle.png rename to control/devicebutton/image/devicebutton/devicebutton_purple_circle.png diff --git a/devicebutton/image/devicebutton/devicebutton_purple_msg.png b/control/devicebutton/image/devicebutton/devicebutton_purple_msg.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_purple_msg.png rename to control/devicebutton/image/devicebutton/devicebutton_purple_msg.png diff --git a/devicebutton/image/devicebutton/devicebutton_purple_msg2.png b/control/devicebutton/image/devicebutton/devicebutton_purple_msg2.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_purple_msg2.png rename to control/devicebutton/image/devicebutton/devicebutton_purple_msg2.png diff --git a/devicebutton/image/devicebutton/devicebutton_purple_police.png b/control/devicebutton/image/devicebutton/devicebutton_purple_police.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_purple_police.png rename to control/devicebutton/image/devicebutton/devicebutton_purple_police.png diff --git a/devicebutton/image/devicebutton/devicebutton_red_bubble.png b/control/devicebutton/image/devicebutton/devicebutton_red_bubble.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_red_bubble.png rename to control/devicebutton/image/devicebutton/devicebutton_red_bubble.png diff --git a/devicebutton/image/devicebutton/devicebutton_red_bubble2.png b/control/devicebutton/image/devicebutton/devicebutton_red_bubble2.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_red_bubble2.png rename to control/devicebutton/image/devicebutton/devicebutton_red_bubble2.png diff --git a/devicebutton/image/devicebutton/devicebutton_red_circle.png b/control/devicebutton/image/devicebutton/devicebutton_red_circle.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_red_circle.png rename to control/devicebutton/image/devicebutton/devicebutton_red_circle.png diff --git a/devicebutton/image/devicebutton/devicebutton_red_msg.png b/control/devicebutton/image/devicebutton/devicebutton_red_msg.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_red_msg.png rename to control/devicebutton/image/devicebutton/devicebutton_red_msg.png diff --git a/devicebutton/image/devicebutton/devicebutton_red_msg2.png b/control/devicebutton/image/devicebutton/devicebutton_red_msg2.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_red_msg2.png rename to control/devicebutton/image/devicebutton/devicebutton_red_msg2.png diff --git a/devicebutton/image/devicebutton/devicebutton_red_police.png b/control/devicebutton/image/devicebutton/devicebutton_red_police.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_red_police.png rename to control/devicebutton/image/devicebutton/devicebutton_red_police.png diff --git a/devicebutton/image/devicebutton/devicebutton_yellow_bubble.png b/control/devicebutton/image/devicebutton/devicebutton_yellow_bubble.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_yellow_bubble.png rename to control/devicebutton/image/devicebutton/devicebutton_yellow_bubble.png diff --git a/devicebutton/image/devicebutton/devicebutton_yellow_bubble2.png b/control/devicebutton/image/devicebutton/devicebutton_yellow_bubble2.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_yellow_bubble2.png rename to control/devicebutton/image/devicebutton/devicebutton_yellow_bubble2.png diff --git a/devicebutton/image/devicebutton/devicebutton_yellow_circle.png b/control/devicebutton/image/devicebutton/devicebutton_yellow_circle.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_yellow_circle.png rename to control/devicebutton/image/devicebutton/devicebutton_yellow_circle.png diff --git a/devicebutton/image/devicebutton/devicebutton_yellow_msg.png b/control/devicebutton/image/devicebutton/devicebutton_yellow_msg.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_yellow_msg.png rename to control/devicebutton/image/devicebutton/devicebutton_yellow_msg.png diff --git a/devicebutton/image/devicebutton/devicebutton_yellow_msg2.png b/control/devicebutton/image/devicebutton/devicebutton_yellow_msg2.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_yellow_msg2.png rename to control/devicebutton/image/devicebutton/devicebutton_yellow_msg2.png diff --git a/devicebutton/image/devicebutton/devicebutton_yellow_police.png b/control/devicebutton/image/devicebutton/devicebutton_yellow_police.png similarity index 100% rename from devicebutton/image/devicebutton/devicebutton_yellow_police.png rename to control/devicebutton/image/devicebutton/devicebutton_yellow_police.png diff --git a/devicebutton/main.cpp b/control/devicebutton/main.cpp similarity index 100% rename from devicebutton/main.cpp rename to control/devicebutton/main.cpp diff --git a/devicebutton/main.qrc b/control/devicebutton/main.qrc similarity index 100% rename from devicebutton/main.qrc rename to control/devicebutton/main.qrc diff --git a/devicesizetable/devicesizetable.cpp b/control/devicesizetable/devicesizetable.cpp similarity index 100% rename from devicesizetable/devicesizetable.cpp rename to control/devicesizetable/devicesizetable.cpp diff --git a/devicesizetable/devicesizetable.h b/control/devicesizetable/devicesizetable.h similarity index 100% rename from devicesizetable/devicesizetable.h rename to control/devicesizetable/devicesizetable.h diff --git a/devicesizetable/devicesizetable.pro b/control/devicesizetable/devicesizetable.pro similarity index 100% rename from devicesizetable/devicesizetable.pro rename to control/devicesizetable/devicesizetable.pro diff --git a/devicesizetable/frmdevicesizetable.cpp b/control/devicesizetable/frmdevicesizetable.cpp similarity index 100% rename from devicesizetable/frmdevicesizetable.cpp rename to control/devicesizetable/frmdevicesizetable.cpp diff --git a/devicesizetable/frmdevicesizetable.h b/control/devicesizetable/frmdevicesizetable.h similarity index 100% rename from devicesizetable/frmdevicesizetable.h rename to control/devicesizetable/frmdevicesizetable.h diff --git a/devicesizetable/frmdevicesizetable.ui b/control/devicesizetable/frmdevicesizetable.ui similarity index 100% rename from devicesizetable/frmdevicesizetable.ui rename to control/devicesizetable/frmdevicesizetable.ui diff --git a/devicesizetable/main.cpp b/control/devicesizetable/main.cpp similarity index 100% rename from devicesizetable/main.cpp rename to control/devicesizetable/main.cpp diff --git a/imageswitch/frmimageswitch.cpp b/control/imageswitch/frmimageswitch.cpp similarity index 100% rename from imageswitch/frmimageswitch.cpp rename to control/imageswitch/frmimageswitch.cpp diff --git a/imageswitch/frmimageswitch.h b/control/imageswitch/frmimageswitch.h similarity index 100% rename from imageswitch/frmimageswitch.h rename to control/imageswitch/frmimageswitch.h diff --git a/imageswitch/frmimageswitch.ui b/control/imageswitch/frmimageswitch.ui similarity index 100% rename from imageswitch/frmimageswitch.ui rename to control/imageswitch/frmimageswitch.ui diff --git a/imageswitch/image/imageswitch/btncheckoff1.png b/control/imageswitch/image/imageswitch/btncheckoff1.png similarity index 100% rename from imageswitch/image/imageswitch/btncheckoff1.png rename to control/imageswitch/image/imageswitch/btncheckoff1.png diff --git a/imageswitch/image/imageswitch/btncheckoff2.png b/control/imageswitch/image/imageswitch/btncheckoff2.png similarity index 100% rename from imageswitch/image/imageswitch/btncheckoff2.png rename to control/imageswitch/image/imageswitch/btncheckoff2.png diff --git a/imageswitch/image/imageswitch/btncheckoff3.png b/control/imageswitch/image/imageswitch/btncheckoff3.png similarity index 100% rename from imageswitch/image/imageswitch/btncheckoff3.png rename to control/imageswitch/image/imageswitch/btncheckoff3.png diff --git a/imageswitch/image/imageswitch/btncheckon1.png b/control/imageswitch/image/imageswitch/btncheckon1.png similarity index 100% rename from imageswitch/image/imageswitch/btncheckon1.png rename to control/imageswitch/image/imageswitch/btncheckon1.png diff --git a/imageswitch/image/imageswitch/btncheckon2.png b/control/imageswitch/image/imageswitch/btncheckon2.png similarity index 100% rename from imageswitch/image/imageswitch/btncheckon2.png rename to control/imageswitch/image/imageswitch/btncheckon2.png diff --git a/imageswitch/image/imageswitch/btncheckon3.png b/control/imageswitch/image/imageswitch/btncheckon3.png similarity index 100% rename from imageswitch/image/imageswitch/btncheckon3.png rename to control/imageswitch/image/imageswitch/btncheckon3.png diff --git a/imageswitch/imageswitch.cpp b/control/imageswitch/imageswitch.cpp similarity index 100% rename from imageswitch/imageswitch.cpp rename to control/imageswitch/imageswitch.cpp diff --git a/imageswitch/imageswitch.h b/control/imageswitch/imageswitch.h similarity index 100% rename from imageswitch/imageswitch.h rename to control/imageswitch/imageswitch.h diff --git a/imageswitch/imageswitch.pro b/control/imageswitch/imageswitch.pro similarity index 100% rename from imageswitch/imageswitch.pro rename to control/imageswitch/imageswitch.pro diff --git a/imageswitch/main.cpp b/control/imageswitch/main.cpp similarity index 100% rename from imageswitch/main.cpp rename to control/imageswitch/main.cpp diff --git a/imageswitch/main.qrc b/control/imageswitch/main.qrc similarity index 100% rename from imageswitch/main.qrc rename to control/imageswitch/main.qrc diff --git a/ipaddress/frmipaddress.cpp b/control/ipaddress/frmipaddress.cpp similarity index 100% rename from ipaddress/frmipaddress.cpp rename to control/ipaddress/frmipaddress.cpp diff --git a/ipaddress/frmipaddress.h b/control/ipaddress/frmipaddress.h similarity index 99% rename from ipaddress/frmipaddress.h rename to control/ipaddress/frmipaddress.h index dfda1a3..616e102 100644 --- a/ipaddress/frmipaddress.h +++ b/control/ipaddress/frmipaddress.h @@ -22,7 +22,6 @@ private slots: void on_btnSetIP_clicked(); void on_btnGetIP_clicked(); void on_btnClear_clicked(); - }; #endif // FRMADDRESS_H diff --git a/ipaddress/frmipaddress.ui b/control/ipaddress/frmipaddress.ui similarity index 100% rename from ipaddress/frmipaddress.ui rename to control/ipaddress/frmipaddress.ui diff --git a/ipaddress/ipaddress.cpp b/control/ipaddress/ipaddress.cpp similarity index 100% rename from ipaddress/ipaddress.cpp rename to control/ipaddress/ipaddress.cpp diff --git a/ipaddress/ipaddress.h b/control/ipaddress/ipaddress.h similarity index 100% rename from ipaddress/ipaddress.h rename to control/ipaddress/ipaddress.h diff --git a/ipaddress/ipaddress.pro b/control/ipaddress/ipaddress.pro similarity index 100% rename from ipaddress/ipaddress.pro rename to control/ipaddress/ipaddress.pro diff --git a/ipaddress/main.cpp b/control/ipaddress/main.cpp similarity index 100% rename from ipaddress/main.cpp rename to control/ipaddress/main.cpp diff --git a/lightbutton/frmlightbutton.cpp b/control/lightbutton/frmlightbutton.cpp similarity index 96% rename from lightbutton/frmlightbutton.cpp rename to control/lightbutton/frmlightbutton.cpp index fbb1023..a52567e 100644 --- a/lightbutton/frmlightbutton.cpp +++ b/control/lightbutton/frmlightbutton.cpp @@ -1,56 +1,56 @@ -#pragma execution_character_set("utf-8") - -#include "frmlightbutton.h" -#include "ui_frmlightbutton.h" -#include "qdatetime.h" -#include "qtimer.h" - -frmLightButton::frmLightButton(QWidget *parent) : QWidget(parent), ui(new Ui::frmLightButton) -{ - ui->setupUi(this); - this->initForm(); -} - -frmLightButton::~frmLightButton() -{ - delete ui; -} - -void frmLightButton::initForm() -{ - ui->lightButton2->setBgColor(QColor(255, 107, 107)); - ui->lightButton3->setBgColor(QColor(24, 189, 155)); - - type = 0; - - QTimer *timer = new QTimer(this); - timer->setInterval(1000); - connect(timer, SIGNAL(timeout()), this, SLOT(updateValue())); - timer->start(); - updateValue(); - - //以下方法启动报警 - //ui->lightButton1->setAlarmColor(QColor(255, 0, 0)); - //ui->lightButton1->setNormalColor(QColor(0, 0, 0)); - //ui->lightButton1->startAlarm(); -} - -void frmLightButton::updateValue() -{ - if (type == 0) { - ui->lightButton1->setLightGreen(); - ui->lightButton2->setLightRed(); - ui->lightButton3->setLightBlue(); - type = 1; - } else if (type == 1) { - ui->lightButton1->setLightBlue(); - ui->lightButton2->setLightGreen(); - ui->lightButton3->setLightRed(); - type = 2; - } else if (type == 2) { - ui->lightButton1->setLightRed(); - ui->lightButton2->setLightBlue(); - ui->lightButton3->setLightGreen(); - type = 0; - } -} +#pragma execution_character_set("utf-8") + +#include "frmlightbutton.h" +#include "ui_frmlightbutton.h" +#include "qdatetime.h" +#include "qtimer.h" + +frmLightButton::frmLightButton(QWidget *parent) : QWidget(parent), ui(new Ui::frmLightButton) +{ + ui->setupUi(this); + this->initForm(); +} + +frmLightButton::~frmLightButton() +{ + delete ui; +} + +void frmLightButton::initForm() +{ + ui->lightButton2->setBgColor(QColor(255, 107, 107)); + ui->lightButton3->setBgColor(QColor(24, 189, 155)); + + type = 0; + + QTimer *timer = new QTimer(this); + timer->setInterval(1000); + connect(timer, SIGNAL(timeout()), this, SLOT(updateValue())); + timer->start(); + updateValue(); + + //以下方法启动报警 + //ui->lightButton1->setAlarmColor(QColor(255, 0, 0)); + //ui->lightButton1->setNormalColor(QColor(0, 0, 0)); + //ui->lightButton1->startAlarm(); +} + +void frmLightButton::updateValue() +{ + if (type == 0) { + ui->lightButton1->setLightGreen(); + ui->lightButton2->setLightRed(); + ui->lightButton3->setLightBlue(); + type = 1; + } else if (type == 1) { + ui->lightButton1->setLightBlue(); + ui->lightButton2->setLightGreen(); + ui->lightButton3->setLightRed(); + type = 2; + } else if (type == 2) { + ui->lightButton1->setLightRed(); + ui->lightButton2->setLightBlue(); + ui->lightButton3->setLightGreen(); + type = 0; + } +} diff --git a/lightbutton/frmlightbutton.h b/control/lightbutton/frmlightbutton.h similarity index 93% rename from lightbutton/frmlightbutton.h rename to control/lightbutton/frmlightbutton.h index 29bf9f5..af5bc16 100644 --- a/lightbutton/frmlightbutton.h +++ b/control/lightbutton/frmlightbutton.h @@ -1,27 +1,27 @@ -#ifndef FRMLIGHTBUTTON_H -#define FRMLIGHTBUTTON_H - -#include - -namespace Ui { -class frmLightButton; -} - -class frmLightButton : public QWidget -{ - Q_OBJECT - -public: - explicit frmLightButton(QWidget *parent = 0); - ~frmLightButton(); - -private: - Ui::frmLightButton *ui; - int type; - -private slots: - void initForm(); - void updateValue(); -}; - -#endif // FRMLIGHTBUTTON_H +#ifndef FRMLIGHTBUTTON_H +#define FRMLIGHTBUTTON_H + +#include + +namespace Ui { +class frmLightButton; +} + +class frmLightButton : public QWidget +{ + Q_OBJECT + +public: + explicit frmLightButton(QWidget *parent = 0); + ~frmLightButton(); + +private: + Ui::frmLightButton *ui; + int type; + +private slots: + void initForm(); + void updateValue(); +}; + +#endif // FRMLIGHTBUTTON_H diff --git a/lightbutton/frmlightbutton.ui b/control/lightbutton/frmlightbutton.ui similarity index 95% rename from lightbutton/frmlightbutton.ui rename to control/lightbutton/frmlightbutton.ui index 5d92613..1938fc9 100644 --- a/lightbutton/frmlightbutton.ui +++ b/control/lightbutton/frmlightbutton.ui @@ -1,38 +1,38 @@ - - - frmLightButton - - - - 0 - 0 - 800 - 600 - - - - Form - - - - - - - - - - - - - - - - LightButton - QWidget -
lightbutton.h
- 1 -
-
- - -
+ + + frmLightButton + + + + 0 + 0 + 800 + 600 + + + + Form + + + + + + + + + + + + + + + + LightButton + QWidget +
lightbutton.h
+ 1 +
+
+ + +
diff --git a/lightbutton/lightbutton.cpp b/control/lightbutton/lightbutton.cpp similarity index 95% rename from lightbutton/lightbutton.cpp rename to control/lightbutton/lightbutton.cpp index a0fe916..7ba1596 100644 --- a/lightbutton/lightbutton.cpp +++ b/control/lightbutton/lightbutton.cpp @@ -1,450 +1,450 @@ -#pragma execution_character_set("utf-8") - -#include "lightbutton.h" -#include "qpainter.h" -#include "qpainterpath.h" -#include "qevent.h" -#include "qtimer.h" -#include "qdebug.h" - -LightButton::LightButton(QWidget *parent) : QWidget(parent) -{ - text = ""; - textColor = QColor(255, 255, 255); - alarmColor = QColor(255, 107, 107); - normalColor = QColor(10, 10, 10); - - borderOutColorStart = QColor(255, 255, 255); - borderOutColorEnd = QColor(166, 166, 166); - - borderInColorStart = QColor(166, 166, 166); - borderInColorEnd = QColor(255, 255, 255); - - bgColor = QColor(100, 184, 255); - - showRect = false; - showOverlay = true; - overlayColor = QColor(255, 255, 255); - - canMove = false; - this->installEventFilter(this); - - isAlarm = false; - timerAlarm = new QTimer(this); - connect(timerAlarm, SIGNAL(timeout()), this, SLOT(alarm())); - timerAlarm->setInterval(500); - - //setFont(QFont("Arial", 8)); -} - -bool LightButton::eventFilter(QObject *watched, QEvent *event) -{ - if (canMove) { - static QPoint lastPoint; - static bool pressed = false; - QMouseEvent *mouseEvent = static_cast(event); - - if (mouseEvent->type() == QEvent::MouseButtonPress) { - if (this->rect().contains(mouseEvent->pos()) && (mouseEvent->button() == Qt::LeftButton)) { - lastPoint = mouseEvent->pos(); - pressed = true; - } - } else if (mouseEvent->type() == QEvent::MouseMove && pressed) { - int dx = mouseEvent->pos().x() - lastPoint.x(); - int dy = mouseEvent->pos().y() - lastPoint.y(); - this->move(this->x() + dx, this->y() + dy); - } else if (mouseEvent->type() == QEvent::MouseButtonRelease && pressed) { - pressed = false; - } - } - - return QWidget::eventFilter(watched, event); -} - -void LightButton::paintEvent(QPaintEvent *) -{ - int width = this->width(); - int height = this->height(); - int side = qMin(width, height); - - //绘制准备工作,启用反锯齿,平移坐标轴中心,等比例缩放 - QPainter painter(this); - painter.setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing); - - if (showRect) { - //绘制矩形区域 - painter.setPen(Qt::NoPen); - painter.setBrush(bgColor); - painter.drawRoundedRect(this->rect(), 5, 5); - - //绘制文字 - if (!text.isEmpty()) { - QFont font; - font.setPixelSize(side - 20); - painter.setFont(font); - painter.setPen(textColor); - painter.drawText(this->rect(), Qt::AlignCenter, text); - } - } else { - painter.translate(width / 2, height / 2); - painter.scale(side / 200.0, side / 200.0); - - //绘制外边框 - drawBorderOut(&painter); - //绘制内边框 - drawBorderIn(&painter); - //绘制内部指示颜色 - drawBg(&painter); - //绘制居中文字 - drawText(&painter); - //绘制遮罩层 - drawOverlay(&painter); - } -} - -void LightButton::drawBorderOut(QPainter *painter) -{ - int radius = 99; - painter->save(); - painter->setPen(Qt::NoPen); - QLinearGradient borderGradient(0, -radius, 0, radius); - borderGradient.setColorAt(0, borderOutColorStart); - borderGradient.setColorAt(1, borderOutColorEnd); - painter->setBrush(borderGradient); - painter->drawEllipse(-radius, -radius, radius * 2, radius * 2); - painter->restore(); -} - -void LightButton::drawBorderIn(QPainter *painter) -{ - int radius = 90; - painter->save(); - painter->setPen(Qt::NoPen); - QLinearGradient borderGradient(0, -radius, 0, radius); - borderGradient.setColorAt(0, borderInColorStart); - borderGradient.setColorAt(1, borderInColorEnd); - painter->setBrush(borderGradient); - painter->drawEllipse(-radius, -radius, radius * 2, radius * 2); - painter->restore(); -} - -void LightButton::drawBg(QPainter *painter) -{ - int radius = 80; - painter->save(); - painter->setPen(Qt::NoPen); - painter->setBrush(bgColor); - painter->drawEllipse(-radius, -radius, radius * 2, radius * 2); - painter->restore(); -} - -void LightButton::drawText(QPainter *painter) -{ - if (text.isEmpty()) { - return; - } - - int radius = 100; - painter->save(); - - QFont font; - font.setPixelSize(85); - painter->setFont(font); - painter->setPen(textColor); - QRect rect(-radius, -radius, radius * 2, radius * 2); - painter->drawText(rect, Qt::AlignCenter, text); - painter->restore(); -} - -void LightButton::drawOverlay(QPainter *painter) -{ - if (!showOverlay) { - return; - } - - int radius = 80; - painter->save(); - painter->setPen(Qt::NoPen); - - QPainterPath smallCircle; - QPainterPath bigCircle; - radius -= 1; - smallCircle.addEllipse(-radius, -radius, radius * 2, radius * 2); - radius *= 2; - bigCircle.addEllipse(-radius, -radius + 140, radius * 2, radius * 2); - - //高光的形状为小圆扣掉大圆的部分 - QPainterPath highlight = smallCircle - bigCircle; - - QLinearGradient linearGradient(0, -radius / 2, 0, 0); - overlayColor.setAlpha(100); - linearGradient.setColorAt(0.0, overlayColor); - overlayColor.setAlpha(30); - linearGradient.setColorAt(1.0, overlayColor); - painter->setBrush(linearGradient); - painter->rotate(-20); - painter->drawPath(highlight); - - painter->restore(); -} - -QString LightButton::getText() const -{ - return this->text; -} - -QColor LightButton::getTextColor() const -{ - return this->textColor; -} - -QColor LightButton::getAlarmColor() const -{ - return this->alarmColor; -} - -QColor LightButton::getNormalColor() const -{ - return this->normalColor; -} - -QColor LightButton::getBorderOutColorStart() const -{ - return this->borderOutColorStart; -} - -QColor LightButton::getBorderOutColorEnd() const -{ - return this->borderOutColorEnd; -} - -QColor LightButton::getBorderInColorStart() const -{ - return this->borderInColorStart; -} - -QColor LightButton::getBorderInColorEnd() const -{ - return this->borderInColorEnd; -} - -QColor LightButton::getBgColor() const -{ - return this->bgColor; -} - -bool LightButton::getCanMove() const -{ - return this->canMove; -} - -bool LightButton::getShowRect() const -{ - return this->showRect; -} - -bool LightButton::getShowOverlay() const -{ - return this->showOverlay; -} - -QColor LightButton::getOverlayColor() const -{ - return this->overlayColor; -} - -QSize LightButton::sizeHint() const -{ - return QSize(100, 100); -} - -QSize LightButton::minimumSizeHint() const -{ - return QSize(10, 10); -} - -void LightButton::setText(const QString &text) -{ - if (this->text != text) { - this->text = text; - this->update(); - } -} - -void LightButton::setTextColor(const QColor &textColor) -{ - if (this->textColor != textColor) { - this->textColor = textColor; - this->update(); - } -} - -void LightButton::setAlarmColor(const QColor &alarmColor) -{ - if (this->alarmColor != alarmColor) { - this->alarmColor = alarmColor; - this->update(); - } -} - -void LightButton::setNormalColor(const QColor &normalColor) -{ - if (this->normalColor != normalColor) { - this->normalColor = normalColor; - this->update(); - } -} - -void LightButton::setBorderOutColorStart(const QColor &borderOutColorStart) -{ - if (this->borderOutColorStart != borderOutColorStart) { - this->borderOutColorStart = borderOutColorStart; - this->update(); - } -} - -void LightButton::setBorderOutColorEnd(const QColor &borderOutColorEnd) -{ - if (this->borderOutColorEnd != borderOutColorEnd) { - this->borderOutColorEnd = borderOutColorEnd; - this->update(); - } -} - -void LightButton::setBorderInColorStart(const QColor &borderInColorStart) -{ - if (this->borderInColorStart != borderInColorStart) { - this->borderInColorStart = borderInColorStart; - this->update(); - } -} - -void LightButton::setBorderInColorEnd(const QColor &borderInColorEnd) -{ - if (this->borderInColorEnd != borderInColorEnd) { - this->borderInColorEnd = borderInColorEnd; - this->update(); - } -} - -void LightButton::setBgColor(const QColor &bgColor) -{ - if (this->bgColor != bgColor) { - this->bgColor = bgColor; - this->update(); - } -} - -void LightButton::setCanMove(bool canMove) -{ - if (this->canMove != canMove) { - this->canMove = canMove; - this->update(); - } -} - -void LightButton::setShowRect(bool showRect) -{ - if (this->showRect != showRect) { - this->showRect = showRect; - this->update(); - } -} - -void LightButton::setShowOverlay(bool showOverlay) -{ - if (this->showOverlay != showOverlay) { - this->showOverlay = showOverlay; - this->update(); - } -} - -void LightButton::setOverlayColor(const QColor &overlayColor) -{ - if (this->overlayColor != overlayColor) { - this->overlayColor = overlayColor; - this->update(); - } -} - -void LightButton::setGreen() -{ - textColor = QColor(255, 255, 255); - setBgColor(QColor(0, 166, 0)); -} - -void LightButton::setRed() -{ - textColor = QColor(255, 255, 255); - setBgColor(QColor(255, 0, 0)); -} - -void LightButton::setYellow() -{ - textColor = QColor(25, 50, 7); - setBgColor(QColor(238, 238, 0)); -} - -void LightButton::setBlack() -{ - textColor = QColor(255, 255, 255); - setBgColor(QColor(10, 10, 10)); -} - -void LightButton::setGray() -{ - textColor = QColor(255, 255, 255); - setBgColor(QColor(129, 129, 129)); -} - -void LightButton::setBlue() -{ - textColor = QColor(255, 255, 255); - setBgColor(QColor(0, 0, 166)); -} - -void LightButton::setLightBlue() -{ - textColor = QColor(255, 255, 255); - setBgColor(QColor(100, 184, 255)); -} - -void LightButton::setLightRed() -{ - textColor = QColor(255, 255, 255); - setBgColor(QColor(255, 107, 107)); -} - -void LightButton::setLightGreen() -{ - textColor = QColor(255, 255, 255); - setBgColor(QColor(24, 189, 155)); -} - -void LightButton::startAlarm() -{ - if (!timerAlarm->isActive()) { - timerAlarm->start(); - } -} - -void LightButton::stopAlarm() -{ - if (timerAlarm->isActive()) { - timerAlarm->stop(); - } -} - -void LightButton::alarm() -{ - if (isAlarm) { - textColor = QColor(255, 255, 255); - bgColor = normalColor; - } else { - textColor = QColor(255, 255, 255); - bgColor = alarmColor; - } - - this->update(); - isAlarm = !isAlarm; -} +#pragma execution_character_set("utf-8") + +#include "lightbutton.h" +#include "qpainter.h" +#include "qpainterpath.h" +#include "qevent.h" +#include "qtimer.h" +#include "qdebug.h" + +LightButton::LightButton(QWidget *parent) : QWidget(parent) +{ + text = ""; + textColor = QColor(255, 255, 255); + alarmColor = QColor(255, 107, 107); + normalColor = QColor(10, 10, 10); + + borderOutColorStart = QColor(255, 255, 255); + borderOutColorEnd = QColor(166, 166, 166); + + borderInColorStart = QColor(166, 166, 166); + borderInColorEnd = QColor(255, 255, 255); + + bgColor = QColor(100, 184, 255); + + showRect = false; + showOverlay = true; + overlayColor = QColor(255, 255, 255); + + canMove = false; + this->installEventFilter(this); + + isAlarm = false; + timerAlarm = new QTimer(this); + connect(timerAlarm, SIGNAL(timeout()), this, SLOT(alarm())); + timerAlarm->setInterval(500); + + //setFont(QFont("Arial", 8)); +} + +bool LightButton::eventFilter(QObject *watched, QEvent *event) +{ + if (canMove) { + static QPoint lastPoint; + static bool pressed = false; + QMouseEvent *mouseEvent = static_cast(event); + + if (mouseEvent->type() == QEvent::MouseButtonPress) { + if (this->rect().contains(mouseEvent->pos()) && (mouseEvent->button() == Qt::LeftButton)) { + lastPoint = mouseEvent->pos(); + pressed = true; + } + } else if (mouseEvent->type() == QEvent::MouseMove && pressed) { + int dx = mouseEvent->pos().x() - lastPoint.x(); + int dy = mouseEvent->pos().y() - lastPoint.y(); + this->move(this->x() + dx, this->y() + dy); + } else if (mouseEvent->type() == QEvent::MouseButtonRelease && pressed) { + pressed = false; + } + } + + return QWidget::eventFilter(watched, event); +} + +void LightButton::paintEvent(QPaintEvent *) +{ + int width = this->width(); + int height = this->height(); + int side = qMin(width, height); + + //绘制准备工作,启用反锯齿,平移坐标轴中心,等比例缩放 + QPainter painter(this); + painter.setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing); + + if (showRect) { + //绘制矩形区域 + painter.setPen(Qt::NoPen); + painter.setBrush(bgColor); + painter.drawRoundedRect(this->rect(), 5, 5); + + //绘制文字 + if (!text.isEmpty()) { + QFont font; + font.setPixelSize(side - 20); + painter.setFont(font); + painter.setPen(textColor); + painter.drawText(this->rect(), Qt::AlignCenter, text); + } + } else { + painter.translate(width / 2, height / 2); + painter.scale(side / 200.0, side / 200.0); + + //绘制外边框 + drawBorderOut(&painter); + //绘制内边框 + drawBorderIn(&painter); + //绘制内部指示颜色 + drawBg(&painter); + //绘制居中文字 + drawText(&painter); + //绘制遮罩层 + drawOverlay(&painter); + } +} + +void LightButton::drawBorderOut(QPainter *painter) +{ + int radius = 99; + painter->save(); + painter->setPen(Qt::NoPen); + QLinearGradient borderGradient(0, -radius, 0, radius); + borderGradient.setColorAt(0, borderOutColorStart); + borderGradient.setColorAt(1, borderOutColorEnd); + painter->setBrush(borderGradient); + painter->drawEllipse(-radius, -radius, radius * 2, radius * 2); + painter->restore(); +} + +void LightButton::drawBorderIn(QPainter *painter) +{ + int radius = 90; + painter->save(); + painter->setPen(Qt::NoPen); + QLinearGradient borderGradient(0, -radius, 0, radius); + borderGradient.setColorAt(0, borderInColorStart); + borderGradient.setColorAt(1, borderInColorEnd); + painter->setBrush(borderGradient); + painter->drawEllipse(-radius, -radius, radius * 2, radius * 2); + painter->restore(); +} + +void LightButton::drawBg(QPainter *painter) +{ + int radius = 80; + painter->save(); + painter->setPen(Qt::NoPen); + painter->setBrush(bgColor); + painter->drawEllipse(-radius, -radius, radius * 2, radius * 2); + painter->restore(); +} + +void LightButton::drawText(QPainter *painter) +{ + if (text.isEmpty()) { + return; + } + + int radius = 100; + painter->save(); + + QFont font; + font.setPixelSize(85); + painter->setFont(font); + painter->setPen(textColor); + QRect rect(-radius, -radius, radius * 2, radius * 2); + painter->drawText(rect, Qt::AlignCenter, text); + painter->restore(); +} + +void LightButton::drawOverlay(QPainter *painter) +{ + if (!showOverlay) { + return; + } + + int radius = 80; + painter->save(); + painter->setPen(Qt::NoPen); + + QPainterPath smallCircle; + QPainterPath bigCircle; + radius -= 1; + smallCircle.addEllipse(-radius, -radius, radius * 2, radius * 2); + radius *= 2; + bigCircle.addEllipse(-radius, -radius + 140, radius * 2, radius * 2); + + //高光的形状为小圆扣掉大圆的部分 + QPainterPath highlight = smallCircle - bigCircle; + + QLinearGradient linearGradient(0, -radius / 2, 0, 0); + overlayColor.setAlpha(100); + linearGradient.setColorAt(0.0, overlayColor); + overlayColor.setAlpha(30); + linearGradient.setColorAt(1.0, overlayColor); + painter->setBrush(linearGradient); + painter->rotate(-20); + painter->drawPath(highlight); + + painter->restore(); +} + +QString LightButton::getText() const +{ + return this->text; +} + +QColor LightButton::getTextColor() const +{ + return this->textColor; +} + +QColor LightButton::getAlarmColor() const +{ + return this->alarmColor; +} + +QColor LightButton::getNormalColor() const +{ + return this->normalColor; +} + +QColor LightButton::getBorderOutColorStart() const +{ + return this->borderOutColorStart; +} + +QColor LightButton::getBorderOutColorEnd() const +{ + return this->borderOutColorEnd; +} + +QColor LightButton::getBorderInColorStart() const +{ + return this->borderInColorStart; +} + +QColor LightButton::getBorderInColorEnd() const +{ + return this->borderInColorEnd; +} + +QColor LightButton::getBgColor() const +{ + return this->bgColor; +} + +bool LightButton::getCanMove() const +{ + return this->canMove; +} + +bool LightButton::getShowRect() const +{ + return this->showRect; +} + +bool LightButton::getShowOverlay() const +{ + return this->showOverlay; +} + +QColor LightButton::getOverlayColor() const +{ + return this->overlayColor; +} + +QSize LightButton::sizeHint() const +{ + return QSize(100, 100); +} + +QSize LightButton::minimumSizeHint() const +{ + return QSize(10, 10); +} + +void LightButton::setText(const QString &text) +{ + if (this->text != text) { + this->text = text; + this->update(); + } +} + +void LightButton::setTextColor(const QColor &textColor) +{ + if (this->textColor != textColor) { + this->textColor = textColor; + this->update(); + } +} + +void LightButton::setAlarmColor(const QColor &alarmColor) +{ + if (this->alarmColor != alarmColor) { + this->alarmColor = alarmColor; + this->update(); + } +} + +void LightButton::setNormalColor(const QColor &normalColor) +{ + if (this->normalColor != normalColor) { + this->normalColor = normalColor; + this->update(); + } +} + +void LightButton::setBorderOutColorStart(const QColor &borderOutColorStart) +{ + if (this->borderOutColorStart != borderOutColorStart) { + this->borderOutColorStart = borderOutColorStart; + this->update(); + } +} + +void LightButton::setBorderOutColorEnd(const QColor &borderOutColorEnd) +{ + if (this->borderOutColorEnd != borderOutColorEnd) { + this->borderOutColorEnd = borderOutColorEnd; + this->update(); + } +} + +void LightButton::setBorderInColorStart(const QColor &borderInColorStart) +{ + if (this->borderInColorStart != borderInColorStart) { + this->borderInColorStart = borderInColorStart; + this->update(); + } +} + +void LightButton::setBorderInColorEnd(const QColor &borderInColorEnd) +{ + if (this->borderInColorEnd != borderInColorEnd) { + this->borderInColorEnd = borderInColorEnd; + this->update(); + } +} + +void LightButton::setBgColor(const QColor &bgColor) +{ + if (this->bgColor != bgColor) { + this->bgColor = bgColor; + this->update(); + } +} + +void LightButton::setCanMove(bool canMove) +{ + if (this->canMove != canMove) { + this->canMove = canMove; + this->update(); + } +} + +void LightButton::setShowRect(bool showRect) +{ + if (this->showRect != showRect) { + this->showRect = showRect; + this->update(); + } +} + +void LightButton::setShowOverlay(bool showOverlay) +{ + if (this->showOverlay != showOverlay) { + this->showOverlay = showOverlay; + this->update(); + } +} + +void LightButton::setOverlayColor(const QColor &overlayColor) +{ + if (this->overlayColor != overlayColor) { + this->overlayColor = overlayColor; + this->update(); + } +} + +void LightButton::setGreen() +{ + textColor = QColor(255, 255, 255); + setBgColor(QColor(0, 166, 0)); +} + +void LightButton::setRed() +{ + textColor = QColor(255, 255, 255); + setBgColor(QColor(255, 0, 0)); +} + +void LightButton::setYellow() +{ + textColor = QColor(25, 50, 7); + setBgColor(QColor(238, 238, 0)); +} + +void LightButton::setBlack() +{ + textColor = QColor(255, 255, 255); + setBgColor(QColor(10, 10, 10)); +} + +void LightButton::setGray() +{ + textColor = QColor(255, 255, 255); + setBgColor(QColor(129, 129, 129)); +} + +void LightButton::setBlue() +{ + textColor = QColor(255, 255, 255); + setBgColor(QColor(0, 0, 166)); +} + +void LightButton::setLightBlue() +{ + textColor = QColor(255, 255, 255); + setBgColor(QColor(100, 184, 255)); +} + +void LightButton::setLightRed() +{ + textColor = QColor(255, 255, 255); + setBgColor(QColor(255, 107, 107)); +} + +void LightButton::setLightGreen() +{ + textColor = QColor(255, 255, 255); + setBgColor(QColor(24, 189, 155)); +} + +void LightButton::startAlarm() +{ + if (!timerAlarm->isActive()) { + timerAlarm->start(); + } +} + +void LightButton::stopAlarm() +{ + if (timerAlarm->isActive()) { + timerAlarm->stop(); + } +} + +void LightButton::alarm() +{ + if (isAlarm) { + textColor = QColor(255, 255, 255); + bgColor = normalColor; + } else { + textColor = QColor(255, 255, 255); + bgColor = alarmColor; + } + + this->update(); + isAlarm = !isAlarm; +} diff --git a/lightbutton/lightbutton.h b/control/lightbutton/lightbutton.h similarity index 97% rename from lightbutton/lightbutton.h rename to control/lightbutton/lightbutton.h index 78287cc..6609955 100644 --- a/lightbutton/lightbutton.h +++ b/control/lightbutton/lightbutton.h @@ -1,152 +1,152 @@ -#ifndef LIGHTBUTTON_H -#define LIGHTBUTTON_H - -/** - * 高亮发光按钮控件 作者:feiyangqingyun(QQ:517216493) 2016-10-16 - * 1. 可设置文本,居中显示。 - * 2. 可设置文本颜色。 - * 3. 可设置外边框渐变颜色。 - * 4. 可设置里边框渐变颜色。 - * 5. 可设置背景色。 - * 6. 可直接调用内置的设置 绿色、红色、黄色、黑色、蓝色 等公有槽函数。 - * 7. 可设置是否在容器中可移动,当成一个对象使用。 - * 8. 可设置是否显示矩形。 - * 9. 可设置报警颜色、非报警颜色。 - * 10. 可控制启动报警和停止报警,报警时闪烁。 - */ - -#include - -#ifdef quc -class Q_DECL_EXPORT LightButton : public QWidget -#else -class LightButton : public QWidget -#endif - -{ - Q_OBJECT - - Q_PROPERTY(QString text READ getText WRITE setText) - Q_PROPERTY(QColor textColor READ getTextColor WRITE setTextColor) - Q_PROPERTY(QColor alarmColor READ getAlarmColor WRITE setAlarmColor) - Q_PROPERTY(QColor normalColor READ getNormalColor WRITE setNormalColor) - - Q_PROPERTY(QColor borderOutColorStart READ getBorderOutColorStart WRITE setBorderOutColorStart) - Q_PROPERTY(QColor borderOutColorEnd READ getBorderOutColorEnd WRITE setBorderOutColorEnd) - Q_PROPERTY(QColor borderInColorStart READ getBorderInColorStart WRITE setBorderInColorStart) - Q_PROPERTY(QColor borderInColorEnd READ getBorderInColorEnd WRITE setBorderInColorEnd) - Q_PROPERTY(QColor bgColor READ getBgColor WRITE setBgColor) - - Q_PROPERTY(bool canMove READ getCanMove WRITE setCanMove) - Q_PROPERTY(bool showRect READ getShowRect WRITE setShowRect) - Q_PROPERTY(bool showOverlay READ getShowOverlay WRITE setShowOverlay) - Q_PROPERTY(QColor overlayColor READ getOverlayColor WRITE setOverlayColor) - -public: - explicit LightButton(QWidget *parent = 0); - -protected: - bool eventFilter(QObject *watched, QEvent *event); - void paintEvent(QPaintEvent *); - void drawBorderOut(QPainter *painter); - void drawBorderIn(QPainter *painter); - void drawBg(QPainter *painter); - void drawText(QPainter *painter); - void drawOverlay(QPainter *painter); - -private: - QString text; //文本 - QColor textColor; //文字颜色 - QColor alarmColor; //报警颜色 - QColor normalColor; //正常颜色 - - QColor borderOutColorStart; //外边框渐变开始颜色 - QColor borderOutColorEnd; //外边框渐变结束颜色 - QColor borderInColorStart; //里边框渐变开始颜色 - QColor borderInColorEnd; //里边框渐变结束颜色 - QColor bgColor; //背景颜色 - - bool showRect; //显示成矩形 - bool canMove; //是否能够移动 - bool showOverlay; //是否显示遮罩层 - QColor overlayColor; //遮罩层颜色 - - bool isAlarm; //是否报警 - QTimer *timerAlarm; //定时器切换颜色 - -public: - QString getText() const; - QColor getTextColor() const; - QColor getAlarmColor() const; - QColor getNormalColor() const; - - QColor getBorderOutColorStart() const; - QColor getBorderOutColorEnd() const; - QColor getBorderInColorStart() const; - QColor getBorderInColorEnd() const; - QColor getBgColor() const; - - bool getCanMove() const; - bool getShowRect() const; - bool getShowOverlay() const; - QColor getOverlayColor() const; - - QSize sizeHint() const; - QSize minimumSizeHint() const; - -public Q_SLOTS: - //设置文本 - void setText(const QString &text); - //设置文本颜色 - void setTextColor(const QColor &textColor); - - //设置报警颜色+正常颜色 - void setAlarmColor(const QColor &alarmColor); - void setNormalColor(const QColor &normalColor); - - //设置外边框渐变颜色 - void setBorderOutColorStart(const QColor &borderOutColorStart); - void setBorderOutColorEnd(const QColor &borderOutColorEnd); - - //设置里边框渐变颜色 - void setBorderInColorStart(const QColor &borderInColorStart); - void setBorderInColorEnd(const QColor &borderInColorEnd); - - //设置背景色 - void setBgColor(const QColor &bgColor); - - //设置是否可移动 - void setCanMove(bool canMove); - //设置是否显示矩形 - void setShowRect(bool showRect); - //设置是否显示遮罩层 - void setShowOverlay(bool showOverlay); - //设置遮罩层颜色 - void setOverlayColor(const QColor &overlayColor); - - //设置为绿色 - void setGreen(); - //设置为红色 - void setRed(); - //设置为黄色 - void setYellow(); - //设置为黑色 - void setBlack(); - //设置为灰色 - void setGray(); - //设置为蓝色 - void setBlue(); - //设置为淡蓝色 - void setLightBlue(); - //设置为淡红色 - void setLightRed(); - //设置为淡绿色 - void setLightGreen(); - - //设置报警闪烁 - void startAlarm(); - void stopAlarm(); - void alarm(); -}; - -#endif // LIGHTBUTTON_H +#ifndef LIGHTBUTTON_H +#define LIGHTBUTTON_H + +/** + * 高亮发光按钮控件 作者:feiyangqingyun(QQ:517216493) 2016-10-16 + * 1. 可设置文本,居中显示。 + * 2. 可设置文本颜色。 + * 3. 可设置外边框渐变颜色。 + * 4. 可设置里边框渐变颜色。 + * 5. 可设置背景色。 + * 6. 可直接调用内置的设置 绿色、红色、黄色、黑色、蓝色 等公有槽函数。 + * 7. 可设置是否在容器中可移动,当成一个对象使用。 + * 8. 可设置是否显示矩形。 + * 9. 可设置报警颜色、非报警颜色。 + * 10. 可控制启动报警和停止报警,报警时闪烁。 + */ + +#include + +#ifdef quc +class Q_DECL_EXPORT LightButton : public QWidget +#else +class LightButton : public QWidget +#endif + +{ + Q_OBJECT + + Q_PROPERTY(QString text READ getText WRITE setText) + Q_PROPERTY(QColor textColor READ getTextColor WRITE setTextColor) + Q_PROPERTY(QColor alarmColor READ getAlarmColor WRITE setAlarmColor) + Q_PROPERTY(QColor normalColor READ getNormalColor WRITE setNormalColor) + + Q_PROPERTY(QColor borderOutColorStart READ getBorderOutColorStart WRITE setBorderOutColorStart) + Q_PROPERTY(QColor borderOutColorEnd READ getBorderOutColorEnd WRITE setBorderOutColorEnd) + Q_PROPERTY(QColor borderInColorStart READ getBorderInColorStart WRITE setBorderInColorStart) + Q_PROPERTY(QColor borderInColorEnd READ getBorderInColorEnd WRITE setBorderInColorEnd) + Q_PROPERTY(QColor bgColor READ getBgColor WRITE setBgColor) + + Q_PROPERTY(bool canMove READ getCanMove WRITE setCanMove) + Q_PROPERTY(bool showRect READ getShowRect WRITE setShowRect) + Q_PROPERTY(bool showOverlay READ getShowOverlay WRITE setShowOverlay) + Q_PROPERTY(QColor overlayColor READ getOverlayColor WRITE setOverlayColor) + +public: + explicit LightButton(QWidget *parent = 0); + +protected: + bool eventFilter(QObject *watched, QEvent *event); + void paintEvent(QPaintEvent *); + void drawBorderOut(QPainter *painter); + void drawBorderIn(QPainter *painter); + void drawBg(QPainter *painter); + void drawText(QPainter *painter); + void drawOverlay(QPainter *painter); + +private: + QString text; //文本 + QColor textColor; //文字颜色 + QColor alarmColor; //报警颜色 + QColor normalColor; //正常颜色 + + QColor borderOutColorStart; //外边框渐变开始颜色 + QColor borderOutColorEnd; //外边框渐变结束颜色 + QColor borderInColorStart; //里边框渐变开始颜色 + QColor borderInColorEnd; //里边框渐变结束颜色 + QColor bgColor; //背景颜色 + + bool showRect; //显示成矩形 + bool canMove; //是否能够移动 + bool showOverlay; //是否显示遮罩层 + QColor overlayColor; //遮罩层颜色 + + bool isAlarm; //是否报警 + QTimer *timerAlarm; //定时器切换颜色 + +public: + QString getText() const; + QColor getTextColor() const; + QColor getAlarmColor() const; + QColor getNormalColor() const; + + QColor getBorderOutColorStart() const; + QColor getBorderOutColorEnd() const; + QColor getBorderInColorStart() const; + QColor getBorderInColorEnd() const; + QColor getBgColor() const; + + bool getCanMove() const; + bool getShowRect() const; + bool getShowOverlay() const; + QColor getOverlayColor() const; + + QSize sizeHint() const; + QSize minimumSizeHint() const; + +public Q_SLOTS: + //设置文本 + void setText(const QString &text); + //设置文本颜色 + void setTextColor(const QColor &textColor); + + //设置报警颜色+正常颜色 + void setAlarmColor(const QColor &alarmColor); + void setNormalColor(const QColor &normalColor); + + //设置外边框渐变颜色 + void setBorderOutColorStart(const QColor &borderOutColorStart); + void setBorderOutColorEnd(const QColor &borderOutColorEnd); + + //设置里边框渐变颜色 + void setBorderInColorStart(const QColor &borderInColorStart); + void setBorderInColorEnd(const QColor &borderInColorEnd); + + //设置背景色 + void setBgColor(const QColor &bgColor); + + //设置是否可移动 + void setCanMove(bool canMove); + //设置是否显示矩形 + void setShowRect(bool showRect); + //设置是否显示遮罩层 + void setShowOverlay(bool showOverlay); + //设置遮罩层颜色 + void setOverlayColor(const QColor &overlayColor); + + //设置为绿色 + void setGreen(); + //设置为红色 + void setRed(); + //设置为黄色 + void setYellow(); + //设置为黑色 + void setBlack(); + //设置为灰色 + void setGray(); + //设置为蓝色 + void setBlue(); + //设置为淡蓝色 + void setLightBlue(); + //设置为淡红色 + void setLightRed(); + //设置为淡绿色 + void setLightGreen(); + + //设置报警闪烁 + void startAlarm(); + void stopAlarm(); + void alarm(); +}; + +#endif // LIGHTBUTTON_H diff --git a/lightbutton/lightbutton.pro b/control/lightbutton/lightbutton.pro similarity index 95% rename from lightbutton/lightbutton.pro rename to control/lightbutton/lightbutton.pro index ffca601..7c380ef 100644 --- a/lightbutton/lightbutton.pro +++ b/control/lightbutton/lightbutton.pro @@ -1,17 +1,17 @@ -QT += core gui -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat - -TARGET = lightbutton -TEMPLATE = app -DESTDIR = $$PWD/../bin -CONFIG += warn_off - -SOURCES += main.cpp -SOURCES += frmlightbutton.cpp -SOURCES += lightbutton.cpp - -HEADERS += frmlightbutton.h -HEADERS += lightbutton.h - -FORMS += frmlightbutton.ui +QT += core gui +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat + +TARGET = lightbutton +TEMPLATE = app +DESTDIR = $$PWD/../bin +CONFIG += warn_off + +SOURCES += main.cpp +SOURCES += frmlightbutton.cpp +SOURCES += lightbutton.cpp + +HEADERS += frmlightbutton.h +HEADERS += lightbutton.h + +FORMS += frmlightbutton.ui diff --git a/lightbutton/main.cpp b/control/lightbutton/main.cpp similarity index 96% rename from lightbutton/main.cpp rename to control/lightbutton/main.cpp index 85f0cf8..8235132 100644 --- a/lightbutton/main.cpp +++ b/control/lightbutton/main.cpp @@ -1,31 +1,31 @@ -#pragma execution_character_set("utf-8") - -#include "frmlightbutton.h" -#include -#include - -int main(int argc, char *argv[]) -{ - QApplication a(argc, argv); - a.setFont(QFont("Microsoft Yahei", 9)); - -#if (QT_VERSION < QT_VERSION_CHECK(5,0,0)) -#if _MSC_VER - QTextCodec *codec = QTextCodec::codecForName("gbk"); -#else - QTextCodec *codec = QTextCodec::codecForName("utf-8"); -#endif - QTextCodec::setCodecForLocale(codec); - QTextCodec::setCodecForCStrings(codec); - QTextCodec::setCodecForTr(codec); -#else - QTextCodec *codec = QTextCodec::codecForName("utf-8"); - QTextCodec::setCodecForLocale(codec); -#endif - - frmLightButton w; - w.setWindowTitle("高亮发光按钮"); - w.show(); - - return a.exec(); -} +#pragma execution_character_set("utf-8") + +#include "frmlightbutton.h" +#include +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + a.setFont(QFont("Microsoft Yahei", 9)); + +#if (QT_VERSION < QT_VERSION_CHECK(5,0,0)) +#if _MSC_VER + QTextCodec *codec = QTextCodec::codecForName("gbk"); +#else + QTextCodec *codec = QTextCodec::codecForName("utf-8"); +#endif + QTextCodec::setCodecForLocale(codec); + QTextCodec::setCodecForCStrings(codec); + QTextCodec::setCodecForTr(codec); +#else + QTextCodec *codec = QTextCodec::codecForName("utf-8"); + QTextCodec::setCodecForLocale(codec); +#endif + + frmLightButton w; + w.setWindowTitle("高亮发光按钮"); + w.show(); + + return a.exec(); +} diff --git a/lunarcalendarwidget/font/fontawesome-webfont.ttf b/control/navbutton/font/fontawesome-webfont.ttf similarity index 100% rename from lunarcalendarwidget/font/fontawesome-webfont.ttf rename to control/navbutton/font/fontawesome-webfont.ttf diff --git a/navbutton/frmnavbutton.cpp b/control/navbutton/frmnavbutton.cpp similarity index 100% rename from navbutton/frmnavbutton.cpp rename to control/navbutton/frmnavbutton.cpp diff --git a/navbutton/frmnavbutton.h b/control/navbutton/frmnavbutton.h similarity index 100% rename from navbutton/frmnavbutton.h rename to control/navbutton/frmnavbutton.h diff --git a/navbutton/frmnavbutton.ui b/control/navbutton/frmnavbutton.ui similarity index 100% rename from navbutton/frmnavbutton.ui rename to control/navbutton/frmnavbutton.ui diff --git a/core_qui/iconhelper.cpp b/control/navbutton/iconhelper.cpp similarity index 100% rename from core_qui/iconhelper.cpp rename to control/navbutton/iconhelper.cpp diff --git a/core_qui/iconhelper.h b/control/navbutton/iconhelper.h similarity index 100% rename from core_qui/iconhelper.h rename to control/navbutton/iconhelper.h diff --git a/navbutton/main.cpp b/control/navbutton/main.cpp similarity index 100% rename from navbutton/main.cpp rename to control/navbutton/main.cpp diff --git a/navbutton/main.qrc b/control/navbutton/main.qrc similarity index 100% rename from navbutton/main.qrc rename to control/navbutton/main.qrc diff --git a/navbutton/navbutton.cpp b/control/navbutton/navbutton.cpp similarity index 100% rename from navbutton/navbutton.cpp rename to control/navbutton/navbutton.cpp diff --git a/navbutton/navbutton.h b/control/navbutton/navbutton.h similarity index 100% rename from navbutton/navbutton.h rename to control/navbutton/navbutton.h diff --git a/navbutton/navbutton.pro b/control/navbutton/navbutton.pro similarity index 100% rename from navbutton/navbutton.pro rename to control/navbutton/navbutton.pro diff --git a/savelog/frmsavelog.cpp b/control/savelog/frmsavelog.cpp similarity index 99% rename from savelog/frmsavelog.cpp rename to control/savelog/frmsavelog.cpp index 1467ff3..26071cb 100644 --- a/savelog/frmsavelog.cpp +++ b/control/savelog/frmsavelog.cpp @@ -166,10 +166,6 @@ void frmSaveLog::on_cboxRow_currentIndexChanged(int index) void frmSaveLog::on_listType_itemPressed(QListWidgetItem *item) { - if (item <= 0) { - return; - } - //切换选中行状态 item->setCheckState(item->checkState() == Qt::Checked ? Qt::Unchecked : Qt::Checked); diff --git a/savelog/frmsavelog.h b/control/savelog/frmsavelog.h similarity index 100% rename from savelog/frmsavelog.h rename to control/savelog/frmsavelog.h diff --git a/savelog/frmsavelog.ui b/control/savelog/frmsavelog.ui similarity index 100% rename from savelog/frmsavelog.ui rename to control/savelog/frmsavelog.ui diff --git a/savelog/main.cpp b/control/savelog/main.cpp similarity index 100% rename from savelog/main.cpp rename to control/savelog/main.cpp diff --git a/savelog/savelog.cpp b/control/savelog/savelog.cpp similarity index 100% rename from savelog/savelog.cpp rename to control/savelog/savelog.cpp diff --git a/savelog/savelog.h b/control/savelog/savelog.h similarity index 100% rename from savelog/savelog.h rename to control/savelog/savelog.h diff --git a/savelog/savelog.pro b/control/savelog/savelog.pro similarity index 100% rename from savelog/savelog.pro rename to control/savelog/savelog.pro diff --git a/saveruntime/frmsaveruntime.cpp b/control/saveruntime/frmsaveruntime.cpp similarity index 100% rename from saveruntime/frmsaveruntime.cpp rename to control/saveruntime/frmsaveruntime.cpp diff --git a/saveruntime/frmsaveruntime.h b/control/saveruntime/frmsaveruntime.h similarity index 100% rename from saveruntime/frmsaveruntime.h rename to control/saveruntime/frmsaveruntime.h diff --git a/saveruntime/frmsaveruntime.ui b/control/saveruntime/frmsaveruntime.ui similarity index 100% rename from saveruntime/frmsaveruntime.ui rename to control/saveruntime/frmsaveruntime.ui diff --git a/saveruntime/main.cpp b/control/saveruntime/main.cpp similarity index 100% rename from saveruntime/main.cpp rename to control/saveruntime/main.cpp diff --git a/saveruntime/saveruntime.cpp b/control/saveruntime/saveruntime.cpp similarity index 100% rename from saveruntime/saveruntime.cpp rename to control/saveruntime/saveruntime.cpp diff --git a/saveruntime/saveruntime.h b/control/saveruntime/saveruntime.h similarity index 100% rename from saveruntime/saveruntime.h rename to control/saveruntime/saveruntime.h diff --git a/saveruntime/saveruntime.pro b/control/saveruntime/saveruntime.pro similarity index 100% rename from saveruntime/saveruntime.pro rename to control/saveruntime/saveruntime.pro diff --git a/smoothcurve/frmsmoothcurve.cpp b/control/smoothcurve/frmsmoothcurve.cpp similarity index 100% rename from smoothcurve/frmsmoothcurve.cpp rename to control/smoothcurve/frmsmoothcurve.cpp diff --git a/smoothcurve/frmsmoothcurve.h b/control/smoothcurve/frmsmoothcurve.h similarity index 100% rename from smoothcurve/frmsmoothcurve.h rename to control/smoothcurve/frmsmoothcurve.h diff --git a/smoothcurve/frmsmoothcurve.ui b/control/smoothcurve/frmsmoothcurve.ui similarity index 100% rename from smoothcurve/frmsmoothcurve.ui rename to control/smoothcurve/frmsmoothcurve.ui diff --git a/smoothcurve/main.cpp b/control/smoothcurve/main.cpp similarity index 100% rename from smoothcurve/main.cpp rename to control/smoothcurve/main.cpp diff --git a/smoothcurve/smoothcurve.cpp b/control/smoothcurve/smoothcurve.cpp similarity index 100% rename from smoothcurve/smoothcurve.cpp rename to control/smoothcurve/smoothcurve.cpp diff --git a/smoothcurve/smoothcurve.h b/control/smoothcurve/smoothcurve.h similarity index 100% rename from smoothcurve/smoothcurve.h rename to control/smoothcurve/smoothcurve.h diff --git a/smoothcurve/smoothcurve.pro b/control/smoothcurve/smoothcurve.pro similarity index 100% rename from smoothcurve/smoothcurve.pro rename to control/smoothcurve/smoothcurve.pro diff --git a/zhtopy/image/zhtopy.txt b/control/zhtopy/data/zhtopy.txt similarity index 100% rename from zhtopy/image/zhtopy.txt rename to control/zhtopy/data/zhtopy.txt diff --git a/zhtopy/frmzhtopy.cpp b/control/zhtopy/frmzhtopy.cpp similarity index 89% rename from zhtopy/frmzhtopy.cpp rename to control/zhtopy/frmzhtopy.cpp index 74045ec..3228e59 100644 --- a/zhtopy/frmzhtopy.cpp +++ b/control/zhtopy/frmzhtopy.cpp @@ -5,7 +5,7 @@ frmZhToPY::frmZhToPY(QWidget *parent) : QWidget(parent), ui(new Ui::frmZhToPY) { ui->setupUi(this); - ZhToPY::Instance()->loadPY(":/image/zhtopy.txt"); + ZhToPY::Instance()->loadPY(":/data/zhtopy.txt"); } frmZhToPY::~frmZhToPY() diff --git a/zhtopy/frmzhtopy.h b/control/zhtopy/frmzhtopy.h similarity index 100% rename from zhtopy/frmzhtopy.h rename to control/zhtopy/frmzhtopy.h diff --git a/zhtopy/frmzhtopy.ui b/control/zhtopy/frmzhtopy.ui similarity index 100% rename from zhtopy/frmzhtopy.ui rename to control/zhtopy/frmzhtopy.ui diff --git a/zhtopy/main.cpp b/control/zhtopy/main.cpp similarity index 100% rename from zhtopy/main.cpp rename to control/zhtopy/main.cpp diff --git a/netserver/qrc/main.qrc b/control/zhtopy/main.qrc similarity index 60% rename from netserver/qrc/main.qrc rename to control/zhtopy/main.qrc index 91c2747..880a2d4 100644 --- a/netserver/qrc/main.qrc +++ b/control/zhtopy/main.qrc @@ -1,5 +1,5 @@ - main.ico + data/zhtopy.txt diff --git a/zhtopy/zhtopy.cpp b/control/zhtopy/zhtopy.cpp similarity index 100% rename from zhtopy/zhtopy.cpp rename to control/zhtopy/zhtopy.cpp diff --git a/zhtopy/zhtopy.h b/control/zhtopy/zhtopy.h similarity index 100% rename from zhtopy/zhtopy.h rename to control/zhtopy/zhtopy.h diff --git a/zhtopy/zhtopy.pro b/control/zhtopy/zhtopy.pro similarity index 100% rename from zhtopy/zhtopy.pro rename to control/zhtopy/zhtopy.pro diff --git a/core_qui/quiconfig.cpp b/core_qui/quiconfig.cpp deleted file mode 100644 index 9fe51fd..0000000 --- a/core_qui/quiconfig.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "quiconfig.h" - -int QUIConfig::IconMain = 0xf072; -int QUIConfig::IconMenu = 0xf0d7; -int QUIConfig::IconMin = 0xf068; -int QUIConfig::IconMax = 0xf2d2; -int QUIConfig::IconNormal = 0xf2d0; -int QUIConfig::IconClose = 0xf00d; - -#ifdef __arm__ -QString QUIConfig::FontName = "WenQuanYi Micro Hei"; -int QUIConfig::FontSize = 18; -#else -QString QUIConfig::FontName = "Microsoft Yahei"; -int QUIConfig::FontSize = 12; -#endif - -QString QUIConfig::TextColor = "#000000"; -QString QUIConfig::PanelColor = "#F0F0F0"; -QString QUIConfig::BorderColor = "#000000"; -QString QUIConfig::NormalColorStart = "#F0F0F0"; -QString QUIConfig::NormalColorEnd = "#F0F0F0"; -QString QUIConfig::DarkColorStart = "#F0F0F0"; -QString QUIConfig::DarkColorEnd = "#F0F0F0"; -QString QUIConfig::HighColor = "#00BB9E"; diff --git a/core_qui/quiconfig.h b/core_qui/quiconfig.h deleted file mode 100644 index b3a5d27..0000000 --- a/core_qui/quiconfig.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef QUICONFIG_H -#define QUICONFIG_H - -#include "quihead.h" - -class QUIConfig -{ -public: - //全局图标 - static int IconMain; //标题栏左上角图标 - static int IconMenu; //下拉菜单图标 - static int IconMin; //最小化图标 - static int IconMax; //最大化图标 - static int IconNormal; //还原图标 - static int IconClose; //关闭图标 - - //全局字体 - static QString FontName; //全局字体名称 - static int FontSize; //全局字体大小 - - //样式表颜色值 - static QString TextColor; //文字颜色 - static QString PanelColor; //面板颜色 - static QString BorderColor; //边框颜色 - static QString NormalColorStart;//正常状态开始颜色 - static QString NormalColorEnd; //正常状态结束颜色 - static QString DarkColorStart; //加深状态开始颜色 - static QString DarkColorEnd; //加深状态结束颜色 - static QString HighColor; //高亮颜色 -}; - -#endif // QUICONFIG_H diff --git a/core_qui/quidateselect.cpp b/core_qui/quidateselect.cpp deleted file mode 100644 index 33c32f5..0000000 --- a/core_qui/quidateselect.cpp +++ /dev/null @@ -1,273 +0,0 @@ -#include "quidateselect.h" - -QScopedPointer QUIDateSelect::self; -QUIDateSelect *QUIDateSelect::Instance() -{ - if (self.isNull()) { - static QMutex mutex; - QMutexLocker locker(&mutex); - if (self.isNull()) { - self.reset(new QUIDateSelect); - } - } - - return self.data(); -} - -QUIDateSelect::QUIDateSelect(QWidget *parent) : QDialog(parent) -{ - this->initControl(); - this->initForm(); -} - -QUIDateSelect::~QUIDateSelect() -{ - delete widgetMain; -} - -void QUIDateSelect::showEvent(QShowEvent *) -{ - QUIHelper::setIconBtn(btnOk, ":/image/btn_ok.png", 0xf00c); - QUIHelper::setIconBtn(btnClose, ":/image/btn_close.png", 0xf00d); - QUIHelper::setFormInCenter(this); - this->activateWindow(); -} - -bool QUIDateSelect::eventFilter(QObject *watched, QEvent *event) -{ - static QPoint mousePoint; - static bool mousePressed = false; - - QMouseEvent *mouseEvent = static_cast(event); - if (mouseEvent->type() == QEvent::MouseButtonPress) { - if (mouseEvent->button() == Qt::LeftButton) { - mousePressed = true; - mousePoint = mouseEvent->globalPos() - this->pos(); - return true; - } - } else if (mouseEvent->type() == QEvent::MouseButtonRelease) { - mousePressed = false; - return true; - } else if (mouseEvent->type() == QEvent::MouseMove) { - if (mousePressed) { - this->move(mouseEvent->globalPos() - mousePoint); - return true; - } - } - - return QWidget::eventFilter(watched, event); -} - -void QUIDateSelect::initControl() -{ - this->setObjectName(QString::fromUtf8("QUIDateSelect")); - - verticalLayout = new QVBoxLayout(this); - verticalLayout->setSpacing(0); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); - verticalLayout->setContentsMargins(1, 1, 1, 1); - - widgetTitle = new QWidget(this); - widgetTitle->setObjectName(QString::fromUtf8("QUIWidgetTitle")); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); - sizePolicy.setHorizontalStretch(0); - sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(widgetTitle->sizePolicy().hasHeightForWidth()); - widgetTitle->setSizePolicy(sizePolicy); - - horizontalLayout1 = new QHBoxLayout(widgetTitle); - horizontalLayout1->setSpacing(0); - horizontalLayout1->setObjectName(QString::fromUtf8("horizontalLayout1")); - horizontalLayout1->setContentsMargins(0, 0, 0, 0); - - labIco = new QLabel(widgetTitle); - labIco->setObjectName(QString::fromUtf8("QUILabIco")); - QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::Preferred); - sizePolicy1.setHorizontalStretch(0); - sizePolicy1.setVerticalStretch(0); - sizePolicy1.setHeightForWidth(labIco->sizePolicy().hasHeightForWidth()); - labIco->setSizePolicy(sizePolicy1); - labIco->setAlignment(Qt::AlignCenter); - horizontalLayout1->addWidget(labIco); - - labTitle = new QLabel(widgetTitle); - labTitle->setObjectName(QString::fromUtf8("QUILabTitle")); - QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Preferred); - sizePolicy2.setHorizontalStretch(0); - sizePolicy2.setVerticalStretch(0); - sizePolicy2.setHeightForWidth(labTitle->sizePolicy().hasHeightForWidth()); - labTitle->setSizePolicy(sizePolicy2); - labTitle->setAlignment(Qt::AlignLeading | Qt::AlignLeft | Qt::AlignVCenter); - horizontalLayout1->addWidget(labTitle); - - widgetMenu = new QWidget(widgetTitle); - widgetMenu->setObjectName(QString::fromUtf8("QUIWidgetMenu")); - sizePolicy1.setHeightForWidth(widgetMenu->sizePolicy().hasHeightForWidth()); - widgetMenu->setSizePolicy(sizePolicy1); - - horizontalLayout = new QHBoxLayout(widgetMenu); - horizontalLayout->setSpacing(0); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); - horizontalLayout->setContentsMargins(0, 0, 0, 0); - - btnMenu_Close = new QPushButton(widgetMenu); - btnMenu_Close->setObjectName(QString::fromUtf8("btnMenu_Close")); - QSizePolicy sizePolicy3(QSizePolicy::Minimum, QSizePolicy::Expanding); - sizePolicy3.setHorizontalStretch(0); - sizePolicy3.setVerticalStretch(0); - sizePolicy3.setHeightForWidth(btnMenu_Close->sizePolicy().hasHeightForWidth()); - btnMenu_Close->setSizePolicy(sizePolicy3); - btnMenu_Close->setCursor(QCursor(Qt::ArrowCursor)); - btnMenu_Close->setFocusPolicy(Qt::NoFocus); - btnMenu_Close->setFlat(true); - - horizontalLayout->addWidget(btnMenu_Close); - horizontalLayout1->addWidget(widgetMenu); - verticalLayout->addWidget(widgetTitle); - - widgetMain = new QWidget(this); - widgetMain->setObjectName(QString::fromUtf8("QUIWidgetMain")); - - verticalLayout1 = new QVBoxLayout(widgetMain); - verticalLayout1->setSpacing(6); - verticalLayout1->setObjectName(QString::fromUtf8("verticalLayout1")); - verticalLayout1->setContentsMargins(6, 6, 6, 6); - - frame = new QFrame(widgetMain); - frame->setObjectName(QString::fromUtf8("QUIFrame")); - frame->setFrameShape(QFrame::Box); - frame->setFrameShadow(QFrame::Sunken); - - gridLayout = new QGridLayout(frame); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - labStart = new QLabel(frame); - labStart->setObjectName(QString::fromUtf8("QUILabStart")); - labStart->setFocusPolicy(Qt::TabFocus); - gridLayout->addWidget(labStart, 0, 0, 1, 1); - - btnOk = new QPushButton(frame); - btnOk->setObjectName(QString::fromUtf8("QUIBtnOk")); - btnOk->setMinimumSize(QSize(85, 0)); - btnOk->setCursor(QCursor(Qt::PointingHandCursor)); - btnOk->setFocusPolicy(Qt::StrongFocus); - gridLayout->addWidget(btnOk, 0, 2, 1, 1); - btnOk->setDefault(true); - - labEnd = new QLabel(frame); - labEnd->setObjectName(QString::fromUtf8("QUILabEnd")); - labEnd->setFocusPolicy(Qt::TabFocus); - gridLayout->addWidget(labEnd, 1, 0, 1, 1); - - btnClose = new QPushButton(frame); - btnClose->setObjectName(QString::fromUtf8("QUIBtnClose")); - btnClose->setMinimumSize(QSize(85, 0)); - btnClose->setCursor(QCursor(Qt::PointingHandCursor)); - btnClose->setFocusPolicy(Qt::StrongFocus); - gridLayout->addWidget(btnClose, 1, 2, 1, 1); - - dateStart = new QDateTimeEdit(frame); - dateStart->setObjectName(QString::fromUtf8("QUIDateStart")); - QSizePolicy sizePolicy4(QSizePolicy::Expanding, QSizePolicy::Fixed); - sizePolicy4.setHorizontalStretch(0); - sizePolicy4.setVerticalStretch(0); - sizePolicy4.setHeightForWidth(dateStart->sizePolicy().hasHeightForWidth()); - dateStart->setSizePolicy(sizePolicy4); - dateStart->setCalendarPopup(true); - gridLayout->addWidget(dateStart, 0, 1, 1, 1); - - dateEnd = new QDateTimeEdit(frame); - dateEnd->setObjectName(QString::fromUtf8("QUIDateEnd")); - sizePolicy4.setHeightForWidth(dateEnd->sizePolicy().hasHeightForWidth()); - dateEnd->setSizePolicy(sizePolicy4); - dateEnd->setCalendarPopup(true); - - gridLayout->addWidget(dateEnd, 1, 1, 1, 1); - verticalLayout1->addWidget(frame); - verticalLayout->addWidget(widgetMain); - - QWidget::setTabOrder(labStart, labEnd); - QWidget::setTabOrder(labEnd, dateStart); - QWidget::setTabOrder(dateStart, dateEnd); - QWidget::setTabOrder(dateEnd, btnOk); - QWidget::setTabOrder(btnOk, btnClose); - - labTitle->setText("日期时间选择"); - labStart->setText("开始时间"); - labEnd->setText("结束时间"); - btnOk->setText("确 定"); - btnClose->setText("关 闭"); - - dateStart->setDate(QDate::currentDate()); - dateEnd->setDate(QDate::currentDate().addDays(1)); - - dateStart->calendarWidget()->setGridVisible(true); - dateEnd->calendarWidget()->setGridVisible(true); - dateStart->calendarWidget()->setLocale(QLocale::Chinese); - dateEnd->calendarWidget()->setLocale(QLocale::Chinese); - setFormat("yyyy-MM-dd"); - - connect(btnOk, SIGNAL(clicked()), this, SLOT(on_btnOk_clicked())); - connect(btnClose, SIGNAL(clicked()), this, SLOT(on_btnMenu_Close_clicked())); - connect(btnMenu_Close, SIGNAL(clicked()), this, SLOT(on_btnMenu_Close_clicked())); -} - -void QUIDateSelect::initForm() -{ - //设置阴影 - QUIHelper::setFormShadow(this, verticalLayout); - //设置无边框 - QUIHelper::setFramelessForm(this, widgetTitle, labIco, btnMenu_Close); - this->setWindowTitle(this->labTitle->text()); - this->setFixedSize(QUIDialogMinWidth + 50, QUIDialogMinHeight); - - //按钮设置最小尺寸和图标大小 - QList btns = this->frame->findChildren(); - foreach (QPushButton *btn, btns) { - btn->setMinimumWidth(QUIBtnMinWidth); - btn->setIconSize(QSize(QUIIconWidth, QUIIconHeight)); - } - - this->installEventFilter(this); -} - -void QUIDateSelect::on_btnOk_clicked() -{ - if (dateStart->dateTime() > dateEnd->dateTime()) { - QUIHelper::showMessageBoxError("开始时间不能大于结束时间!", 3); - return; - } - - startDateTime = dateStart->dateTime().toString(format); - endDateTime = dateEnd->dateTime().toString(format); - - done(QMessageBox::Ok); - close(); -} - -void QUIDateSelect::on_btnMenu_Close_clicked() -{ - done(QMessageBox::Cancel); - close(); -} - -QString QUIDateSelect::getStartDateTime() const -{ - return this->startDateTime; -} - -QString QUIDateSelect::getEndDateTime() const -{ - return this->endDateTime; -} - -void QUIDateSelect::setIconMain(int icon, quint32 size) -{ - IconHelper::setIcon(this->labIco, icon, size); -} - -void QUIDateSelect::setFormat(const QString &format) -{ - this->format = format; - this->dateStart->setDisplayFormat(format); - this->dateEnd->setDisplayFormat(format); -} diff --git a/core_qui/quidateselect.h b/core_qui/quidateselect.h deleted file mode 100644 index 22b023e..0000000 --- a/core_qui/quidateselect.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef QUIDATESELECT_H -#define QUIDATESELECT_H - -#include "quihead.h" - -class QUIDateSelect : public QDialog -{ - Q_OBJECT - -public: - static QUIDateSelect *Instance(); - explicit QUIDateSelect(QWidget *parent = 0); - ~QUIDateSelect(); - -protected: - void showEvent(QShowEvent *); - bool eventFilter(QObject *watched, QEvent *event); - -private: - static QScopedPointer self; - - QVBoxLayout *verticalLayout; - QWidget *widgetTitle; - QHBoxLayout *horizontalLayout1; - QLabel *labIco; - QLabel *labTitle; - QWidget *widgetMenu; - QHBoxLayout *horizontalLayout; - QPushButton *btnMenu_Close; - QWidget *widgetMain; - QVBoxLayout *verticalLayout1; - QFrame *frame; - QGridLayout *gridLayout; - QLabel *labStart; - QPushButton *btnOk; - QLabel *labEnd; - QPushButton *btnClose; - QDateTimeEdit *dateStart; - QDateTimeEdit *dateEnd; - -private: - QString startDateTime; //开始时间 - QString endDateTime; //结束时间 - QString format; //日期时间格式 - -private slots: - void initControl(); //初始化控件 - void initForm(); //初始化窗体 - -private slots: - void on_btnOk_clicked(); - void on_btnMenu_Close_clicked(); - -public: - //获取当前选择的开始时间和结束时间 - QString getStartDateTime() const; - QString getEndDateTime() const; - -public Q_SLOTS: - //设置左上角图标 - void setIconMain(int icon, quint32 size = 12); - //设置日期格式 - void setFormat(const QString &format); -}; - -#endif // QUIDATESELECT_H diff --git a/core_qui/quihead.h b/core_qui/quihead.h deleted file mode 100644 index 53d9a72..0000000 --- a/core_qui/quihead.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef QUIHEAD_H -#define QUIHEAD_H - -//日期时间字符串宏定义 -#ifndef TIMEMS -#define TIMEMS qPrintable(QTime::currentTime().toString("HH:mm:ss zzz")) -#endif -#ifndef TIME -#define TIME qPrintable(QTime::currentTime().toString("HH:mm:ss")) -#endif -#ifndef QDATE -#define QDATE qPrintable(QDate::currentDate().toString("yyyy-MM-dd")) -#endif -#ifndef QTIME -#define QTIME qPrintable(QTime::currentTime().toString("HH-mm-ss")) -#endif -#ifndef DATETIME -#define DATETIME qPrintable(QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss")) -#endif -#ifndef STRDATETIME -#define STRDATETIME qPrintable(QDateTime::currentDateTime().toString("yyyy-MM-dd-HH-mm-ss")) -#endif -#ifndef STRDATETIMEMS -#define STRDATETIMEMS qPrintable(QDateTime::currentDateTime().toString("yyyy-MM-dd-HH-mm-ss-zzz")) -#endif - -//数据 0 -#define data_zero (char)0x00 - -//定义换行符 -#ifdef Q_OS_WIN -#define NEWLINE "\r\n" -#else -#define NEWLINE "\n" -#endif - -//定义无边框标题栏高度+对话框最小宽高 -#ifdef __arm__ -#define QUITitleMinSize 40 -#define QUIDialogMinWidth 350 -#define QUIDialogMinHeight 180 -#define QUIBtnMinWidth 90 -#define QUIIconWidth 22 -#define QUIIconHeight 22 -#else -#define QUITitleMinSize 30 -#define QUIDialogMinWidth 280 -#define QUIDialogMinHeight 150 -#define QUIBtnMinWidth 80 -#define QUIIconWidth 18 -#define QUIIconHeight 18 -#endif - -#include "head.h" -#include "iconhelper.h" -#include "quihelper.h" -#include "quiconfig.h" -#include "quistyle.h" -#include "quimessagebox.h" -#include "quitipbox.h" -#include "quidateselect.h" -#include "quiinputbox.h" -#include "quiwidget.h" - -#endif // QUIHEAD_H diff --git a/core_qui/quihelper.cpp b/core_qui/quihelper.cpp deleted file mode 100644 index ea409f5..0000000 --- a/core_qui/quihelper.cpp +++ /dev/null @@ -1,1540 +0,0 @@ -#include "quihelper.h" - -int QUIHelper::getScreenIndex() -{ - //需要对多个屏幕进行处理 - int screenIndex = 0; -#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) - int screenCount = qApp->screens().count(); -#else - int screenCount = qApp->desktop()->screenCount(); -#endif - - if (screenCount > 1) { - //找到当前鼠标所在屏幕 - QPoint pos = QCursor::pos(); - for (int i = 0; i < screenCount; ++i) { -#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) - if (qApp->screens().at(i)->geometry().contains(pos)) { -#else - if (qApp->desktop()->screenGeometry(i).contains(pos)) { -#endif - screenIndex = i; - break; - } - } - } - return screenIndex; -} - -QRect QUIHelper::getScreenRect(bool available) -{ - QRect rect; - int screenIndex = QUIHelper::getScreenIndex(); - if (available) { -#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) - rect = qApp->screens().at(screenIndex)->availableGeometry(); -#else - rect = qApp->desktop()->availableGeometry(screenIndex); -#endif - } else { -#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) - rect = qApp->screens().at(screenIndex)->geometry(); -#else - rect = qApp->desktop()->screenGeometry(screenIndex); -#endif - } - return rect; -} - -int QUIHelper::deskWidth() -{ - return getScreenRect().width(); -} - -int QUIHelper::deskHeight() -{ - return getScreenRect().height(); -} - -QWidget *QUIHelper::centerBaseForm = 0; -void QUIHelper::setFormInCenter(QWidget *form) -{ - int formWidth = form->width(); - int formHeight = form->height(); - - //如果=0表示采用系统桌面屏幕为参照 - QRect rect; - if (centerBaseForm == 0) { - rect = getScreenRect(); - } else { - rect = centerBaseForm->geometry(); - } - - int deskWidth = rect.width(); - int deskHeight = rect.height(); - QPoint movePoint(deskWidth / 2 - formWidth / 2 + rect.x(), deskHeight / 2 - formHeight / 2 + rect.y()); - form->move(movePoint); -} - -QString QUIHelper::appName() -{ - //没有必要每次都获取,只有当变量为空时才去获取一次 - static QString name; - if (name.isEmpty()) { - name = qApp->applicationFilePath(); - //下面的方法主要为了过滤安卓的路径 lib程序名_armeabi-v7a - QStringList list = name.split("/"); - name = list.at(list.count() - 1).split(".").at(0); - } - - return name; -} - -QString QUIHelper::appPath() -{ -#ifdef Q_OS_ANDROID - //return QString("/sdcard/Android/%1").arg(appName()); - return QString("/storage/emulated/0/%1").arg(appName()); -#else - return qApp->applicationDirPath(); -#endif -} - -QString QUIHelper::getUuid() -{ - QString uuid = QUuid::createUuid().toString(); - uuid.replace("{", ""); - uuid.replace("}", ""); - return uuid; -} - -void QUIHelper::initRand() -{ - //初始化随机数种子 - QTime t = QTime::currentTime(); - srand(t.msec() + t.second() * 1000); -} - -void QUIHelper::newDir(const QString &dirName) -{ - QString strDir = dirName; - - //如果路径中包含斜杠字符则说明是绝对路径 - //linux系统路径字符带有 / windows系统 路径字符带有 :/ - if (!strDir.startsWith("/") && !strDir.contains(":/")) { - strDir = QString("%1/%2").arg(QUIHelper::appPath()).arg(strDir); - } - - QDir dir(strDir); - if (!dir.exists()) { - dir.mkpath(strDir); - } -} - -void QUIHelper::sleep(int msec) -{ - if (msec <= 0) { - return; - } - -#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) - QThread::msleep(msec); -#else - QTime endTime = QTime::currentTime().addMSecs(msec); - while (QTime::currentTime() < endTime) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 100); - } -#endif -} - -void QUIHelper::setCode(bool utf8) -{ -#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) - //如果想要控制台打印信息中文正常就注释掉这个设置 - if (utf8) { - QTextCodec *codec = QTextCodec::codecForName("utf-8"); - QTextCodec::setCodecForLocale(codec); - } -#else -#if _MSC_VER - QTextCodec *codec = QTextCodec::codecForName("gbk"); -#else - QTextCodec *codec = QTextCodec::codecForName("utf-8"); -#endif - QTextCodec::setCodecForLocale(codec); - QTextCodec::setCodecForCStrings(codec); - QTextCodec::setCodecForTr(codec); -#endif -} - -void QUIHelper::setFont(const QString &ttfFile, const QString &fontName, int fontSize) -{ - QFont font; - font.setFamily(fontName); - font.setPixelSize(fontSize); - - //如果存在字体文件则设备字体文件中的字体 - //安卓版本和网页版本需要字体文件一起打包单独设置字体 - if (!ttfFile.isEmpty()) { - QFontDatabase fontDb; - int fontId = fontDb.addApplicationFont(ttfFile); - if (fontId != -1) { - QStringList androidFont = fontDb.applicationFontFamilies(fontId); - if (androidFont.size() != 0) { - font.setFamily(androidFont.at(0)); - font.setPixelSize(fontSize); - } - } - } - qApp->setFont(font); -} - -void QUIHelper::setTranslator() -{ - //以后还有其他的自行加上去就行 - QUIHelper::setTranslator(":/qm/widgets.qm"); - QUIHelper::setTranslator(":/qm/qt_zh_CN.qm"); - QUIHelper::setTranslator(":/qm/designer_zh_CN.qm"); -} - -void QUIHelper::setTranslator(const QString &qmFile) -{ - //过滤下不存在的就不用设置了 - if (!QFile(qmFile).exists()) { - return; - } - - QTranslator *translator = new QTranslator(qApp); - translator->load(qmFile); - qApp->installTranslator(translator); -} - -void QUIHelper::initDb(const QString &dbName) -{ - initFile(QString(":/%1.db").arg(appName()), dbName); -} - -void QUIHelper::initFile(const QString &sourceName, const QString &targetName) -{ - //判断文件是否存在,不存在则从资源文件复制出来 - QFile file(targetName); - if (!file.exists() || file.size() == 0) { - file.remove(); - QUIHelper::copyFile(sourceName, targetName); - } -} - -bool QUIHelper::checkIniFile(const QString &iniFile) -{ - //如果配置文件大小为0,则以初始值继续运行,并生成配置文件 - QFile file(iniFile); - if (file.size() == 0) { - return false; - } - - //如果配置文件不完整,则以初始值继续运行,并生成配置文件 - if (file.open(QFile::ReadOnly)) { - bool ok = true; - while (!file.atEnd()) { - QString line = file.readLine(); - line.replace("\r", ""); - line.replace("\n", ""); - QStringList list = line.split("="); - - if (list.count() == 2) { - if (list.at(1) == "") { - qDebug() << TIMEMS << "ini node no value" << list.at(0); - ok = false; - break; - } - } - } - - if (!ok) { - return false; - } - } else { - return false; - } - - return true; -} - -void QUIHelper::setIconBtn(QAbstractButton *btn, const QString &png, int icon) -{ - int size = 16; - int width = 18; - int height = 18; - QPixmap pix; - if (QPixmap(png).isNull()) { - pix = IconHelper::getPixmap(QUIConfig::TextColor, icon, size, width, height); - } else { - pix = QPixmap(png); - } - - btn->setIconSize(QSize(width, height)); - btn->setIcon(QIcon(pix)); -} - -void QUIHelper::writeInfo(const QString &info, bool needWrite, const QString &filePath) -{ - if (!needWrite) { - return; - } - - QString fileName = QString("%1/%2/%3_runinfo_%4.txt").arg(QUIHelper::appPath()) - .arg(filePath).arg(QUIHelper::appName()).arg(QDate::currentDate().toString("yyyyMM")); - - QFile file(fileName); - file.open(QIODevice::WriteOnly | QIODevice::Append | QFile::Text); - QTextStream stream(&file); - stream << DATETIME << " " << info << NEWLINE; - file.close(); -} - -void QUIHelper::writeError(const QString &info, bool needWrite, const QString &filePath) -{ - if (!needWrite) { - return; - } - - QString fileName = QString("%1/%2/%3_runerror_%4.txt").arg(QUIHelper::appPath()) - .arg(filePath).arg(QUIHelper::appName()).arg(QDate::currentDate().toString("yyyyMM")); - - QFile file(fileName); - file.open(QIODevice::WriteOnly | QIODevice::Append | QFile::Text); - QTextStream stream(&file); - stream << DATETIME << " " << info << NEWLINE; - file.close(); -} - -//在部分linux系统设置了背景透明是黑色的所以限定只在win -#ifdef Q_OS_WIN -int QUIHelper::shadowMargin = 5; -#else -int QUIHelper::shadowMargin = 0; -#endif -int QUIHelper::shadowRadius = 15; -QString QUIHelper::shadowColor = "#333333"; -void QUIHelper::setFormShadow(QWidget *widget, QLayout *layout, const QString &color, int margin, int radius) -{ - if (margin <= 0 || radius <= 0) { - return; - } - - //先判断是否已经存在阴影效果 - QGraphicsDropShadowEffect *shadowEffect = (QGraphicsDropShadowEffect *)widget->graphicsEffect(); - if (shadowEffect == 0) { - shadowEffect = new QGraphicsDropShadowEffect(widget); - } - - //采用系统自带的函数设置阴影 - shadowEffect->setOffset(0, 0); - shadowEffect->setColor(color); - shadowEffect->setBlurRadius(radius); - widget->setGraphicsEffect(shadowEffect); - - //必须设置背景透明 - widget->setAttribute(Qt::WA_TranslucentBackground, true); - //设置布局边距留出空间给边框阴影 - layout->setContentsMargins(margin, margin, margin, margin); -} - -void QUIHelper::setFormShadow(const QString &color) -{ - //重新应用边框阴影颜色等 - QUIHelper::shadowColor = color; - QGraphicsDropShadowEffect *shadowEffect = 0; - - //消息框 - shadowEffect = (QGraphicsDropShadowEffect *) QUIMessageBox::Instance()->graphicsEffect(); - if (shadowEffect != 0) { - shadowEffect->setColor(color); - } - - //输入框 - shadowEffect = (QGraphicsDropShadowEffect *) QUIInputBox::Instance()->graphicsEffect(); - if (shadowEffect != 0) { - shadowEffect->setColor(color); - } - - //右下角提示框 - shadowEffect = (QGraphicsDropShadowEffect *) QUITipBox::Instance()->graphicsEffect(); - if (shadowEffect != 0) { - shadowEffect->setColor(color); - } - - //日期选择框 - shadowEffect = (QGraphicsDropShadowEffect *) QUIDateSelect::Instance()->graphicsEffect(); - if (shadowEffect != 0) { - shadowEffect->setColor(color); - } -} - -void QUIHelper::setFramelessForm(QWidget *widgetMain, bool tool, bool top, bool menu) -{ - widgetMain->setProperty("form", true); - widgetMain->setProperty("canMove", true); - - //根据设定逐个追加属性 -#ifdef __arm__ - widgetMain->setWindowFlags(Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint); -#else - widgetMain->setWindowFlags(Qt::FramelessWindowHint); -#endif - if (tool) { - widgetMain->setWindowFlags(widgetMain->windowFlags() | Qt::Tool); - } - if (top) { - widgetMain->setWindowFlags(widgetMain->windowFlags() | Qt::WindowStaysOnTopHint); - } - if (menu) { - //如果是其他系统比如neokylin会产生系统边框 -#ifdef Q_OS_WIN - widgetMain->setWindowFlags(widgetMain->windowFlags() | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint); -#endif - } -} - -void QUIHelper::setFramelessForm(QWidget *widgetMain, QWidget *widgetTitle, - QLabel *labIco, QPushButton *btnClose, - bool tool, bool top, bool menu) -{ - labIco->setFixedWidth(QUITitleMinSize); - btnClose->setFixedWidth(QUITitleMinSize); - widgetTitle->setFixedHeight(QUITitleMinSize); - widgetTitle->setProperty("form", "title"); - widgetMain->setProperty("form", true); - widgetMain->setProperty("canMove", true); - - //根据设定逐个追加属性 -#ifdef __arm__ - widgetMain->setWindowFlags(Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint); -#else - widgetMain->setWindowFlags(Qt::FramelessWindowHint); -#endif - if (tool) { - widgetMain->setWindowFlags(widgetMain->windowFlags() | Qt::Tool); - } - if (top) { - widgetMain->setWindowFlags(widgetMain->windowFlags() | Qt::WindowStaysOnTopHint); - } - if (menu) { - widgetMain->setWindowFlags(widgetMain->windowFlags() | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint); - } - - IconHelper::setIcon(labIco, QUIConfig::IconMain, QUIConfig::FontSize + 2); - IconHelper::setIcon(btnClose, QUIConfig::IconClose, QUIConfig::FontSize); -} - -void QUIHelper::setSystemDateTime(const QString &year, const QString &month, const QString &day, const QString &hour, const QString &min, const QString &sec) -{ -#ifdef Q_OS_WIN - QProcess p(0); - p.start("cmd"); - p.waitForStarted(); - p.write(QString("date %1-%2-%3\n").arg(year).arg(month).arg(day).toLatin1()); - p.closeWriteChannel(); - p.waitForFinished(1000); - p.close(); - p.start("cmd"); - p.waitForStarted(); - p.write(QString("time %1:%2:%3.00\n").arg(hour).arg(min).arg(sec).toLatin1()); - p.closeWriteChannel(); - p.waitForFinished(1000); - p.close(); -#else - QString cmd = QString("date %1%2%3%4%5.%6").arg(month).arg(day).arg(hour).arg(min).arg(year).arg(sec); - system(cmd.toLatin1()); - system("hwclock -w"); -#endif -} - -void QUIHelper::runWithSystem(const QString &strName, const QString &strPath, bool autoRun) -{ -#ifdef Q_OS_WIN - QSettings reg("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", QSettings::NativeFormat); - reg.setValue(strName, autoRun ? strPath : ""); -#endif -} - -QList QUIHelper::colors = QList(); -QList QUIHelper::getColorList() -{ - //备用颜色集合 可以自行添加 - if (colors.count() == 0) { - colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); - colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); - colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); - colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); - colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); - } - - return colors; -} - -QStringList QUIHelper::getColorNames() -{ - QList colors = getColorList(); - QStringList colorNames; - foreach (QColor color, colors) { - colorNames << color.name(); - } - return colorNames; -} - -QColor QUIHelper::getRandColor() -{ - QList colors = getColorList(); - int index = getRandValue(0, colors.count(), true); - return colors.at(index); -} - -double QUIHelper::getRandValue(int min, int max, bool contansMin, bool contansMax) -{ - int value; -#if (QT_VERSION <= QT_VERSION_CHECK(5,10,0)) - //通用公式 a是起始值,n是整数的范围 - //int value = a + rand() % n; - if (contansMin) { - if (contansMax) { - value = min + 0 + (rand() % (max - min + 1)); - } else { - value = min + 0 + (rand() % (max - min + 0)); - } - } else { - if (contansMax) { - value = min + 1 + (rand() % (max - min + 0)); - } else { - value = min + 1 + (rand() % (max - min - 1)); - } - } -#else - if (contansMin) { - if (contansMax) { - value = QRandomGenerator::global()->bounded(min + 0, max + 1); - } else { - value = QRandomGenerator::global()->bounded(min + 0, max + 0); - } - } else { - if (contansMax) { - value = QRandomGenerator::global()->bounded(min + 1, max + 1); - } else { - value = QRandomGenerator::global()->bounded(min + 1, max + 0); - } - } -#endif - return value; -} - -QString QUIHelper::getIP(const QString &url) -{ - //取出IP地址 - QRegExp regExp("((?:(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d))"); - int start = regExp.indexIn(url); - int length = regExp.matchedLength(); - QString ip = url.mid(start, length); - return ip; -} - -bool QUIHelper::isIP(const QString &ip) -{ - QRegExp regExp("((2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.){3}(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)"); - return regExp.exactMatch(ip); -} - -bool QUIHelper::isMac(const QString &mac) -{ - QRegExp regExp("^[A-F0-9]{2}(-[A-F0-9]{2}){5}$"); - return regExp.exactMatch(mac); -} - -bool QUIHelper::isTel(const QString &tel) -{ - if (tel.length() != 11) { - return false; - } - - if (!tel.startsWith("13") && !tel.startsWith("14") && !tel.startsWith("15") && !tel.startsWith("18")) { - return false; - } - - return true; -} - -bool QUIHelper::isEmail(const QString &email) -{ - if (!email.contains("@") || !email.contains(".com")) { - return false; - } - - return true; -} - -QString QUIHelper::ipv4IntToString(quint32 ip) -{ - QString result = QString("%1.%2.%3.%4").arg((ip >> 24) & 0xFF).arg((ip >> 16) & 0xFF).arg((ip >> 8) & 0xFF).arg(ip & 0xFF); - return result; -} - -quint32 QUIHelper::ipv4StringToInt(const QString &ip) -{ - int result = 0; - if (isIP(ip)) { - QStringList list = ip.split("."); - int ip0 = list.at(0).toInt(); - int ip1 = list.at(1).toInt(); - int ip2 = list.at(2).toInt(); - int ip3 = list.at(3).toInt(); - result = ip3 | ip2 << 8 | ip1 << 16 | ip0 << 24; - } - return result; -} - -int QUIHelper::strHexToDecimal(const QString &strHex) -{ - bool ok; - return strHex.toInt(&ok, 16); -} - -int QUIHelper::strDecimalToDecimal(const QString &strDecimal) -{ - bool ok; - return strDecimal.toInt(&ok, 10); -} - -int QUIHelper::strBinToDecimal(const QString &strBin) -{ - bool ok; - return strBin.toInt(&ok, 2); -} - -QString QUIHelper::strHexToStrBin(const QString &strHex) -{ - uchar decimal = strHexToDecimal(strHex); - QString bin = QString::number(decimal, 2); - uchar len = bin.length(); - - if (len < 8) { - for (int i = 0; i < 8 - len; i++) { - bin = "0" + bin; - } - } - - return bin; -} - -QString QUIHelper::decimalToStrBin1(int decimal) -{ - QString bin = QString::number(decimal, 2); - uchar len = bin.length(); - if (len <= 8) { - for (int i = 0; i < 8 - len; i++) { - bin = "0" + bin; - } - } - - return bin; -} - -QString QUIHelper::decimalToStrBin2(int decimal) -{ - QString bin = QString::number(decimal, 2); - uchar len = bin.length(); - if (len <= 16) { - for (int i = 0; i < 16 - len; i++) { - bin = "0" + bin; - } - } - - return bin; -} - -QString QUIHelper::decimalToStrHex(int decimal) -{ - QString temp = QString::number(decimal, 16); - if (temp.length() == 1) { - temp = "0" + temp; - } - - return temp; -} - -QByteArray QUIHelper::intToByte(int i) -{ - QByteArray result; - result.resize(4); - result[3] = (uchar)(0x000000ff & i); - result[2] = (uchar)((0x0000ff00 & i) >> 8); - result[1] = (uchar)((0x00ff0000 & i) >> 16); - result[0] = (uchar)((0xff000000 & i) >> 24); - return result; -} - -QByteArray QUIHelper::intToByteRec(int i) -{ - QByteArray result; - result.resize(4); - result[0] = (uchar)(0x000000ff & i); - result[1] = (uchar)((0x0000ff00 & i) >> 8); - result[2] = (uchar)((0x00ff0000 & i) >> 16); - result[3] = (uchar)((0xff000000 & i) >> 24); - return result; -} - -int QUIHelper::byteToInt(const QByteArray &data) -{ - int i = data.at(3) & 0x000000ff; - i |= ((data.at(2) << 8) & 0x0000ff00); - i |= ((data.at(1) << 16) & 0x00ff0000); - i |= ((data.at(0) << 24) & 0xff000000); - return i; -} - -int QUIHelper::byteToIntRec(const QByteArray &data) -{ - int i = data.at(0) & 0x000000ff; - i |= ((data.at(1) << 8) & 0x0000ff00); - i |= ((data.at(2) << 16) & 0x00ff0000); - i |= ((data.at(3) << 24) & 0xff000000); - return i; -} - -quint32 QUIHelper::byteToUInt(const QByteArray &data) -{ - quint32 i = data.at(3) & 0x000000ff; - i |= ((data.at(2) << 8) & 0x0000ff00); - i |= ((data.at(1) << 16) & 0x00ff0000); - i |= ((data.at(0) << 24) & 0xff000000); - return i; -} - -quint32 QUIHelper::byteToUIntRec(const QByteArray &data) -{ - quint32 i = data.at(0) & 0x000000ff; - i |= ((data.at(1) << 8) & 0x0000ff00); - i |= ((data.at(2) << 16) & 0x00ff0000); - i |= ((data.at(3) << 24) & 0xff000000); - return i; -} - -QByteArray QUIHelper::ushortToByte(ushort i) -{ - QByteArray result; - result.resize(2); - result[1] = (uchar)(0x000000ff & i); - result[0] = (uchar)((0x0000ff00 & i) >> 8); - return result; -} - -QByteArray QUIHelper::ushortToByteRec(ushort i) -{ - QByteArray result; - result.resize(2); - result[0] = (uchar)(0x000000ff & i); - result[1] = (uchar)((0x0000ff00 & i) >> 8); - return result; -} - -int QUIHelper::byteToUShort(const QByteArray &data) -{ - int i = data.at(1) & 0x000000FF; - i |= ((data.at(0) << 8) & 0x0000FF00); - if (i >= 32768) { - i = i - 65536; - } - - return i; -} - -int QUIHelper::byteToUShortRec(const QByteArray &data) -{ - int i = data.at(0) & 0x000000FF; - i |= ((data.at(1) << 8) & 0x0000FF00); - if (i >= 32768) { - i = i - 65536; - } - - return i; -} - -QString QUIHelper::getXorEncryptDecrypt(const QString &value, char key) -{ - //矫正范围外的数据 - if (key < 0 || key >= 127) { - key = 127; - } - - QString result = value; - int count = result.count(); - for (int i = 0; i < count; i++) { - result[i] = QChar(result.at(i).toLatin1() ^ key); - } - return result; -} - -uchar QUIHelper::getOrCode(const QByteArray &data) -{ - int len = data.length(); - uchar result = 0; - for (int i = 0; i < len; i++) { - result ^= data.at(i); - } - - return result; -} - -uchar QUIHelper::getCheckCode(const QByteArray &data) -{ - int len = data.length(); - uchar temp = 0; - for (uchar i = 0; i < len; i++) { - temp += data.at(i); - } - - return temp % 256; -} - -//函数功能:计算CRC16 -//参数1:*data 16位CRC校验数据, -//参数2:len 数据流长度 -//参数3:init 初始化值 -//参数4:table 16位CRC查找表 - -//正序CRC计算 -quint16 QUIHelper::getCRC16(quint8 *data, int len, quint16 init, const quint16 *table) -{ - quint16 cRc_16 = init; - quint8 temp; - while (len-- > 0) { - temp = cRc_16 & 0xff; - cRc_16 = (cRc_16 >> 8) ^ table[(temp ^ *data++) & 0xff]; - } - - return cRc_16; -} - -//逆序CRC计算 -quint16 QUIHelper::getCRC16Rec(quint8 *data, int len, quint16 init, const quint16 *table) -{ - quint16 cRc_16 = init; - quint8 temp; - while (len-- > 0) { - temp = cRc_16 >> 8; - cRc_16 = (cRc_16 << 8) ^ table[(temp ^ *data++) & 0xff]; - } - - return cRc_16; -} - -//Modbus CRC16校验 -quint16 QUIHelper::getModbus16(quint8 *data, int len) -{ - //MODBUS CRC-16表 8005 逆序 - const quint16 table_16[256] = { - 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, - 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, - 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, - 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, - 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40, - 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41, - 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641, - 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040, - 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240, - 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441, - 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41, - 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840, - 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41, - 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40, - 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640, - 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041, - 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240, - 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441, - 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41, - 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840, - 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41, - 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40, - 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640, - 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041, - 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241, - 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440, - 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40, - 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841, - 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40, - 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41, - 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641, - 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040 - }; - - return getCRC16(data, len, 0xFFFF, table_16); -} - -//CRC16校验 -QByteArray QUIHelper::getCRCCode(const QByteArray &data) -{ - quint16 result = getModbus16((quint8 *)data.data(), data.length()); - return QUIHelper::ushortToByteRec(result); -} - -static QMap listChar; -void QUIHelper::initAsciiStr() -{ - //0x20为空格,空格以下都是不可见字符 - if (listChar.count() == 0) { - listChar.insert(0, "\\NUL"); - listChar.insert(1, "\\SOH"); - listChar.insert(2, "\\STX"); - listChar.insert(3, "\\ETX"); - listChar.insert(4, "\\EOT"); - listChar.insert(5, "\\ENQ"); - listChar.insert(6, "\\ACK"); - listChar.insert(7, "\\BEL"); - listChar.insert(8, "\\BS"); - listChar.insert(9, "\\HT"); - listChar.insert(10, "\\LF"); - listChar.insert(11, "\\VT"); - listChar.insert(12, "\\FF"); - listChar.insert(13, "\\CR"); - listChar.insert(14, "\\SO"); - listChar.insert(15, "\\SI"); - listChar.insert(16, "\\DLE"); - listChar.insert(17, "\\DC1"); - listChar.insert(18, "\\DC2"); - listChar.insert(19, "\\DC3"); - listChar.insert(20, "\\DC4"); - listChar.insert(21, "\\NAK"); - listChar.insert(22, "\\SYN"); - listChar.insert(23, "\\ETB"); - listChar.insert(24, "\\CAN"); - listChar.insert(25, "\\EM"); - listChar.insert(26, "\\SUB"); - listChar.insert(27, "\\ESC"); - listChar.insert(28, "\\FS"); - listChar.insert(29, "\\GS"); - listChar.insert(30, "\\RS"); - listChar.insert(31, "\\US"); - listChar.insert(0x5C, "\\"); - listChar.insert(0x7F, "\\DEL"); - } -} - -QString QUIHelper::byteArrayToAsciiStr(const QByteArray &data) -{ - initAsciiStr(); - QString temp; - int len = data.size(); - - for (int i = 0; i < len; i++) { - char byte = data.at(i); - QString value = listChar.value(byte); - if (!value.isEmpty()) { - } else if (byte >= 0 && byte <= 0x7F) { - value = QString("%1").arg(byte); - } else { - value = decimalToStrHex((quint8)byte); - value = QString("\\x%1").arg(value.toUpper()); - } - - temp += value; - } - - return temp.trimmed(); -} - -QByteArray QUIHelper::asciiStrToByteArray(const QString &data) -{ - initAsciiStr(); - QByteArray buffer; - QStringList list = data.split("\\"); - - int count = list.count(); - for (int i = 1; i < count; i++) { - QString str = list.at(i); - int key = 0; - if (str.contains("x")) { - key = strHexToDecimal(str.mid(1, 2)); - } else { - key = listChar.key("\\" + str); - } - - buffer.append(key); - } - - return buffer; -} - -char QUIHelper::hexStrToChar(char data) -{ - if ((data >= '0') && (data <= '9')) { - return data - 0x30; - } else if ((data >= 'A') && (data <= 'F')) { - return data - 'A' + 10; - } else if ((data >= 'a') && (data <= 'f')) { - return data - 'a' + 10; - } else { - return (-1); - } -} - -QByteArray QUIHelper::hexStrToByteArray(const QString &data) -{ - QByteArray senddata; - int hexdata, lowhexdata; - int hexdatalen = 0; - int len = data.length(); - senddata.resize(len / 2); - char lstr, hstr; - - for (int i = 0; i < len;) { - hstr = data.at(i).toLatin1(); - if (hstr == ' ') { - i++; - continue; - } - - i++; - if (i >= len) { - break; - } - - lstr = data.at(i).toLatin1(); - hexdata = hexStrToChar(hstr); - lowhexdata = hexStrToChar(lstr); - - if ((hexdata == 16) || (lowhexdata == 16)) { - break; - } else { - hexdata = hexdata * 16 + lowhexdata; - } - - i++; - senddata[hexdatalen] = (char)hexdata; - hexdatalen++; - } - - senddata.resize(hexdatalen); - return senddata; -} - -QString QUIHelper::byteArrayToHexStr(const QByteArray &data) -{ - QString temp = ""; - QString hex = data.toHex(); - for (int i = 0; i < hex.length(); i = i + 2) { - temp += hex.mid(i, 2) + " "; - } - - return temp.trimmed().toUpper(); -} - -QString QUIHelper::getSaveName(const QString &filter, QString defaultDir) -{ - return QFileDialog::getSaveFileName(0, "选择文件", defaultDir, filter); -} - -QString QUIHelper::getFileName(const QString &filter, QString defaultDir) -{ - return QFileDialog::getOpenFileName(0, "选择文件", defaultDir, filter); -} - -QString QUIHelper::saveFileName(const QString &filter, const QString &defaultDir, const QString &fileName) -{ - QString file; - QFileDialog dialog; - dialog.setFixedSize(900, 600); - dialog.setWindowModality(Qt::WindowModal); - dialog.setWindowTitle("保存文件"); - dialog.setLabelText(QFileDialog::Accept, "保存(&S)"); - dialog.setLabelText(QFileDialog::Reject, "取消(&C)"); - dialog.selectFile(fileName); - dialog.setNameFilter(filter); - dialog.setDirectory(defaultDir); - - if (dialog.exec() == 1) { - file = dialog.selectedFiles().value(0); - file = QFileInfo(file).suffix().isEmpty() ? "" : file; - } - - return file; -} - -QStringList QUIHelper::getFileNames(const QString &filter, QString defaultDir) -{ - return QFileDialog::getOpenFileNames(0, "选择文件", defaultDir, filter); -} - -QString QUIHelper::getFolderName() -{ - return QFileDialog::getExistingDirectory(); -} - -QString QUIHelper::getFileNameWithExtension(const QString &strFilePath) -{ - QFileInfo fileInfo(strFilePath); - return fileInfo.fileName(); -} - -QStringList QUIHelper::getFolderFileNames(const QStringList &filter) -{ - QStringList fileList; - QString strFolder = QFileDialog::getExistingDirectory(); - if (!strFolder.length() == 0) { - QDir myFolder(strFolder); - if (myFolder.exists()) { - fileList = myFolder.entryList(filter); - } - } - - return fileList; -} - -bool QUIHelper::folderIsExist(const QString &strFolder) -{ - QDir tempFolder(strFolder); - return tempFolder.exists(); -} - -bool QUIHelper::fileIsExist(const QString &strFile) -{ - QFile tempFile(strFile); - return tempFile.exists(); -} - -bool QUIHelper::copyFile(const QString &sourceFile, const QString &targetFile) -{ - bool ok; - ok = QFile::copy(sourceFile, targetFile); - //将复制过去的文件只读属性取消 - ok = QFile::setPermissions(targetFile, QFile::WriteOwner); - return ok; -} - -void QUIHelper::deleteDirectory(const QString &path) -{ - QDir dir(path); - if (!dir.exists()) { - return; - } - - dir.setFilter(QDir::AllEntries | QDir::NoDotAndDotDot); - QFileInfoList fileList = dir.entryInfoList(); - foreach (QFileInfo fi, fileList) { - if (fi.isFile()) { - fi.dir().remove(fi.fileName()); - } else { - deleteDirectory(fi.absoluteFilePath()); - dir.rmdir(fi.absoluteFilePath()); - } - } -} - -bool QUIHelper::ipLive(const QString &ip, int port, int timeout) -{ - //局部的事件循环,不卡主界面 - QEventLoop eventLoop; - - //设置超时 - QTimer timer; - QObject::connect(&timer, SIGNAL(timeout()), &eventLoop, SLOT(quit())); - timer.setSingleShot(true); - timer.start(timeout); - - //主动测试下连接 - QTcpSocket tcpSocket; - QObject::connect(&tcpSocket, SIGNAL(connected()), &eventLoop, SLOT(quit())); - tcpSocket.connectToHost(ip, port); - eventLoop.exec(); - - //判断最终状态 - bool ok = (tcpSocket.state() == QAbstractSocket::ConnectedState); - return ok; -} - -bool QUIHelper::download(const QString &url, const QString &fileName, int timeout) -{ - QByteArray data = getHtml(url, timeout); - if (!data.isEmpty()) { - QFile file(fileName); - if (file.open(QFile::WriteOnly | QFile::Truncate)) { - file.write(data); - file.close(); - } - return true; - } - - return false; -} - -QByteArray QUIHelper::getHtml(const QString &url, int timeout) -{ - //初始化网络请求对象 - QNetworkAccessManager manager; - //局部的事件循环,不卡主界面 - QEventLoop eventLoop; - - //设置超时 5.15开始自带了超时时间函数 默认30秒 -#if (QT_VERSION >= QT_VERSION_CHECK(5,15,0)) - manager.setTransferTimeout(timeout); -#else - QTimer timer; - QObject::connect(&timer, SIGNAL(timeout()), &eventLoop, SLOT(quit())); - timer.setSingleShot(true); - timer.start(timeout); -#endif - - //启动网络请求 - QNetworkReply *reply = manager.get(QNetworkRequest(QUrl(url))); - QObject::connect(reply, SIGNAL(finished()), &eventLoop, SLOT(quit())); - eventLoop.exec(); - - //读取结果 - QByteArray data = reply->readAll(); - reply->deleteLater(); - return data; -} - -QString QUIHelper::getNetIP(const QString &html) -{ - QString ip; - QStringList list = html.split(" "); - foreach (QString str, list) { - //value=\"101.86.197.178\"> - if (str.contains("value=")) { - QStringList temp = str.split("\""); - ip = temp.at(1); - break; - } - } - return ip; -} - -QString QUIHelper::getLocalIP() -{ - //优先取192开头的IP,如果获取不到IP则取127.0.0.1 - QString ip = "127.0.0.1"; - QStringList ips = getLocalIPs(); - foreach (QString str, ips) { - if (str.startsWith("192.168.1") || str.startsWith("192")) { - ip = str; - break; - } - } - - return ip; -} - -QStringList QUIHelper::getLocalIPs() -{ - static QStringList ips; - if (ips.count() == 0) { -#ifdef emsdk - ips << "127.0.0.1"; -#else - QList netInterfaces = QNetworkInterface::allInterfaces(); - foreach (const QNetworkInterface &netInterface, netInterfaces) { - //移除虚拟机和抓包工具的虚拟网卡 - QString humanReadableName = netInterface.humanReadableName().toLower(); - if (humanReadableName.startsWith("vmware network adapter") || humanReadableName.startsWith("npcap loopback adapter")) { - continue; - } - - //过滤当前网络接口 - bool flag = (netInterface.flags() == (QNetworkInterface::IsUp | QNetworkInterface::IsRunning | QNetworkInterface::CanBroadcast | QNetworkInterface::CanMulticast)); - if (flag) { - QList addrs = netInterface.addressEntries(); - foreach (QNetworkAddressEntry addr, addrs) { - //只取出IPV4的地址 - if (addr.ip().protocol() == QAbstractSocket::IPv4Protocol) { - QString ip4 = addr.ip().toString(); - if (ip4 != "127.0.0.1") { - ips << ip4; - } - } - } - } - } -#endif - } - - return ips; -} - -QString QUIHelper::urlToIP(const QString &url) -{ - QHostInfo host = QHostInfo::fromName(url); - return host.addresses().at(0).toString(); -} - -QString QUIHelper::getValue(quint8 value) -{ - QString result = QString::number(value); - if (result.length() <= 1) { - result = QString("0%1").arg(result); - } - return result; -} - -bool QUIHelper::isCustomUI = false; -int QUIHelper::showMessageBox(const QString &info, int type, int closeSec, bool exec) -{ - int result = 0; - if (type == 0) { - showMessageBoxInfo(info, closeSec, exec); - } else if (type == 1) { - showMessageBoxError(info, closeSec, exec); - } else if (type == 2) { - result = showMessageBoxQuestion(info); - } - - return result; -} - -void QUIHelper::showMessageBoxInfo(const QString &info, int closeSec, bool exec) -{ - if (isCustomUI) { - if (exec) { - QUIMessageBox msg; - msg.setMessage(info, 0, closeSec); - msg.exec(); - } else { - QUIMessageBox::Instance()->setMessage(info, 0, closeSec); - QUIMessageBox::Instance()->show(); - } - } else { - QMessageBox box(QMessageBox::Information, "提示", info); - box.setStandardButtons(QMessageBox::Yes); - box.setButtonText(QMessageBox::Yes, QString("确 定")); - box.exec(); - //QMessageBox::information(0, "提示", info, QMessageBox::Yes); - } -} - -void QUIHelper::showMessageBoxError(const QString &info, int closeSec, bool exec) -{ - if (isCustomUI) { - if (exec) { - QUIMessageBox msg; - msg.setMessage(info, 2, closeSec); - msg.exec(); - } else { - QUIMessageBox::Instance()->setMessage(info, 2, closeSec); - QUIMessageBox::Instance()->show(); - } - } else { - QMessageBox box(QMessageBox::Critical, "错误", info); - box.setStandardButtons(QMessageBox::Yes); - box.setButtonText(QMessageBox::Yes, QString("确 定")); - box.exec(); - //QMessageBox::critical(0, "错误", info, QMessageBox::Yes); - } -} - -int QUIHelper::showMessageBoxQuestion(const QString &info) -{ - if (isCustomUI) { - QUIMessageBox msg; - msg.setMessage(info, 1); - msg.update(); - return msg.exec(); - } else { - QMessageBox box(QMessageBox::Question, "询问", info); - box.setStandardButtons(QMessageBox::Yes | QMessageBox::No); - box.setButtonText(QMessageBox::Yes, QString("确 定")); - box.setButtonText(QMessageBox::No, QString("取 消")); - return box.exec(); - //return QMessageBox::question(0, "询问", info, QMessageBox::Yes | QMessageBox::No); - } -} - -void QUIHelper::showTipBox(const QString &title, const QString &tip, bool fullScreen, bool center, int closeSec) -{ - QUITipBox::Instance()->setTip(title, tip, fullScreen, center, closeSec); - QUITipBox::Instance()->show(); -} - -void QUIHelper::hideTipBox() -{ - QUITipBox::Instance()->hide(); -} - -QString QUIHelper::showInputBox(const QString &title, int type, int closeSec, - const QString &placeholderText, bool pwd, - const QString &defaultValue) -{ - if (isCustomUI) { - QUIInputBox input; - input.setParameter(title, type, closeSec, placeholderText, pwd, defaultValue); - input.exec(); - return input.getValue(); - } else { - return QInputDialog::getText(0, "输入框", title); - } -} - -void QUIHelper::showDateSelect(QString &dateStart, QString &dateEnd, const QString &format) -{ - QUIDateSelect select; - select.setFormat(format); - select.exec(); - dateStart = select.getStartDateTime(); - dateEnd = select.getEndDateTime(); -} - -void QUIHelper::initTableView(QTableView *tableView, int rowHeight, bool headVisible, bool edit, bool stretchLast) -{ - //取消自动换行 - tableView->setWordWrap(false); - //超出文本不显示省略号 - tableView->setTextElideMode(Qt::ElideNone); - //奇数偶数行颜色交替 - tableView->setAlternatingRowColors(false); - //垂直表头是否可见 - tableView->verticalHeader()->setVisible(headVisible); - //选中一行表头是否加粗 - tableView->horizontalHeader()->setHighlightSections(false); - //最后一行拉伸填充 - tableView->horizontalHeader()->setStretchLastSection(stretchLast); - //行标题最小宽度尺寸 - tableView->horizontalHeader()->setMinimumSectionSize(0); - //行标题最小高度,等同于和默认行高一致 - tableView->horizontalHeader()->setFixedHeight(rowHeight); - //默认行高 - tableView->verticalHeader()->setDefaultSectionSize(rowHeight); - //选中时一行整体选中 - tableView->setSelectionBehavior(QAbstractItemView::SelectRows); - //只允许选择单个 - tableView->setSelectionMode(QAbstractItemView::SingleSelection); - - //表头不可单击 -#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) - tableView->horizontalHeader()->setSectionsClickable(false); -#else - tableView->horizontalHeader()->setClickable(false); -#endif - - //鼠标按下即进入编辑模式 - if (edit) { - tableView->setEditTriggers(QAbstractItemView::CurrentChanged | QAbstractItemView::DoubleClicked); - } else { - tableView->setEditTriggers(QAbstractItemView::NoEditTriggers); - } -} - -void QUIHelper::openFile(const QString &fileName, const QString &msg) -{ -#ifdef __arm__ - return; -#endif - if (fileName.isEmpty()) { - return; - } - if (QUIHelper::showMessageBoxQuestion(msg + "成功!确定现在就打开吗?") == QMessageBox::Yes) { - QString url = QString("file:///%1").arg(fileName); - QDesktopServices::openUrl(QUrl(url, QUrl::TolerantMode)); - } -} - -bool QUIHelper::checkRowCount(int rowCount, int maxCount, int warnCount) -{ - if (rowCount > maxCount) { - QString msg = QString("要处理的数据共 %1 条,超过最大 %2 条,请重新查询!").arg(rowCount).arg(maxCount); - QUIHelper::showMessageBoxError(msg, 3); - return false; - } - - if (rowCount > warnCount) { - QString msg = QString("要处理的数据共 %1 条,请耐心等待,确定要继续吗?").arg(rowCount); - if (QUIHelper::showMessageBoxQuestion(msg) != QMessageBox::Yes) { - return false; - } - } - - return true; -} - -QPixmap QUIHelper::getPixmap(QWidget *widget, const QPixmap &pixmap, bool scale) -{ - if (pixmap.isNull()) { - return pixmap; - } - - //scale=false 超过尺寸才需要等比例缩放 - QPixmap pix = pixmap; - if (scale) { - pix = pix.scaled(widget->size() - QSize(2, 2), Qt::KeepAspectRatio, Qt::SmoothTransformation); - } else if (pix.width() > widget->width() || pix.height() > widget->height()) { - pix = pix.scaled(widget->size() - QSize(2, 2), Qt::KeepAspectRatio, Qt::SmoothTransformation); - } - - return pix; -} - -void QUIHelper::setPixmap(QLabel *label, const QString &file, bool scale) -{ - //文件不存在则不用处理 - if (!QFile(file).exists()) { - label->clear(); - return; - } - - QPixmap pixmap(file); - pixmap = getPixmap(label, pixmap); - label->setPixmap(pixmap); -} - -void QUIHelper::setLogo(QLabel *label, const QString &file, - int width, int height, int offset, - const QString &oldColor, const QString &newColor) -{ - //如果是icon开头则表示图形字体否则取logo图片 - if (file.startsWith("icon")) { - //设置图形字体作为logo - height = 55, width = 80; - QString text = file.split("_").last(); - int icon = text.toInt(NULL, 16); - IconHelper::setIcon(label, icon, height); - } else { - //区分资源文件和本地文件 - QString fileName = file; - if (!file.startsWith(":/")) { - height = 50; - fileName = QString("%1/logo/%2.png").arg(QUIHelper::appPath()).arg(file); - } - - //svg图片自动换颜色 - if (file.endsWith(".svg")) { - //打开文件对指定颜色进行替换 - QFile f(file); - if (f.open(QFile::ReadOnly)) { - QString text = f.readAll(); - text.replace(oldColor, newColor); - f.close(); - - //目录不存在则新建 - QUIHelper::newDir("logo"); - //打开新的文件输出 - fileName = QString("%1/logo/temp.svg").arg(QUIHelper::appPath()); - QFile f2(fileName); - if (f2.open(QFile::WriteOnly)) { - f2.write(text.toUtf8()); - f2.close(); - } - } - } - - //自动计算宽度比例 - QPixmap pixmap(fileName); - width = pixmap.width() / (pixmap.height() / height); - pixmap = pixmap.scaled(width, height, Qt::KeepAspectRatio, Qt::SmoothTransformation); - label->setPixmap(pixmap); - } - - //设置logo标签最小宽度 - if (width - height < offset) { - width += offset; - } - - label->setFixedWidth(width); - label->setAlignment(Qt::AlignCenter); -} diff --git a/core_qui/quihelper.h b/core_qui/quihelper.h deleted file mode 100644 index 4c5e954..0000000 --- a/core_qui/quihelper.h +++ /dev/null @@ -1,248 +0,0 @@ -#ifndef QUIHELPER_H -#define QUIHELPER_H - -#include "quihead.h" - -class QUIHelper -{ -public: - //获取当前鼠标所在屏幕索引+尺寸 - static int getScreenIndex(); - static QRect getScreenRect(bool available = true); - - //获取桌面宽度高度 - static int deskWidth(); - static int deskHeight(); - - //居中显示窗体 - //定义标志位指定是以桌面为参照还是主程序界面为参照 - static QWidget *centerBaseForm; - static void setFormInCenter(QWidget *form); - - //程序文件名称+当前所在路径 - static QString appName(); - static QString appPath(); - - //获取uuid+初始化随机数种子+新建目录+延时 - static QString getUuid(); - static void initRand(); - static void newDir(const QString &dirName); - static void sleep(int msec); - - //设置编码 - static void setCode(bool utf8 = true); - //设置字体 - static void setFont(const QString &ttfFile = ":/font/DroidSansFallback.ttf", - const QString &fontName = "Microsoft Yahei", int fontSize = 12); - //设置翻译文件 - static void setTranslator(); - static void setTranslator(const QString &qmFile); - - //初始化数据库 - static void initDb(const QString &dbName); - //初始化文件,不存在则拷贝 - static void initFile(const QString &sourceName, const QString &targetName); - - //检查ini配置文件 - static bool checkIniFile(const QString &iniFile); - - //设置图标到按钮 - static void setIconBtn(QAbstractButton *btn, const QString &png, int icon); - - //写入消息到额外的的消息日志文件 - static void writeInfo(const QString &info, bool needWrite = false, const QString &filePath = "log"); - static void writeError(const QString &info, bool needWrite = false, const QString &filePath = "log"); - - //设置边框阴影 - static int shadowMargin; - static int shadowRadius; - static QString shadowColor; - static void setFormShadow(QWidget *widget, QLayout *layout, - const QString &color = shadowColor, - int margin = shadowMargin, - int radius = shadowRadius); - //立即更新所有阴影边框颜色比如换肤的时候需要用到 - static void setFormShadow(const QString &color); - - //设置无边框窗体 - static void setFramelessForm(QWidget *widgetMain, - bool tool = false, bool top = false, bool menu = true); - static void setFramelessForm(QWidget *widgetMain, QWidget *widgetTitle, - QLabel *labIco, QPushButton *btnClose, - bool tool = true, bool top = true, bool menu = false); - - //设置系统时间 - static void setSystemDateTime(const QString &year, const QString &month, const QString &day, - const QString &hour, const QString &min, const QString &sec); - //设置开机自启动 - static void runWithSystem(const QString &strName, const QString &strPath, bool autoRun = true); - - //获取内置颜色集合 - static QList colors; - static QList getColorList(); - static QStringList getColorNames(); - //随机获取颜色集合中的颜色 - static QColor getRandColor(); - - //获取随机数,指定最小值和最大值 - static double getRandValue(int min, int max, bool contansMin = false, bool contansMax = false); - - //从字符串获取IP地址 - static QString getIP(const QString &url); - //判断是否是IP地址 - static bool isIP(const QString &ip); - //判断是否是MAC地址 - static bool isMac(const QString &mac); - //判断是否是合法的电话号码 - static bool isTel(const QString &tel); - //判断是否是合法的邮箱地址 - static bool isEmail(const QString &email); - - //IP地址字符串与整型转换 - static QString ipv4IntToString(quint32 ip); - static quint32 ipv4StringToInt(const QString &ip); - - //16进制字符串转10进制 - static int strHexToDecimal(const QString &strHex); - //10进制字符串转10进制 - static int strDecimalToDecimal(const QString &strDecimal); - //2进制字符串转10进制 - static int strBinToDecimal(const QString &strBin); - - //16进制字符串转2进制字符串 - static QString strHexToStrBin(const QString &strHex); - //10进制转2进制字符串一个字节 - static QString decimalToStrBin1(int decimal); - //10进制转2进制字符串两个字节 - static QString decimalToStrBin2(int decimal); - //10进制转16进制字符串,补零. - static QString decimalToStrHex(int decimal); - - //int转字节数组 - static QByteArray intToByte(int i); - static QByteArray intToByteRec(int i); - - //字节数组转int - static int byteToInt(const QByteArray &data); - static int byteToIntRec(const QByteArray &data); - static quint32 byteToUInt(const QByteArray &data); - static quint32 byteToUIntRec(const QByteArray &data); - - //ushort转字节数组 - static QByteArray ushortToByte(ushort i); - static QByteArray ushortToByteRec(ushort i); - - //字节数组转ushort - static int byteToUShort(const QByteArray &data); - static int byteToUShortRec(const QByteArray &data); - - //异或加密-只支持字符,如果是中文需要将其转换base64编码 - static QString getXorEncryptDecrypt(const QString &value, char key); - //异或校验 - static uchar getOrCode(const QByteArray &data); - //计算校验码 - static uchar getCheckCode(const QByteArray &data); - - //CRC校验 - static quint16 getCRC16Rec(quint8 *data, int len, quint16 init, const quint16 *table); - static quint16 getCRC16(quint8 *data, int len, quint16 init, const quint16 *table); - static quint16 getModbus16(quint8 *data, int len); - static QByteArray getCRCCode(const QByteArray &data); - - //字节数组与Ascii字符串互转 - static void initAsciiStr(); - static QString byteArrayToAsciiStr(const QByteArray &data); - static QByteArray asciiStrToByteArray(const QString &data); - - //16进制字符串与字节数组互转 - static char hexStrToChar(char data); - static QByteArray hexStrToByteArray(const QString &data); - static QString byteArrayToHexStr(const QByteArray &data); - - //获取保存的文件 - static QString getSaveName(const QString &filter, QString defaultDir = QCoreApplication::applicationDirPath()); - //获取选择的文件 - static QString getFileName(const QString &filter, QString defaultDir = QCoreApplication::applicationDirPath()); - //非阻塞保存文件对话框 - static QString saveFileName(const QString &filter, const QString &defaultDir = "", const QString &fileName = ""); - //获取选择的文件集合 - static QStringList getFileNames(const QString &filter, QString defaultDir = QCoreApplication::applicationDirPath()); - //获取选择的目录 - static QString getFolderName(); - - //获取文件名,含拓展名 - static QString getFileNameWithExtension(const QString &strFilePath); - //获取选择文件夹中的文件 - static QStringList getFolderFileNames(const QStringList &filter); - - //文件夹是否存在 - static bool folderIsExist(const QString &strFolder); - //文件是否存在 - static bool fileIsExist(const QString &strFile); - //复制文件 - static bool copyFile(const QString &sourceFile, const QString &targetFile); - //删除文件夹下所有文件 - static void deleteDirectory(const QString &path); - - //判断IP地址及端口是否在线 - static bool ipLive(const QString &ip, int port, int timeout = 1000); - //下载网络文件 - static bool download(const QString &url, const QString &fileName, int timeout = 1000); - //获取网页所有源代码 - static QByteArray getHtml(const QString &url, int timeout = 1000); - - //获取本机公网IP地址 - static QString getNetIP(const QString &html); - //获取本机IP - static QString getLocalIP(); - //获取本机IP地址集合 - static QStringList getLocalIPs(); - //Url地址转为IP地址 - static QString urlToIP(const QString &url); - - //字符串补全 - static QString getValue(quint8 value); - - //定义标志位启用系统的还是自定义的对话框 - static bool isCustomUI; - //弹出框 - static int showMessageBox(const QString &info, int type = 0, int closeSec = 0, bool exec = false); - //弹出消息框 - static void showMessageBoxInfo(const QString &info, int closeSec = 0, bool exec = false); - //弹出错误框 - static void showMessageBoxError(const QString &info, int closeSec = 0, bool exec = false); - //弹出询问框 - static int showMessageBoxQuestion(const QString &info); - - //弹出+隐藏右下角信息框 - static void showTipBox(const QString &title, const QString &tip, bool fullScreen = false, - bool center = true, int closeSec = 0); - static void hideTipBox(); - - //弹出输入框 - static QString showInputBox(const QString &title, int type = 0, int closeSec = 0, - const QString &placeholderText = QString(), bool pwd = false, - const QString &defaultValue = QString()); - //弹出日期选择框 - static void showDateSelect(QString &dateStart, QString &dateEnd, const QString &format = "yyyy-MM-dd"); - - - //初始化表格 - static void initTableView(QTableView *tableView, int rowHeight = 25, - bool headVisible = false, bool edit = false, - bool stretchLast = true); - //打开文件带提示框 - static void openFile(const QString &fileName, const QString &msg); - //导出和打印数据提示框 - static bool checkRowCount(int rowCount, int maxCount, int warnCount); - - //获取等比例缩放过的图片 - static QPixmap getPixmap(QWidget *widget, const QPixmap &pixmap, bool scale = false); - static void setPixmap(QLabel *label, const QString &file, bool scale = false); - //设置logo图片支持 资源文件+本地图片+图形字体+svg自动变色 等多种形式 - static void setLogo(QLabel *label, const QString &file, - int width, int height, int offset = 20, - const QString &oldColor = QString(), const QString &newColor = QString()); -}; - -#endif // QUIHELPER_H diff --git a/core_qui/quiinputbox.cpp b/core_qui/quiinputbox.cpp deleted file mode 100644 index fb52803..0000000 --- a/core_qui/quiinputbox.cpp +++ /dev/null @@ -1,299 +0,0 @@ -#include "quiinputbox.h" - -QScopedPointer QUIInputBox::self; -QUIInputBox *QUIInputBox::Instance() -{ - if (self.isNull()) { - static QMutex mutex; - QMutexLocker locker(&mutex); - if (self.isNull()) { - self.reset(new QUIInputBox); - } - } - - return self.data(); -} - -QUIInputBox::QUIInputBox(QWidget *parent) : QDialog(parent) -{ - this->initControl(); - this->initForm(); -} - -QUIInputBox::~QUIInputBox() -{ - delete widgetMain; -} - -void QUIInputBox::showEvent(QShowEvent *) -{ - QUIHelper::setIconBtn(btnOk, ":/image/btn_ok.png", 0xf00c); - QUIHelper::setIconBtn(btnCancel, ":/image/btn_close.png", 0xf00d); - QUIHelper::setFormInCenter(this); - txtValue->setFocus(); - this->activateWindow(); -} - -void QUIInputBox::initControl() -{ - this->setObjectName(QString::fromUtf8("QUIInputBox")); - - verticalLayout1 = new QVBoxLayout(this); - verticalLayout1->setSpacing(0); - verticalLayout1->setObjectName(QString::fromUtf8("verticalLayout1")); - verticalLayout1->setContentsMargins(1, 1, 1, 1); - - widgetTitle = new QWidget(this); - widgetTitle->setObjectName(QString::fromUtf8("QUIWidgetTitle")); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); - sizePolicy.setHorizontalStretch(0); - sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(widgetTitle->sizePolicy().hasHeightForWidth()); - widgetTitle->setSizePolicy(sizePolicy); - - horizontalLayout1 = new QHBoxLayout(widgetTitle); - horizontalLayout1->setSpacing(0); - horizontalLayout1->setObjectName(QString::fromUtf8("horizontalLayout1")); - horizontalLayout1->setContentsMargins(0, 0, 0, 0); - - labIco = new QLabel(widgetTitle); - labIco->setObjectName(QString::fromUtf8("QUILabIco")); - QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::Preferred); - sizePolicy1.setHorizontalStretch(0); - sizePolicy1.setVerticalStretch(0); - sizePolicy1.setHeightForWidth(labIco->sizePolicy().hasHeightForWidth()); - labIco->setSizePolicy(sizePolicy1); - labIco->setAlignment(Qt::AlignCenter); - horizontalLayout1->addWidget(labIco); - - labTitle = new QLabel(widgetTitle); - labTitle->setObjectName(QString::fromUtf8("QUILabTitle")); - labTitle->setAlignment(Qt::AlignLeading | Qt::AlignLeft | Qt::AlignVCenter); - horizontalLayout1->addWidget(labTitle); - - labCountDown = new QLabel(widgetTitle); - labCountDown->setObjectName(QString::fromUtf8("QUILabCountDown")); - QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Preferred); - sizePolicy2.setHorizontalStretch(0); - sizePolicy2.setVerticalStretch(0); - sizePolicy2.setHeightForWidth(labCountDown->sizePolicy().hasHeightForWidth()); - labCountDown->setSizePolicy(sizePolicy2); - labCountDown->setAlignment(Qt::AlignCenter); - horizontalLayout1->addWidget(labCountDown); - - widgetMenu = new QWidget(widgetTitle); - widgetMenu->setObjectName(QString::fromUtf8("QUIWidgetMenu")); - sizePolicy1.setHeightForWidth(widgetMenu->sizePolicy().hasHeightForWidth()); - widgetMenu->setSizePolicy(sizePolicy1); - - horizontalLayout2 = new QHBoxLayout(widgetMenu); - horizontalLayout2->setSpacing(0); - horizontalLayout2->setObjectName(QString::fromUtf8("horizontalLayout2")); - horizontalLayout2->setContentsMargins(0, 0, 0, 0); - - btnMenu_Close = new QPushButton(widgetMenu); - btnMenu_Close->setObjectName(QString::fromUtf8("btnMenu_Close")); - QSizePolicy sizePolicy3(QSizePolicy::Minimum, QSizePolicy::Expanding); - sizePolicy3.setHorizontalStretch(0); - sizePolicy3.setVerticalStretch(0); - sizePolicy3.setHeightForWidth(btnMenu_Close->sizePolicy().hasHeightForWidth()); - btnMenu_Close->setSizePolicy(sizePolicy3); - btnMenu_Close->setCursor(QCursor(Qt::ArrowCursor)); - btnMenu_Close->setFocusPolicy(Qt::NoFocus); - btnMenu_Close->setFlat(true); - - horizontalLayout2->addWidget(btnMenu_Close); - horizontalLayout1->addWidget(widgetMenu); - verticalLayout1->addWidget(widgetTitle); - - widgetMain = new QWidget(this); - widgetMain->setObjectName(QString::fromUtf8("QUIWidgetMain")); - - verticalLayout2 = new QVBoxLayout(widgetMain); - verticalLayout2->setSpacing(5); - verticalLayout2->setObjectName(QString::fromUtf8("verticalLayout2")); - verticalLayout2->setContentsMargins(5, 5, 5, 5); - - frame = new QFrame(widgetMain); - frame->setObjectName(QString::fromUtf8("QUIFrame")); - frame->setFrameShape(QFrame::Box); - frame->setFrameShadow(QFrame::Sunken); - - labInfo = new QLabel(frame); - labInfo->setObjectName(QString::fromUtf8("QUILabInfo")); - labInfo->setScaledContents(false); - labInfo->setWordWrap(true); - - verticalLayout3 = new QVBoxLayout(frame); - verticalLayout3->setObjectName(QString::fromUtf8("verticalLayout3")); - verticalLayout3->addWidget(labInfo); - - txtValue = new QLineEdit(frame); - txtValue->setObjectName(QString::fromUtf8("QUITxtValue")); - verticalLayout3->addWidget(txtValue); - - cboxValue = new QComboBox(frame); - cboxValue->setObjectName(QString::fromUtf8("QUICboxValue")); - verticalLayout3->addWidget(cboxValue); - - lay = new QHBoxLayout(); - lay->setObjectName(QString::fromUtf8("lay")); - horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - lay->addItem(horizontalSpacer); - - btnOk = new QPushButton(frame); - btnOk->setObjectName(QString::fromUtf8("QUIBtnOk")); - btnOk->setMinimumSize(QSize(85, 0)); - lay->addWidget(btnOk); - btnOk->setDefault(true); - - btnCancel = new QPushButton(frame); - btnCancel->setObjectName(QString::fromUtf8("QUIBtnCancel")); - btnCancel->setMinimumSize(QSize(85, 0)); - lay->addWidget(btnCancel); - - verticalLayout3->addLayout(lay); - verticalLayout2->addWidget(frame); - verticalLayout1->addWidget(widgetMain); - - QWidget::setTabOrder(txtValue, btnOk); - QWidget::setTabOrder(btnOk, btnCancel); - - labTitle->setText("输入框"); - btnOk->setText("确 定"); - btnCancel->setText("取 消"); - - connect(btnOk, SIGNAL(clicked()), this, SLOT(on_btnOk_clicked())); - connect(btnCancel, SIGNAL(clicked()), this, SLOT(on_btnMenu_Close_clicked())); - connect(btnMenu_Close, SIGNAL(clicked()), this, SLOT(on_btnMenu_Close_clicked())); -} - -void QUIInputBox::initForm() -{ - //设置阴影 - QUIHelper::setFormShadow(this, verticalLayout1); - //设置无边框 - QUIHelper::setFramelessForm(this, widgetTitle, labIco, btnMenu_Close); - this->setWindowTitle(this->labTitle->text()); - this->setFixedSize(QUIDialogMinWidth, QUIDialogMinHeight + 10); - - //按钮设置最小尺寸和图标大小 - QList btns = this->frame->findChildren(); - foreach (QPushButton *btn, btns) { - btn->setMinimumWidth(QUIBtnMinWidth); - btn->setIconSize(QSize(QUIIconWidth, QUIIconHeight)); - } - - closeSec = 0; - currentSec = 0; - - QTimer *timer = new QTimer(this); - timer->setInterval(1000); - connect(timer, SIGNAL(timeout()), this, SLOT(checkSec())); - timer->start(); - - this->installEventFilter(this); -} - -void QUIInputBox::checkSec() -{ - if (closeSec == 0) { - return; - } - - if (currentSec < closeSec) { - currentSec++; - } else { - this->close(); - } - - QString str = QString("关闭倒计时 %1 s").arg(closeSec - currentSec + 1); - this->labCountDown->setText(str); -} - -void QUIInputBox::setParameter(const QString &title, int type, int closeSec, - QString placeholderText, bool pwd, - const QString &defaultValue) -{ - this->closeSec = closeSec; - this->currentSec = 0; - this->labCountDown->clear(); - this->labInfo->setText(title); - checkSec(); - - if (type == 0) { - this->cboxValue->setVisible(false); - this->txtValue->setPlaceholderText(placeholderText); - this->txtValue->setText(defaultValue); - - if (pwd) { - this->txtValue->setEchoMode(QLineEdit::Password); - } - } else if (type == 1) { - this->txtValue->setVisible(false); - this->cboxValue->addItems(defaultValue.split("|")); - //回显字符串作为默认的下拉选项 - if (!placeholderText.isEmpty()) { - this->cboxValue->setCurrentIndex(this->cboxValue->findText(placeholderText)); - } - } -} - -QString QUIInputBox::getValue() const -{ - return this->value; -} - -void QUIInputBox::closeEvent(QCloseEvent *) -{ - closeSec = 0; - currentSec = 0; -} - -bool QUIInputBox::eventFilter(QObject *watched, QEvent *event) -{ - static QPoint mousePoint; - static bool mousePressed = false; - - QMouseEvent *mouseEvent = static_cast(event); - if (mouseEvent->type() == QEvent::MouseButtonPress) { - if (mouseEvent->button() == Qt::LeftButton) { - mousePressed = true; - mousePoint = mouseEvent->globalPos() - this->pos(); - return true; - } - } else if (mouseEvent->type() == QEvent::MouseButtonRelease) { - mousePressed = false; - return true; - } else if (mouseEvent->type() == QEvent::MouseMove) { - if (mousePressed) { - this->move(mouseEvent->globalPos() - mousePoint); - return true; - } - } - - return QWidget::eventFilter(watched, event); -} - -void QUIInputBox::on_btnOk_clicked() -{ - if (this->txtValue->isVisible()) { - value = this->txtValue->text(); - } else if (this->cboxValue->isVisible()) { - value = this->cboxValue->currentText(); - } - - done(QMessageBox::Ok); - close(); -} - -void QUIInputBox::on_btnMenu_Close_clicked() -{ - done(QMessageBox::Cancel); - close(); -} - -void QUIInputBox::setIconMain(int icon, quint32 size) -{ - IconHelper::setIcon(this->labIco, icon, size); -} diff --git a/core_qui/quiinputbox.h b/core_qui/quiinputbox.h deleted file mode 100644 index f6824bc..0000000 --- a/core_qui/quiinputbox.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef QUIINPUTBOX_H -#define QUIINPUTBOX_H - -#include "quihead.h" - -class QUIInputBox : public QDialog -{ - Q_OBJECT - -public: - static QUIInputBox *Instance(); - explicit QUIInputBox(QWidget *parent = 0); - ~QUIInputBox(); - -protected: - void showEvent(QShowEvent *); - void closeEvent(QCloseEvent *); - bool eventFilter(QObject *watched, QEvent *event); - -private: - static QScopedPointer self; - - QVBoxLayout *verticalLayout1; - QWidget *widgetTitle; - QHBoxLayout *horizontalLayout1; - QLabel *labIco; - QLabel *labTitle; - QLabel *labCountDown; - QWidget *widgetMenu; - QHBoxLayout *horizontalLayout2; - QPushButton *btnMenu_Close; - QWidget *widgetMain; - QVBoxLayout *verticalLayout2; - QFrame *frame; - QVBoxLayout *verticalLayout3; - QLabel *labInfo; - QLineEdit *txtValue; - QComboBox *cboxValue; - QHBoxLayout *lay; - QSpacerItem *horizontalSpacer; - QPushButton *btnOk; - QPushButton *btnCancel; - -private: - int closeSec; //总显示时间 - int currentSec; //当前已显示时间 - QString value; //当前值 - -private slots: - void initControl(); //初始化控件 - void initForm(); //初始化窗体 - void checkSec(); //校验倒计时 - -private slots: - void on_btnOk_clicked(); - void on_btnMenu_Close_clicked(); - -public: - QString getValue()const; - -public Q_SLOTS: - //设置左上角图标 - void setIconMain(int icon, quint32 size = 12); - //设置输入对话框的各种参数 - void setParameter(const QString &title, int type = 0, int closeSec = 0, - QString placeholderText = QString(), bool pwd = false, - const QString &defaultValue = QString()); - -}; - -#endif // QUIINPUTBOX_H diff --git a/core_qui/quimessagebox.cpp b/core_qui/quimessagebox.cpp deleted file mode 100644 index 4a8bfbd..0000000 --- a/core_qui/quimessagebox.cpp +++ /dev/null @@ -1,337 +0,0 @@ -#include "quimessagebox.h" - -QScopedPointer QUIMessageBox::self; -QUIMessageBox *QUIMessageBox::Instance() -{ - if (self.isNull()) { - static QMutex mutex; - QMutexLocker locker(&mutex); - if (self.isNull()) { - self.reset(new QUIMessageBox); - } - } - - return self.data(); -} - -QUIMessageBox::QUIMessageBox(QWidget *parent) : QDialog(parent) -{ - this->initControl(); - this->initForm(); -} - -QUIMessageBox::~QUIMessageBox() -{ - delete widgetMain; -} - -void QUIMessageBox::showEvent(QShowEvent *) -{ - QUIHelper::setIconBtn(btnOk, ":/image/btn_ok.png", 0xf00c); - QUIHelper::setIconBtn(btnCancel, ":/image/btn_close.png", 0xf00d); - QUIHelper::setFormInCenter(this); - this->activateWindow(); - //QMetaObject::invokeMethod(this, "autoSize", Qt::QueuedConnection); -} - -void QUIMessageBox::closeEvent(QCloseEvent *) -{ - closeSec = 0; - currentSec = 0; -} - -bool QUIMessageBox::eventFilter(QObject *watched, QEvent *event) -{ - static QPoint mousePoint; - static bool mousePressed = false; - - QMouseEvent *mouseEvent = static_cast(event); - if (mouseEvent->type() == QEvent::MouseButtonPress) { - if (mouseEvent->button() == Qt::LeftButton) { - mousePressed = true; - mousePoint = mouseEvent->globalPos() - this->pos(); - return true; - } - } else if (mouseEvent->type() == QEvent::MouseButtonRelease) { - mousePressed = false; - return true; - } else if (mouseEvent->type() == QEvent::MouseMove) { - if (mousePressed) { - this->move(mouseEvent->globalPos() - mousePoint); - return true; - } - } - - return QWidget::eventFilter(watched, event); -} - -void QUIMessageBox::initControl() -{ - this->setObjectName(QString::fromUtf8("QUIMessageBox")); - - verticalLayout1 = new QVBoxLayout(this); - verticalLayout1->setSpacing(0); - verticalLayout1->setObjectName(QString::fromUtf8("verticalLayout1")); - verticalLayout1->setContentsMargins(1, 1, 1, 1); - - widgetTitle = new QWidget(this); - widgetTitle->setObjectName(QString::fromUtf8("QUIWidgetTitle")); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); - sizePolicy.setHorizontalStretch(0); - sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(widgetTitle->sizePolicy().hasHeightForWidth()); - widgetTitle->setSizePolicy(sizePolicy); - - horizontalLayout3 = new QHBoxLayout(widgetTitle); - horizontalLayout3->setSpacing(0); - horizontalLayout3->setObjectName(QString::fromUtf8("horizontalLayout3")); - horizontalLayout3->setContentsMargins(0, 0, 0, 0); - - labIco = new QLabel(widgetTitle); - labIco->setObjectName(QString::fromUtf8("QUILabIco")); - QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::Preferred); - sizePolicy1.setHorizontalStretch(0); - sizePolicy1.setVerticalStretch(0); - sizePolicy1.setHeightForWidth(labIco->sizePolicy().hasHeightForWidth()); - labIco->setSizePolicy(sizePolicy1); - labIco->setAlignment(Qt::AlignCenter); - horizontalLayout3->addWidget(labIco); - - labTitle = new QLabel(widgetTitle); - labTitle->setObjectName(QString::fromUtf8("QUILabTitle")); - labTitle->setAlignment(Qt::AlignLeading | Qt::AlignLeft | Qt::AlignVCenter); - horizontalLayout3->addWidget(labTitle); - - labCountDown = new QLabel(widgetTitle); - labCountDown->setObjectName(QString::fromUtf8("QUILabCountDown")); - QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Preferred); - sizePolicy2.setHorizontalStretch(0); - sizePolicy2.setVerticalStretch(0); - sizePolicy2.setHeightForWidth(labCountDown->sizePolicy().hasHeightForWidth()); - labCountDown->setSizePolicy(sizePolicy2); - labCountDown->setAlignment(Qt::AlignCenter); - horizontalLayout3->addWidget(labCountDown); - - widgetMenu = new QWidget(widgetTitle); - widgetMenu->setObjectName(QString::fromUtf8("QUIWidgetMenu")); - sizePolicy1.setHeightForWidth(widgetMenu->sizePolicy().hasHeightForWidth()); - widgetMenu->setSizePolicy(sizePolicy1); - - horizontalLayout4 = new QHBoxLayout(widgetMenu); - horizontalLayout4->setSpacing(0); - horizontalLayout4->setObjectName(QString::fromUtf8("horizontalLayout4")); - horizontalLayout4->setContentsMargins(0, 0, 0, 0); - - btnMenu_Close = new QPushButton(widgetMenu); - btnMenu_Close->setObjectName(QString::fromUtf8("btnMenu_Close")); - QSizePolicy sizePolicy3(QSizePolicy::Minimum, QSizePolicy::Expanding); - sizePolicy3.setHorizontalStretch(0); - sizePolicy3.setVerticalStretch(0); - sizePolicy3.setHeightForWidth(btnMenu_Close->sizePolicy().hasHeightForWidth()); - btnMenu_Close->setSizePolicy(sizePolicy3); - btnMenu_Close->setCursor(QCursor(Qt::ArrowCursor)); - btnMenu_Close->setFocusPolicy(Qt::NoFocus); - btnMenu_Close->setFlat(true); - - horizontalLayout4->addWidget(btnMenu_Close); - horizontalLayout3->addWidget(widgetMenu); - verticalLayout1->addWidget(widgetTitle); - - widgetMain = new QWidget(this); - widgetMain->setObjectName(QString::fromUtf8("QUIWidgetMain")); - - verticalLayout2 = new QVBoxLayout(widgetMain); - verticalLayout2->setSpacing(5); - verticalLayout2->setObjectName(QString::fromUtf8("verticalLayout2")); - verticalLayout2->setContentsMargins(5, 5, 5, 5); - - frame = new QFrame(widgetMain); - frame->setObjectName(QString::fromUtf8("QUIFrame")); - frame->setFrameShape(QFrame::Box); - frame->setFrameShadow(QFrame::Sunken); - - labIcoMain = new QLabel(frame); - labIcoMain->setObjectName(QString::fromUtf8("QUILabIcoMain")); - labIcoMain->setAlignment(Qt::AlignCenter); - - verticalLayout4 = new QVBoxLayout(frame); - verticalLayout4->setObjectName(QString::fromUtf8("verticalLayout4")); - verticalLayout4->setContentsMargins(-1, 9, -1, -1); - - horizontalLayout1 = new QHBoxLayout(); - horizontalLayout1->setObjectName(QString::fromUtf8("horizontalLayout1")); - horizontalLayout1->addWidget(labIcoMain); - horizontalSpacer1 = new QSpacerItem(5, 0, QSizePolicy::Minimum, QSizePolicy::Minimum); - horizontalLayout1->addItem(horizontalSpacer1); - - labInfo = new QLabel(frame); - labInfo->setObjectName(QString::fromUtf8("QUILabInfo")); - QSizePolicy sizePolicy4(QSizePolicy::Expanding, QSizePolicy::Expanding); - sizePolicy4.setHorizontalStretch(0); - sizePolicy4.setVerticalStretch(0); - sizePolicy4.setHeightForWidth(labInfo->sizePolicy().hasHeightForWidth()); - labInfo->setSizePolicy(sizePolicy4); - labInfo->setMinimumSize(QSize(0, QUITitleMinSize)); - labInfo->setScaledContents(false); - labInfo->setWordWrap(true); - horizontalLayout1->addWidget(labInfo); - verticalLayout4->addLayout(horizontalLayout1); - - horizontalLayout2 = new QHBoxLayout(); - horizontalLayout2->setObjectName(QString::fromUtf8("horizontalLayout2")); - horizontalSpacer2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - horizontalLayout2->addItem(horizontalSpacer2); - - btnOk = new QPushButton(frame); - btnOk->setObjectName(QString::fromUtf8("QUIBtnOk")); - btnOk->setMinimumSize(QSize(85, 0)); - btnOk->setFocusPolicy(Qt::StrongFocus); - horizontalLayout2->addWidget(btnOk); - btnOk->setDefault(true); - - btnCancel = new QPushButton(frame); - btnCancel->setObjectName(QString::fromUtf8("QUIBtnCancel")); - btnCancel->setMinimumSize(QSize(85, 0)); - btnCancel->setFocusPolicy(Qt::StrongFocus); - horizontalLayout2->addWidget(btnCancel); - - verticalLayout4->addLayout(horizontalLayout2); - verticalLayout2->addWidget(frame); - verticalLayout1->addWidget(widgetMain); - - widgetTitle->raise(); - widgetMain->raise(); - frame->raise(); - - btnOk->setText("确 定"); - btnCancel->setText("取 消"); - - connect(btnOk, SIGNAL(clicked()), this, SLOT(on_btnOk_clicked())); - connect(btnCancel, SIGNAL(clicked()), this, SLOT(on_btnMenu_Close_clicked())); - connect(btnMenu_Close, SIGNAL(clicked()), this, SLOT(on_btnMenu_Close_clicked())); -} - -void QUIMessageBox::initForm() -{ - //设置阴影 - QUIHelper::setFormShadow(this, verticalLayout1); - //设置无边框 - QUIHelper::setFramelessForm(this, widgetTitle, labIco, btnMenu_Close); - this->setWindowTitle(this->labTitle->text()); - this->setFixedSize(QUIDialogMinWidth, QUIDialogMinHeight); - labIcoMain->setFixedSize(QUITitleMinSize, QUITitleMinSize); - - //按钮设置最小尺寸和图标大小 - QList btns = this->frame->findChildren(); - foreach (QPushButton *btn, btns) { - btn->setMinimumWidth(QUIBtnMinWidth); - btn->setIconSize(QSize(QUIIconWidth, QUIIconHeight)); - } - - closeSec = 0; - currentSec = 0; - - //倒计时定时器关闭窗体 - QTimer *timer = new QTimer(this); - timer->setInterval(1000); - connect(timer, SIGNAL(timeout()), this, SLOT(checkSec())); - timer->start(); - - this->installEventFilter(this); -} - -void QUIMessageBox::checkSec() -{ - if (closeSec == 0) { - return; - } - - if (currentSec < closeSec) { - currentSec++; - } else { - this->close(); - } - - QString str = QString("关闭倒计时 %1 s").arg(closeSec - currentSec + 1); - this->labCountDown->setText(str); -} - -void QUIMessageBox::on_btnOk_clicked() -{ - done(QMessageBox::Yes); - close(); -} - -void QUIMessageBox::on_btnMenu_Close_clicked() -{ - done(QMessageBox::No); - close(); -} - -void QUIMessageBox::setIconMain(int icon, quint32 size) -{ - IconHelper::setIcon(this->labIco, icon, size); -} - -void QUIMessageBox::setIconMsg(const QString &png, int icon) -{ - //图片存在则取图片,不存在则取图形字体 - int size = this->labIcoMain->size().height(); - if (QImage(png).isNull()) { - IconHelper::setIcon(this->labIcoMain, icon, size); - } else { - this->labIcoMain->setStyleSheet(QString("border-image:url(%1);").arg(png)); - } -} - -void QUIMessageBox::setMessage(const QString &msg, int type, int closeSec) -{ - this->closeSec = closeSec; - this->currentSec = 0; - this->labCountDown->clear(); - checkSec(); - - if (type == 0) { - setIconMsg(":/image/msg_info.png", 0xf05a); - this->btnCancel->setVisible(false); - this->labTitle->setText("提示"); - } else if (type == 1) { - setIconMsg(":/image/msg_question.png", 0xf059); - this->labTitle->setText("询问"); - } else if (type == 2) { - setIconMsg(":/image/msg_error.png", 0xf057); - this->btnCancel->setVisible(false); - this->labTitle->setText("错误"); - } - - this->labInfo->setText(msg); - this->setWindowTitle(this->labTitle->text()); - this->autoSize(); -} - -void QUIMessageBox::autoSize() -{ - QString msg = labInfo->text(); - //长度符合要求比如就两行只需要默认尺寸 - bool normal = (msg.length() < 30); - //计算有多少个换行符 - int count = 0; - foreach (QString s, msg) { - if (s == "\n") { - count++; - } - } - //如果包含换行超过1个则表示超过2行需要特殊布局尺寸 - if (count > 1) { - normal = false; - } - - //设置对话框的大小总以最合适的大小显示 - if (normal) { - //this->layout()->setSizeConstraint(QLayout::SetMinimumSize); - this->setFixedSize(QUIDialogMinWidth + 1, QUIDialogMinHeight + 1); - } else { - //this->layout()->setSizeConstraint(QLayout::SetFixedSize); - this->setFixedSize(labInfo->sizeHint() + QSize(100, 120)); - } -} diff --git a/core_qui/quimessagebox.h b/core_qui/quimessagebox.h deleted file mode 100644 index 1de41a1..0000000 --- a/core_qui/quimessagebox.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef QUIMESSAGEBOX_H -#define QUIMESSAGEBOX_H - -#include "quihead.h" - -class QUIMessageBox : public QDialog -{ - Q_OBJECT - -public: - static QUIMessageBox *Instance(); - explicit QUIMessageBox(QWidget *parent = 0); - ~QUIMessageBox(); - -protected: - void showEvent(QShowEvent *); - void closeEvent(QCloseEvent *); - bool eventFilter(QObject *watched, QEvent *event); - -private: - static QScopedPointer self; - - QVBoxLayout *verticalLayout1; - QWidget *widgetTitle; - QHBoxLayout *horizontalLayout3; - QLabel *labIco; - QLabel *labTitle; - QLabel *labCountDown; - QWidget *widgetMenu; - QHBoxLayout *horizontalLayout4; - QPushButton *btnMenu_Close; - QWidget *widgetMain; - QVBoxLayout *verticalLayout2; - QFrame *frame; - QVBoxLayout *verticalLayout4; - QHBoxLayout *horizontalLayout1; - QLabel *labIcoMain; - QSpacerItem *horizontalSpacer1; - QLabel *labInfo; - QHBoxLayout *horizontalLayout2; - QSpacerItem *horizontalSpacer2; - QPushButton *btnOk; - QPushButton *btnCancel; - -private: - int closeSec; //总显示时间 - int currentSec; //当前已显示时间 - -private slots: - void initControl(); //初始化控件 - void initForm(); //初始化窗体 - void checkSec(); //校验倒计时 - -private slots: - void on_btnOk_clicked(); - void on_btnMenu_Close_clicked(); - -public Q_SLOTS: - //设置左上角图标 - void setIconMain(int icon, quint32 size = 12); - //设置消息图标 图形字体+图片两种方式 - void setIconMsg(const QString &png, int icon); - //设置提示信息带类型和关闭倒计时 - void setMessage(const QString &msg, int type, int closeSec = 0); - //自适应尺寸 - void autoSize(); -}; - -#endif // QUIMESSAGEBOX_H diff --git a/core_qui/quistyle.cpp b/core_qui/quistyle.cpp deleted file mode 100644 index 2712aae..0000000 --- a/core_qui/quistyle.cpp +++ /dev/null @@ -1,224 +0,0 @@ -#include "quistyle.h" - -bool QUIStyle::isDark1(const QString &styleName) -{ - QStringList listDark; - listDark << "blackvideo" << "blackblue" << "darkblack" << "darkblue" << "flatblack" << "flatblue" << "purple"; - bool dark = false; - foreach (QString list, listDark) { - if (styleName.contains(list)) { - dark = true; - break; - } - } - return dark; -} - -bool QUIStyle::isDark2(const QString &styleName) -{ - QStringList listDark; - listDark << "blackvideo" << "blackblue" << "darkblack" << "darkblue" << "purple"; - bool dark = false; - foreach (QString list, listDark) { - if (styleName.contains(list)) { - dark = true; - break; - } - } - return dark; -} - -void QUIStyle::getStyle(QStringList &styleNames, QStringList &styleFiles) -{ - static QStringList names; - if (names.count() == 0) { - names << "银色" << "蓝色" << "浅蓝色" << "深蓝色"; - names << "灰色" << "浅灰色" << "深灰色"; - names << "黑色" << "浅黑色" << "深黑色" << "PS黑色"; - names << "黑色扁平" << "白色扁平" << "蓝色扁平"; - names << "紫色" << "黑蓝色" << "视频黑"; - } - - //中文皮肤名称对应样式表文件 - static QStringList files; - if (files.count() == 0) { - files << ":/qss/silvery.css" << ":/qss/blue.css" << ":/qss/lightblue.css" << ":/qss/darkblue.css"; - files << ":/qss/gray.css" << ":/qss/lightgray.css" << ":/qss/darkgray.css"; - files << ":/qss/black.css" << ":/qss/lightblack.css" << ":/qss/darkblack.css" << ":/qss/psblack.css"; - files << ":/qss/flatblack.css" << ":/qss/flatwhite.css" << ":/qss/flatblue.css"; - files << ":/qss/purple.css" << ":/qss/blackblue.css" << ":/qss/blackvideo.css"; - } - - styleNames = names; - styleFiles = files; -} - -void QUIStyle::setStyle(const QString &qss) -{ - QStringList list; - list << qss; - - //5.12开始tabbar左右反过来的 -#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) - //左右两侧的边框偏移一个像素 - list << "QTabWidget::pane:left{left:-1px;right:0px;}"; - list << "QTabWidget::pane:right{right:-1px;left:0px;}"; - //选中和悬停的时候边缘加深2个像素 - list << "QTabBar::tab:left:selected,QTabBar::tab:left:hover{border-width:0px 0px 0px 2px;}"; - list << "QTabBar::tab:right:selected,QTabBar::tab:right:hover{border-width:0px 2px 0px 0px;}"; -#endif - - //5.2开始颜色支持透明度 - QString txtReadOnlyColor = QUIConfig::NormalColorStart.right(6); -#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0)) - txtReadOnlyColor = "88" + txtReadOnlyColor; -#endif - - //增加文本框只读背景颜色 - list << QString("QLineEdit:read-only{background-color:#%1;}").arg(txtReadOnlyColor); - - QUIHelper::isCustomUI = true; - //阴影边框和配色方案自动变化 - QUIHelper::setFormShadow(QUIConfig::HighColor); - - QString paletteColor = qss.mid(20, 7); - qApp->setPalette(QPalette(paletteColor)); - qApp->setStyleSheet(list.join("")); -} - -void QUIStyle::setStyle(const QUIStyle::Style &style) -{ - //取出所有的皮肤名称和对应样式文件 - QStringList styleNames, styleFiles; - getStyle(styleNames, styleFiles); - - //取出对应索引的样式文件 - QString qssFile = (styleFiles.at((int)style)); - - //设置全局样式 - QFile file(qssFile); - if (file.open(QFile::ReadOnly)) { - QString qss = QLatin1String(file.readAll()); - QString paletteColor = qss.mid(20, 7); - getQssColor(qss, QUIConfig::TextColor, QUIConfig::PanelColor, QUIConfig::BorderColor, QUIConfig::NormalColorStart, - QUIConfig::NormalColorEnd, QUIConfig::DarkColorStart, QUIConfig::DarkColorEnd, QUIConfig::HighColor); - setStyle(qss); - file.close(); - } -} - -void QUIStyle::setStyleFile(const QString &qssFile) -{ - QString paletteColor, textColor; - setStyleFile(qssFile, paletteColor, textColor); -} - -void QUIStyle::setStyleFile(const QString &qssFile, QString &paletteColor, QString &textColor) -{ - QFile file(qssFile); - if (file.open(QFile::ReadOnly)) { - QString qss = QLatin1String(file.readAll()); - paletteColor = qss.mid(20, 7); - textColor = qss.mid(49, 7); - getQssColor(qss, QUIConfig::TextColor, QUIConfig::PanelColor, QUIConfig::BorderColor, QUIConfig::NormalColorStart, - QUIConfig::NormalColorEnd, QUIConfig::DarkColorStart, QUIConfig::DarkColorEnd, QUIConfig::HighColor); - setStyle(qss); - file.close(); - } -} - -void QUIStyle::setStyleFile(const QString &qssFile, QString &textColor, QString &panelColor, QString &borderColor, - QString &normalColorStart, QString &normalColorEnd, - QString &darkColorStart, QString &darkColorEnd, QString &highColor) -{ - QFile file(qssFile); - if (file.open(QFile::ReadOnly)) { - QString qss = QLatin1String(file.readAll()); - getQssColor(qss, textColor, panelColor, borderColor, normalColorStart, normalColorEnd, darkColorStart, darkColorEnd, highColor); - setStyle(qss); - file.close(); - } -} - -void QUIStyle::getQssColor(const QString &qss, const QString &flag, QString &color) -{ - int index = qss.indexOf(flag); - if (index >= 0) { - color = qss.mid(index + flag.length(), 7); - } - //qDebug() << TIMEMS << flag << color; -} - -void QUIStyle::getQssColor(const QString &qss, QString &textColor, - QString &panelColor, QString &borderColor, - QString &normalColorStart, QString &normalColorEnd, - QString &darkColorStart, QString &darkColorEnd, QString &highColor) -{ - getQssColor(qss, "TextColor:", textColor); - getQssColor(qss, "PanelColor:", panelColor); - getQssColor(qss, "BorderColor:", borderColor); - getQssColor(qss, "NormalColorStart:", normalColorStart); - getQssColor(qss, "NormalColorEnd:", normalColorEnd); - getQssColor(qss, "DarkColorStart:", darkColorStart); - getQssColor(qss, "DarkColorEnd:", darkColorEnd); - getQssColor(qss, "HighColor:", highColor); - - QUIHelper::isCustomUI = true; - QUIConfig::TextColor = textColor; - QUIConfig::PanelColor = panelColor; - QUIConfig::BorderColor = borderColor; - QUIConfig::NormalColorStart = normalColorStart; - QUIConfig::NormalColorEnd = normalColorEnd; - QUIConfig::DarkColorStart = darkColorStart; - QUIConfig::DarkColorEnd = darkColorEnd; - QUIConfig::HighColor = highColor; -} - -void QUIStyle::setLabStyle(QLabel *lab, quint8 type, const QString &bgColor, const QString &textColor) -{ - QString colorBg = bgColor; - QString colorText = textColor; - - //如果设置了新颜色则启用新颜色 - if (bgColor.isEmpty() || textColor.isEmpty()) { - if (type == 0) { - colorBg = "#D64D54"; - colorText = "#FFFFFF"; - } else if (type == 1) { - colorBg = "#17A086"; - colorText = "#FFFFFF"; - } else if (type == 2) { - colorBg = "#47A4E9"; - colorText = "#FFFFFF"; - } else if (type == 3) { - colorBg = "#282D30"; - colorText = "#FFFFFF"; - } else if (type == 4) { - colorBg = "#0E99A0"; - colorText = "#FFFFFF"; - } else if (type == 5) { - colorBg = "#A279C5"; - colorText = "#FFFFFF"; - } else if (type == 6) { - colorBg = "#8C2957"; - colorText = "#FFFFFF"; - } else if (type == 7) { - colorBg = "#04567E"; - colorText = "#FFFFFF"; - } else if (type == 8) { - colorBg = "#FD8B28"; - colorText = "#FFFFFF"; - } else if (type == 9) { - colorBg = "#5580A2"; - colorText = "#FFFFFF"; - } - } - - QStringList qss; - //禁用颜色 - qss << QString("QLabel::disabled{background:none;color:%1;}").arg(QUIConfig::BorderColor); - //正常颜色 - qss << QString("QLabel{border:none;background-color:%1;color:%2;}").arg(colorBg).arg(colorText); - lab->setStyleSheet(qss.join("")); -} - diff --git a/core_qui/quistyle.h b/core_qui/quistyle.h deleted file mode 100644 index c8bd147..0000000 --- a/core_qui/quistyle.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef QUISTYLE_H -#define QUISTYLE_H - -#include "quihead.h" - -class QUIStyle -{ -public: - //样式枚举 - enum Style { - Style_Silvery = 0, //银色样式 - Style_Blue = 1, //蓝色样式 - Style_LightBlue = 2, //淡蓝色样式 - Style_DarkBlue = 3, //深蓝色样式 - Style_Gray = 4, //灰色样式 - Style_LightGray = 5, //浅灰色样式 - Style_DarkGray = 6, //深灰色样式 - Style_Black = 7, //黑色样式 - Style_LightBlack = 8, //浅黑色样式 - Style_DarkBlack = 9, //深黑色样式 - Style_PSBlack = 10, //PS黑色样式 - Style_FlatBlack = 11, //黑色扁平样式 - Style_FlatWhite = 12, //白色扁平样式 - Style_FlatBlue = 13, //蓝色扁平样式 - Style_Purple = 14, //紫色样式 - Style_BlackBlue = 15, //黑蓝色样式 - Style_BlackVideo = 16 //视频监控黑色样式 - }; - - //获取是否是加深样式 - static bool isDark1(const QString &styleName); - static bool isDark2(const QString &styleName); - - //获取皮肤样式中文名称和对应的样式表文件 - static void getStyle(QStringList &styleNames, QStringList &styleFiles); - //设置全局样式 - static void setStyle(const QString &qss); - static void setStyle(const QUIStyle::Style &style); - static void setStyleFile(const QString &qssFile); - static void setStyleFile(const QString &qssFile, QString &paletteColor, QString &textColor); - static void setStyleFile(const QString &qssFile, QString &textColor, - QString &panelColor, QString &borderColor, - QString &normalColorStart, QString &normalColorEnd, - QString &darkColorStart, QString &darkColorEnd, - QString &highColor); - - //根据QSS样式获取对应颜色值 - static void getQssColor(const QString &qss, const QString &flag, QString &color); - static void getQssColor(const QString &qss, QString &textColor, - QString &panelColor, QString &borderColor, - QString &normalColorStart, QString &normalColorEnd, - QString &darkColorStart, QString &darkColorEnd, - QString &highColor); - - //设置标签颜色 - static void setLabStyle(QLabel *lab, quint8 type, const QString &bgColor = "", const QString &textColor = ""); -}; - -#endif // QUISTYLE_H diff --git a/core_qui/quitipbox.cpp b/core_qui/quitipbox.cpp deleted file mode 100644 index c71d95f..0000000 --- a/core_qui/quitipbox.cpp +++ /dev/null @@ -1,254 +0,0 @@ -#include "quitipbox.h" - -QScopedPointer QUITipBox::self; -QUITipBox *QUITipBox::Instance() -{ - if (self.isNull()) { - static QMutex mutex; - QMutexLocker locker(&mutex); - if (self.isNull()) { - self.reset(new QUITipBox); - } - } - - return self.data(); -} - -QUITipBox::QUITipBox(QWidget *parent) : QDialog(parent) -{ - this->initControl(); - this->initForm(); -} - -QUITipBox::~QUITipBox() -{ - delete widgetMain; -} - -void QUITipBox::showEvent(QShowEvent *) -{ - this->activateWindow(); -} - -void QUITipBox::closeEvent(QCloseEvent *) -{ - closeSec = 0; - currentSec = 0; -} - -bool QUITipBox::eventFilter(QObject *watched, QEvent *event) -{ - static QPoint mousePoint; - static bool mousePressed = false; - - QMouseEvent *mouseEvent = static_cast(event); - if (mouseEvent->type() == QEvent::MouseButtonPress) { - if (mouseEvent->button() == Qt::LeftButton) { - mousePressed = true; - mousePoint = mouseEvent->globalPos() - this->pos(); - return true; - } - } else if (mouseEvent->type() == QEvent::MouseButtonRelease) { - mousePressed = false; - return true; - } else if (mouseEvent->type() == QEvent::MouseMove) { - if (mousePressed) { - this->move(mouseEvent->globalPos() - mousePoint); - return true; - } - } - - return QWidget::eventFilter(watched, event); -} - -void QUITipBox::initControl() -{ - this->setObjectName(QString::fromUtf8("QUITipBox")); - - verticalLayout = new QVBoxLayout(this); - verticalLayout->setSpacing(0); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); - verticalLayout->setContentsMargins(1, 1, 1, 1); - - widgetTitle = new QWidget(this); - widgetTitle->setObjectName(QString::fromUtf8("QUIWidgetTitle")); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); - sizePolicy.setHorizontalStretch(0); - sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(widgetTitle->sizePolicy().hasHeightForWidth()); - widgetTitle->setSizePolicy(sizePolicy); - - horizontalLayout2 = new QHBoxLayout(widgetTitle); - horizontalLayout2->setSpacing(0); - horizontalLayout2->setObjectName(QString::fromUtf8("horizontalLayout2")); - horizontalLayout2->setContentsMargins(0, 0, 0, 0); - - labIco = new QLabel(widgetTitle); - labIco->setObjectName(QString::fromUtf8("QUILabIco")); - labIco->setAlignment(Qt::AlignCenter); - horizontalLayout2->addWidget(labIco); - - labTitle = new QLabel(widgetTitle); - labTitle->setObjectName(QString::fromUtf8("QUILabTitle")); - labTitle->setAlignment(Qt::AlignLeading | Qt::AlignLeft | Qt::AlignVCenter); - horizontalLayout2->addWidget(labTitle); - - labCountDown = new QLabel(widgetTitle); - labCountDown->setObjectName(QString::fromUtf8("QUILabCountDown")); - QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Preferred); - sizePolicy1.setHorizontalStretch(0); - sizePolicy1.setVerticalStretch(0); - sizePolicy1.setHeightForWidth(labCountDown->sizePolicy().hasHeightForWidth()); - labCountDown->setSizePolicy(sizePolicy1); - labCountDown->setAlignment(Qt::AlignCenter); - horizontalLayout2->addWidget(labCountDown); - - widgetMenu = new QWidget(widgetTitle); - widgetMenu->setObjectName(QString::fromUtf8("QUIWidgetMenu")); - QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Preferred); - sizePolicy2.setHorizontalStretch(0); - sizePolicy2.setVerticalStretch(0); - sizePolicy2.setHeightForWidth(widgetMenu->sizePolicy().hasHeightForWidth()); - widgetMenu->setSizePolicy(sizePolicy2); - - horizontalLayout = new QHBoxLayout(widgetMenu); - horizontalLayout->setSpacing(0); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); - horizontalLayout->setContentsMargins(0, 0, 0, 0); - - btnMenu_Close = new QPushButton(widgetMenu); - btnMenu_Close->setObjectName(QString::fromUtf8("btnMenu_Close")); - QSizePolicy sizePolicy3(QSizePolicy::Minimum, QSizePolicy::Expanding); - sizePolicy3.setHorizontalStretch(0); - sizePolicy3.setVerticalStretch(0); - sizePolicy3.setHeightForWidth(btnMenu_Close->sizePolicy().hasHeightForWidth()); - btnMenu_Close->setSizePolicy(sizePolicy3); - btnMenu_Close->setCursor(QCursor(Qt::ArrowCursor)); - btnMenu_Close->setFocusPolicy(Qt::NoFocus); - btnMenu_Close->setFlat(true); - - horizontalLayout->addWidget(btnMenu_Close); - horizontalLayout2->addWidget(widgetMenu); - verticalLayout->addWidget(widgetTitle); - - widgetMain = new QWidget(this); - widgetMain->setObjectName(QString::fromUtf8("QUIWidgetMain")); - widgetMain->setAutoFillBackground(true); - - labInfo = new QLabel(widgetMain); - labInfo->setObjectName(QString::fromUtf8("QUILabInfo")); - labInfo->setScaledContents(true); - labInfo->setWordWrap(true); - - verticalLayout2 = new QVBoxLayout(widgetMain); - verticalLayout2->setObjectName(QString::fromUtf8("verticalLayout2")); - verticalLayout2->addWidget(labInfo); - verticalLayout->addWidget(widgetMain); - - connect(btnMenu_Close, SIGNAL(clicked()), this, SLOT(on_btnMenu_Close_clicked())); -} - -void QUITipBox::initForm() -{ - //设置阴影 - QUIHelper::setFormShadow(this, verticalLayout); - //设置无边框 - QUIHelper::setFramelessForm(this, widgetTitle, labIco, btnMenu_Close); - this->setWindowTitle(this->labTitle->text()); - this->setFixedSize(QUIDialogMinWidth, QUIDialogMinHeight); - - closeSec = 0; - currentSec = 0; - - //关闭倒计时定时器 - QTimer *timer = new QTimer(this); - timer->setInterval(1000); - connect(timer, SIGNAL(timeout()), this, SLOT(checkSec())); - timer->start(); - - this->installEventFilter(this); - - //字体加大 - QFont font; - font.setPixelSize(QUIConfig::FontSize + 3); - font.setBold(true); - this->labInfo->setFont(font); - - //显示和隐藏窗体动画效果 - animation = new QPropertyAnimation(this, "pos", this); - animation->setDuration(500); - animation->setEasingCurve(QEasingCurve::InOutQuad); -} - -void QUITipBox::checkSec() -{ - if (closeSec == 0) { - return; - } - - if (currentSec < closeSec) { - currentSec++; - } else { - this->close(); - } - - QString str = QString("关闭倒计时 %1 s").arg(closeSec - currentSec + 1); - this->labCountDown->setText(str); -} - -void QUITipBox::on_btnMenu_Close_clicked() -{ - done(QMessageBox::No); - close(); -} - -void QUITipBox::setIconMain(int icon, quint32 size) -{ - IconHelper::setIcon(this->labIco, icon, size); -} - -void QUITipBox::setTip(const QString &title, const QString &tip, bool fullScreen, bool center, int closeSec) -{ - this->closeSec = closeSec; - this->currentSec = 0; - this->labCountDown->clear(); - checkSec(); - - this->fullScreen = fullScreen; - this->labTitle->setText(title); - this->labInfo->setText(tip); - this->labInfo->setAlignment(center ? Qt::AlignCenter : Qt::AlignLeft); - this->setWindowTitle(this->labTitle->text()); - - //计算屏幕尺寸 - QRect rect = QUIHelper::getScreenRect(!fullScreen); - int width = rect.width(); - int height = rect.height(); - int x = width - this->width() + rect.x(); - int y = height - this->height(); - - //移到右下角 - this->move(x, y); - - //启动动画 - animation->stop(); - animation->setStartValue(QPoint(x, height)); - animation->setEndValue(QPoint(x, y)); - animation->start(); -} - -void QUITipBox::hide() -{ - QRect rect = QUIHelper::getScreenRect(!fullScreen); - int width = rect.width(); - int height = rect.height(); - int x = width - this->width() + rect.x(); - int y = height - this->height(); - - //启动动画 - animation->stop(); - animation->setStartValue(QPoint(x, y)); - animation->setEndValue(QPoint(x, QUIHelper::getScreenRect(false).height())); - animation->start(); -} - diff --git a/core_qui/quitipbox.h b/core_qui/quitipbox.h deleted file mode 100644 index 8e4f432..0000000 --- a/core_qui/quitipbox.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef QUITIPBOX_H -#define QUITIPBOX_H - -#include "quihead.h" - -class QUITipBox : public QDialog -{ - Q_OBJECT - -public: - static QUITipBox *Instance(); - explicit QUITipBox(QWidget *parent = 0); - ~QUITipBox(); - -protected: - void showEvent(QShowEvent *); - void closeEvent(QCloseEvent *); - bool eventFilter(QObject *watched, QEvent *event); - -private: - static QScopedPointer self; - - QVBoxLayout *verticalLayout; - QWidget *widgetTitle; - QHBoxLayout *horizontalLayout2; - QLabel *labIco; - QLabel *labTitle; - QLabel *labCountDown; - QWidget *widgetMenu; - QHBoxLayout *horizontalLayout; - QPushButton *btnMenu_Close; - QWidget *widgetMain; - QVBoxLayout *verticalLayout2; - QLabel *labInfo; - - QPropertyAnimation *animation; - bool fullScreen; - -private: - int closeSec; //总显示时间 - int currentSec; //当前已显示时间 - -private slots: - void initControl(); //初始化控件 - void initForm(); //初始化窗体 - void checkSec(); //校验倒计时 - -private slots: - void on_btnMenu_Close_clicked(); - -public Q_SLOTS: - //设置左上角图标 - void setIconMain(int icon, quint32 size = 12); - //设置提示信息 - void setTip(const QString &title, const QString &tip, bool fullScreen = false, bool center = true, int closeSec = 0); - //隐藏界面 - void hide(); -}; - -#endif // QUITIPBOX_H diff --git a/core_qui/quiwidget.cpp b/core_qui/quiwidget.cpp deleted file mode 100644 index 20908e6..0000000 --- a/core_qui/quiwidget.cpp +++ /dev/null @@ -1,473 +0,0 @@ -#include "quiwidget.h" - -QUIWidget::QUIWidget(QWidget *parent) : QDialog(parent) -{ - this->initControl(); - this->initForm(); -} - -QUIWidget::~QUIWidget() -{ -} - -bool QUIWidget::eventFilter(QObject *watched, QEvent *event) -{ - static QPoint mousePoint; - static bool mousePressed = false; - - QMouseEvent *mouseEvent = static_cast(event); - if (mouseEvent->type() == QEvent::MouseButtonPress) { - if (mouseEvent->button() == Qt::LeftButton) { - mousePressed = true; - mousePoint = mouseEvent->globalPos() - this->pos(); - } - } else if (mouseEvent->type() == QEvent::MouseButtonRelease) { - mousePressed = false; - } else if (mouseEvent->type() == QEvent::MouseMove) { - if (mousePressed) { - if (this->property("canMove").toBool()) { - this->move(mouseEvent->globalPos() - mousePoint); - } - } - } else if (mouseEvent->type() == QEvent::MouseButtonDblClick) { - //以下写法可以将双击识别限定在标题栏 - if (this->btnMenu_Max->isVisible() && watched == this->widgetTitle) { - //if (this->btnMenu_Max->isVisible()) { - this->on_btnMenu_Max_clicked(); - } - } - - return QWidget::eventFilter(watched, event); -} - -QLabel *QUIWidget::getLabIco() const -{ - return this->labIco; -} - -QLabel *QUIWidget::getLabTitle() const -{ - return this->labTitle; -} - -QToolButton *QUIWidget::getBtnMenu() const -{ - return this->btnMenu; -} - -QPushButton *QUIWidget::getBtnMenuMin() const -{ - return this->btnMenu_Min; -} - -QPushButton *QUIWidget::getBtnMenuMax() const -{ - return this->btnMenu_Max; -} - -QPushButton *QUIWidget::getBtnMenuClose() const -{ - return this->btnMenu_Close; -} - -QString QUIWidget::getTitle() const -{ - return this->title; -} - -Qt::Alignment QUIWidget::getAlignment() const -{ - return this->alignment; -} - -bool QUIWidget::getMinHide() const -{ - return this->minHide; -} - -bool QUIWidget::getExitAll() const -{ - return this->exitAll; -} - -QSize QUIWidget::sizeHint() const -{ - return QSize(600, 450); -} - -QSize QUIWidget::minimumSizeHint() const -{ - return QSize(200, 150); -} - -void QUIWidget::initControl() -{ - this->setObjectName(QString::fromUtf8("QUIWidget")); - this->resize(900, 750); - verticalLayout1 = new QVBoxLayout(this); - verticalLayout1->setSpacing(0); - verticalLayout1->setContentsMargins(11, 11, 11, 11); - verticalLayout1->setObjectName(QString::fromUtf8("verticalLayout1")); - verticalLayout1->setContentsMargins(1, 1, 1, 1); - widgetMain = new QWidget(this); - widgetMain->setObjectName(QString::fromUtf8("QUIWidgetMain")); - verticalLayout2 = new QVBoxLayout(widgetMain); - verticalLayout2->setSpacing(0); - verticalLayout2->setContentsMargins(11, 11, 11, 11); - verticalLayout2->setObjectName(QString::fromUtf8("verticalLayout2")); - verticalLayout2->setContentsMargins(0, 0, 0, 0); - widgetTitle = new QWidget(widgetMain); - widgetTitle->setObjectName(QString::fromUtf8("QUIWidgetTitle")); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); - sizePolicy.setHorizontalStretch(0); - sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(widgetTitle->sizePolicy().hasHeightForWidth()); - widgetTitle->setSizePolicy(sizePolicy); - widgetTitle->setMinimumSize(QSize(0, 30)); - horizontalLayout4 = new QHBoxLayout(widgetTitle); - horizontalLayout4->setSpacing(0); - horizontalLayout4->setContentsMargins(11, 11, 11, 11); - horizontalLayout4->setObjectName(QString::fromUtf8("horizontalLayout4")); - horizontalLayout4->setContentsMargins(0, 0, 0, 0); - - labIco = new QLabel(widgetTitle); - labIco->setObjectName(QString::fromUtf8("QUILabIco")); - QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::Preferred); - sizePolicy1.setHorizontalStretch(0); - sizePolicy1.setVerticalStretch(0); - sizePolicy1.setHeightForWidth(labIco->sizePolicy().hasHeightForWidth()); - labIco->setSizePolicy(sizePolicy1); - labIco->setMinimumSize(QSize(30, 0)); - labIco->setAlignment(Qt::AlignCenter); - horizontalLayout4->addWidget(labIco); - - labTitle = new QLabel(widgetTitle); - labTitle->setObjectName(QString::fromUtf8("QUILabTitle")); - QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Preferred); - sizePolicy2.setHorizontalStretch(0); - sizePolicy2.setVerticalStretch(0); - sizePolicy2.setHeightForWidth(labTitle->sizePolicy().hasHeightForWidth()); - labTitle->setSizePolicy(sizePolicy2); - labTitle->setAlignment(Qt::AlignLeading | Qt::AlignLeft | Qt::AlignVCenter); - horizontalLayout4->addWidget(labTitle); - - widgetMenu = new QWidget(widgetTitle); - widgetMenu->setObjectName(QString::fromUtf8("QUIWidgetMenu")); - sizePolicy1.setHeightForWidth(widgetMenu->sizePolicy().hasHeightForWidth()); - widgetMenu->setSizePolicy(sizePolicy1); - horizontalLayout = new QHBoxLayout(widgetMenu); - horizontalLayout->setSpacing(0); - horizontalLayout->setContentsMargins(11, 11, 11, 11); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); - horizontalLayout->setContentsMargins(0, 0, 0, 0); - - btnMenu = new QToolButton(widgetMenu); - btnMenu->setObjectName(QString::fromUtf8("btnMenu")); - QSizePolicy sizePolicy3(QSizePolicy::Fixed, QSizePolicy::Expanding); - sizePolicy3.setHorizontalStretch(0); - sizePolicy3.setVerticalStretch(0); - sizePolicy3.setHeightForWidth(btnMenu->sizePolicy().hasHeightForWidth()); - btnMenu->setSizePolicy(sizePolicy3); - btnMenu->setMinimumSize(QSize(30, 0)); - btnMenu->setMaximumSize(QSize(30, 16777215)); - btnMenu->setFocusPolicy(Qt::NoFocus); - btnMenu->setPopupMode(QToolButton::InstantPopup); - horizontalLayout->addWidget(btnMenu); - - btnMenu_Min = new QPushButton(widgetMenu); - btnMenu_Min->setObjectName(QString::fromUtf8("btnMenu_Min")); - QSizePolicy sizePolicy4(QSizePolicy::Minimum, QSizePolicy::Expanding); - sizePolicy4.setHorizontalStretch(0); - sizePolicy4.setVerticalStretch(0); - sizePolicy4.setHeightForWidth(btnMenu_Min->sizePolicy().hasHeightForWidth()); - btnMenu_Min->setSizePolicy(sizePolicy4); - btnMenu_Min->setMinimumSize(QSize(30, 0)); - btnMenu_Min->setMaximumSize(QSize(30, 16777215)); - btnMenu_Min->setCursor(QCursor(Qt::ArrowCursor)); - btnMenu_Min->setFocusPolicy(Qt::NoFocus); - horizontalLayout->addWidget(btnMenu_Min); - - btnMenu_Max = new QPushButton(widgetMenu); - btnMenu_Max->setObjectName(QString::fromUtf8("btnMenu_Max")); - sizePolicy3.setHeightForWidth(btnMenu_Max->sizePolicy().hasHeightForWidth()); - btnMenu_Max->setSizePolicy(sizePolicy3); - btnMenu_Max->setMinimumSize(QSize(30, 0)); - btnMenu_Max->setMaximumSize(QSize(30, 16777215)); - btnMenu_Max->setCursor(QCursor(Qt::ArrowCursor)); - btnMenu_Max->setFocusPolicy(Qt::NoFocus); - horizontalLayout->addWidget(btnMenu_Max); - - btnMenu_Close = new QPushButton(widgetMenu); - btnMenu_Close->setObjectName(QString::fromUtf8("btnMenu_Close")); - sizePolicy3.setHeightForWidth(btnMenu_Close->sizePolicy().hasHeightForWidth()); - btnMenu_Close->setSizePolicy(sizePolicy3); - btnMenu_Close->setMinimumSize(QSize(30, 0)); - btnMenu_Close->setMaximumSize(QSize(30, 16777215)); - btnMenu_Close->setCursor(QCursor(Qt::ArrowCursor)); - btnMenu_Close->setFocusPolicy(Qt::NoFocus); - horizontalLayout->addWidget(btnMenu_Close); - horizontalLayout4->addWidget(widgetMenu); - verticalLayout2->addWidget(widgetTitle); - - widget = new QWidget(widgetMain); - widget->setObjectName(QString::fromUtf8("widget")); - verticalLayout3 = new QVBoxLayout(widget); - verticalLayout3->setSpacing(0); - verticalLayout3->setContentsMargins(11, 11, 11, 11); - verticalLayout3->setObjectName(QString::fromUtf8("verticalLayout3")); - verticalLayout3->setContentsMargins(0, 0, 0, 0); - verticalLayout2->addWidget(widget); - verticalLayout1->addWidget(widgetMain); - - connect(this->btnMenu_Min, SIGNAL(clicked()), this, SLOT(on_btnMenu_Min_clicked())); - connect(this->btnMenu_Max, SIGNAL(clicked()), this, SLOT(on_btnMenu_Max_clicked())); - connect(this->btnMenu_Close, SIGNAL(clicked()), this, SLOT(on_btnMenu_Close_clicked())); -} - -void QUIWidget::initForm() -{ - //设置图形字体 - setIcon(QUIWidget::Lab_Ico, QUIConfig::IconMain, QUIConfig::FontSize + 1); - setIcon(QUIWidget::BtnMenu, QUIConfig::IconMenu); - setIcon(QUIWidget::BtnMenu_Min, QUIConfig::IconMin); - setIcon(QUIWidget::BtnMenu_Normal, QUIConfig::IconNormal); - setIcon(QUIWidget::BtnMenu_Close, QUIConfig::IconClose); - - //设置阴影 - //QUIHelper::setFormShadow(this, verticalLayout1); - //设置无边框 - QUIHelper::setFramelessForm(this); - this->widgetTitle->setProperty("form", "title"); - - //设置标题及对齐方式 - title = "QUI Demo"; - alignment = Qt::AlignLeft | Qt::AlignVCenter; - minHide = false; - exitAll = true; - mainWidget = 0; - - setVisible(QUIWidget::BtnMenu, false); - - //绑定事件过滤器监听鼠标移动 - this->installEventFilter(this); - this->widgetTitle->installEventFilter(this); - - //默认切换换肤立即换肤 - changedStyle = true; - - //添加换肤菜单 - QStringList styleNames, styleFiles; - QUIStyle::getStyle(styleNames, styleFiles); - - //添加到动作分组中形成互斥效果 - actionGroup = new QActionGroup(this); - int count = styleNames.count(); - for (int i = 0; i < count; i++) { - QAction *action = new QAction(this); - //设置可选中前面有个勾勾 - action->setCheckable(true); - action->setText(styleNames.at(i)); - action->setData(styleFiles.at(i)); - connect(action, SIGNAL(triggered(bool)), this, SLOT(changeStyle())); - this->btnMenu->addAction(action); - actionGroup->addAction(action); - } - - //默认选择一种样式 - setQssChecked(":/qss/lightblue.css"); -} - -void QUIWidget::changeStyle() -{ - QAction *action = (QAction *)sender(); - QString qssFile = action->data().toString(); - - //有些应用可能只需要发送个换肤的信号给他就行 - if (changedStyle) { - QUIStyle::setStyleFile(qssFile); - } - - emit changeStyle(qssFile); -} - -void QUIWidget::setIcon(QUIWidget::Widget widget, int icon, quint32 size) -{ - if (widget == QUIWidget::Lab_Ico) { - setIconMain(icon, size); - } else if (widget == QUIWidget::BtnMenu) { - QUIConfig::IconMenu = icon; - IconHelper::setIcon(this->btnMenu, icon, size); - } else if (widget == QUIWidget::BtnMenu_Min) { - QUIConfig::IconMin = icon; - IconHelper::setIcon(this->btnMenu_Min, icon, size); - } else if (widget == QUIWidget::BtnMenu_Max) { - QUIConfig::IconMax = icon; - IconHelper::setIcon(this->btnMenu_Max, icon, size); - } else if (widget == QUIWidget::BtnMenu_Normal) { - QUIConfig::IconNormal = icon; - IconHelper::setIcon(this->btnMenu_Max, icon, size); - } else if (widget == QUIWidget::BtnMenu_Close) { - QUIConfig::IconClose = icon; - IconHelper::setIcon(this->btnMenu_Close, icon, size); - } -} - -void QUIWidget::setIconMain(int icon, quint32 size) -{ - QUIConfig::IconMain = icon; - IconHelper::setIcon(this->labIco, icon, size); - QUIMessageBox::Instance()->setIconMain(icon, size); - QUIInputBox::Instance()->setIconMain(icon, size); - QUIDateSelect::Instance()->setIconMain(icon, size); -} - -void QUIWidget::setPixmap(QUIWidget::Widget widget, const QString &file, const QSize &size) -{ - //按照宽高比自动缩放 - QPixmap pix = QPixmap(file); - pix = pix.scaled(size, Qt::KeepAspectRatio); - if (widget == QUIWidget::Lab_Ico) { - this->labIco->setPixmap(pix); - } else if (widget == QUIWidget::BtnMenu) { - this->btnMenu->setIcon(QIcon(file)); - } else if (widget == QUIWidget::BtnMenu_Min) { - this->btnMenu_Min->setIcon(QIcon(file)); - } else if (widget == QUIWidget::BtnMenu_Max) { - this->btnMenu_Max->setIcon(QIcon(file)); - } else if (widget == QUIWidget::BtnMenu_Close) { - this->btnMenu_Close->setIcon(QIcon(file)); - } -} - -void QUIWidget::setVisible(QUIWidget::Widget widget, bool visible) -{ - if (widget == QUIWidget::Lab_Ico) { - this->labIco->setVisible(visible); - } else if (widget == QUIWidget::BtnMenu) { - this->btnMenu->setVisible(visible); - } else if (widget == QUIWidget::BtnMenu_Min) { - this->btnMenu_Min->setVisible(visible); - } else if (widget == QUIWidget::BtnMenu_Max) { - this->btnMenu_Max->setVisible(visible); - } else if (widget == QUIWidget::BtnMenu_Close) { - this->btnMenu_Close->setVisible(visible); - } -} - -void QUIWidget::setOnlyCloseBtn() -{ - this->btnMenu->setVisible(false); - this->btnMenu_Min->setVisible(false); - this->btnMenu_Max->setVisible(false); -} - -void QUIWidget::setTitleHeight(int height) -{ - this->widgetTitle->setFixedHeight(height); -} - -void QUIWidget::setBtnWidth(int width) -{ - this->labIco->setFixedWidth(width); - this->btnMenu->setFixedWidth(width); - this->btnMenu_Min->setFixedWidth(width); - this->btnMenu_Max->setFixedWidth(width); - this->btnMenu_Close->setFixedWidth(width); -} - -void QUIWidget::setTitle(const QString &title) -{ - if (this->title != title) { - this->title = title; - this->labTitle->setText(title); - this->setWindowTitle(this->labTitle->text()); - } -} - -void QUIWidget::setAlignment(Qt::Alignment alignment) -{ - if (this->alignment != alignment) { - this->alignment = alignment; - this->labTitle->setAlignment(alignment); - } -} - -void QUIWidget::setMinHide(bool minHide) -{ - if (this->minHide != minHide) { - this->minHide = minHide; - } -} - -void QUIWidget::setExitAll(bool exitAll) -{ - if (this->exitAll != exitAll) { - this->exitAll = exitAll; - } -} - -void QUIWidget::setMainWidget(QWidget *mainWidget) -{ - //一个QUI窗体对象只能设置一个主窗体 - if (this->mainWidget == 0) { - //将子窗体添加到布局 - this->widget->layout()->addWidget(mainWidget); - //自动设置大小 - resize(mainWidget->width(), mainWidget->height() + this->widgetTitle->height()); - this->mainWidget = mainWidget; - QUIHelper::setFormInCenter(this); - } -} - -void QUIWidget::setQssChecked(const QString &qssFile) -{ - QList actions = actionGroup->actions(); - foreach (QAction *action, actions) { - if (action->data().toString() == qssFile) { - action->setChecked(true); - break; - } - } -} - -void QUIWidget::setChangedStyle(bool changedStyle) -{ - this->changedStyle = changedStyle; -} - -void QUIWidget::on_btnMenu_Min_clicked() -{ - if (minHide) { - hide(); - } else { - showMinimized(); - } -} - -void QUIWidget::on_btnMenu_Max_clicked() -{ - static bool max = false; - static QRect location = this->geometry(); - - if (max) { - this->setGeometry(location); - setIcon(QUIWidget::BtnMenu_Normal, QUIConfig::IconNormal); - } else { - location = this->geometry(); - this->setGeometry(QUIHelper::getScreenRect()); - setIcon(QUIWidget::BtnMenu_Max, QUIConfig::IconMax); - } - - this->setProperty("canMove", max); - max = !max; -} - -void QUIWidget::on_btnMenu_Close_clicked() -{ - //先发送关闭信号 - emit closing(); - if (exitAll) { - mainWidget->close(); - this->close(); - } -} diff --git a/core_qui/quiwidget.h b/core_qui/quiwidget.h deleted file mode 100644 index d13d00f..0000000 --- a/core_qui/quiwidget.h +++ /dev/null @@ -1,120 +0,0 @@ -#ifndef QUIWIDGET_H -#define QUIWIDGET_H - -#include "quihead.h" - -class QUIWidget : public QDialog -{ - Q_OBJECT - -public: - //将部分对象作为枚举值暴露给外部 - enum Widget { - Lab_Ico = 0, //左上角图标 - BtnMenu = 1, //下拉菜单按钮 - BtnMenu_Min = 2, //最小化按钮 - BtnMenu_Max = 3, //最大化按钮 - BtnMenu_Normal = 4, //还原按钮 - BtnMenu_Close = 5 //关闭按钮 - }; - - explicit QUIWidget(QWidget *parent = 0); - ~QUIWidget(); - -protected: - bool eventFilter(QObject *watched, QEvent *event); - -private: - QVBoxLayout *verticalLayout1; - QWidget *widgetMain; - QVBoxLayout *verticalLayout2; - QWidget *widgetTitle; - QHBoxLayout *horizontalLayout4; - QLabel *labIco; - QLabel *labTitle; - QWidget *widgetMenu; - QHBoxLayout *horizontalLayout; - QToolButton *btnMenu; - QPushButton *btnMenu_Min; - QPushButton *btnMenu_Max; - QPushButton *btnMenu_Close; - QWidget *widget; - QVBoxLayout *verticalLayout3; - -private: - QString title; //标题 - Qt::Alignment alignment; //标题文本对齐 - bool minHide; //最小化隐藏 - bool exitAll; //退出整个程序 - QWidget *mainWidget; //主窗体对象 - - bool changedStyle; //切换换肤是否立即换肤 - QActionGroup *actionGroup; //换肤菜单动作组 - -public: - QLabel *getLabIco() const; - QLabel *getLabTitle() const; - - QToolButton *getBtnMenu() const; - QPushButton *getBtnMenuMin() const; - QPushButton *getBtnMenuMax() const; - QPushButton *getBtnMenuClose() const; - - QString getTitle() const; - Qt::Alignment getAlignment() const; - bool getMinHide() const; - bool getExitAll() const; - - QSize sizeHint() const; - QSize minimumSizeHint() const; - -private slots: - void initControl(); //初始化控件 - void initForm(); //初始化窗体 - void changeStyle(); //更换样式 - -private slots: - void on_btnMenu_Min_clicked(); - void on_btnMenu_Max_clicked(); - void on_btnMenu_Close_clicked(); - -public Q_SLOTS: - //设置部件图标 - void setIcon(QUIWidget::Widget widget, int icon, quint32 size = 12); - void setIconMain(int icon, quint32 size = 12); - //设置部件图片 - void setPixmap(QUIWidget::Widget widget, const QString &file, const QSize &size = QSize(16, 16)); - //设置部件是否可见 - void setVisible(QUIWidget::Widget widget, bool visible = true); - //设置只有关闭按钮 - void setOnlyCloseBtn(); - - //设置标题栏高度 - void setTitleHeight(int height); - //设置按钮统一宽度 - void setBtnWidth(int width); - - //设置标题及文本样式 - void setTitle(const QString &title); - void setAlignment(Qt::Alignment alignment); - - //设置最小化隐藏 - void setMinHide(bool minHide); - - //设置退出时候直接退出整个应用程序 - void setExitAll(bool exitAll); - - //设置主窗体 - void setMainWidget(QWidget *mainWidget); - - //设置默认选中的换肤菜单 - void setQssChecked(const QString &qssFile); - //设置切换换肤是否立即换肤 - void setChangedStyle(bool changedStyle); - -Q_SIGNALS: - void changeStyle(const QString &qssFile); - void closing(); -}; - -#endif // QUIWIDGET_H diff --git a/countcode/snap.png b/countcode/snap.png deleted file mode 100644 index cc8c1e7..0000000 Binary files a/countcode/snap.png and /dev/null differ diff --git a/echartgauge/echartgauge.gif b/echartgauge/echartgauge.gif deleted file mode 100644 index 47bd702..0000000 Binary files a/echartgauge/echartgauge.gif and /dev/null differ diff --git a/echartgauge/echartgauge.pro b/echartgauge/echartgauge.pro deleted file mode 100644 index 1c17182..0000000 --- a/echartgauge/echartgauge.pro +++ /dev/null @@ -1,33 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2016-05-05T22:58:58 -# -#------------------------------------------------- - -QT += core gui - -greaterThan(QT_MAJOR_VERSION, 4){ -QT += widgets -win32 { -msvc{ -QT += webenginewidgets -} -} else { -QT += webenginewidgets -} -} else { -QT += webkit -DEFINES += webkit -} - -TARGET = echartgauge -TEMPLATE = app -MOC_DIR = temp/moc -RCC_DIR = temp/rcc -UI_DIR = temp/ui -OBJECTS_DIR = temp/obj -DESTDIR = bin - -SOURCES += main.cpp widget.cpp -HEADERS += widget.h -FORMS += widget.ui diff --git a/key/key.pro b/key/key.pro deleted file mode 100644 index a5e8a85..0000000 --- a/key/key.pro +++ /dev/null @@ -1,4 +0,0 @@ -TEMPLATE = subdirs -CONFIG += ordered -SUBDIRS += keytool -SUBDIRS += keydemo diff --git a/key/snap/QQ截图20190226090503.png b/key/snap/QQ截图20190226090503.png deleted file mode 100644 index 90be902..0000000 Binary files a/key/snap/QQ截图20190226090503.png and /dev/null differ diff --git a/key/snap/QQ截图20190226090532.png b/key/snap/QQ截图20190226090532.png deleted file mode 100644 index 6234099..0000000 Binary files a/key/snap/QQ截图20190226090532.png and /dev/null differ diff --git a/key/snap/QQ截图20190226090557.png b/key/snap/QQ截图20190226090557.png deleted file mode 100644 index c2ddaaf..0000000 Binary files a/key/snap/QQ截图20190226090557.png and /dev/null differ diff --git a/key/snap/QQ截图20190226090720.png b/key/snap/QQ截图20190226090720.png deleted file mode 100644 index 771a97d..0000000 Binary files a/key/snap/QQ截图20190226090720.png and /dev/null differ diff --git a/lightbutton/lightbutton.gif b/lightbutton/lightbutton.gif deleted file mode 100644 index efcc22d..0000000 Binary files a/lightbutton/lightbutton.gif and /dev/null differ diff --git a/live/live.pro b/live/live.pro deleted file mode 100644 index 89a3774..0000000 --- a/live/live.pro +++ /dev/null @@ -1,4 +0,0 @@ -TEMPLATE = subdirs -CONFIG += ordered -SUBDIRS += livetool -SUBDIRS += livedemo diff --git a/live/snap/QQ截图20190302141124.png b/live/snap/QQ截图20190302141124.png deleted file mode 100644 index b09a677..0000000 Binary files a/live/snap/QQ截图20190302141124.png and /dev/null differ diff --git a/live/snap/QQ截图20190302141129.png b/live/snap/QQ截图20190302141129.png deleted file mode 100644 index 29e2f25..0000000 Binary files a/live/snap/QQ截图20190302141129.png and /dev/null differ diff --git a/live/snap/QQ截图20190302141147.png b/live/snap/QQ截图20190302141147.png deleted file mode 100644 index 901349e..0000000 Binary files a/live/snap/QQ截图20190302141147.png and /dev/null differ diff --git a/netfriend/astackwidget/astackwidget.cpp b/netfriend/astackwidget/astackwidget.cpp new file mode 100644 index 0000000..dce0220 --- /dev/null +++ b/netfriend/astackwidget/astackwidget.cpp @@ -0,0 +1,172 @@ +#include "astackwidget.h" + +#include +#include + +AStackWidget::AStackWidget(QWidget *parent) + : QWidget(parent) +{ + m_offset = 0; + m_curIndex = 0; + m_lastIndex = 0; + m_duration = 500; + m_moveAnimation = new QPropertyAnimation(this, ""); + m_moveAnimation->setDuration(m_duration); + connect(m_moveAnimation, &QPropertyAnimation::valueChanged, this, &AStackWidget::onValueChanged); + connect(m_moveAnimation, &QPropertyAnimation::finished, this, &AStackWidget::onMoveFinished); +} + +AStackWidget::~AStackWidget() +{ + +} + +int AStackWidget::count() const +{ + return m_widgetLst.size(); +} + +int AStackWidget::currentIndex() const +{ + return m_curIndex; +} + +void AStackWidget::setDuration(int duration) +{ + m_duration = duration; +} + +int AStackWidget::addWidget(QWidget * widget) +{ + int index = indexOf(widget); + if (index >= 0){ + return index; + } + widget->setParent(this); + m_widgetLst.append(widget); + return count() - 1; +} + +int AStackWidget::indexOf(QWidget * widget) const +{ + return m_widgetLst.indexOf(widget); +} + +int AStackWidget::insertWidget(int index, QWidget * widget) +{ + int curindex = indexOf(widget); + if (curindex >= 0) { + return curindex; + } + widget->setParent(this); + m_widgetLst.insert(index, widget); + return index; +} + +QWidget * AStackWidget::currentWidget() const +{ + if (m_curIndex >= 0 && m_curIndex < count()){ + return m_widgetLst.at(m_curIndex); + } + return 0; +} + +QWidget * AStackWidget::widget(int index) const +{ + if (index >= 0 && index < count()) { + return m_widgetLst.at(index); + } + return 0; +} + +void AStackWidget::removeWidget(QWidget * widget) +{ + int index = indexOf(widget); + if (index >= 0) { + m_widgetLst.removeAll(widget); + emit widgetRemoved(index); + } +} + +void AStackWidget::setCurrentWidget(QWidget * widget) +{ + int index = indexOf(widget); + if (index >= 0 && m_curIndex != index) { + setCurrentIndex(index); + } +} + +void AStackWidget::setCurrentIndex(int index) +{ + if (index >= 0 && m_curIndex != index) { + m_lastIndex = m_curIndex; + m_curIndex = index; + moveAnimationStart(); + emit currentChanged(index); + } +} + +void AStackWidget::resizeEvent(QResizeEvent *event) +{ + QWidget::resizeEvent(event); + + int size = count(); + for (int i = 0; i < size; i++) { + m_widgetLst.at(i)->resize(this->width(), this->height()); + } + + if (m_moveAnimation->state() == QAbstractAnimation::Running) { + moveAnimationStart(); + } + else { + setWidgetsVisible(); + onValueChanged(0); + } +} + +void AStackWidget::onValueChanged(const QVariant &value) +{ + m_offset = value.toInt(); + m_widgetLst.at(m_curIndex)->move(m_offset, 0); + if (m_curIndex > m_lastIndex) { + m_widgetLst.at(m_lastIndex)->move(m_offset - this->width(), 0); + } else if (m_curIndex < m_lastIndex){ + m_widgetLst.at(m_lastIndex)->move(this->width() + m_offset, 0); + } +} + +void AStackWidget::moveAnimationStart() +{ + m_moveAnimation->stop(); + setWidgetsVisible(); + int startOffset = m_offset; + if (m_curIndex > m_lastIndex) { + if (startOffset == 0) startOffset = this->width(); + else startOffset = this->width() - qAbs(startOffset); + } + else { + if (startOffset == 0) startOffset = -this->width(); + else startOffset = qAbs(startOffset) - this->width(); + } + m_moveAnimation->setDuration(qAbs(startOffset) * m_duration / this->width()); + m_moveAnimation->setStartValue(startOffset); + m_moveAnimation->setEndValue(0); + m_moveAnimation->start(); +} + +void AStackWidget::setWidgetsVisible() +{ + int size = count(); + for (int i = 0; i < size; i++) { + if (m_lastIndex == i || m_curIndex == i) + m_widgetLst.at(i)->setVisible(true); + else { + m_widgetLst.at(i)->setVisible(false); + } + } +} + +void AStackWidget::onMoveFinished() +{ + +} diff --git a/netfriend/astackwidget/astackwidget.h b/netfriend/astackwidget/astackwidget.h new file mode 100644 index 0000000..a6c8520 --- /dev/null +++ b/netfriend/astackwidget/astackwidget.h @@ -0,0 +1,52 @@ +#include + +class QPropertyAnimation; +class AStackWidget : public QWidget +{ + Q_OBJECT + +public: + AStackWidget(QWidget *parent); + ~AStackWidget(); + +signals: + void currentChanged(int index); + void widgetRemoved(int index); + +public: + int count() const; + int currentIndex() const; + int addWidget(QWidget *widget); + int indexOf(QWidget *widget) const; + int insertWidget(int index, QWidget *widget); + + QWidget *currentWidget() const; + QWidget *widget(int index) const; + + void removeWidget(QWidget *widget); + void setDuration(int duration); + +public slots: + void setCurrentIndex(int index); + void setCurrentWidget(QWidget *widget); + +private slots: + void onValueChanged(const QVariant &); + void onMoveFinished(); + +private: + void moveAnimationStart(); + void setWidgetsVisible(); + +protected: + void resizeEvent(QResizeEvent *event); + +private: + int m_offset; + int m_curIndex; + int m_lastIndex; + + int m_duration; + QPropertyAnimation *m_moveAnimation; + QList m_widgetLst; +}; diff --git a/netfriend/astackwidget/astackwidget.pro b/netfriend/astackwidget/astackwidget.pro new file mode 100644 index 0000000..ff48b41 --- /dev/null +++ b/netfriend/astackwidget/astackwidget.pro @@ -0,0 +1,16 @@ +QT += core gui +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat + +TARGET = astackwidget +TEMPLATE = app +DESTDIR = $$PWD/../bin +CONFIG += warn_off + +SOURCES += main.cpp +SOURCES += astackwidget.cpp +HEADERS += astackwidget.h + +SOURCES += frmastackwidget.cpp +HEADERS += frmastackwidget.h +FORMS += frmastackwidget.ui diff --git a/netfriend/astackwidget/frmastackwidget.cpp b/netfriend/astackwidget/frmastackwidget.cpp new file mode 100644 index 0000000..43f5b9d --- /dev/null +++ b/netfriend/astackwidget/frmastackwidget.cpp @@ -0,0 +1,42 @@ +#pragma execution_character_set("utf-8") + +#include "FrmAStackWidget.h" + +#include +#include + +FrmAStackWidget::FrmAStackWidget(QWidget *parent) + : QWidget(parent) +{ + ui.setupUi(this); + + QList colorlst; + colorlst << "#1abc9c"; + colorlst << "#2ecc71"; + colorlst << "#3498db"; + colorlst << "#9b59b6"; + colorlst << "#e74c3c"; + + QList btnlst; + btnlst << ui.pushButton_1; + btnlst << ui.pushButton_2; + btnlst << ui.pushButton_3; + btnlst << ui.pushButton_4; + btnlst << ui.pushButton_5; + + QButtonGroup *btnGroup = new QButtonGroup(this); +#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0)) + connect(btnGroup, SIGNAL(idClicked(int)), ui.aStackwidget, SLOT(setCurrentIndex(int))); +#else + connect(btnGroup, SIGNAL(buttonClicked(int)), ui.aStackwidget, SLOT(setCurrentIndex(int))); +#endif + + for (int i = 0; i < 5; i++) { + QLabel *label = new QLabel(ui.aStackwidget); + label->setStyleSheet(QString("background-color:%1;color:#ffffff;").arg(colorlst.at(i))); + label->setText(QString::number(i + 1)); + label->setAlignment(Qt::AlignCenter); + int index = ui.aStackwidget->addWidget(label); + btnGroup->addButton(btnlst.at(i), index); + } +} diff --git a/netfriend/astackwidget/frmastackwidget.h b/netfriend/astackwidget/frmastackwidget.h new file mode 100644 index 0000000..794f91c --- /dev/null +++ b/netfriend/astackwidget/frmastackwidget.h @@ -0,0 +1,13 @@ +#include +#include "ui_FrmAStackWidget.h" + +class FrmAStackWidget : public QWidget +{ + Q_OBJECT + +public: + FrmAStackWidget(QWidget *parent = Q_NULLPTR); + +private: + Ui::FrmAStackWidgetClass ui; +}; diff --git a/netfriend/astackwidget/frmastackwidget.ui b/netfriend/astackwidget/frmastackwidget.ui new file mode 100644 index 0000000..d6db1d5 --- /dev/null +++ b/netfriend/astackwidget/frmastackwidget.ui @@ -0,0 +1,94 @@ + + + FrmAStackWidgetClass + + + + 0 + 0 + 600 + 400 + + + + FrmAStackWidget + + + + 12 + + + 12 + + + 12 + + + 12 + + + 12 + + + + + + + PushButton1 + + + + + + + PushButton2 + + + + + + + PushButton3 + + + + + + + PushButton4 + + + + + + + PushButton5 + + + + + + + + + + 0 + 0 + + + + + + + + + + AStackWidget + QWidget +
astackwidget.h
+ 1 +
+
+ + +
diff --git a/netfriend/astackwidget/main.cpp b/netfriend/astackwidget/main.cpp new file mode 100644 index 0000000..ff74030 --- /dev/null +++ b/netfriend/astackwidget/main.cpp @@ -0,0 +1,30 @@ +#pragma execution_character_set("utf-8") +#include "frmastackwidget.h" + +#include +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + a.setFont(QFont("Microsoft Yahei", 9)); + +#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0)) +#if _MSC_VER + QTextCodec *codec = QTextCodec::codecForName("gbk"); +#else + QTextCodec *codec = QTextCodec::codecForName("utf-8"); +#endif + QTextCodec::setCodecForLocale(codec); + QTextCodec::setCodecForCStrings(codec); + QTextCodec::setCodecForTr(codec); +#else + QTextCodec *codec = QTextCodec::codecForName("utf-8"); + QTextCodec::setCodecForLocale(codec); +#endif + + FrmAStackWidget w; + w.setWindowTitle(QStringLiteral("动态StackWidget")); + w.show(); + return a.exec(); +} diff --git a/netfriend/imagecropper/assets/README/001.png b/netfriend/imagecropper/assets/README/001.png new file mode 100644 index 0000000..a6ea589 Binary files /dev/null and b/netfriend/imagecropper/assets/README/001.png differ diff --git a/netfriend/imagecropper/assets/README/002.png b/netfriend/imagecropper/assets/README/002.png new file mode 100644 index 0000000..368f4a4 Binary files /dev/null and b/netfriend/imagecropper/assets/README/002.png differ diff --git a/netfriend/imagecropper/assets/README/003.png b/netfriend/imagecropper/assets/README/003.png new file mode 100644 index 0000000..e0e28e2 Binary files /dev/null and b/netfriend/imagecropper/assets/README/003.png differ diff --git a/netfriend/imagecropper/assets/README/004.png b/netfriend/imagecropper/assets/README/004.png new file mode 100644 index 0000000..ef02015 Binary files /dev/null and b/netfriend/imagecropper/assets/README/004.png differ diff --git a/netfriend/imagecropper/assets/README/005.png b/netfriend/imagecropper/assets/README/005.png new file mode 100644 index 0000000..599ad9c Binary files /dev/null and b/netfriend/imagecropper/assets/README/005.png differ diff --git a/netfriend/imagecropper/assets/README/006.png b/netfriend/imagecropper/assets/README/006.png new file mode 100644 index 0000000..a9b166e Binary files /dev/null and b/netfriend/imagecropper/assets/README/006.png differ diff --git a/netfriend/imagecropper/assets/README/cropper_shape.png b/netfriend/imagecropper/assets/README/cropper_shape.png new file mode 100644 index 0000000..da424ed Binary files /dev/null and b/netfriend/imagecropper/assets/README/cropper_shape.png differ diff --git a/netfriend/imagecropper/assets/README/import_functions.png b/netfriend/imagecropper/assets/README/import_functions.png new file mode 100644 index 0000000..f284bf2 Binary files /dev/null and b/netfriend/imagecropper/assets/README/import_functions.png differ diff --git a/netfriend/imagecropper/base/imagecropperdialog.h b/netfriend/imagecropper/base/imagecropperdialog.h new file mode 100644 index 0000000..2f1696d --- /dev/null +++ b/netfriend/imagecropper/base/imagecropperdialog.h @@ -0,0 +1,99 @@ +#ifndef IMAGECROPPER_H +#define IMAGECROPPER_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "imagecropperlabel.h" + +/******************************************************* + * Loacl private class, which do image-cropping + * Used in class ImageCropper +*******************************************************/ +class ImageCropperDialogPrivate : public QDialog +{ + Q_OBJECT +public: + ImageCropperDialogPrivate(const QPixmap &imageIn, QPixmap &outputImage, + int windowWidth, int windowHeight, + CropperShape shape, QSize cropperSize = QSize()) + : QDialog(0) + , outputImage(outputImage) + { + this->setAttribute(Qt::WA_DeleteOnClose, true); + this->setWindowTitle("Image Cropper"); + this->setMouseTracking(true); + this->setModal(true); + + imageLabel = new ImageCropperLabel(windowWidth, windowHeight, this); + imageLabel->setCropper(shape, cropperSize); + imageLabel->setOutputShape(OutputShape::RECT); + imageLabel->setOriginalImage(imageIn); + imageLabel->enableOpacity(true); + + QHBoxLayout *btnLayout = new QHBoxLayout(); + btnOk = new QPushButton("OK", this); + btnCancel = new QPushButton("Cancel", this); + btnLayout->addStretch(); + btnLayout->addWidget(btnOk); + btnLayout->addWidget(btnCancel); + + QVBoxLayout *mainLayout = new QVBoxLayout(this); + mainLayout->addWidget(imageLabel); + mainLayout->addLayout(btnLayout); + + connect(btnOk, &QPushButton::clicked, this, [this]() { + this->outputImage = this->imageLabel->getCroppedImage(); + this->close(); + }); + connect(btnCancel, &QPushButton::clicked, this, [this]() { + this->outputImage = QPixmap(); + this->close(); + }); + } + +private: + ImageCropperLabel *imageLabel; + QPushButton *btnOk; + QPushButton *btnCancel; + QPixmap &outputImage; +}; + +/******************************************************************* + * class ImageCropperDialog + * create a instane of class ImageCropperDialogPrivate + * and get cropped image from the instance(after closing) +********************************************************************/ +class ImageCropperDialog : QObject +{ +public: + static QPixmap getCroppedImage(const QString &filename, int windowWidth, int windowHeight, + CropperShape cropperShape, QSize crooperSize = QSize()) + { + QPixmap inputImage; + QPixmap outputImage; + + if (!inputImage.load(filename)) { + QMessageBox::critical(0, "Error", "Load image failed!", QMessageBox::Ok); + return outputImage; + } + + ImageCropperDialogPrivate *imageCropperDo = + new ImageCropperDialogPrivate(inputImage, outputImage, + windowWidth, windowHeight, + cropperShape, crooperSize); + imageCropperDo->exec(); + + return outputImage; + } +}; + +#endif // IMAGECROPPER_H diff --git a/netfriend/imagecropper/base/imagecropperlabel.cpp b/netfriend/imagecropper/base/imagecropperlabel.cpp new file mode 100644 index 0000000..2800e04 --- /dev/null +++ b/netfriend/imagecropper/base/imagecropperlabel.cpp @@ -0,0 +1,714 @@ +#include "imagecropperlabel.h" + +#include +#include +#include +#include +#include + +ImageCropperLabel::ImageCropperLabel(int width, int height, QWidget* parent) : + QLabel(parent) +{ + this->setFixedSize(width, height); + this->setAlignment(Qt::AlignCenter); + this->setMouseTracking(true); + + borderPen.setWidth(1); + borderPen.setColor(Qt::white); + borderPen.setDashPattern(QVector() << 3 << 3 << 3 << 3); +} + +void ImageCropperLabel::setOriginalImage(const QPixmap &pixmap) { + originalImage = pixmap; + + int imgWidth = pixmap.width(); + int imgHeight = pixmap.height(); + int labelWidth = this->width(); + int labelHeight = this->height(); + int imgWidthInLabel; + int imgHeightInLabel; + + if (imgWidth * labelHeight < imgHeight * labelWidth) { + scaledRate = labelHeight / double(imgHeight); + imgHeightInLabel = labelHeight; + imgWidthInLabel = int(scaledRate * imgWidth); + imageRect.setRect((labelWidth - imgWidthInLabel) / 2, 0, + imgWidthInLabel, imgHeightInLabel); + } + else { + scaledRate = labelWidth / double(imgWidth); + imgWidthInLabel = labelWidth; + imgHeightInLabel = int(scaledRate * imgHeight); + imageRect.setRect(0, (labelHeight - imgHeightInLabel) / 2, + imgWidthInLabel, imgHeightInLabel); + } + + tempImage = originalImage.scaled(imgWidthInLabel, imgHeightInLabel, + Qt::KeepAspectRatio, Qt::SmoothTransformation); + this->setPixmap(tempImage); + + if (cropperShape >= CropperShape::FIXED_RECT) { + cropperRect.setWidth(int(cropperRect_.width() * scaledRate)); + cropperRect.setHeight(int(cropperRect_.height() * scaledRate)); + } + resetCropperPos(); +} + + +/***************************************** + * set cropper's shape (and size) +*****************************************/ +void ImageCropperLabel::setRectCropper() { + cropperShape = CropperShape::RECT; + resetCropperPos(); +} + +void ImageCropperLabel::setSquareCropper() { + cropperShape = CropperShape::SQUARE; + resetCropperPos(); +} + +void ImageCropperLabel::setEllipseCropper() { + cropperShape = CropperShape::ELLIPSE; + resetCropperPos(); +} + +void ImageCropperLabel::setCircleCropper() { + cropperShape = CropperShape::CIRCLE; + resetCropperPos(); +} + +void ImageCropperLabel::setFixedRectCropper(QSize size) { + cropperShape = CropperShape::FIXED_RECT; + cropperRect_.setSize(size); + resetCropperPos(); +} + +void ImageCropperLabel::setFixedEllipseCropper(QSize size) { + cropperShape = CropperShape::FIXED_ELLIPSE; + cropperRect_.setSize(size); + resetCropperPos(); +} + +// not recommended +void ImageCropperLabel::setCropper(CropperShape shape, QSize size) { + cropperShape = shape; + cropperRect_.setSize(size); + resetCropperPos(); +} + +/***************************************************************************** + * Set cropper's fixed size + *****************************************************************************/ +void ImageCropperLabel::setCropperFixedSize(int fixedWidth, int fixedHeight) { + cropperRect_.setSize(QSize(fixedWidth, fixedHeight)); + resetCropperPos(); +} + +void ImageCropperLabel::setCropperFixedWidth(int fixedWidth) { + cropperRect_.setWidth(fixedWidth); + resetCropperPos(); +} + +void ImageCropperLabel::setCropperFixedHeight(int fixedHeight) { + cropperRect_.setHeight(fixedHeight); + resetCropperPos(); +} + +/********************************************** + * Move cropper to the center of the image + * And resize to default +**********************************************/ +void ImageCropperLabel::resetCropperPos() { + int labelWidth = this->width(); + int labelHeight = this->height(); + + if (cropperShape == CropperShape::FIXED_RECT || cropperShape == CropperShape::FIXED_ELLIPSE) { + cropperRect.setWidth(int(cropperRect_.width() * scaledRate)); + cropperRect.setHeight(int(cropperRect_.height() * scaledRate)); + } + + switch (cropperShape) { + case CropperShape::UNDEFINED: + break; + case CropperShape::FIXED_RECT: + case CropperShape::FIXED_ELLIPSE: { + cropperRect.setRect((labelWidth - cropperRect.width()) / 2, + (labelHeight - cropperRect.height()) / 2, + cropperRect.width(), cropperRect.height()); + break; + } + case CropperShape::RECT: + case CropperShape::SQUARE: + case CropperShape::ELLIPSE: + case CropperShape::CIRCLE: { + int imgWidth = tempImage.width(); + int imgHeight = tempImage.height(); + int edge = int((imgWidth > imgHeight ? imgHeight : imgWidth) * 3 / 4.0); + cropperRect.setRect((labelWidth - edge) / 2, (labelHeight - edge) / 2, edge, edge); + break; + } + } +} + +QPixmap ImageCropperLabel::getCroppedImage() { + return getCroppedImage(this->outputShape); +} + +QPixmap ImageCropperLabel::getCroppedImage(OutputShape shape) { + int startX = int((cropperRect.left() - imageRect.left()) / scaledRate); + int startY = int((cropperRect.top() - imageRect.top()) / scaledRate); + int croppedWidth = int(cropperRect.width() / scaledRate); + int croppedHeight = int(cropperRect.height() / scaledRate); + + QPixmap resultImage(croppedWidth, croppedHeight); + resultImage = originalImage.copy(startX, startY, croppedWidth, croppedHeight); + + // Set ellipse mask (cut to ellipse shape) + if (shape == OutputShape::ELLIPSE) { + QSize size(croppedWidth, croppedHeight); + QBitmap mask(size); + QPainter painter(&mask); + painter.setRenderHint(QPainter::Antialiasing); + painter.setRenderHint(QPainter::SmoothPixmapTransform); + painter.fillRect(0, 0, size.width(), size.height(), Qt::white); + painter.setBrush(QColor(0, 0, 0)); + painter.drawRoundedRect(0, 0, size.width(), size.height(), 99, 99); + resultImage.setMask(mask); + } + + return resultImage; +} + + +void ImageCropperLabel::paintEvent(QPaintEvent *event) { + // Draw original image + QLabel::paintEvent(event); + + // Draw cropper and set some effects + switch (cropperShape) { + case CropperShape::UNDEFINED: + break; + case CropperShape::FIXED_RECT: + drawRectOpacity(); + break; + case CropperShape::FIXED_ELLIPSE: + drawEllipseOpacity(); + break; + case CropperShape::RECT: + drawRectOpacity(); + drawSquareEdge(!ONLY_FOUR_CORNERS); + break; + case CropperShape::SQUARE: + drawRectOpacity(); + drawSquareEdge(ONLY_FOUR_CORNERS); + break; + case CropperShape::ELLIPSE: + drawEllipseOpacity(); + drawSquareEdge(!ONLY_FOUR_CORNERS); + break; + case CropperShape::CIRCLE: + drawEllipseOpacity(); + drawSquareEdge(ONLY_FOUR_CORNERS); + break; + } + + // Draw cropper rect + if (isShowRectBorder) { + QPainter painter(this); + painter.setPen(borderPen); + painter.drawRect(cropperRect); + } +} + +void ImageCropperLabel::drawSquareEdge(bool onlyFourCorners) { + if (!isShowDragSquare) + return; + + // Four corners + drawFillRect(cropperRect.topLeft(), dragSquareEdge, dragSquareColor); + drawFillRect(cropperRect.topRight(), dragSquareEdge, dragSquareColor); + drawFillRect(cropperRect.bottomLeft(), dragSquareEdge, dragSquareColor); + drawFillRect(cropperRect.bottomRight(), dragSquareEdge, dragSquareColor); + + // Four edges + if (!onlyFourCorners) { + int centralX = cropperRect.left() + cropperRect.width() / 2; + int centralY = cropperRect.top() + cropperRect.height() / 2; + drawFillRect(QPoint(cropperRect.left(), centralY), dragSquareEdge, dragSquareColor); + drawFillRect(QPoint(centralX, cropperRect.top()), dragSquareEdge, dragSquareColor); + drawFillRect(QPoint(cropperRect.right(), centralY), dragSquareEdge, dragSquareColor); + drawFillRect(QPoint(centralX, cropperRect.bottom()), dragSquareEdge, dragSquareColor); + } +} + +void ImageCropperLabel::drawFillRect(QPoint centralPoint, int edge, QColor color) { + QRect rect(centralPoint.x() - edge / 2, centralPoint.y() - edge / 2, edge, edge); + QPainter painter(this); + painter.fillRect(rect, color); +} + +// Opacity effect +void ImageCropperLabel::drawOpacity(const QPainterPath& path) { + QPainter painterOpac(this); + painterOpac.setOpacity(opacity); + painterOpac.fillPath(path, QBrush(Qt::black)); +} + +void ImageCropperLabel::drawRectOpacity() { + if (isShowOpacityEffect) { + QPainterPath p1, p2, p; + p1.addRect(imageRect); + p2.addRect(cropperRect); + p = p1.subtracted(p2); + drawOpacity(p); + } +} + +void ImageCropperLabel::drawEllipseOpacity() { + if (isShowOpacityEffect) { + QPainterPath p1, p2, p; + p1.addRect(imageRect); + p2.addEllipse(cropperRect); + p = p1.subtracted(p2); + drawOpacity(p); + } +} + +bool ImageCropperLabel::isPosNearDragSquare(const QPoint& pt1, const QPoint& pt2) { + return abs(pt1.x() - pt2.x()) * 2 <= dragSquareEdge + && abs(pt1.y() - pt2.y()) * 2 <= dragSquareEdge; +} + +int ImageCropperLabel::getPosInCropperRect(const QPoint &pt) { + if (isPosNearDragSquare(pt, QPoint(cropperRect.right(), cropperRect.center().y()))) + return RECT_RIGHT; + if (isPosNearDragSquare(pt, cropperRect.bottomRight())) + return RECT_BOTTOM_RIGHT; + if (isPosNearDragSquare(pt, QPoint(cropperRect.center().x(), cropperRect.bottom()))) + return RECT_BOTTOM; + if (isPosNearDragSquare(pt, cropperRect.bottomLeft())) + return RECT_BOTTOM_LEFT; + if (isPosNearDragSquare(pt, QPoint(cropperRect.left(), cropperRect.center().y()))) + return RECT_LEFT; + if (isPosNearDragSquare(pt, cropperRect.topLeft())) + return RECT_TOP_LEFT; + if (isPosNearDragSquare(pt, QPoint(cropperRect.center().x(), cropperRect.top()))) + return RECT_TOP; + if (isPosNearDragSquare(pt, cropperRect.topRight())) + return RECT_TOP_RIGHT; + if (cropperRect.contains(pt, true)) + return RECT_INSIDE; + return RECT_OUTSIZD; +} + +/************************************************* + * + * Change mouse cursor type + * Arrow, SizeHor, SizeVer, etc... + * +*************************************************/ + +void ImageCropperLabel::changeCursor() { + switch (cursorPosInCropperRect) { + case RECT_OUTSIZD: + setCursor(Qt::ArrowCursor); + break; + case RECT_BOTTOM_RIGHT: { + switch (cropperShape) { + case CropperShape::SQUARE: + case CropperShape::CIRCLE: + case CropperShape::RECT: + case CropperShape::ELLIPSE: + setCursor(Qt::SizeFDiagCursor); + break; + default: + break; + } + break; + } + case RECT_RIGHT: { + switch (cropperShape) { + case CropperShape::RECT: + case CropperShape::ELLIPSE: + setCursor(Qt::SizeHorCursor); + break; + default: + break; + } + break; + } + case RECT_BOTTOM: { + switch (cropperShape) { + case CropperShape::RECT: + case CropperShape::ELLIPSE: + setCursor(Qt::SizeVerCursor); + break; + default: + break; + } + break; + } + case RECT_BOTTOM_LEFT: { + switch (cropperShape) { + case CropperShape::RECT: + case CropperShape::ELLIPSE: + case CropperShape::SQUARE: + case CropperShape::CIRCLE: + setCursor(Qt::SizeBDiagCursor); + break; + default: + break; + } + break; + } + case RECT_LEFT: { + switch (cropperShape) { + case CropperShape::RECT: + case CropperShape::ELLIPSE: + setCursor(Qt::SizeHorCursor); + break; + default: + break; + } + break; + } + case RECT_TOP_LEFT: { + switch (cropperShape) { + case CropperShape::RECT: + case CropperShape::ELLIPSE: + case CropperShape::SQUARE: + case CropperShape::CIRCLE: + setCursor(Qt::SizeFDiagCursor); + break; + default: + break; + } + break; + } + case RECT_TOP: { + switch (cropperShape) { + case CropperShape::RECT: + case CropperShape::ELLIPSE: + setCursor(Qt::SizeVerCursor); + break; + default: + break; + } + break; + } + case RECT_TOP_RIGHT: { + switch (cropperShape) { + case CropperShape::SQUARE: + case CropperShape::CIRCLE: + case CropperShape::RECT: + case CropperShape::ELLIPSE: + setCursor(Qt::SizeBDiagCursor); + break; + default: + break; + } + break; + } + case RECT_INSIDE: { + setCursor(Qt::SizeAllCursor); + break; + } + } +} + +/***************************************************** + * + * Mouse Events + * +*****************************************************/ + +void ImageCropperLabel::mousePressEvent(QMouseEvent *e) { + currPos = lastPos = e->pos(); + isLButtonPressed = true; +} + +void ImageCropperLabel::mouseMoveEvent(QMouseEvent *e) { + currPos = e->pos(); + if (!isCursorPosCalculated) { + cursorPosInCropperRect = getPosInCropperRect(currPos); + changeCursor(); + } + + if (!isLButtonPressed) + return; + if (!imageRect.contains(currPos)) + return; + + isCursorPosCalculated = true; + + int xOffset = currPos.x() - lastPos.x(); + int yOffset = currPos.y() - lastPos.y(); + lastPos = currPos; + + int disX = 0; + int disY = 0; + + // Move cropper + switch (cursorPosInCropperRect) { + case RECT_OUTSIZD: + break; + case RECT_BOTTOM_RIGHT: { + disX = currPos.x() - cropperRect.left(); + disY = currPos.y() - cropperRect.top(); + switch (cropperShape) { + case CropperShape::UNDEFINED: + case CropperShape::FIXED_RECT: + case CropperShape::FIXED_ELLIPSE: + break; + case CropperShape::SQUARE: + case CropperShape::CIRCLE: + setCursor(Qt::SizeFDiagCursor); + if (disX >= cropperMinimumWidth && disY >= cropperMinimumHeight) { + if (disX > disY && cropperRect.top() + disX <= imageRect.bottom()) { + cropperRect.setRight(currPos.x()); + cropperRect.setBottom(cropperRect.top() + disX); + emit croppedImageChanged(); + } + else if (disX <= disY && cropperRect.left() + disY <= imageRect.right()) { + cropperRect.setBottom(currPos.y()); + cropperRect.setRight(cropperRect.left() + disY); + emit croppedImageChanged(); + } + } + break; + case CropperShape::RECT: + case CropperShape::ELLIPSE: + setCursor(Qt::SizeFDiagCursor); + if (disX >= cropperMinimumWidth) { + cropperRect.setRight(currPos.x()); + emit croppedImageChanged(); + } + if (disY >= cropperMinimumHeight) { + cropperRect.setBottom(currPos.y()); + emit croppedImageChanged(); + } + break; + } + break; + } + case RECT_RIGHT: { + disX = currPos.x() - cropperRect.left(); + switch (cropperShape) { + case CropperShape::UNDEFINED: + case CropperShape::FIXED_RECT: + case CropperShape::FIXED_ELLIPSE: + case CropperShape::SQUARE: + case CropperShape::CIRCLE: + break; + case CropperShape::RECT: + case CropperShape::ELLIPSE: + if (disX >= cropperMinimumWidth) { + cropperRect.setRight(currPos.x()); + emit croppedImageChanged(); + } + break; + } + break; + } + case RECT_BOTTOM: { + disY = currPos.y() - cropperRect.top(); + switch (cropperShape) { + case CropperShape::UNDEFINED: + case CropperShape::FIXED_RECT: + case CropperShape::FIXED_ELLIPSE: + case CropperShape::SQUARE: + case CropperShape::CIRCLE: + break; + case CropperShape::RECT: + case CropperShape::ELLIPSE: + if (disY >= cropperMinimumHeight) { + cropperRect.setBottom(cropperRect.bottom() + yOffset); + emit croppedImageChanged(); + } + break; + } + break; + } + case RECT_BOTTOM_LEFT: { + disX = cropperRect.right() - currPos.x(); + disY = currPos.y() - cropperRect.top(); + switch (cropperShape) { + case CropperShape::UNDEFINED: + break; + case CropperShape::FIXED_RECT: + case CropperShape::FIXED_ELLIPSE: + case CropperShape::RECT: + case CropperShape::ELLIPSE: + if (disX >= cropperMinimumWidth) { + cropperRect.setLeft(currPos.x()); + emit croppedImageChanged(); + } + if (disY >= cropperMinimumHeight) { + cropperRect.setBottom(currPos.y()); + emit croppedImageChanged(); + } + break; + case CropperShape::SQUARE: + case CropperShape::CIRCLE: + if (disX >= cropperMinimumWidth && disY >= cropperMinimumHeight) { + if (disX > disY && cropperRect.top() + disX <= imageRect.bottom()) { + cropperRect.setLeft(currPos.x()); + cropperRect.setBottom(cropperRect.top() + disX); + emit croppedImageChanged(); + } + else if (disX <= disY && cropperRect.right() - disY >= imageRect.left()) { + cropperRect.setBottom(currPos.y()); + cropperRect.setLeft(cropperRect.right() - disY); + emit croppedImageChanged(); + } + } + break; + } + break; + } + case RECT_LEFT: { + disX = cropperRect.right() - currPos.x(); + switch (cropperShape) { + case CropperShape::UNDEFINED: + case CropperShape::FIXED_RECT: + case CropperShape::FIXED_ELLIPSE: + case CropperShape::SQUARE: + case CropperShape::CIRCLE: + break; + case CropperShape::RECT: + case CropperShape::ELLIPSE: + if (disX >= cropperMinimumHeight) { + cropperRect.setLeft(cropperRect.left() + xOffset); + emit croppedImageChanged(); + } + break; + } + break; + } + case RECT_TOP_LEFT: { + disX = cropperRect.right() - currPos.x(); + disY = cropperRect.bottom() - currPos.y(); + switch (cropperShape) { + case CropperShape::UNDEFINED: + case CropperShape::FIXED_RECT: + case CropperShape::FIXED_ELLIPSE: + break; + case CropperShape::RECT: + case CropperShape::ELLIPSE: + if (disX >= cropperMinimumWidth) { + cropperRect.setLeft(currPos.x()); + emit croppedImageChanged(); + } + if (disY >= cropperMinimumHeight) { + cropperRect.setTop(currPos.y()); + emit croppedImageChanged(); + } + break; + case CropperShape::SQUARE: + case CropperShape::CIRCLE: + if (disX >= cropperMinimumWidth && disY >= cropperMinimumHeight) { + if (disX > disY && cropperRect.bottom() - disX >= imageRect.top()) { + cropperRect.setLeft(currPos.x()); + cropperRect.setTop(cropperRect.bottom() - disX); + emit croppedImageChanged(); + } + else if (disX <= disY && cropperRect.right() - disY >= imageRect.left()) { + cropperRect.setTop(currPos.y()); + cropperRect.setLeft(cropperRect.right() - disY); + emit croppedImageChanged(); + } + } + break; + } + break; + } + case RECT_TOP: { + disY = cropperRect.bottom() - currPos.y(); + switch (cropperShape) { + case CropperShape::UNDEFINED: + case CropperShape::FIXED_RECT: + case CropperShape::FIXED_ELLIPSE: + case CropperShape::SQUARE: + case CropperShape::CIRCLE: + break; + case CropperShape::RECT: + case CropperShape::ELLIPSE: + if (disY >= cropperMinimumHeight) { + cropperRect.setTop(cropperRect.top() + yOffset); + emit croppedImageChanged(); + } + break; + } + break; + } + case RECT_TOP_RIGHT: { + disX = currPos.x() - cropperRect.left(); + disY = cropperRect.bottom() - currPos.y(); + switch (cropperShape) { + case CropperShape::UNDEFINED: + case CropperShape::FIXED_RECT: + case CropperShape::FIXED_ELLIPSE: + break; + case CropperShape::RECT: + case CropperShape::ELLIPSE: + if (disX >= cropperMinimumWidth) { + cropperRect.setRight(currPos.x()); + emit croppedImageChanged(); + } + if (disY >= cropperMinimumHeight) { + cropperRect.setTop(currPos.y()); + emit croppedImageChanged(); + } + break; + case CropperShape::SQUARE: + case CropperShape::CIRCLE: + if (disX >= cropperMinimumWidth && disY >= cropperMinimumHeight) { + if (disX < disY && cropperRect.left() + disY <= imageRect.right()) { + cropperRect.setTop(currPos.y()); + cropperRect.setRight(cropperRect.left() + disY); + emit croppedImageChanged(); + } + else if (disX >= disY && cropperRect.bottom() - disX >= imageRect.top()) { + cropperRect.setRight(currPos.x()); + cropperRect.setTop(cropperRect.bottom() - disX); + emit croppedImageChanged(); + } + } + break; + } + break; + } + case RECT_INSIDE: { + // Make sure the cropperRect is entirely inside the imageRecct + if (xOffset > 0) { + if (cropperRect.right() + xOffset > imageRect.right()) + xOffset = 0; + } + else if (xOffset < 0) { + if (cropperRect.left() + xOffset < imageRect.left()) + xOffset = 0; + } + if (yOffset > 0) { + if (cropperRect.bottom() + yOffset > imageRect.bottom()) + yOffset = 0; + } + else if (yOffset < 0) { + if (cropperRect.top() + yOffset < imageRect.top()) + yOffset = 0; + } + cropperRect.moveTo(cropperRect.left() + xOffset, cropperRect.top() + yOffset); + emit croppedImageChanged(); + } + break; + } + + repaint(); +} + +void ImageCropperLabel::mouseReleaseEvent(QMouseEvent *) { + isLButtonPressed = false; + isCursorPosCalculated = false; + setCursor(Qt::ArrowCursor); +} + diff --git a/netfriend/imagecropper/base/imagecropperlabel.h b/netfriend/imagecropper/base/imagecropperlabel.h new file mode 100644 index 0000000..5c79471 --- /dev/null +++ b/netfriend/imagecropper/base/imagecropperlabel.h @@ -0,0 +1,168 @@ +#ifndef IMAGECROPPERLABEL_H +#define IMAGECROPPERLABEL_H + +#include +#include +#include + +enum class CropperShape { + UNDEFINED = 0, + RECT = 1, + SQUARE = 2, + FIXED_RECT = 3, + ELLIPSE = 4, + CIRCLE = 5, + FIXED_ELLIPSE = 6 +}; + +enum class OutputShape { + RECT = 0, + ELLIPSE = 1 +}; + +enum class SizeType { + fixedSize = 0, + fitToMaxWidth = 1, + fitToMaxHeight = 2, + fitToMaxWidthHeight = 3, +}; + +class ImageCropperLabel : public QLabel +{ + Q_OBJECT +public: + ImageCropperLabel(int width, int height, QWidget *parent); + + void setOriginalImage(const QPixmap &pixmap); + void setOutputShape(OutputShape shape) { outputShape = shape; } + QPixmap getCroppedImage(); + QPixmap getCroppedImage(OutputShape shape); + + /***************************************** + * Set cropper's shape + *****************************************/ + void setRectCropper(); + void setSquareCropper(); + void setEllipseCropper(); + void setCircleCropper(); + void setFixedRectCropper(QSize size); + void setFixedEllipseCropper(QSize size); + void setCropper(CropperShape shape, QSize size); // not recommended + + /***************************************************************************** + * Set cropper's fixed size + *****************************************************************************/ + void setCropperFixedSize(int fixedWidth, int fixedHeight); + void setCropperFixedWidth(int fixedWidht); + void setCropperFixedHeight(int fixedHeight); + + /***************************************************************************** + * Set cropper's minimum size + * default: the twice of minimum of the edge lenght of drag square + *****************************************************************************/ + void setCropperMinimumSize(int minWidth, int minHeight) + { + cropperMinimumWidth = minWidth; + cropperMinimumHeight = minHeight; + } + void setCropperMinimumWidth(int minWidth) { cropperMinimumWidth = minWidth; } + void setCropperMinimumHeight(int minHeight) { cropperMinimumHeight = minHeight; } + + /************************************************* + * Set the size, color, visibility of rectangular border + *************************************************/ + void setShowRectBorder(bool show) { isShowRectBorder = show; } + QPen getBorderPen() { return borderPen; } + void setBorderPen(const QPen &pen) { borderPen = pen; } + + /************************************************* + * Set the size, color of drag square + *************************************************/ + void setShowDragSquare(bool show) { isShowDragSquare = show; } + void setDragSquareEdge(int edge) { dragSquareEdge = (edge >= 3 ? edge : 3); } + void setDragSquareColor(const QColor &color) { dragSquareColor = color; } + + /***************************************** + * Opacity Effect + *****************************************/ + void enableOpacity(bool b = true) { isShowOpacityEffect = b; } + void setOpacity(double newOpacity) { opacity = newOpacity; } + +signals: + void croppedImageChanged(); + +protected: + /***************************************** + * Event + *****************************************/ + virtual void paintEvent(QPaintEvent *event) override; + virtual void mousePressEvent(QMouseEvent *e) override; + virtual void mouseMoveEvent(QMouseEvent *e) override; + virtual void mouseReleaseEvent(QMouseEvent *e) override; + +private: + /*************************************** + * Draw shapes + ***************************************/ + void drawFillRect(QPoint centralPoint, int edge, QColor color); + void drawRectOpacity(); + void drawEllipseOpacity(); + void drawOpacity(const QPainterPath &path); // shadow effect + void drawSquareEdge(bool onlyFourCorners); + + /*************************************** + * Other utility methods + ***************************************/ + int getPosInCropperRect(const QPoint &pt); + bool isPosNearDragSquare(const QPoint &pt1, const QPoint &pt2); + void resetCropperPos(); + void changeCursor(); + + enum { + RECT_OUTSIZD = 0, + RECT_INSIDE = 1, + RECT_TOP_LEFT, + RECT_TOP, + RECT_TOP_RIGHT, + RECT_RIGHT, + RECT_BOTTOM_RIGHT, + RECT_BOTTOM, + RECT_BOTTOM_LEFT, + RECT_LEFT + }; + + const bool ONLY_FOUR_CORNERS = true; + +private: + QPixmap originalImage; + QPixmap tempImage; + + bool isShowRectBorder = true; + QPen borderPen; + + CropperShape cropperShape = CropperShape::UNDEFINED; + OutputShape outputShape = OutputShape::RECT; + + QRect imageRect; // the whole image area in the label (not real size) + QRect cropperRect; // a rectangle frame to choose image area (not real size) + QRect cropperRect_; // cropper rect (real size) + double scaledRate = 1.0; + + bool isLButtonPressed = false; + bool isCursorPosCalculated = false; + int cursorPosInCropperRect = RECT_OUTSIZD; + QPoint lastPos; + QPoint currPos; + + bool isShowDragSquare = true; + int dragSquareEdge = 8; + QColor dragSquareColor = Qt::white; + + int cropperMinimumWidth = dragSquareEdge * 2; + int cropperMinimumHeight = dragSquareEdge * 2; + + bool isShowOpacityEffect = false; + double opacity = 0.6; +}; + +#endif // IMAGECROPPERLABEL_H diff --git a/netfriend/imagecropper/example/imagecropperdemo.cpp b/netfriend/imagecropper/example/imagecropperdemo.cpp new file mode 100644 index 0000000..995d137 --- /dev/null +++ b/netfriend/imagecropper/example/imagecropperdemo.cpp @@ -0,0 +1,415 @@ +#include "imagecropperdemo.h" +#include +#include +#include +#include +#include + +ImageCropperDemo::ImageCropperDemo(QWidget* parent) : + QDialog(parent) +{ + setupLayout(); + init(); + + this->setAttribute(Qt::WA_DeleteOnClose, true); + this->setWindowTitle("Image Cropper Demo"); +} + + +void ImageCropperDemo::setupLayout() { + imgCropperLabel = new ImageCropperLabel(600, 500, this); + imgCropperLabel->setFrameStyle(1); + + comboOutputShape = new QComboBox(this); + comboCropperShape = new QComboBox(this); + + labelPreviewImage = new QLabel(this); + + editOriginalImagePath = new QLineEdit(this); + btnChooseOriginalImagePath = new QPushButton(this); + QHBoxLayout* hOriginalImagePathLayout = new QHBoxLayout(); + hOriginalImagePathLayout->addWidget(editOriginalImagePath); + hOriginalImagePathLayout->addWidget(btnChooseOriginalImagePath); + + editCropperFixedWidth = new QLineEdit(this); + editCropperFixedHeight = new QLineEdit(this); + QHBoxLayout* hCropperFixedSizeLayout = new QHBoxLayout(); + hCropperFixedSizeLayout->addWidget(editCropperFixedWidth); + hCropperFixedSizeLayout->addWidget(editCropperFixedHeight); + + editCropperMinWidth = new QLineEdit("8", this); + editCropperMinHeight = new QLineEdit("8", this); + QHBoxLayout* hCropperMinSizeLayout = new QHBoxLayout(); + hCropperMinSizeLayout->addWidget(editCropperMinWidth); + hCropperMinSizeLayout->addWidget(editCropperMinHeight); + + checkEnableOpacity = new QCheckBox(this); + sliderOpacity = new QSlider(Qt::Horizontal, this); + + checkShowDragSquare = new QCheckBox(this); + editDragSquareEdge = new QLineEdit("8", this); + checkShowRectBorder = new QCheckBox(this); + + labelRectBorderColor = new QLabel(this); + btnChooseRectBorderCorlor = new QPushButton(this); + QHBoxLayout* hRectBorderColorLayout = new QHBoxLayout(); + hRectBorderColorLayout->addWidget(labelRectBorderColor); + hRectBorderColorLayout->addWidget(btnChooseRectBorderCorlor); + + labelDragSquareColor = new QLabel(this); + btnChooseDragSquareColor = new QPushButton(this); + QHBoxLayout* hDragSquareColorLayout = new QHBoxLayout(); + hDragSquareColorLayout->addWidget(labelDragSquareColor); + hDragSquareColorLayout->addWidget(btnChooseDragSquareColor); + + QFormLayout* formLayout1 = new QFormLayout(); + formLayout1->addRow(new QLabel("Preview:"), labelPreviewImage); + formLayout1->addRow(new QLabel("OriginalImage:", this), hOriginalImagePathLayout); + formLayout1->addRow(new QLabel("OutputShape:", this), comboOutputShape); + formLayout1->addRow(new QLabel("CropperShape:", this), comboCropperShape); + formLayout1->addRow(new QLabel("FixedSize:", this), hCropperFixedSizeLayout); + formLayout1->addRow(new QLabel("MinimumSize:", this), hCropperMinSizeLayout); + + QFormLayout* formLayout2 = new QFormLayout(); + formLayout2->addRow(new QLabel("EnableOpacity:", this), checkEnableOpacity); + formLayout2->addRow(new QLabel("Opacity:", this), sliderOpacity); + + QFormLayout* formLayout3 = new QFormLayout(); + formLayout3->addRow(new QLabel("ShowDragSquare:", this), checkShowDragSquare); + formLayout3->addRow(new QLabel("DragSquareEdge:", this), editDragSquareEdge); + formLayout3->addRow(new QLabel("DragSquareColor:", this), hDragSquareColorLayout); + + QFormLayout* formLayout4 = new QFormLayout(); + formLayout4->addRow(new QLabel("ShowRectBorder:", this), checkShowRectBorder); + formLayout4->addRow(new QLabel("RectBorderColor:", this), hRectBorderColorLayout); + + btnSavePreview = new QPushButton("Save", this); + btnQuit = new QPushButton("Quit", this); + QHBoxLayout* btnLayout = new QHBoxLayout(); + btnLayout->addStretch(); + btnLayout->addWidget(btnSavePreview); + btnLayout->addStretch(); + btnLayout->addWidget(btnQuit); + btnLayout->addStretch(); + + QVBoxLayout* vLayout = new QVBoxLayout(); + vLayout->addLayout(formLayout1); + vLayout->addStretch(); + vLayout->addLayout(formLayout2); + vLayout->addStretch(); + vLayout->addLayout(formLayout3); + vLayout->addStretch(); + vLayout->addLayout(formLayout4); + vLayout->addStretch(); + vLayout->addLayout(btnLayout); + + mainLayout = new QHBoxLayout(this); + mainLayout->addWidget(imgCropperLabel); + mainLayout->addLayout(vLayout); +} + +void ImageCropperDemo::init() { + imgCropperLabel->setRectCropper(); + editCropperFixedWidth->setEnabled(false); + editCropperFixedHeight->setEnabled(false); + + labelPreviewImage->setFixedSize(96, 96); + labelPreviewImage->setAlignment(Qt::AlignCenter); + labelPreviewImage->setFrameStyle(QFrame::Panel | QFrame::Sunken); + connect(imgCropperLabel, &ImageCropperLabel::croppedImageChanged, + this, &ImageCropperDemo::onUpdatePreview); + + btnChooseOriginalImagePath->setIcon(QIcon("res/select-file.ico")); + btnChooseOriginalImagePath->setFixedWidth(30); + connect(btnChooseOriginalImagePath, &QPushButton::clicked, + this, &ImageCropperDemo::onChooseOriginalImage); + + comboOutputShape->addItem("Rect/Square"); + comboOutputShape->addItem("Ellipse/Circle"); + connect(comboOutputShape, SIGNAL(currentIndexChanged(int)), + this, SLOT(onOutputShapeChanged(int))); + + comboCropperShape->addItem("Rect"); + comboCropperShape->addItem("Square"); + comboCropperShape->addItem("FixedRect"); + comboCropperShape->addItem("Ellipse"); + comboCropperShape->addItem("Circle"); + comboCropperShape->addItem("FixedEllipse"); + connect(comboCropperShape, SIGNAL(currentIndexChanged(int)), + this, SLOT(onCropperShapeChanged(int))); + + connect(editCropperFixedWidth, &QLineEdit::textChanged, + this, &ImageCropperDemo::onFixedWidthChanged); + connect(editCropperFixedHeight, &QLineEdit::textChanged, + this, &ImageCropperDemo::onFixedHeightChanged); + connect(editCropperMinWidth, &QLineEdit::textChanged, + this, &ImageCropperDemo::onMinWidthChanged); + connect(editCropperMinHeight, &QLineEdit::textChanged, + this, &ImageCropperDemo::onMinHeightChanged); + + checkEnableOpacity->setCheckState(Qt::Checked); + imgCropperLabel->enableOpacity(true); + connect(checkEnableOpacity, &QCheckBox::stateChanged, + this, &ImageCropperDemo::onEnableOpacityChanged); + + checkShowDragSquare->setCheckState(Qt::Checked); + imgCropperLabel->setShowDragSquare(true); + connect(checkShowDragSquare, &QCheckBox::stateChanged, + this, &ImageCropperDemo::onShowDragSquareChanged); + connect(editDragSquareEdge, &QLineEdit::textChanged, + this, &ImageCropperDemo::onDragSquareEdgeChanged); + + sliderOpacity->setRange(0, 100); + sliderOpacity->setValue(60); + connect(sliderOpacity, &QSlider::valueChanged, + this, &ImageCropperDemo::onOpacityChanged); + + checkShowRectBorder->setCheckState(Qt::Checked); + connect(checkShowRectBorder, &QCheckBox::stateChanged, + this, &ImageCropperDemo::onShowRectBorder); + + setLabelColor(labelRectBorderColor, Qt::white); + btnChooseRectBorderCorlor->setIcon(QIcon("res/color-palette.ico")); + btnChooseRectBorderCorlor->setFixedWidth(40); + connect(btnChooseRectBorderCorlor, &QPushButton::clicked, + this, &ImageCropperDemo::onChooseRectBorderColor); + + setLabelColor(labelDragSquareColor, Qt::white); + btnChooseDragSquareColor->setIcon(QIcon("res/color-palette.ico")); + btnChooseDragSquareColor->setFixedWidth(40); + connect(btnChooseDragSquareColor, &QPushButton::clicked, + this, &ImageCropperDemo::onChooseDragSquareColor); + + connect(btnSavePreview, &QPushButton::clicked, + this, &ImageCropperDemo::onSaveCroppedImage); + connect(btnQuit, &QPushButton::clicked, + this, &ImageCropperDemo::close); + + imgCropperLabel->update(); +} + + +/***************************************************************************** + * + * slots + * +*****************************************************************************/ + +void ImageCropperDemo::onChooseOriginalImage() { + QString filename = QFileDialog::getOpenFileName(this, "Select a picture", "", + "picture (*.jpg *.png *.bmp)"); + if (filename.isNull()) + return; + + QPixmap pixmap; + if (!pixmap.load(filename)) { + QMessageBox::critical(this, "Error", "Load image failed", QMessageBox::Ok); + return; + } + + editOriginalImagePath->setText(filename); + imgCropperLabel->setOriginalImage(pixmap); + imgCropperLabel->update(); + onUpdatePreview(); + labelPreviewImage->setFrameStyle(0); +} + +void ImageCropperDemo::onOutputShapeChanged(int idx) { + // Output: Rectangular + if (idx == 0) + imgCropperLabel->setOutputShape(OutputShape::RECT); + else + imgCropperLabel->setOutputShape(OutputShape::ELLIPSE); + onUpdatePreview(); +} + +void ImageCropperDemo::onCropperShapeChanged(int idx) { + switch (CropperShape(idx + 1)) { + case CropperShape::RECT: { + imgCropperLabel->setRectCropper(); + editCropperFixedWidth->setEnabled(false); + editCropperFixedHeight->setEnabled(false); + editCropperMinWidth->setEnabled(true); + editCropperMinHeight->setEnabled(true); + checkShowDragSquare->setEnabled(true); + editDragSquareEdge->setEnabled(true); + btnChooseDragSquareColor->setEnabled(true); + break; + } + case CropperShape::SQUARE: { + imgCropperLabel->setSquareCropper(); + editCropperFixedWidth->setEnabled(false); + editCropperFixedHeight->setEnabled(false); + editCropperMinWidth->setEnabled(true); + editCropperMinHeight->setEnabled(true); + checkShowDragSquare->setEnabled(true); + editDragSquareEdge->setEnabled(true); + btnChooseDragSquareColor->setEnabled(true); + break; + } + case CropperShape::FIXED_RECT: { + imgCropperLabel->setFixedRectCropper(QSize(64, 64)); + editCropperFixedWidth->setEnabled(true); + editCropperFixedHeight->setEnabled(true); + editCropperMinWidth->setEnabled(false); + editCropperMinHeight->setEnabled(false); + editCropperFixedWidth->setText("64"); + editCropperFixedHeight->setText("64"); + checkShowDragSquare->setEnabled(false); + editDragSquareEdge->setEnabled(false); + btnChooseDragSquareColor->setEnabled(false); + break; + } + case CropperShape::ELLIPSE: { + imgCropperLabel->setEllipseCropper(); + editCropperFixedWidth->setEnabled(false); + editCropperFixedHeight->setEnabled(false); + editCropperMinWidth->setEnabled(true); + editCropperMinHeight->setEnabled(true); + checkShowDragSquare->setEnabled(true); + editDragSquareEdge->setEnabled(true); + btnChooseDragSquareColor->setEnabled(true); + break; + } + case CropperShape::CIRCLE: { + imgCropperLabel->setCircleCropper(); + editCropperFixedWidth->setEnabled(false); + editCropperFixedHeight->setEnabled(false); + editCropperMinWidth->setEnabled(true); + editCropperMinHeight->setEnabled(true); + checkShowDragSquare->setEnabled(true); + editDragSquareEdge->setEnabled(true); + btnChooseDragSquareColor->setEnabled(true); + break; + } + case CropperShape::FIXED_ELLIPSE: + imgCropperLabel->setFixedEllipseCropper(QSize(64, 64)); + editCropperFixedWidth->setEnabled(true); + editCropperFixedHeight->setEnabled(true); + editCropperMinWidth->setEnabled(false); + editCropperMinHeight->setEnabled(false); + editCropperFixedWidth->setText("64"); + editCropperFixedHeight->setText("64"); + checkShowDragSquare->setEnabled(false); + editDragSquareEdge->setEnabled(false); + btnChooseDragSquareColor->setEnabled(false); + break; + case CropperShape::UNDEFINED: + break; + } + + imgCropperLabel->update(); + onUpdatePreview(); +} + +void ImageCropperDemo::onEnableOpacityChanged(int state) { + if (state == Qt::Checked) { + sliderOpacity->setEnabled(true); + imgCropperLabel->enableOpacity(true); + } + else { + sliderOpacity->setEnabled(false); + imgCropperLabel->enableOpacity(false); + } + imgCropperLabel->update(); +} + +void ImageCropperDemo::onShowDragSquareChanged(int state) { + if (state == Qt::Checked) { + editDragSquareEdge->setEnabled(true); + btnChooseDragSquareColor->setEnabled(true); + imgCropperLabel->setShowDragSquare(true); + } + else { + editDragSquareEdge->setEnabled(false); + btnChooseDragSquareColor->setEnabled(false); + imgCropperLabel->setShowDragSquare(false); + } + imgCropperLabel->update(); +} + +void ImageCropperDemo::onDragSquareEdgeChanged(QString edge) { + imgCropperLabel->setDragSquareEdge(edge.toInt()); + imgCropperLabel->update(); +} + +void ImageCropperDemo::onOpacityChanged(int val) { + imgCropperLabel->setOpacity(val / 100.0); + imgCropperLabel->update(); +} + +void ImageCropperDemo::onFixedWidthChanged(QString width) { + imgCropperLabel->setCropperFixedWidth(width.toInt()); + imgCropperLabel->update(); +} + +void ImageCropperDemo::onFixedHeightChanged(QString height) { + imgCropperLabel->setCropperFixedHeight(height.toInt()); + imgCropperLabel->update(); +} + +void ImageCropperDemo::onMinWidthChanged(QString width) { + imgCropperLabel->setCropperMinimumWidth(width.toInt()); + imgCropperLabel->update(); +} + +void ImageCropperDemo::onMinHeightChanged(QString height) { + imgCropperLabel->setMinimumHeight(height.toInt()); + imgCropperLabel->update(); +} + +void ImageCropperDemo::onShowRectBorder(int state) { + if (state == Qt::Checked) { + btnChooseRectBorderCorlor->setEnabled(true); + imgCropperLabel->setShowRectBorder(true); + } + else { + btnChooseRectBorderCorlor->setEnabled(false); + imgCropperLabel->setShowRectBorder(false); + } + imgCropperLabel->update(); +} + +void ImageCropperDemo::onChooseRectBorderColor() { + QColor color = QColorDialog::getColor(imgCropperLabel->getBorderPen().color(), this); + if (color.isValid()) { + setLabelColor(labelRectBorderColor, color); + QPen pen = imgCropperLabel->getBorderPen(); + pen.setColor(color); + imgCropperLabel->setBorderPen(pen); + imgCropperLabel->update(); + } +} + +void ImageCropperDemo::onChooseDragSquareColor() { + QColor color = QColorDialog::getColor(Qt::white, this); + if (color.isValid()) { + setLabelColor(labelDragSquareColor, color); + imgCropperLabel->setDragSquareColor(color); + imgCropperLabel->update(); + } +} + +void ImageCropperDemo::onUpdatePreview() { + QPixmap preview = imgCropperLabel->getCroppedImage(); + preview = preview.scaled(labelPreviewImage->width(), labelPreviewImage->height(), + Qt::KeepAspectRatio, Qt::SmoothTransformation); + labelPreviewImage->setPixmap(preview); +} + +void ImageCropperDemo::onSaveCroppedImage() { + const QPixmap* pixmap = labelPreviewImage->pixmap(); + if (!pixmap) { + QMessageBox::information(this, "Error", "There is no cropped image to save.", QMessageBox::Ok); + return ; + } + + QString filename = QFileDialog::getSaveFileName(this, "Save cropped image", "", "picture (*.png)"); + if (!filename.isNull()) { + if (imgCropperLabel->getCroppedImage().save(filename, "PNG")) + QMessageBox::information(this, "Prompt", "Saved successfully", QMessageBox::Ok); + else + QMessageBox::information(this, "Error", "Save image failed!", QMessageBox::Ok); + } +} + diff --git a/netfriend/imagecropper/example/imagecropperdemo.h b/netfriend/imagecropper/example/imagecropperdemo.h new file mode 100644 index 0000000..b9388d8 --- /dev/null +++ b/netfriend/imagecropper/example/imagecropperdemo.h @@ -0,0 +1,85 @@ +#ifndef TESTIMAGECROPPERLABEL_H +#define TESTIMAGECROPPERLABEL_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../base/imagecropperlabel.h" + +class ImageCropperDemo : public QDialog +{ + Q_OBJECT +public: + ImageCropperDemo(QWidget* parent = 0); + + void setupLayout(); + + void init(); + +public slots: + void onOutputShapeChanged(int idx); + void onCropperShapeChanged(int idx); + void onEnableOpacityChanged(int state); + void onShowDragSquareChanged(int state); + void onDragSquareEdgeChanged(QString edge); + void onOpacityChanged(int val); + void onFixedWidthChanged(QString width); + void onFixedHeightChanged(QString height); + void onMinWidthChanged(QString width); + void onMinHeightChanged(QString height); + void onShowRectBorder(int state); + void onChooseRectBorderColor(); + void onChooseDragSquareColor(); + + void onChooseOriginalImage(); + void onUpdatePreview(); + void onSaveCroppedImage(); + +private: + void setLabelColor(QLabel* label, QColor color) { + QPixmap pixmap(QSize(80, 25)); + pixmap.fill(color); + label->setPixmap(pixmap); + } + +private: + ImageCropperLabel* imgCropperLabel; + QHBoxLayout* mainLayout; + + QLabel* labelPreviewImage; + + QComboBox* comboOutputShape; + QComboBox* comboCropperShape; + + QLineEdit* editOriginalImagePath; + QPushButton* btnChooseOriginalImagePath; + + QLineEdit* editCropperFixedWidth; + QLineEdit* editCropperFixedHeight; + QLineEdit* editCropperMinWidth; + QLineEdit* editCropperMinHeight; + + QCheckBox* checkShowDragSquare; + QCheckBox* checkEnableOpacity; + QSlider* sliderOpacity; + QLineEdit* editDragSquareEdge; + + QCheckBox* checkShowRectBorder; + QLabel* labelRectBorderColor; + QPushButton* btnChooseRectBorderCorlor; + + QLabel* labelDragSquareColor; + QPushButton* btnChooseDragSquareColor; + + QPushButton* btnSavePreview; + QPushButton* btnQuit; +}; + +#endif // TESTIMAGECROPPERLABEL_H diff --git a/netfriend/imagecropper/example/main.cpp b/netfriend/imagecropper/example/main.cpp new file mode 100644 index 0000000..fd3e533 --- /dev/null +++ b/netfriend/imagecropper/example/main.cpp @@ -0,0 +1,11 @@ +#include "mainwindow.h" + +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + MainWindow w; + w.show(); + return a.exec(); +} diff --git a/netfriend/imagecropper/example/mainwindow.cpp b/netfriend/imagecropper/example/mainwindow.cpp new file mode 100644 index 0000000..b9c6a31 --- /dev/null +++ b/netfriend/imagecropper/example/mainwindow.cpp @@ -0,0 +1,62 @@ +#include "mainwindow.h" +#include "imagecropperdemo.h" + +#include "../base/imagecropperdialog.h" + +#include +#include +#include + + +MainWindow::MainWindow(QWidget *parent) + : QMainWindow(parent) +{ + setupLayout(); +} + +MainWindow::~MainWindow() +{ +} + +void MainWindow::setupLayout() { + QWidget* centralWidget = new QWidget(this); + + btnCustomCrop = new QPushButton("Custom Crop", centralWidget); + btnSimpleCrop = new QPushButton("Simple Crop", centralWidget); + + QVBoxLayout* mainLayout = new QVBoxLayout(centralWidget); + mainLayout->addWidget(btnCustomCrop); + mainLayout->addWidget(btnSimpleCrop); + this->setCentralWidget(centralWidget); + + connect(btnCustomCrop, &QPushButton::clicked, this, &MainWindow::onCustomCrop); + connect(btnSimpleCrop, &QPushButton::clicked, this, &MainWindow::onSimpleCrop); +} + +void MainWindow::onCustomCrop() { + ImageCropperDemo* dialog = new ImageCropperDemo(this); + dialog->show(); +} + +void MainWindow::onSimpleCrop() { + QMessageBox::information(this, "Prompt", "Please select a picture", QMessageBox::Ok); + QString filename = QFileDialog::getOpenFileName(this, "Select image", "", "image (*.png *.jpg)"); + if (filename.isNull()) + return; + + // ********* + // ******* + // ***** + // *** + // * + QPixmap image = ImageCropperDialog::getCroppedImage(filename, 600, 400, CropperShape::CIRCLE); + if (image.isNull()) + return; + + QDialog* dialog = new QDialog(0); + dialog->setAttribute(Qt::WA_DeleteOnClose, true); + QLabel* label = new QLabel(dialog); + label->setFixedSize(image.size()); + label->setPixmap(image); + dialog->exec(); +} diff --git a/netfriend/imagecropper/example/mainwindow.h b/netfriend/imagecropper/example/mainwindow.h new file mode 100644 index 0000000..333fc74 --- /dev/null +++ b/netfriend/imagecropper/example/mainwindow.h @@ -0,0 +1,26 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + MainWindow(QWidget *parent = 0); + ~MainWindow(); + +public slots: + void onCustomCrop(); + void onSimpleCrop(); + +private: + void setupLayout(); + +private: + QPushButton* btnCustomCrop; + QPushButton* btnSimpleCrop; +}; +#endif // MAINWINDOW_H diff --git a/netfriend/imagecropper/imagecropper.pro b/netfriend/imagecropper/imagecropper.pro new file mode 100644 index 0000000..0350cb7 --- /dev/null +++ b/netfriend/imagecropper/imagecropper.pro @@ -0,0 +1,33 @@ +QT += core gui +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + base/imagecropperlabel.cpp \ + example/imagecropperdemo.cpp \ + example/main.cpp \ + example/mainwindow.cpp + +HEADERS += \ + base/imagecropperdialog.h \ + base/imagecropperlabel.h \ + example/imagecropperdemo.h \ + example/mainwindow.h + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target diff --git a/netfriend/imagecropper/res/color-palette.ico b/netfriend/imagecropper/res/color-palette.ico new file mode 100644 index 0000000..b046713 Binary files /dev/null and b/netfriend/imagecropper/res/color-palette.ico differ diff --git a/netfriend/imagecropper/res/save.ico b/netfriend/imagecropper/res/save.ico new file mode 100644 index 0000000..39de3e6 Binary files /dev/null and b/netfriend/imagecropper/res/save.ico differ diff --git a/netfriend/imagecropper/res/select-file.ico b/netfriend/imagecropper/res/select-file.ico new file mode 100644 index 0000000..1ef4c60 Binary files /dev/null and b/netfriend/imagecropper/res/select-file.ico differ diff --git a/netfriend/imageviewwindow/Resources/1.jpg b/netfriend/imageviewwindow/Resources/1.jpg new file mode 100644 index 0000000..cb7f271 Binary files /dev/null and b/netfriend/imageviewwindow/Resources/1.jpg differ diff --git a/netfriend/imageviewwindow/Resources/2.jpg b/netfriend/imageviewwindow/Resources/2.jpg new file mode 100644 index 0000000..99726b3 Binary files /dev/null and b/netfriend/imageviewwindow/Resources/2.jpg differ diff --git a/netfriend/imageviewwindow/Resources/3.jpg b/netfriend/imageviewwindow/Resources/3.jpg new file mode 100644 index 0000000..86e5e3a Binary files /dev/null and b/netfriend/imageviewwindow/Resources/3.jpg differ diff --git a/netfriend/imageviewwindow/Resources/4.jpg b/netfriend/imageviewwindow/Resources/4.jpg new file mode 100644 index 0000000..139a17c Binary files /dev/null and b/netfriend/imageviewwindow/Resources/4.jpg differ diff --git a/netfriend/imageviewwindow/Resources/5.jpg b/netfriend/imageviewwindow/Resources/5.jpg new file mode 100644 index 0000000..41c2db3 Binary files /dev/null and b/netfriend/imageviewwindow/Resources/5.jpg differ diff --git a/netfriend/imageviewwindow/Resources/6.jpg b/netfriend/imageviewwindow/Resources/6.jpg new file mode 100644 index 0000000..dbe1c97 Binary files /dev/null and b/netfriend/imageviewwindow/Resources/6.jpg differ diff --git a/netfriend/imageviewwindow/Resources/7.jpg b/netfriend/imageviewwindow/Resources/7.jpg new file mode 100644 index 0000000..f23f324 Binary files /dev/null and b/netfriend/imageviewwindow/Resources/7.jpg differ diff --git a/netfriend/imageviewwindow/Resources/Wblog_left.png b/netfriend/imageviewwindow/Resources/Wblog_left.png new file mode 100644 index 0000000..ff05dea Binary files /dev/null and b/netfriend/imageviewwindow/Resources/Wblog_left.png differ diff --git a/netfriend/imageviewwindow/Resources/Wblog_right.png b/netfriend/imageviewwindow/Resources/Wblog_right.png new file mode 100644 index 0000000..1480069 Binary files /dev/null and b/netfriend/imageviewwindow/Resources/Wblog_right.png differ diff --git a/netfriend/imageviewwindow/graphicspixmap.cpp b/netfriend/imageviewwindow/graphicspixmap.cpp new file mode 100644 index 0000000..d2dfaf2 --- /dev/null +++ b/netfriend/imageviewwindow/graphicspixmap.cpp @@ -0,0 +1,59 @@ +#include "graphicspixmap.h" + +#include +#include +#include +#include + +GraphicsPixmap::GraphicsPixmap() : QGraphicsObject() +{ + setCacheMode(DeviceCoordinateCache); +} + +void GraphicsPixmap::mousePressEvent(QGraphicsSceneMouseEvent *event) +{ + QGraphicsObject::mousePressEvent(event); + if (event->button() == Qt::LeftButton) + { + emit clicked(); + } +} + +void GraphicsPixmap::setItemOffset(QPointF ponit) +{ + prepareGeometryChange(); + offset = ponit; + update(); +} + +QPointF GraphicsPixmap::itemoffset() +{ + return offset; +} + +void GraphicsPixmap::setPixmap(const QPixmap& pixmap) +{ + pixSize = pixmap.size(); + pix = pixmap; +} + +void GraphicsPixmap::setPixmapSize(QSize size) +{ + pixSize = size; +} + +QSize GraphicsPixmap::pixsize() +{ + return pixSize; +} + +QRectF GraphicsPixmap::boundingRect() const +{ + return QRectF(offset, pix.size() / pix.devicePixelRatio()); +} + +void GraphicsPixmap::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) +{ + painter->setRenderHint(QPainter::SmoothPixmapTransform, true); + painter->drawPixmap(offset, pix.scaled(pixSize, Qt::KeepAspectRatio, Qt::SmoothTransformation)); +} \ No newline at end of file diff --git a/netfriend/imageviewwindow/graphicspixmap.h b/netfriend/imageviewwindow/graphicspixmap.h new file mode 100644 index 0000000..9bf2dad --- /dev/null +++ b/netfriend/imageviewwindow/graphicspixmap.h @@ -0,0 +1,38 @@ +#ifndef GRAPHICSPIXMAP_H +#define GRAPHICSPIXMAP_H + +#include +#include +#include + +class GraphicsPixmap : public QGraphicsObject +{ + Q_OBJECT + Q_PROPERTY(QPointF itemoffset READ itemoffset WRITE setItemOffset) + Q_PROPERTY(QSize itemsize READ pixsize WRITE setPixmapSize) + +public: + GraphicsPixmap(); + +public: + QRectF boundingRect() const Q_DECL_OVERRIDE; + void setItemOffset(QPointF ponit); + QPointF itemoffset(); + QSize pixsize(); + void setPixmap(const QPixmap& pixmap); + void setPixmapSize(QSize size); + +signals: + void clicked(); + +private: + void mousePressEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE; + void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) Q_DECL_OVERRIDE; + +private: + QPixmap pix; + QPointF offset; + QSize pixSize; +}; + +#endif // GRAPHICSPIXMAP_H diff --git a/netfriend/imageviewwindow/graphicsview.cpp b/netfriend/imageviewwindow/graphicsview.cpp new file mode 100644 index 0000000..69c1426 --- /dev/null +++ b/netfriend/imageviewwindow/graphicsview.cpp @@ -0,0 +1,18 @@ +#include "graphicsview.h" + +GraphicsView::GraphicsView(QGraphicsScene *scene) + : QGraphicsView(scene) +{ + +} + +GraphicsView::~GraphicsView() +{ + +} + +void GraphicsView::resizeEvent(QResizeEvent *event) +{ + QGraphicsView::resizeEvent(event); + fitInView(sceneRect(), Qt::KeepAspectRatio); +} \ No newline at end of file diff --git a/netfriend/imageviewwindow/graphicsview.h b/netfriend/imageviewwindow/graphicsview.h new file mode 100644 index 0000000..1e625a8 --- /dev/null +++ b/netfriend/imageviewwindow/graphicsview.h @@ -0,0 +1,18 @@ +#ifndef GRAPHICSVIEW_H +#define GRAPHICSVIEW_H + +#include + +class GraphicsView : public QGraphicsView +{ + Q_OBJECT + +public: + GraphicsView(QGraphicsScene *scene); + ~GraphicsView(); + +protected: + void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE; +}; + +#endif // GRAPHICSVIEW_H diff --git a/netfriend/imageviewwindow/imageviewwindow.cpp b/netfriend/imageviewwindow/imageviewwindow.cpp new file mode 100644 index 0000000..6d4c5f5 --- /dev/null +++ b/netfriend/imageviewwindow/imageviewwindow.cpp @@ -0,0 +1,211 @@ +#include "imageviewwindow.h" +#include "graphicsview.h" +#include "graphicspixmap.h" + +#include +#include +#include +#include + +const int image_conunt = 5; +const int image_yoffset = 40; +const int image_xoffset = 60; +ImageViewWindow::ImageViewWindow(QWidget *parent) + : QWidget(parent) + , m_isStart(false) +{ + ui.setupUi(this); + initControl(); +} + +ImageViewWindow::~ImageViewWindow() +{ + +} + +void ImageViewWindow::initControl() +{ + //场景 + m_scene = new QGraphicsScene(QRect(0, 0, 876, 368), this); + //图片信息 + m_imgMapInfolst << QMap{ + { "zIndex" , "1" }, + { "width" , "120" }, + { "height" , "150" }, + { "top" , "71" }, + { "left" , "134" }, + { "opacity" , "0.6" } + }; + m_imgMapInfolst << QMap{ + { "zIndex", "2" }, + { "width", "130" }, + { "height", "170" }, + { "top", "61" }, + { "left", "0" }, + { "opacity", "0.7" } + }; + m_imgMapInfolst << QMap{ + { "zIndex", "3" }, + { "width", "170" }, + { "height", "218" }, + { "top", "37" }, + { "left", "110" }, + { "opacity", "0.8" } + }; + m_imgMapInfolst << QMap{ + { "zIndex", "4" }, + { "width", "224" }, + { "height", "288" }, + { "top", "0" }, + { "left", "262" }, + { "opacity", "1" } + }; + m_imgMapInfolst << QMap{ + { "zIndex", "3" }, + { "width", "170" }, + { "height", "218" }, + { "top", "37" }, + { "left", "468" }, + { "opacity", "0.8" } + }; + m_imgMapInfolst << QMap{ + { "zIndex", "2" }, + { "width", "130" }, + { "height", "170" }, + { "top", "61" }, + { "left", "620" }, + { "opacity", "0.7" } + }; + m_imgMapInfolst << QMap{ + { "zIndex", "1" }, + { "width", "120" }, + { "height", "150" }, + { "top", "71" }, + { "left", "496" }, + { "opacity", "0.6" } + }; + + //场景中添加图片元素 + for (int index = 0; index < m_imgMapInfolst.size(); index++) + { + const auto imageInfoMap = m_imgMapInfolst[index]; + const QString&& centerImg = QString(":/ImageViewWindow/Resources/%1.jpg").arg(index + 1); + const QPixmap&& pixmap = QPixmap(centerImg); + GraphicsPixmap *item = new GraphicsPixmap(); + item->setPixmap(pixmap); + item->setPixmapSize(QSize(imageInfoMap["width"].toInt(), imageInfoMap["height"].toInt())); + item->setItemOffset(QPointF(imageInfoMap["left"].toInt() + image_xoffset, imageInfoMap["top"].toInt() + image_yoffset)); + item->setZValue(imageInfoMap["zIndex"].toInt()); + item->setOpacity(imageInfoMap["opacity"].toFloat()); + m_items << item; + m_scene->addItem(item); + } + + //left button + GraphicsPixmap *leftBtn = new GraphicsPixmap(); + leftBtn->setCursor(QCursor(Qt::PointingHandCursor)); + leftBtn->setPixmap(QPixmap(":/ImageViewWindow/Resources/Wblog_left.png")); + leftBtn->setItemOffset(QPointF(12, image_yoffset + 124)); + leftBtn->setZValue(5); + m_scene->addItem(leftBtn); + connect(leftBtn, SIGNAL(clicked()), this, SLOT(onLeftBtnClicked())); + //right button + GraphicsPixmap *rightBtn = new GraphicsPixmap(); + rightBtn->setCursor(QCursor(Qt::PointingHandCursor)); + rightBtn->setPixmap(QPixmap(":/ImageViewWindow/Resources/Wblog_right.png")); + rightBtn->setItemOffset(QPointF(836, image_yoffset + 124)); + rightBtn->setZValue(5); + m_scene->addItem(rightBtn); + connect(rightBtn, SIGNAL(clicked()), this, SLOT(onRightBtnClicked())); + + //视图 + GraphicsView *view = new GraphicsView(m_scene); + view->setFrameShape(QFrame::NoFrame); + view->setParent(this); + view->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate); + view->setBackgroundBrush(QColor(46, 46, 46)); + view->setCacheMode(QGraphicsView::CacheBackground); + view->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); + ui.viewlayout->addWidget(view); + + //动画: 大小,位置 + m_group = new QParallelAnimationGroup; + for (int i = 0; i < m_items.count(); ++i) { + QPropertyAnimation *anim = new QPropertyAnimation(m_items[i], "itemoffset"); + QPropertyAnimation *anims = new QPropertyAnimation(m_items[i], "itemsize"); + m_animationMap.insert(m_items[i], anim); + m_animationsMap.insert(m_items[i], anims); + anim->setDuration(1000); + anims->setDuration(1000); + anim->setEasingCurve(QEasingCurve::OutQuad); + anims->setEasingCurve(QEasingCurve::OutQuad); + m_group->addAnimation(anim); + m_group->addAnimation(anims); + } + //定时切换图片 + m_timer = new QTimer(this); + m_timer->setInterval(2000); + connect(m_timer, &QTimer::timeout, [this](){ + nextPlay(); + }); + connect(m_group, &QParallelAnimationGroup::finished, [this](){ + m_isStart = false; + m_timer->start(); + }); + m_timer->start(); +} + +void ImageViewWindow::onLeftBtnClicked() +{ + //鼠标点击的时候,先暂停定时器预览 + m_timer->stop(); + //上一张 + lastPlay(); +} + +void ImageViewWindow::onRightBtnClicked() +{ + //鼠标点击的时候,先暂停定时器预览 + m_timer->stop(); + //下一张 + nextPlay(); +} + +void ImageViewWindow::play() +{ + for (int index = 0; index < m_imgMapInfolst.size(); index++) + { + const auto item = m_items[index]; + QPropertyAnimation *anim = m_animationMap.value(item); + QPropertyAnimation *anims = m_animationsMap.value(item); + const auto imageInfoMap = m_imgMapInfolst[index]; + item->setZValue(imageInfoMap["zIndex"].toInt()); + item->setOpacity(imageInfoMap["opacity"].toFloat()); + QPointF pointf(imageInfoMap["left"].toInt() + image_xoffset, imageInfoMap["top"].toInt() + image_yoffset); + const QString&& centerImg = QString(":/ImageViewWindow/Resources/%1.jpg").arg(index + 1); + anim->setStartValue(item->itemoffset()); + anims->setStartValue(item->pixsize()); + anim->setEndValue(pointf); + anims->setEndValue(QSize(imageInfoMap["width"].toInt(), imageInfoMap["height"].toInt())); + } + m_isStart = true; +} + + +void ImageViewWindow::nextPlay() +{ + m_group->stop(); + auto firstItem = m_items.takeAt(0); + m_items << firstItem; + play(); + m_group->start(); +} + +void ImageViewWindow::lastPlay() +{ + m_group->stop(); + auto lastItem = m_items.takeAt(m_items.size() - 1); + m_items.prepend(lastItem); + play(); + m_group->start(); +} diff --git a/netfriend/imageviewwindow/imageviewwindow.h b/netfriend/imageviewwindow/imageviewwindow.h new file mode 100644 index 0000000..c8f4b7f --- /dev/null +++ b/netfriend/imageviewwindow/imageviewwindow.h @@ -0,0 +1,42 @@ +#ifndef IMAGEVIEWWINDOW_H +#define IMAGEVIEWWINDOW_H + +#include +#include "ui_imageviewwindow.h" + +class QTimer; +class QPropertyAnimation; +class GraphicsPixmap; +class QGraphicsScene; +class QParallelAnimationGroup; +class ImageViewWindow : public QWidget +{ + Q_OBJECT + +public: + ImageViewWindow(QWidget *parent = 0); + ~ImageViewWindow(); + +private: + void initControl(); + void nextPlay(); + void lastPlay(); + void play(); + +private slots: + void onLeftBtnClicked(); + void onRightBtnClicked(); + +private: + Ui::ImageViewWindowClass ui; + QGraphicsScene* m_scene; + QList > m_imgMapInfolst; + QList m_items; + QParallelAnimationGroup *m_group; + QMap m_animationMap; + QMap m_animationsMap; + QTimer* m_timer; + bool m_isStart; +}; + +#endif // IMAGEVIEWWINDOW_H diff --git a/netfriend/imageviewwindow/imageviewwindow.pro b/netfriend/imageviewwindow/imageviewwindow.pro new file mode 100644 index 0000000..86a8890 --- /dev/null +++ b/netfriend/imageviewwindow/imageviewwindow.pro @@ -0,0 +1,20 @@ +QT += core gui +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat + +TARGET = imageviewwindow +TEMPLATE = app +DESTDIR = $$PWD/../bin +CONFIG += warn_off + +HEADERS += graphicsview.h +HEADERS += graphicspixmap.h +HEADERS += imageviewwindow.h + +SOURCES += main.cpp +SOURCES += graphicspixmap.cpp +SOURCES += graphicsview.cpp +SOURCES += imageviewwindow.cpp + +FORMS += imageviewwindow.ui +RESOURCES += imageviewwindow.qrc diff --git a/netfriend/imageviewwindow/imageviewwindow.qrc b/netfriend/imageviewwindow/imageviewwindow.qrc new file mode 100644 index 0000000..f3ca46d --- /dev/null +++ b/netfriend/imageviewwindow/imageviewwindow.qrc @@ -0,0 +1,13 @@ + + + Resources/1.jpg + Resources/2.jpg + Resources/3.jpg + Resources/4.jpg + Resources/5.jpg + Resources/6.jpg + Resources/7.jpg + Resources/Wblog_left.png + Resources/Wblog_right.png + + diff --git a/netfriend/imageviewwindow/imageviewwindow.ui b/netfriend/imageviewwindow/imageviewwindow.ui new file mode 100644 index 0000000..508ea42 --- /dev/null +++ b/netfriend/imageviewwindow/imageviewwindow.ui @@ -0,0 +1,39 @@ + + + ImageViewWindowClass + + + + 0 + 0 + 1062 + 538 + + + + ImageViewWindow + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + diff --git a/netfriend/imageviewwindow/main.cpp b/netfriend/imageviewwindow/main.cpp new file mode 100644 index 0000000..7290eda --- /dev/null +++ b/netfriend/imageviewwindow/main.cpp @@ -0,0 +1,29 @@ +#pragma execution_character_set("utf-8") + +#include "imageviewwindow.h" +#include +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + a.setFont(QFont("Microsoft Yahei", 9)); + +#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0)) +#if _MSC_VER + QTextCodec *codec = QTextCodec::codecForName("gbk"); +#else + QTextCodec *codec = QTextCodec::codecForName("utf-8"); +#endif + QTextCodec::setCodecForLocale(codec); + QTextCodec::setCodecForCStrings(codec); + QTextCodec::setCodecForTr(codec); +#else + QTextCodec *codec = QTextCodec::codecForName("utf-8"); + QTextCodec::setCodecForLocale(codec); +#endif + + ImageViewWindow w; + w.show(); + return a.exec(); +} diff --git a/netfriend/netfriend.pro b/netfriend/netfriend.pro new file mode 100644 index 0000000..88a605f --- /dev/null +++ b/netfriend/netfriend.pro @@ -0,0 +1,5 @@ +TEMPLATE = subdirs +SUBDIRS += astackwidget +SUBDIRS += imagecropper +SUBDIRS += imageviewwindow +SUBDIRS += slidepuzzlewidget diff --git a/netfriend/slidepuzzlewidget/Resources/back1.png b/netfriend/slidepuzzlewidget/Resources/back1.png new file mode 100644 index 0000000..ff8baa9 Binary files /dev/null and b/netfriend/slidepuzzlewidget/Resources/back1.png differ diff --git a/netfriend/slidepuzzlewidget/Resources/back2.png b/netfriend/slidepuzzlewidget/Resources/back2.png new file mode 100644 index 0000000..203e262 Binary files /dev/null and b/netfriend/slidepuzzlewidget/Resources/back2.png differ diff --git a/netfriend/slidepuzzlewidget/Resources/back3.png b/netfriend/slidepuzzlewidget/Resources/back3.png new file mode 100644 index 0000000..ba3db89 Binary files /dev/null and b/netfriend/slidepuzzlewidget/Resources/back3.png differ diff --git a/netfriend/slidepuzzlewidget/Resources/back4.png b/netfriend/slidepuzzlewidget/Resources/back4.png new file mode 100644 index 0000000..c077c29 Binary files /dev/null and b/netfriend/slidepuzzlewidget/Resources/back4.png differ diff --git a/netfriend/slidepuzzlewidget/frmslidepuzzlewidget.cpp b/netfriend/slidepuzzlewidget/frmslidepuzzlewidget.cpp new file mode 100644 index 0000000..78df26f --- /dev/null +++ b/netfriend/slidepuzzlewidget/frmslidepuzzlewidget.cpp @@ -0,0 +1,18 @@ +#include "frmslidepuzzlewidget.h" + +FrmSlidePuzzleWidget::FrmSlidePuzzleWidget(QWidget *parent) + : QWidget(parent) +{ + ui.setupUi(this); + this->initForm(); +} + +FrmSlidePuzzleWidget::~FrmSlidePuzzleWidget() +{ + +} + +void FrmSlidePuzzleWidget::initForm() +{ + +} diff --git a/netfriend/slidepuzzlewidget/frmslidepuzzlewidget.h b/netfriend/slidepuzzlewidget/frmslidepuzzlewidget.h new file mode 100644 index 0000000..ca15483 --- /dev/null +++ b/netfriend/slidepuzzlewidget/frmslidepuzzlewidget.h @@ -0,0 +1,22 @@ +#ifndef FRMSLIDEPUZZLEWIDGET_H +#define FRMSLIDEPUZZLEWIDGET_H + +#include +#include "ui_frmslidepuzzlewidget.h" + +class FrmSlidePuzzleWidget : public QWidget +{ + Q_OBJECT + +public: + FrmSlidePuzzleWidget(QWidget *parent = 0); + ~FrmSlidePuzzleWidget(); + +private: + void initForm(); + +private: + Ui::FrmSlidePuzzleWidgetClass ui; +}; + +#endif // FRMSLIDEPUZZLEWIDGET_H diff --git a/netfriend/slidepuzzlewidget/frmslidepuzzlewidget.qrc b/netfriend/slidepuzzlewidget/frmslidepuzzlewidget.qrc new file mode 100644 index 0000000..2637c50 --- /dev/null +++ b/netfriend/slidepuzzlewidget/frmslidepuzzlewidget.qrc @@ -0,0 +1,8 @@ + + + Resources/back1.png + Resources/back2.png + Resources/back3.png + Resources/back4.png + + diff --git a/netfriend/slidepuzzlewidget/frmslidepuzzlewidget.ui b/netfriend/slidepuzzlewidget/frmslidepuzzlewidget.ui new file mode 100644 index 0000000..59d1673 --- /dev/null +++ b/netfriend/slidepuzzlewidget/frmslidepuzzlewidget.ui @@ -0,0 +1,50 @@ + + + FrmSlidePuzzleWidgetClass + + + + 0 + 0 + 600 + 400 + + + + FrmSlidePuzzleWidget + + + + 20 + + + 20 + + + 20 + + + 20 + + + 20 + + + + + + + + + + SliderPuzzleWidget + QWidget +
sliderpuzzlewidget.h
+ 1 +
+
+ + + + +
diff --git a/netfriend/slidepuzzlewidget/main.cpp b/netfriend/slidepuzzlewidget/main.cpp new file mode 100644 index 0000000..f88a322 --- /dev/null +++ b/netfriend/slidepuzzlewidget/main.cpp @@ -0,0 +1,30 @@ +#pragma execution_character_set("utf-8") + +#include "frmslidepuzzlewidget.h" +#include +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + a.setFont(QFont("Microsoft Yahei", 10)); + +#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0)) +#if _MSC_VER + QTextCodec *codec = QTextCodec::codecForName("gbk"); +#else + QTextCodec *codec = QTextCodec::codecForName("utf-8"); +#endif + QTextCodec::setCodecForLocale(codec); + QTextCodec::setCodecForCStrings(codec); + QTextCodec::setCodecForTr(codec); +#else + QTextCodec *codec = QTextCodec::codecForName("utf-8"); + QTextCodec::setCodecForLocale(codec); +#endif + + FrmSlidePuzzleWidget w; + w.setWindowTitle("滑块图片验证码"); + w.show(); + return a.exec(); +} diff --git a/netfriend/slidepuzzlewidget/puzzlewidget.cpp b/netfriend/slidepuzzlewidget/puzzlewidget.cpp new file mode 100644 index 0000000..e5c1ecb --- /dev/null +++ b/netfriend/slidepuzzlewidget/puzzlewidget.cpp @@ -0,0 +1,81 @@ +#include "puzzlewidget.h" + +#include +#include +#include +#include + +const int squarewidth = 46; +const int squareradius = 20; +PuzzleWidget::PuzzleWidget(QWidget *parent) + : QWidget(parent) +{ + m_value = 0; + m_offsetPoint = QPoint(0, 0); + srand(QTime(0, 0, 0).secsTo(QTime::currentTime())); +} + +PuzzleWidget::~PuzzleWidget() +{ + +} + +void PuzzleWidget::setPixmap(const QString& pixmap) +{ + m_pixmap = pixmap; + QTimer::singleShot(10, this, SLOT(onUpdatePixmap())); +} + +void PuzzleWidget::onUpdatePixmap() +{ + m_offsetPoint.rx() = qBound(0, rand() % this->width() + squarewidth + squareradius, this->width() - squarewidth - squareradius); + m_offsetPoint.ry() = qBound(0, rand() % this->height() + squarewidth + squareradius, this->height() - squarewidth - squareradius); + update(); +} + +void PuzzleWidget::setValue(int value) +{ + m_value = qBound(0, value, this->width() - squarewidth - squareradius + m_offsetPoint.x()); + update(); +} + +void PuzzleWidget::paintEvent(QPaintEvent *event) +{ + QPainter painter(this); + painter.setRenderHints(QPainter::Antialiasing); + QPainterPath clippath; + clippath.addRoundedRect(this->rect(), 4, 4); + painter.setClipPath(clippath); + const QPixmap& pixmap = QPixmap(m_pixmap).scaled(this->width(), this->height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation); + painter.drawPixmap(0, 0, this->width(), this->height(), pixmap); + + QPainterPath cutoutpath; + cutoutpath.setFillRule(Qt::WindingFill); + QRect rect(m_offsetPoint, QSize(squarewidth, squarewidth)); + cutoutpath.addRoundedRect(rect, 2, 2); + cutoutpath.addEllipse(rect.center().x() - squareradius / 2, rect.top() - squareradius + 6, squareradius, squareradius); + QPainterPath subellipseparh; + subellipseparh.addEllipse(rect.right() - squareradius + 6, rect.center().y() - squareradius / 2, squareradius, squareradius); + cutoutpath -= subellipseparh; + + painter.setPen(QPen(QColor(80, 80, 80), 1)); + painter.setBrush(QColor(100, 100, 100, 220)); + painter.drawPath(cutoutpath); + + QPixmap puzzlePixmap(this->size()); + puzzlePixmap.fill(Qt::transparent); + QPainter puzzlePainter(&puzzlePixmap); + puzzlePainter.setRenderHints(QPainter::Antialiasing); + puzzlePainter.setClipPath(cutoutpath); + puzzlePainter.setPen(QPen(QColor(80, 80, 80), 2)); + puzzlePainter.setBrush(QColor(200, 200, 200, 100)); + puzzlePainter.drawPixmap(0, 0, this->width(), this->height(), pixmap); + puzzlePainter.drawPath(cutoutpath); + + painter.drawPixmap(-m_offsetPoint.x() + m_value, 0, this->width(), this->height(), puzzlePixmap); +} + +bool PuzzleWidget::isOverlap() +{ + return qAbs(-m_offsetPoint.x() + m_value) < 5; +} diff --git a/netfriend/slidepuzzlewidget/puzzlewidget.h b/netfriend/slidepuzzlewidget/puzzlewidget.h new file mode 100644 index 0000000..117e717 --- /dev/null +++ b/netfriend/slidepuzzlewidget/puzzlewidget.h @@ -0,0 +1,34 @@ +#ifndef PUZZLEWIDGET_H +#define PUZZLEWIDGET_H + +#include + +class PuzzleWidget : public QWidget +{ + Q_OBJECT + Q_PROPERTY(QString pixmap READ getPixmap WRITE setPixmap) + +public: + PuzzleWidget(QWidget *parent); + ~PuzzleWidget(); + +public: + QString getPixmap() const { return m_pixmap; }; + void setPixmap(const QString& pixmap); + + void setValue(int value); + bool isOverlap(); + +private slots: + void onUpdatePixmap(); + +protected: + void paintEvent(QPaintEvent *event); + +private: + int m_value; + QString m_pixmap; + QPoint m_offsetPoint; +}; + +#endif // PUZZLEWIDGET_H diff --git a/netfriend/slidepuzzlewidget/slidepuzzlewidget.pro b/netfriend/slidepuzzlewidget/slidepuzzlewidget.pro new file mode 100644 index 0000000..234abfe --- /dev/null +++ b/netfriend/slidepuzzlewidget/slidepuzzlewidget.pro @@ -0,0 +1,23 @@ +QT += core gui +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat + +TEMPLATE = app +TARGET = slidepuzzlewidget +DESTDIR = $$PWD/../bin +CONFIG += warn_off + +HEADERS += frmslidepuzzlewidget.h +HEADERS += puzzlewidget.h +HEADERS += sliderpuzzlewidget.h + +SOURCES += main.cpp +SOURCES += frmslidepuzzlewidget.cpp +SOURCES += puzzlewidget.cpp +SOURCES += sliderpuzzlewidget.cpp + +FORMS += frmslidepuzzlewidget.ui +FORMS += sliderpuzzlewidget.ui +RESOURCES += frmslidepuzzlewidget.qrc + + diff --git a/netfriend/slidepuzzlewidget/sliderpuzzlewidget.cpp b/netfriend/slidepuzzlewidget/sliderpuzzlewidget.cpp new file mode 100644 index 0000000..1d29bb5 --- /dev/null +++ b/netfriend/slidepuzzlewidget/sliderpuzzlewidget.cpp @@ -0,0 +1,49 @@ +#pragma execution_character_set("utf-8") +#include "sliderpuzzlewidget.h" + +#include +#include + +SliderPuzzleWidget::SliderPuzzleWidget(QWidget *parent) + : QWidget(parent) +{ + ui.setupUi(this); + this->initForm(); +} + +SliderPuzzleWidget::~SliderPuzzleWidget() +{ + +} + +void SliderPuzzleWidget::initForm() +{ + QTimer::singleShot(10, this, SLOT(onUpdateWidget())); + connect(ui.horizontalSlider, &QSlider::valueChanged, this, &SliderPuzzleWidget::onSliderValueChanged); + connect(ui.horizontalSlider, &QSlider::sliderReleased, this, &SliderPuzzleWidget::onSliderReleased); + ui.puzzlewidget->setPixmap(":/FrmSlidePuzzleWidget/Resources/back1.png"); +} + +void SliderPuzzleWidget::onUpdateWidget() +{ + ui.horizontalSlider->setRange(0, this->width()); +} + +void SliderPuzzleWidget::onSliderValueChanged(int value) +{ + ui.puzzlewidget->setValue(value); +} + +void SliderPuzzleWidget::onSliderReleased() +{ + QString content = ui.puzzlewidget->isOverlap() ? "验证成功!" : "验证失败!"; + QMessageBox msgBox; + msgBox.setWindowTitle("滑块图片验证码"); + msgBox.setText(content); + msgBox.exec(); + + static int testIndex = 1; + testIndex = testIndex + 1 > 4 ? 1 : testIndex + 1; + ui.horizontalSlider->setValue(0); + ui.puzzlewidget->setPixmap(QString(":/FrmSlidePuzzleWidget/Resources/back%1.png").arg(testIndex)); +} \ No newline at end of file diff --git a/netfriend/slidepuzzlewidget/sliderpuzzlewidget.h b/netfriend/slidepuzzlewidget/sliderpuzzlewidget.h new file mode 100644 index 0000000..3dda2d7 --- /dev/null +++ b/netfriend/slidepuzzlewidget/sliderpuzzlewidget.h @@ -0,0 +1,27 @@ +#ifndef SLIDERPUZZLEWIDGET_H +#define SLIDERPUZZLEWIDGET_H + +#include +#include "ui_sliderpuzzlewidget.h" + +class SliderPuzzleWidget : public QWidget +{ + Q_OBJECT + +public: + SliderPuzzleWidget(QWidget *parent = 0); + ~SliderPuzzleWidget(); + +private: + void initForm(); + +private slots: + void onUpdateWidget(); + void onSliderValueChanged(int value); + void onSliderReleased(); + +private: + Ui::SliderPuzzleWidget ui; +}; + +#endif // SLIDERPUZZLEWIDGET_H diff --git a/netfriend/slidepuzzlewidget/sliderpuzzlewidget.ui b/netfriend/slidepuzzlewidget/sliderpuzzlewidget.ui new file mode 100644 index 0000000..311cb13 --- /dev/null +++ b/netfriend/slidepuzzlewidget/sliderpuzzlewidget.ui @@ -0,0 +1,55 @@ + + + SliderPuzzleWidget + + + + 0 + 0 + 717 + 320 + + + + SliderPuzzleWidget + + + + 14 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + Qt::Horizontal + + + + + + + + + PuzzleWidget + QWidget +
puzzlewidget.h
+ 1 +
+
+ + +
diff --git a/other/0snap/bgdemo.jpg b/other/0snap/bgdemo.jpg new file mode 100644 index 0000000..4312120 Binary files /dev/null and b/other/0snap/bgdemo.jpg differ diff --git a/other/0snap/dbpage.jpg b/other/0snap/dbpage.jpg new file mode 100644 index 0000000..7630610 Binary files /dev/null and b/other/0snap/dbpage.jpg differ diff --git a/other/0snap/echartgauge.jpg b/other/0snap/echartgauge.jpg new file mode 100644 index 0000000..4d66ef9 Binary files /dev/null and b/other/0snap/echartgauge.jpg differ diff --git a/other/0snap/lineeditnext.jpg b/other/0snap/lineeditnext.jpg new file mode 100644 index 0000000..f4a82d9 Binary files /dev/null and b/other/0snap/lineeditnext.jpg differ diff --git a/other/0snap/mouseline.jpg b/other/0snap/mouseline.jpg new file mode 100644 index 0000000..5dcabec Binary files /dev/null and b/other/0snap/mouseline.jpg differ diff --git a/other/0snap/ntpclient.jpg b/other/0snap/ntpclient.jpg new file mode 100644 index 0000000..b9eb63d Binary files /dev/null and b/other/0snap/ntpclient.jpg differ diff --git a/other/0snap/trayicon.jpg b/other/0snap/trayicon.jpg new file mode 100644 index 0000000..bc88a63 Binary files /dev/null and b/other/0snap/trayicon.jpg differ diff --git a/bgdemo/bgdemo.pro b/other/bgdemo/bgdemo.pro similarity index 100% rename from bgdemo/bgdemo.pro rename to other/bgdemo/bgdemo.pro diff --git a/bgdemo/image/1.png b/other/bgdemo/image/1.png similarity index 100% rename from bgdemo/image/1.png rename to other/bgdemo/image/1.png diff --git a/bgdemo/image/2.png b/other/bgdemo/image/2.png similarity index 100% rename from bgdemo/image/2.png rename to other/bgdemo/image/2.png diff --git a/bgdemo/image/3.png b/other/bgdemo/image/3.png similarity index 100% rename from bgdemo/image/3.png rename to other/bgdemo/image/3.png diff --git a/bgdemo/image/4.png b/other/bgdemo/image/4.png similarity index 100% rename from bgdemo/image/4.png rename to other/bgdemo/image/4.png diff --git a/bgdemo/image/5.png b/other/bgdemo/image/5.png similarity index 100% rename from bgdemo/image/5.png rename to other/bgdemo/image/5.png diff --git a/bgdemo/main.cpp b/other/bgdemo/main.cpp similarity index 100% rename from bgdemo/main.cpp rename to other/bgdemo/main.cpp diff --git a/bgdemo/rc.qrc b/other/bgdemo/rc.qrc similarity index 100% rename from bgdemo/rc.qrc rename to other/bgdemo/rc.qrc diff --git a/bgdemo/widget.cpp b/other/bgdemo/widget.cpp similarity index 100% rename from bgdemo/widget.cpp rename to other/bgdemo/widget.cpp diff --git a/bgdemo/widget.h b/other/bgdemo/widget.h similarity index 100% rename from bgdemo/widget.h rename to other/bgdemo/widget.h diff --git a/bgdemo/widget.ui b/other/bgdemo/widget.ui similarity index 100% rename from bgdemo/widget.ui rename to other/bgdemo/widget.ui diff --git a/dbpage/TA.db b/other/dbpage/TA.db similarity index 100% rename from dbpage/TA.db rename to other/dbpage/TA.db diff --git a/dbpage/dbpage.cpp b/other/dbpage/dbpage.cpp similarity index 100% rename from dbpage/dbpage.cpp rename to other/dbpage/dbpage.cpp diff --git a/dbpage/dbpage.h b/other/dbpage/dbpage.h similarity index 100% rename from dbpage/dbpage.h rename to other/dbpage/dbpage.h diff --git a/dbpage/dbpage.pro b/other/dbpage/dbpage.pro similarity index 58% rename from dbpage/dbpage.pro rename to other/dbpage/dbpage.pro index b466530..d5698de 100644 --- a/dbpage/dbpage.pro +++ b/other/dbpage/dbpage.pro @@ -15,4 +15,16 @@ HEADERS += dbpage.h HEADERS += frmdbpage.h FORMS += frmdbpage.ui -INCLUDEPATH += $$PWD +#自动拷贝文件 +src_file = $$PWD/TA.db +dst_file = $$DESTDIR +win32 { +#转换斜杠 / 到 \\ +src_file ~= s,/,\\,g +dst_file ~= s,/,\\,g +dst_file2 ~= s,/,\\,g +QMAKE_POST_LINK += copy $$src_file $$dst_file +} +unix { +QMAKE_POST_LINK += cp -r -f $$src_file $$dst_file +} diff --git a/dbpage/frmdbpage.cpp b/other/dbpage/frmdbpage.cpp similarity index 100% rename from dbpage/frmdbpage.cpp rename to other/dbpage/frmdbpage.cpp diff --git a/dbpage/frmdbpage.h b/other/dbpage/frmdbpage.h similarity index 100% rename from dbpage/frmdbpage.h rename to other/dbpage/frmdbpage.h diff --git a/dbpage/frmdbpage.ui b/other/dbpage/frmdbpage.ui similarity index 100% rename from dbpage/frmdbpage.ui rename to other/dbpage/frmdbpage.ui diff --git a/dbpage/head.h b/other/dbpage/head.h similarity index 100% rename from dbpage/head.h rename to other/dbpage/head.h diff --git a/dbpage/main.cpp b/other/dbpage/main.cpp similarity index 100% rename from dbpage/main.cpp rename to other/dbpage/main.cpp diff --git a/dbpage/readme.txt b/other/dbpage/readme.txt similarity index 100% rename from dbpage/readme.txt rename to other/dbpage/readme.txt diff --git a/other/echartgauge/echartgauge.pro b/other/echartgauge/echartgauge.pro new file mode 100644 index 0000000..0b4bf92 --- /dev/null +++ b/other/echartgauge/echartgauge.pro @@ -0,0 +1,28 @@ +QT += core gui +greaterThan(QT_MAJOR_VERSION, 4) QT += widgets +greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat + +TARGET = echartgauge +TEMPLATE = app +DESTDIR = $$PWD/../bin + +SOURCES += main.cpp +SOURCES += widget.cpp +HEADERS += widget.h +FORMS += widget.ui + +include ($$PWD/webcore.pri) + +#自动拷贝文件 +src_file = $$PWD/file/* +dst_file = $$DESTDIR +win32 { +#转换斜杠 / 到 \\ +src_file ~= s,/,\\,g +dst_file ~= s,/,\\,g +dst_file2 ~= s,/,\\,g +QMAKE_POST_LINK += copy $$src_file $$dst_file +} +unix { +QMAKE_POST_LINK += cp -r -f $$src_file $$dst_file +} diff --git a/echartgauge/file/echarts.min.js b/other/echartgauge/file/echarts.min.js similarity index 100% rename from echartgauge/file/echarts.min.js rename to other/echartgauge/file/echarts.min.js diff --git a/echartgauge/file/gauge.html b/other/echartgauge/file/gauge.html similarity index 100% rename from echartgauge/file/gauge.html rename to other/echartgauge/file/gauge.html diff --git a/echartgauge/file/qwebchannel.js b/other/echartgauge/file/qwebchannel.js similarity index 100% rename from echartgauge/file/qwebchannel.js rename to other/echartgauge/file/qwebchannel.js diff --git a/echartgauge/main.cpp b/other/echartgauge/main.cpp similarity index 100% rename from echartgauge/main.cpp rename to other/echartgauge/main.cpp diff --git a/echartgauge/readme.txt b/other/echartgauge/readme.txt similarity index 100% rename from echartgauge/readme.txt rename to other/echartgauge/readme.txt diff --git a/other/echartgauge/webcore.pri b/other/echartgauge/webcore.pri new file mode 100644 index 0000000..493794a --- /dev/null +++ b/other/echartgauge/webcore.pri @@ -0,0 +1,51 @@ +#默认假定采用webkit,因为Qt4没有qtHaveModule函数而且默认采用的是webkit +#如果在windows上没有浏览器模块则默认采用miniblink +DEFINES += webkit + +#判断当前qt版本号 +message($$QT_ARCH : $$QT_VERSION -> $$QT_MAJOR_VERSION . $$QT_MINOR_VERSION) + +#5.0以上版本 +!lessThan(QT_MAJOR_VERSION, 5) { +#如果没有安装webkit模块 +!qtHaveModule(webkit) { +DEFINES -= webkit +} +#如果安装了webenginewidgets模块 +qtHaveModule(webenginewidgets) { +DEFINES += webengine +} +} + +#6.0以上版本 强制使用miniblink +greaterThan(QT_MAJOR_VERSION, 5) { +#DEFINES -= webkit +#DEFINES += webminiblink +} + +contains(DEFINES, webkit) { +QT += webkit +greaterThan(QT_MAJOR_VERSION, 4) { +QT += webkitwidgets +} +} else { +contains(DEFINES, webengine) { +QT += webenginewidgets +} else { +message("没有找到浏览器模块,将采用第三方浏览器模块哦") +#如果采用IE浏览器则改成 DEFINES += webie +#如果采用miniblink改成 DEFINES += webminiblink 只支持win +win32 {DEFINES += webminiblink} +greaterThan(QT_MAJOR_VERSION, 4) { +lessThan(QT_MAJOR_VERSION, 6) { +win32 {QT += axcontainer} +} +} else { +win32 {CONFIG += qaxcontainer} +}}} + +#在win上也可以手动强制使用 miniblink 就算存在 webkit 或者 webengine +#DEFINES -= webkit +#DEFINES -= webengine +#DEFINES += webminiblink + diff --git a/echartgauge/widget.cpp b/other/echartgauge/widget.cpp similarity index 76% rename from echartgauge/widget.cpp rename to other/echartgauge/widget.cpp index 7d9f0eb..b8bf9c8 100644 --- a/echartgauge/widget.cpp +++ b/other/echartgauge/widget.cpp @@ -1,5 +1,15 @@ #include "widget.h" #include "ui_widget.h" +#include "qurl.h" + +#ifdef webkit +#include +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) +#include +#endif +#elif webengine +#include +#endif Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget) { @@ -19,8 +29,8 @@ void Widget::initForm() webSetting->setAttribute(QWebSettings::JavascriptEnabled, true); webSetting->setAttribute(QWebSettings::PluginsEnabled, true); webSetting->setAttribute(QWebSettings::JavascriptCanOpenWindows, true); -#else - QWebEngineSettings *webSetting = QWebEngineSettings::globalSettings(); +#elif webengine + QWebEngineSettings *webSetting = QWebEngineProfile::defaultProfile()->settings(); webSetting->setAttribute(QWebEngineSettings::JavascriptEnabled, true); webSetting->setAttribute(QWebEngineSettings::PluginsEnabled, true); webSetting->setAttribute(QWebEngineSettings::JavascriptCanOpenWindows, true); @@ -31,22 +41,25 @@ void Widget::initForm() webView1 = new QWebView; webView2 = new QWebView; webView3 = new QWebView; -#else +#elif webengine webView = new QWebEngineView; webView1 = new QWebEngineView; webView2 = new QWebEngineView; webView3 = new QWebEngineView; #endif + QUrl url("file:///" + qApp->applicationDirPath() + "/gauge.html"); +#if (defined webkit) || (defined webengine) ui->gridLayout->addWidget(webView, 0, 0); ui->gridLayout->addWidget(webView1, 0, 1); ui->gridLayout->addWidget(webView2, 1, 0); ui->gridLayout->addWidget(webView3, 1, 1); - webView->load(QUrl("file:///" + qApp->applicationDirPath() + "/gauge.html")); - webView1->load(QUrl("file:///" + qApp->applicationDirPath() + "/gauge.html")); - webView2->load(QUrl("file:///" + qApp->applicationDirPath() + "/gauge.html")); - webView3->load(QUrl("file:///" + qApp->applicationDirPath() + "/gauge.html")); + webView->load(url); + webView1->load(url); + webView2->load(url); + webView3->load(url); +#endif } void Widget::on_horizontalSlider_valueChanged(int value) @@ -57,7 +70,7 @@ void Widget::on_horizontalSlider_valueChanged(int value) webView1->page()->mainFrame()->evaluateJavaScript(js); webView2->page()->mainFrame()->evaluateJavaScript(js); webView3->page()->mainFrame()->evaluateJavaScript(js); -#else +#elif webengine webView->page()->runJavaScript(js); webView1->page()->runJavaScript(js); webView2->page()->runJavaScript(js); diff --git a/echartgauge/widget.h b/other/echartgauge/widget.h similarity index 78% rename from echartgauge/widget.h rename to other/echartgauge/widget.h index 968d521..2b466a2 100644 --- a/echartgauge/widget.h +++ b/other/echartgauge/widget.h @@ -1,15 +1,12 @@ #ifndef WIDGET_H #define WIDGET_H -#ifdef webkit -#include -#else -#include -#endif +#include +class QWebView; +class QWebEngineView; -namespace Ui -{ - class Widget; +namespace Ui { +class Widget; } class Widget : public QWidget @@ -28,10 +25,9 @@ private: Ui::Widget *ui; #ifdef webkit QWebView *webView, *webView1, *webView2, *webView3; -#else +#elif webengine QWebEngineView *webView, *webView1, *webView2, *webView3; #endif - }; #endif // WIDGET_H diff --git a/echartgauge/widget.ui b/other/echartgauge/widget.ui similarity index 100% rename from echartgauge/widget.ui rename to other/echartgauge/widget.ui diff --git a/lineeditnext/lineeditnext.pro b/other/lineeditnext/lineeditnext.pro similarity index 100% rename from lineeditnext/lineeditnext.pro rename to other/lineeditnext/lineeditnext.pro diff --git a/lineeditnext/main.cpp b/other/lineeditnext/main.cpp similarity index 100% rename from lineeditnext/main.cpp rename to other/lineeditnext/main.cpp diff --git a/lineeditnext/widget.cpp b/other/lineeditnext/widget.cpp similarity index 100% rename from lineeditnext/widget.cpp rename to other/lineeditnext/widget.cpp diff --git a/lineeditnext/widget.h b/other/lineeditnext/widget.h similarity index 100% rename from lineeditnext/widget.h rename to other/lineeditnext/widget.h diff --git a/lineeditnext/widget.ui b/other/lineeditnext/widget.ui similarity index 96% rename from lineeditnext/widget.ui rename to other/lineeditnext/widget.ui index 66ff09d..e1ccd81 100644 --- a/lineeditnext/widget.ui +++ b/other/lineeditnext/widget.ui @@ -11,7 +11,7 @@ - Widget + 回车自动跳转 diff --git a/moneytool/main.cpp b/other/mouseline/main.cpp similarity index 100% rename from moneytool/main.cpp rename to other/mouseline/main.cpp diff --git a/mouseline/mouseline.pro b/other/mouseline/mouseline.pro similarity index 100% rename from mouseline/mouseline.pro rename to other/mouseline/mouseline.pro diff --git a/mouseline/widget.cpp b/other/mouseline/widget.cpp similarity index 100% rename from mouseline/widget.cpp rename to other/mouseline/widget.cpp diff --git a/mouseline/widget.h b/other/mouseline/widget.h similarity index 100% rename from mouseline/widget.h rename to other/mouseline/widget.h diff --git a/mouseline/widget.ui b/other/mouseline/widget.ui similarity index 100% rename from mouseline/widget.ui rename to other/mouseline/widget.ui diff --git a/ntpclient/frmntpclient.cpp b/other/ntpclient/frmntpclient.cpp similarity index 100% rename from ntpclient/frmntpclient.cpp rename to other/ntpclient/frmntpclient.cpp diff --git a/ntpclient/frmntpclient.h b/other/ntpclient/frmntpclient.h similarity index 100% rename from ntpclient/frmntpclient.h rename to other/ntpclient/frmntpclient.h diff --git a/ntpclient/frmntpclient.ui b/other/ntpclient/frmntpclient.ui similarity index 100% rename from ntpclient/frmntpclient.ui rename to other/ntpclient/frmntpclient.ui diff --git a/ntpclient/main.cpp b/other/ntpclient/main.cpp similarity index 100% rename from ntpclient/main.cpp rename to other/ntpclient/main.cpp diff --git a/ntpclient/ntpclient.cpp b/other/ntpclient/ntpclient.cpp similarity index 100% rename from ntpclient/ntpclient.cpp rename to other/ntpclient/ntpclient.cpp diff --git a/ntpclient/ntpclient.h b/other/ntpclient/ntpclient.h similarity index 100% rename from ntpclient/ntpclient.h rename to other/ntpclient/ntpclient.h diff --git a/ntpclient/ntpclient.pro b/other/ntpclient/ntpclient.pro similarity index 100% rename from ntpclient/ntpclient.pro rename to other/ntpclient/ntpclient.pro diff --git a/other/other.pro b/other/other.pro new file mode 100644 index 0000000..97a141c --- /dev/null +++ b/other/other.pro @@ -0,0 +1,8 @@ +TEMPLATE = subdirs +SUBDIRS += bgdemo +SUBDIRS += dbpage +SUBDIRS += lineeditnext +SUBDIRS += mouseline +SUBDIRS += ntpclient +SUBDIRS += trayicon +SUBDIRS += echartgauge diff --git a/trayicon/frmtrayicon.cpp b/other/trayicon/frmtrayicon.cpp similarity index 100% rename from trayicon/frmtrayicon.cpp rename to other/trayicon/frmtrayicon.cpp diff --git a/trayicon/frmtrayicon.h b/other/trayicon/frmtrayicon.h similarity index 100% rename from trayicon/frmtrayicon.h rename to other/trayicon/frmtrayicon.h diff --git a/trayicon/frmtrayicon.ui b/other/trayicon/frmtrayicon.ui similarity index 100% rename from trayicon/frmtrayicon.ui rename to other/trayicon/frmtrayicon.ui diff --git a/trayicon/main.cpp b/other/trayicon/main.cpp similarity index 100% rename from trayicon/main.cpp rename to other/trayicon/main.cpp diff --git a/trayicon/main.ico b/other/trayicon/main.ico similarity index 100% rename from trayicon/main.ico rename to other/trayicon/main.ico diff --git a/comtool/qrc/main.qrc b/other/trayicon/main.qrc similarity index 100% rename from comtool/qrc/main.qrc rename to other/trayicon/main.qrc diff --git a/live/livetool/trayicon.cpp b/other/trayicon/trayicon.cpp similarity index 100% rename from live/livetool/trayicon.cpp rename to other/trayicon/trayicon.cpp diff --git a/live/livetool/trayicon.h b/other/trayicon/trayicon.h similarity index 100% rename from live/livetool/trayicon.h rename to other/trayicon/trayicon.h diff --git a/trayicon/trayicon.pro b/other/trayicon/trayicon.pro similarity index 100% rename from trayicon/trayicon.pro rename to other/trayicon/trayicon.pro diff --git a/styledemo/readme.txt b/styledemo/readme.txt deleted file mode 100644 index ee25995..0000000 --- a/styledemo/readme.txt +++ /dev/null @@ -1,134 +0,0 @@ -PS:本样式demo完全开源。 - -V20170219首版开发计划 -1:所有其他窗体都是其布居中的widget。 -2:左上角图标、标题、标题居中、右上角最小化最大化关闭都可设置,包括设置样式+图标+图形字体(默认图形字体)。 -3:左上角图标及右上角三个按钮可视化控制。同时提供外部访问权限。 -4:无边框窗体可拉伸控制。 -5:提供换肤接口,内置8套样式选择,也可自定义样式路径。 -6:做成设计师插件,可以直接拖曳使用,所见即所得。 -7:后期增加内置信息框、颜色框等弹出窗体的支持。 - -8:重新设计QSS样式,去掉单选框图片、滚动条图片,增加主菜单样式。 -样式表格式 -(1):第一行为特殊自定义部分,可以通过读取文本文件识别到特殊的颜色值。用于特殊处理。 -(2):第二行为全局样式设置,例如无虚线,全局字体大小,文字颜色,禁用控件颜色。 -(3):其他部分 -(3):标签控件 -(4):按钮控件 - -用Qt写项目写多了,为了满足不同客户的需求,需要定制不同样式的界面,QUI皮肤生成器应运而生。思考这个工具的架构花了一年时间,如何从复杂的配色方案中提取出共性,然后将共性转为具体的QSS文件。思考架构花了一年时间,编写大概花了一天时间完成。 -demo演示版:http://pan.baidu.com/s/1jIkbVKU - -QUI皮肤生成器介绍: -1:极简设计,傻瓜式操作步骤:,只需简单几步即可设计出漂亮的皮肤。 -2:所见即所得,想要什么好的皮肤,分分钟搞定。 -3:自动生成样式中所需要的对应颜色的图片资源文件,比如单选框、复选框指示器图片。 -4:集成自定义无边框标题栏样式、左边导航切换样式、顶部导航切换样式、设备面板样式。 - - - - -银色风格 -字体颜色:#000000 -面板背景:#F5F5F5 -边框颜色:#B2B6B9 -普通渐变:#E1E4E6 #CCD3D9 -加深渐变:#F2F3F4 #E7E9EB -高亮颜色:#00BB9E - -蓝色风格 -字体颜色:#324C6C -面板背景:#CFDDEE -边框颜色:#7F9AB8 -普通渐变:#C0D3EB #BCCFE7 -加深渐变:#D2E3F5 #CADDF3 -高亮颜色:#00BB9E - -淡蓝色风格 -字体颜色:#386487 -面板背景:#EAF7FF -边框颜色:#C0DCF2 -普通渐变:#DEF0FE #C0DEF6 -加深渐变:#F2F9FF #DAEFFF -高亮颜色:#00BB9E - -深蓝色风格 -字体颜色:#7AAFE3 -面板背景:#0E1A32 -边框颜色:#132743 -普通渐变:#133050 #133050 -加深渐变:#033967 #033967 -高亮颜色:#00BB9E - -灰色风格 -字体颜色:#000000 -面板背景:#F0F0F0 -边框颜色:#A9A9A9 -普通渐变:#E4E4E4 #A2A2A2 -加深渐变:#DBDBDB #C1C1C1 -高亮颜色:#00BB9E - -浅灰色风格: -字体颜色:#6F6F6F -面板背景:#F0F0F0 -边框颜色:#D4D0C8 -普通渐变:#EEEEEE #E5E5E5 -加深渐变:#FCFCFC #F7F7F7 -高亮颜色:#00BB9E - -深灰色风格 -字体颜色:#5D5C6C -面板背景:#EBECF0 -边框颜色:#A9ACB5 -普通渐变:#D8D9DE #C8C8D0 -加深渐变:#EFF0F4 #DDE0E7 -高亮颜色:#00BB9E - -黑色风格 -字体颜色:#F0F0F0 -面板背景:#464646 -边框颜色:#353535 -普通渐变:#4D4D4D #292929 -加深渐变:#636363 #575757 -高亮颜色:#00BB9E - -浅黑色风格 -字体颜色:#E7ECF0 -面板背景:#616F76 -边框颜色:#738393 -普通渐变:#667481 #566373 -加深渐变:#778899 #708090 -高亮颜色:#00BB9E - -深黑色风格 -字体颜色:#D7E2E9 -面板背景:#1F2026 -边框颜色:#111214 -普通渐变:#242629 #141518 -加深渐变:#007DC4 #0074BF -高亮颜色:#00BB9E - -PS黑色风格 -字体颜色:#DCDCDC -面板背景:#444444 -边框颜色:#242424 -普通渐变:#484848 #383838 -加深渐变:#646464 #525252 -高亮颜色:#00BB9E - -黑色扁平 -字体颜色:#BEC0C2 -面板背景:#2E2F30 -边框颜色:#67696B -普通渐变:#404244 #404244 -加深渐变:#262829 #262829 -高亮颜色:#00BB9E - -白色扁平 -字体颜色:#57595B -面板背景:#FFFFFF -边框颜色:#B6B6B6 -普通渐变:#E4E4E4 #E4E4E4 -加深渐变:#F6F6F6 #F6F6F6 -高亮颜色:#00BB9E \ No newline at end of file diff --git a/styledemo/snap_flatwhite.png b/styledemo/snap_flatwhite.png deleted file mode 100644 index ff9f670..0000000 Binary files a/styledemo/snap_flatwhite.png and /dev/null differ diff --git a/styledemo/snap_lightblue.png b/styledemo/snap_lightblue.png deleted file mode 100644 index c9f6f53..0000000 Binary files a/styledemo/snap_lightblue.png and /dev/null differ diff --git a/styledemo/snap_psblack.png b/styledemo/snap_psblack.png deleted file mode 100644 index 90cd9e5..0000000 Binary files a/styledemo/snap_psblack.png and /dev/null differ diff --git a/third/0snap/designer.jpg b/third/0snap/designer.jpg new file mode 100644 index 0000000..6e909d6 Binary files /dev/null and b/third/0snap/designer.jpg differ diff --git a/third/0snap/hotkey.jpg b/third/0snap/hotkey.jpg new file mode 100644 index 0000000..09d1f33 Binary files /dev/null and b/third/0snap/hotkey.jpg differ diff --git a/third/0snap/miniblink.jpg b/third/0snap/miniblink.jpg new file mode 100644 index 0000000..318a091 Binary files /dev/null and b/third/0snap/miniblink.jpg differ diff --git a/third/0snap/qwtdemo.jpg b/third/0snap/qwtdemo.jpg new file mode 100644 index 0000000..3633594 Binary files /dev/null and b/third/0snap/qwtdemo.jpg differ diff --git a/third/0snap/shortcut.jpg b/third/0snap/shortcut.jpg new file mode 100644 index 0000000..09d1f33 Binary files /dev/null and b/third/0snap/shortcut.jpg differ diff --git a/3rd_qhotkey/3rd_qhotkey.pri b/third/3rd_qhotkey/3rd_qhotkey.pri similarity index 100% rename from 3rd_qhotkey/3rd_qhotkey.pri rename to third/3rd_qhotkey/3rd_qhotkey.pri diff --git a/3rd_qhotkey/qhotkey.cpp b/third/3rd_qhotkey/qhotkey.cpp similarity index 100% rename from 3rd_qhotkey/qhotkey.cpp rename to third/3rd_qhotkey/qhotkey.cpp diff --git a/3rd_qhotkey/qhotkey.h b/third/3rd_qhotkey/qhotkey.h similarity index 100% rename from 3rd_qhotkey/qhotkey.h rename to third/3rd_qhotkey/qhotkey.h diff --git a/3rd_qhotkey/qhotkey_mac.cpp b/third/3rd_qhotkey/qhotkey_mac.cpp similarity index 100% rename from 3rd_qhotkey/qhotkey_mac.cpp rename to third/3rd_qhotkey/qhotkey_mac.cpp diff --git a/3rd_qhotkey/qhotkey_p.h b/third/3rd_qhotkey/qhotkey_p.h similarity index 100% rename from 3rd_qhotkey/qhotkey_p.h rename to third/3rd_qhotkey/qhotkey_p.h diff --git a/3rd_qhotkey/qhotkey_win.cpp b/third/3rd_qhotkey/qhotkey_win.cpp similarity index 100% rename from 3rd_qhotkey/qhotkey_win.cpp rename to third/3rd_qhotkey/qhotkey_win.cpp diff --git a/3rd_qhotkey/qhotkey_x11.cpp b/third/3rd_qhotkey/qhotkey_x11.cpp similarity index 100% rename from 3rd_qhotkey/qhotkey_x11.cpp rename to third/3rd_qhotkey/qhotkey_x11.cpp diff --git a/qwtdemo/qwt/qwt.pri b/third/3rd_qwt/3rd_qwt.pri similarity index 100% rename from qwtdemo/qwt/qwt.pri rename to third/3rd_qwt/3rd_qwt.pri diff --git a/qwtdemo/qwt/qwt.h b/third/3rd_qwt/qwt.h similarity index 100% rename from qwtdemo/qwt/qwt.h rename to third/3rd_qwt/qwt.h diff --git a/qwtdemo/qwt/qwt_abstract_legend.cpp b/third/3rd_qwt/qwt_abstract_legend.cpp similarity index 100% rename from qwtdemo/qwt/qwt_abstract_legend.cpp rename to third/3rd_qwt/qwt_abstract_legend.cpp diff --git a/qwtdemo/qwt/qwt_abstract_legend.h b/third/3rd_qwt/qwt_abstract_legend.h similarity index 100% rename from qwtdemo/qwt/qwt_abstract_legend.h rename to third/3rd_qwt/qwt_abstract_legend.h diff --git a/qwtdemo/qwt/qwt_abstract_scale.cpp b/third/3rd_qwt/qwt_abstract_scale.cpp similarity index 100% rename from qwtdemo/qwt/qwt_abstract_scale.cpp rename to third/3rd_qwt/qwt_abstract_scale.cpp diff --git a/qwtdemo/qwt/qwt_abstract_scale.h b/third/3rd_qwt/qwt_abstract_scale.h similarity index 100% rename from qwtdemo/qwt/qwt_abstract_scale.h rename to third/3rd_qwt/qwt_abstract_scale.h diff --git a/qwtdemo/qwt/qwt_abstract_scale_draw.cpp b/third/3rd_qwt/qwt_abstract_scale_draw.cpp similarity index 100% rename from qwtdemo/qwt/qwt_abstract_scale_draw.cpp rename to third/3rd_qwt/qwt_abstract_scale_draw.cpp diff --git a/qwtdemo/qwt/qwt_abstract_scale_draw.h b/third/3rd_qwt/qwt_abstract_scale_draw.h similarity index 100% rename from qwtdemo/qwt/qwt_abstract_scale_draw.h rename to third/3rd_qwt/qwt_abstract_scale_draw.h diff --git a/qwtdemo/qwt/qwt_abstract_slider.cpp b/third/3rd_qwt/qwt_abstract_slider.cpp similarity index 100% rename from qwtdemo/qwt/qwt_abstract_slider.cpp rename to third/3rd_qwt/qwt_abstract_slider.cpp diff --git a/qwtdemo/qwt/qwt_abstract_slider.h b/third/3rd_qwt/qwt_abstract_slider.h similarity index 100% rename from qwtdemo/qwt/qwt_abstract_slider.h rename to third/3rd_qwt/qwt_abstract_slider.h diff --git a/qwtdemo/qwt/qwt_analog_clock.cpp b/third/3rd_qwt/qwt_analog_clock.cpp similarity index 100% rename from qwtdemo/qwt/qwt_analog_clock.cpp rename to third/3rd_qwt/qwt_analog_clock.cpp diff --git a/qwtdemo/qwt/qwt_analog_clock.h b/third/3rd_qwt/qwt_analog_clock.h similarity index 100% rename from qwtdemo/qwt/qwt_analog_clock.h rename to third/3rd_qwt/qwt_analog_clock.h diff --git a/qwtdemo/qwt/qwt_arrow_button.cpp b/third/3rd_qwt/qwt_arrow_button.cpp similarity index 100% rename from qwtdemo/qwt/qwt_arrow_button.cpp rename to third/3rd_qwt/qwt_arrow_button.cpp diff --git a/qwtdemo/qwt/qwt_arrow_button.h b/third/3rd_qwt/qwt_arrow_button.h similarity index 100% rename from qwtdemo/qwt/qwt_arrow_button.h rename to third/3rd_qwt/qwt_arrow_button.h diff --git a/qwtdemo/qwt/qwt_clipper.cpp b/third/3rd_qwt/qwt_clipper.cpp similarity index 100% rename from qwtdemo/qwt/qwt_clipper.cpp rename to third/3rd_qwt/qwt_clipper.cpp diff --git a/qwtdemo/qwt/qwt_clipper.h b/third/3rd_qwt/qwt_clipper.h similarity index 100% rename from qwtdemo/qwt/qwt_clipper.h rename to third/3rd_qwt/qwt_clipper.h diff --git a/qwtdemo/qwt/qwt_color_map.cpp b/third/3rd_qwt/qwt_color_map.cpp similarity index 100% rename from qwtdemo/qwt/qwt_color_map.cpp rename to third/3rd_qwt/qwt_color_map.cpp diff --git a/qwtdemo/qwt/qwt_color_map.h b/third/3rd_qwt/qwt_color_map.h similarity index 100% rename from qwtdemo/qwt/qwt_color_map.h rename to third/3rd_qwt/qwt_color_map.h diff --git a/qwtdemo/qwt/qwt_column_symbol.cpp b/third/3rd_qwt/qwt_column_symbol.cpp similarity index 100% rename from qwtdemo/qwt/qwt_column_symbol.cpp rename to third/3rd_qwt/qwt_column_symbol.cpp diff --git a/qwtdemo/qwt/qwt_column_symbol.h b/third/3rd_qwt/qwt_column_symbol.h similarity index 100% rename from qwtdemo/qwt/qwt_column_symbol.h rename to third/3rd_qwt/qwt_column_symbol.h diff --git a/qwtdemo/qwt/qwt_compass.cpp b/third/3rd_qwt/qwt_compass.cpp similarity index 100% rename from qwtdemo/qwt/qwt_compass.cpp rename to third/3rd_qwt/qwt_compass.cpp diff --git a/qwtdemo/qwt/qwt_compass.h b/third/3rd_qwt/qwt_compass.h similarity index 100% rename from qwtdemo/qwt/qwt_compass.h rename to third/3rd_qwt/qwt_compass.h diff --git a/qwtdemo/qwt/qwt_compass_rose.cpp b/third/3rd_qwt/qwt_compass_rose.cpp similarity index 100% rename from qwtdemo/qwt/qwt_compass_rose.cpp rename to third/3rd_qwt/qwt_compass_rose.cpp diff --git a/qwtdemo/qwt/qwt_compass_rose.h b/third/3rd_qwt/qwt_compass_rose.h similarity index 100% rename from qwtdemo/qwt/qwt_compass_rose.h rename to third/3rd_qwt/qwt_compass_rose.h diff --git a/qwtdemo/qwt/qwt_compat.h b/third/3rd_qwt/qwt_compat.h similarity index 100% rename from qwtdemo/qwt/qwt_compat.h rename to third/3rd_qwt/qwt_compat.h diff --git a/qwtdemo/qwt/qwt_counter.cpp b/third/3rd_qwt/qwt_counter.cpp similarity index 100% rename from qwtdemo/qwt/qwt_counter.cpp rename to third/3rd_qwt/qwt_counter.cpp diff --git a/qwtdemo/qwt/qwt_counter.h b/third/3rd_qwt/qwt_counter.h similarity index 100% rename from qwtdemo/qwt/qwt_counter.h rename to third/3rd_qwt/qwt_counter.h diff --git a/qwtdemo/qwt/qwt_curve_fitter.cpp b/third/3rd_qwt/qwt_curve_fitter.cpp similarity index 100% rename from qwtdemo/qwt/qwt_curve_fitter.cpp rename to third/3rd_qwt/qwt_curve_fitter.cpp diff --git a/qwtdemo/qwt/qwt_curve_fitter.h b/third/3rd_qwt/qwt_curve_fitter.h similarity index 100% rename from qwtdemo/qwt/qwt_curve_fitter.h rename to third/3rd_qwt/qwt_curve_fitter.h diff --git a/qwtdemo/qwt/qwt_date.cpp b/third/3rd_qwt/qwt_date.cpp similarity index 100% rename from qwtdemo/qwt/qwt_date.cpp rename to third/3rd_qwt/qwt_date.cpp diff --git a/qwtdemo/qwt/qwt_date.h b/third/3rd_qwt/qwt_date.h similarity index 100% rename from qwtdemo/qwt/qwt_date.h rename to third/3rd_qwt/qwt_date.h diff --git a/qwtdemo/qwt/qwt_date_scale_draw.cpp b/third/3rd_qwt/qwt_date_scale_draw.cpp similarity index 100% rename from qwtdemo/qwt/qwt_date_scale_draw.cpp rename to third/3rd_qwt/qwt_date_scale_draw.cpp diff --git a/qwtdemo/qwt/qwt_date_scale_draw.h b/third/3rd_qwt/qwt_date_scale_draw.h similarity index 100% rename from qwtdemo/qwt/qwt_date_scale_draw.h rename to third/3rd_qwt/qwt_date_scale_draw.h diff --git a/qwtdemo/qwt/qwt_date_scale_engine.cpp b/third/3rd_qwt/qwt_date_scale_engine.cpp similarity index 100% rename from qwtdemo/qwt/qwt_date_scale_engine.cpp rename to third/3rd_qwt/qwt_date_scale_engine.cpp diff --git a/qwtdemo/qwt/qwt_date_scale_engine.h b/third/3rd_qwt/qwt_date_scale_engine.h similarity index 100% rename from qwtdemo/qwt/qwt_date_scale_engine.h rename to third/3rd_qwt/qwt_date_scale_engine.h diff --git a/qwtdemo/qwt/qwt_dial.cpp b/third/3rd_qwt/qwt_dial.cpp similarity index 100% rename from qwtdemo/qwt/qwt_dial.cpp rename to third/3rd_qwt/qwt_dial.cpp diff --git a/qwtdemo/qwt/qwt_dial.h b/third/3rd_qwt/qwt_dial.h similarity index 100% rename from qwtdemo/qwt/qwt_dial.h rename to third/3rd_qwt/qwt_dial.h diff --git a/qwtdemo/qwt/qwt_dial_needle.cpp b/third/3rd_qwt/qwt_dial_needle.cpp similarity index 100% rename from qwtdemo/qwt/qwt_dial_needle.cpp rename to third/3rd_qwt/qwt_dial_needle.cpp diff --git a/qwtdemo/qwt/qwt_dial_needle.h b/third/3rd_qwt/qwt_dial_needle.h similarity index 100% rename from qwtdemo/qwt/qwt_dial_needle.h rename to third/3rd_qwt/qwt_dial_needle.h diff --git a/qwtdemo/qwt/qwt_dyngrid_layout.cpp b/third/3rd_qwt/qwt_dyngrid_layout.cpp similarity index 100% rename from qwtdemo/qwt/qwt_dyngrid_layout.cpp rename to third/3rd_qwt/qwt_dyngrid_layout.cpp diff --git a/qwtdemo/qwt/qwt_dyngrid_layout.h b/third/3rd_qwt/qwt_dyngrid_layout.h similarity index 100% rename from qwtdemo/qwt/qwt_dyngrid_layout.h rename to third/3rd_qwt/qwt_dyngrid_layout.h diff --git a/qwtdemo/qwt/qwt_event_pattern.cpp b/third/3rd_qwt/qwt_event_pattern.cpp similarity index 100% rename from qwtdemo/qwt/qwt_event_pattern.cpp rename to third/3rd_qwt/qwt_event_pattern.cpp diff --git a/qwtdemo/qwt/qwt_event_pattern.h b/third/3rd_qwt/qwt_event_pattern.h similarity index 100% rename from qwtdemo/qwt/qwt_event_pattern.h rename to third/3rd_qwt/qwt_event_pattern.h diff --git a/qwtdemo/qwt/qwt_global.h b/third/3rd_qwt/qwt_global.h similarity index 100% rename from qwtdemo/qwt/qwt_global.h rename to third/3rd_qwt/qwt_global.h diff --git a/qwtdemo/qwt/qwt_graphic.cpp b/third/3rd_qwt/qwt_graphic.cpp similarity index 100% rename from qwtdemo/qwt/qwt_graphic.cpp rename to third/3rd_qwt/qwt_graphic.cpp diff --git a/qwtdemo/qwt/qwt_graphic.h b/third/3rd_qwt/qwt_graphic.h similarity index 100% rename from qwtdemo/qwt/qwt_graphic.h rename to third/3rd_qwt/qwt_graphic.h diff --git a/qwtdemo/qwt/qwt_interval.cpp b/third/3rd_qwt/qwt_interval.cpp similarity index 100% rename from qwtdemo/qwt/qwt_interval.cpp rename to third/3rd_qwt/qwt_interval.cpp diff --git a/qwtdemo/qwt/qwt_interval.h b/third/3rd_qwt/qwt_interval.h similarity index 100% rename from qwtdemo/qwt/qwt_interval.h rename to third/3rd_qwt/qwt_interval.h diff --git a/qwtdemo/qwt/qwt_interval_symbol.cpp b/third/3rd_qwt/qwt_interval_symbol.cpp similarity index 100% rename from qwtdemo/qwt/qwt_interval_symbol.cpp rename to third/3rd_qwt/qwt_interval_symbol.cpp diff --git a/qwtdemo/qwt/qwt_interval_symbol.h b/third/3rd_qwt/qwt_interval_symbol.h similarity index 100% rename from qwtdemo/qwt/qwt_interval_symbol.h rename to third/3rd_qwt/qwt_interval_symbol.h diff --git a/qwtdemo/qwt/qwt_knob.cpp b/third/3rd_qwt/qwt_knob.cpp similarity index 100% rename from qwtdemo/qwt/qwt_knob.cpp rename to third/3rd_qwt/qwt_knob.cpp diff --git a/qwtdemo/qwt/qwt_knob.h b/third/3rd_qwt/qwt_knob.h similarity index 100% rename from qwtdemo/qwt/qwt_knob.h rename to third/3rd_qwt/qwt_knob.h diff --git a/qwtdemo/qwt/qwt_legend.cpp b/third/3rd_qwt/qwt_legend.cpp similarity index 100% rename from qwtdemo/qwt/qwt_legend.cpp rename to third/3rd_qwt/qwt_legend.cpp diff --git a/qwtdemo/qwt/qwt_legend.h b/third/3rd_qwt/qwt_legend.h similarity index 100% rename from qwtdemo/qwt/qwt_legend.h rename to third/3rd_qwt/qwt_legend.h diff --git a/qwtdemo/qwt/qwt_legend_data.cpp b/third/3rd_qwt/qwt_legend_data.cpp similarity index 100% rename from qwtdemo/qwt/qwt_legend_data.cpp rename to third/3rd_qwt/qwt_legend_data.cpp diff --git a/qwtdemo/qwt/qwt_legend_data.h b/third/3rd_qwt/qwt_legend_data.h similarity index 100% rename from qwtdemo/qwt/qwt_legend_data.h rename to third/3rd_qwt/qwt_legend_data.h diff --git a/qwtdemo/qwt/qwt_legend_label.cpp b/third/3rd_qwt/qwt_legend_label.cpp similarity index 100% rename from qwtdemo/qwt/qwt_legend_label.cpp rename to third/3rd_qwt/qwt_legend_label.cpp diff --git a/qwtdemo/qwt/qwt_legend_label.h b/third/3rd_qwt/qwt_legend_label.h similarity index 100% rename from qwtdemo/qwt/qwt_legend_label.h rename to third/3rd_qwt/qwt_legend_label.h diff --git a/qwtdemo/qwt/qwt_magnifier.cpp b/third/3rd_qwt/qwt_magnifier.cpp similarity index 100% rename from qwtdemo/qwt/qwt_magnifier.cpp rename to third/3rd_qwt/qwt_magnifier.cpp diff --git a/qwtdemo/qwt/qwt_magnifier.h b/third/3rd_qwt/qwt_magnifier.h similarity index 100% rename from qwtdemo/qwt/qwt_magnifier.h rename to third/3rd_qwt/qwt_magnifier.h diff --git a/qwtdemo/qwt/qwt_math.cpp b/third/3rd_qwt/qwt_math.cpp similarity index 100% rename from qwtdemo/qwt/qwt_math.cpp rename to third/3rd_qwt/qwt_math.cpp diff --git a/qwtdemo/qwt/qwt_math.h b/third/3rd_qwt/qwt_math.h similarity index 100% rename from qwtdemo/qwt/qwt_math.h rename to third/3rd_qwt/qwt_math.h diff --git a/qwtdemo/qwt/qwt_matrix_raster_data.cpp b/third/3rd_qwt/qwt_matrix_raster_data.cpp similarity index 100% rename from qwtdemo/qwt/qwt_matrix_raster_data.cpp rename to third/3rd_qwt/qwt_matrix_raster_data.cpp diff --git a/qwtdemo/qwt/qwt_matrix_raster_data.h b/third/3rd_qwt/qwt_matrix_raster_data.h similarity index 100% rename from qwtdemo/qwt/qwt_matrix_raster_data.h rename to third/3rd_qwt/qwt_matrix_raster_data.h diff --git a/qwtdemo/qwt/qwt_null_paintdevice.cpp b/third/3rd_qwt/qwt_null_paintdevice.cpp similarity index 100% rename from qwtdemo/qwt/qwt_null_paintdevice.cpp rename to third/3rd_qwt/qwt_null_paintdevice.cpp diff --git a/qwtdemo/qwt/qwt_null_paintdevice.h b/third/3rd_qwt/qwt_null_paintdevice.h similarity index 100% rename from qwtdemo/qwt/qwt_null_paintdevice.h rename to third/3rd_qwt/qwt_null_paintdevice.h diff --git a/qwtdemo/qwt/qwt_painter.cpp b/third/3rd_qwt/qwt_painter.cpp similarity index 100% rename from qwtdemo/qwt/qwt_painter.cpp rename to third/3rd_qwt/qwt_painter.cpp diff --git a/qwtdemo/qwt/qwt_painter.h b/third/3rd_qwt/qwt_painter.h similarity index 100% rename from qwtdemo/qwt/qwt_painter.h rename to third/3rd_qwt/qwt_painter.h diff --git a/qwtdemo/qwt/qwt_painter_command.cpp b/third/3rd_qwt/qwt_painter_command.cpp similarity index 100% rename from qwtdemo/qwt/qwt_painter_command.cpp rename to third/3rd_qwt/qwt_painter_command.cpp diff --git a/qwtdemo/qwt/qwt_painter_command.h b/third/3rd_qwt/qwt_painter_command.h similarity index 100% rename from qwtdemo/qwt/qwt_painter_command.h rename to third/3rd_qwt/qwt_painter_command.h diff --git a/qwtdemo/qwt/qwt_panner.cpp b/third/3rd_qwt/qwt_panner.cpp similarity index 100% rename from qwtdemo/qwt/qwt_panner.cpp rename to third/3rd_qwt/qwt_panner.cpp diff --git a/qwtdemo/qwt/qwt_panner.h b/third/3rd_qwt/qwt_panner.h similarity index 100% rename from qwtdemo/qwt/qwt_panner.h rename to third/3rd_qwt/qwt_panner.h diff --git a/qwtdemo/qwt/qwt_picker.cpp b/third/3rd_qwt/qwt_picker.cpp similarity index 100% rename from qwtdemo/qwt/qwt_picker.cpp rename to third/3rd_qwt/qwt_picker.cpp diff --git a/qwtdemo/qwt/qwt_picker.h b/third/3rd_qwt/qwt_picker.h similarity index 100% rename from qwtdemo/qwt/qwt_picker.h rename to third/3rd_qwt/qwt_picker.h diff --git a/qwtdemo/qwt/qwt_picker_machine.cpp b/third/3rd_qwt/qwt_picker_machine.cpp similarity index 100% rename from qwtdemo/qwt/qwt_picker_machine.cpp rename to third/3rd_qwt/qwt_picker_machine.cpp diff --git a/qwtdemo/qwt/qwt_picker_machine.h b/third/3rd_qwt/qwt_picker_machine.h similarity index 100% rename from qwtdemo/qwt/qwt_picker_machine.h rename to third/3rd_qwt/qwt_picker_machine.h diff --git a/qwtdemo/qwt/qwt_pixel_matrix.cpp b/third/3rd_qwt/qwt_pixel_matrix.cpp similarity index 100% rename from qwtdemo/qwt/qwt_pixel_matrix.cpp rename to third/3rd_qwt/qwt_pixel_matrix.cpp diff --git a/qwtdemo/qwt/qwt_pixel_matrix.h b/third/3rd_qwt/qwt_pixel_matrix.h similarity index 100% rename from qwtdemo/qwt/qwt_pixel_matrix.h rename to third/3rd_qwt/qwt_pixel_matrix.h diff --git a/qwtdemo/qwt/qwt_plot.cpp b/third/3rd_qwt/qwt_plot.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot.cpp rename to third/3rd_qwt/qwt_plot.cpp diff --git a/qwtdemo/qwt/qwt_plot.h b/third/3rd_qwt/qwt_plot.h similarity index 100% rename from qwtdemo/qwt/qwt_plot.h rename to third/3rd_qwt/qwt_plot.h diff --git a/qwtdemo/qwt/qwt_plot_abstract_barchart.cpp b/third/3rd_qwt/qwt_plot_abstract_barchart.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_abstract_barchart.cpp rename to third/3rd_qwt/qwt_plot_abstract_barchart.cpp diff --git a/qwtdemo/qwt/qwt_plot_abstract_barchart.h b/third/3rd_qwt/qwt_plot_abstract_barchart.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_abstract_barchart.h rename to third/3rd_qwt/qwt_plot_abstract_barchart.h diff --git a/qwtdemo/qwt/qwt_plot_axis.cpp b/third/3rd_qwt/qwt_plot_axis.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_axis.cpp rename to third/3rd_qwt/qwt_plot_axis.cpp diff --git a/qwtdemo/qwt/qwt_plot_barchart.cpp b/third/3rd_qwt/qwt_plot_barchart.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_barchart.cpp rename to third/3rd_qwt/qwt_plot_barchart.cpp diff --git a/qwtdemo/qwt/qwt_plot_barchart.h b/third/3rd_qwt/qwt_plot_barchart.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_barchart.h rename to third/3rd_qwt/qwt_plot_barchart.h diff --git a/qwtdemo/qwt/qwt_plot_canvas.cpp b/third/3rd_qwt/qwt_plot_canvas.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_canvas.cpp rename to third/3rd_qwt/qwt_plot_canvas.cpp diff --git a/qwtdemo/qwt/qwt_plot_canvas.h b/third/3rd_qwt/qwt_plot_canvas.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_canvas.h rename to third/3rd_qwt/qwt_plot_canvas.h diff --git a/qwtdemo/qwt/qwt_plot_curve.cpp b/third/3rd_qwt/qwt_plot_curve.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_curve.cpp rename to third/3rd_qwt/qwt_plot_curve.cpp diff --git a/qwtdemo/qwt/qwt_plot_curve.h b/third/3rd_qwt/qwt_plot_curve.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_curve.h rename to third/3rd_qwt/qwt_plot_curve.h diff --git a/qwtdemo/qwt/qwt_plot_dict.cpp b/third/3rd_qwt/qwt_plot_dict.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_dict.cpp rename to third/3rd_qwt/qwt_plot_dict.cpp diff --git a/qwtdemo/qwt/qwt_plot_dict.h b/third/3rd_qwt/qwt_plot_dict.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_dict.h rename to third/3rd_qwt/qwt_plot_dict.h diff --git a/qwtdemo/qwt/qwt_plot_directpainter.cpp b/third/3rd_qwt/qwt_plot_directpainter.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_directpainter.cpp rename to third/3rd_qwt/qwt_plot_directpainter.cpp diff --git a/qwtdemo/qwt/qwt_plot_directpainter.h b/third/3rd_qwt/qwt_plot_directpainter.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_directpainter.h rename to third/3rd_qwt/qwt_plot_directpainter.h diff --git a/qwtdemo/qwt/qwt_plot_glcanvas.cpp b/third/3rd_qwt/qwt_plot_glcanvas.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_glcanvas.cpp rename to third/3rd_qwt/qwt_plot_glcanvas.cpp diff --git a/qwtdemo/qwt/qwt_plot_glcanvas.h b/third/3rd_qwt/qwt_plot_glcanvas.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_glcanvas.h rename to third/3rd_qwt/qwt_plot_glcanvas.h diff --git a/qwtdemo/qwt/qwt_plot_grid.cpp b/third/3rd_qwt/qwt_plot_grid.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_grid.cpp rename to third/3rd_qwt/qwt_plot_grid.cpp diff --git a/qwtdemo/qwt/qwt_plot_grid.h b/third/3rd_qwt/qwt_plot_grid.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_grid.h rename to third/3rd_qwt/qwt_plot_grid.h diff --git a/qwtdemo/qwt/qwt_plot_histogram.cpp b/third/3rd_qwt/qwt_plot_histogram.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_histogram.cpp rename to third/3rd_qwt/qwt_plot_histogram.cpp diff --git a/qwtdemo/qwt/qwt_plot_histogram.h b/third/3rd_qwt/qwt_plot_histogram.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_histogram.h rename to third/3rd_qwt/qwt_plot_histogram.h diff --git a/qwtdemo/qwt/qwt_plot_intervalcurve.cpp b/third/3rd_qwt/qwt_plot_intervalcurve.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_intervalcurve.cpp rename to third/3rd_qwt/qwt_plot_intervalcurve.cpp diff --git a/qwtdemo/qwt/qwt_plot_intervalcurve.h b/third/3rd_qwt/qwt_plot_intervalcurve.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_intervalcurve.h rename to third/3rd_qwt/qwt_plot_intervalcurve.h diff --git a/qwtdemo/qwt/qwt_plot_item.cpp b/third/3rd_qwt/qwt_plot_item.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_item.cpp rename to third/3rd_qwt/qwt_plot_item.cpp diff --git a/qwtdemo/qwt/qwt_plot_item.h b/third/3rd_qwt/qwt_plot_item.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_item.h rename to third/3rd_qwt/qwt_plot_item.h diff --git a/qwtdemo/qwt/qwt_plot_layout.cpp b/third/3rd_qwt/qwt_plot_layout.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_layout.cpp rename to third/3rd_qwt/qwt_plot_layout.cpp diff --git a/qwtdemo/qwt/qwt_plot_layout.h b/third/3rd_qwt/qwt_plot_layout.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_layout.h rename to third/3rd_qwt/qwt_plot_layout.h diff --git a/qwtdemo/qwt/qwt_plot_legenditem.cpp b/third/3rd_qwt/qwt_plot_legenditem.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_legenditem.cpp rename to third/3rd_qwt/qwt_plot_legenditem.cpp diff --git a/qwtdemo/qwt/qwt_plot_legenditem.h b/third/3rd_qwt/qwt_plot_legenditem.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_legenditem.h rename to third/3rd_qwt/qwt_plot_legenditem.h diff --git a/qwtdemo/qwt/qwt_plot_magnifier.cpp b/third/3rd_qwt/qwt_plot_magnifier.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_magnifier.cpp rename to third/3rd_qwt/qwt_plot_magnifier.cpp diff --git a/qwtdemo/qwt/qwt_plot_magnifier.h b/third/3rd_qwt/qwt_plot_magnifier.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_magnifier.h rename to third/3rd_qwt/qwt_plot_magnifier.h diff --git a/qwtdemo/qwt/qwt_plot_marker.cpp b/third/3rd_qwt/qwt_plot_marker.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_marker.cpp rename to third/3rd_qwt/qwt_plot_marker.cpp diff --git a/qwtdemo/qwt/qwt_plot_marker.h b/third/3rd_qwt/qwt_plot_marker.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_marker.h rename to third/3rd_qwt/qwt_plot_marker.h diff --git a/qwtdemo/qwt/qwt_plot_multi_barchart.cpp b/third/3rd_qwt/qwt_plot_multi_barchart.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_multi_barchart.cpp rename to third/3rd_qwt/qwt_plot_multi_barchart.cpp diff --git a/qwtdemo/qwt/qwt_plot_multi_barchart.h b/third/3rd_qwt/qwt_plot_multi_barchart.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_multi_barchart.h rename to third/3rd_qwt/qwt_plot_multi_barchart.h diff --git a/qwtdemo/qwt/qwt_plot_panner.cpp b/third/3rd_qwt/qwt_plot_panner.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_panner.cpp rename to third/3rd_qwt/qwt_plot_panner.cpp diff --git a/qwtdemo/qwt/qwt_plot_panner.h b/third/3rd_qwt/qwt_plot_panner.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_panner.h rename to third/3rd_qwt/qwt_plot_panner.h diff --git a/qwtdemo/qwt/qwt_plot_picker.cpp b/third/3rd_qwt/qwt_plot_picker.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_picker.cpp rename to third/3rd_qwt/qwt_plot_picker.cpp diff --git a/qwtdemo/qwt/qwt_plot_picker.h b/third/3rd_qwt/qwt_plot_picker.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_picker.h rename to third/3rd_qwt/qwt_plot_picker.h diff --git a/qwtdemo/qwt/qwt_plot_rasteritem.cpp b/third/3rd_qwt/qwt_plot_rasteritem.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_rasteritem.cpp rename to third/3rd_qwt/qwt_plot_rasteritem.cpp diff --git a/qwtdemo/qwt/qwt_plot_rasteritem.h b/third/3rd_qwt/qwt_plot_rasteritem.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_rasteritem.h rename to third/3rd_qwt/qwt_plot_rasteritem.h diff --git a/qwtdemo/qwt/qwt_plot_renderer.cpp b/third/3rd_qwt/qwt_plot_renderer.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_renderer.cpp rename to third/3rd_qwt/qwt_plot_renderer.cpp diff --git a/qwtdemo/qwt/qwt_plot_renderer.h b/third/3rd_qwt/qwt_plot_renderer.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_renderer.h rename to third/3rd_qwt/qwt_plot_renderer.h diff --git a/qwtdemo/qwt/qwt_plot_rescaler.cpp b/third/3rd_qwt/qwt_plot_rescaler.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_rescaler.cpp rename to third/3rd_qwt/qwt_plot_rescaler.cpp diff --git a/qwtdemo/qwt/qwt_plot_rescaler.h b/third/3rd_qwt/qwt_plot_rescaler.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_rescaler.h rename to third/3rd_qwt/qwt_plot_rescaler.h diff --git a/qwtdemo/qwt/qwt_plot_scaleitem.cpp b/third/3rd_qwt/qwt_plot_scaleitem.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_scaleitem.cpp rename to third/3rd_qwt/qwt_plot_scaleitem.cpp diff --git a/qwtdemo/qwt/qwt_plot_scaleitem.h b/third/3rd_qwt/qwt_plot_scaleitem.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_scaleitem.h rename to third/3rd_qwt/qwt_plot_scaleitem.h diff --git a/qwtdemo/qwt/qwt_plot_seriesitem.cpp b/third/3rd_qwt/qwt_plot_seriesitem.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_seriesitem.cpp rename to third/3rd_qwt/qwt_plot_seriesitem.cpp diff --git a/qwtdemo/qwt/qwt_plot_seriesitem.h b/third/3rd_qwt/qwt_plot_seriesitem.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_seriesitem.h rename to third/3rd_qwt/qwt_plot_seriesitem.h diff --git a/qwtdemo/qwt/qwt_plot_shapeitem.cpp b/third/3rd_qwt/qwt_plot_shapeitem.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_shapeitem.cpp rename to third/3rd_qwt/qwt_plot_shapeitem.cpp diff --git a/qwtdemo/qwt/qwt_plot_shapeitem.h b/third/3rd_qwt/qwt_plot_shapeitem.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_shapeitem.h rename to third/3rd_qwt/qwt_plot_shapeitem.h diff --git a/qwtdemo/qwt/qwt_plot_spectrocurve.cpp b/third/3rd_qwt/qwt_plot_spectrocurve.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_spectrocurve.cpp rename to third/3rd_qwt/qwt_plot_spectrocurve.cpp diff --git a/qwtdemo/qwt/qwt_plot_spectrocurve.h b/third/3rd_qwt/qwt_plot_spectrocurve.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_spectrocurve.h rename to third/3rd_qwt/qwt_plot_spectrocurve.h diff --git a/qwtdemo/qwt/qwt_plot_spectrogram.cpp b/third/3rd_qwt/qwt_plot_spectrogram.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_spectrogram.cpp rename to third/3rd_qwt/qwt_plot_spectrogram.cpp diff --git a/qwtdemo/qwt/qwt_plot_spectrogram.h b/third/3rd_qwt/qwt_plot_spectrogram.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_spectrogram.h rename to third/3rd_qwt/qwt_plot_spectrogram.h diff --git a/qwtdemo/qwt/qwt_plot_svgitem.cpp b/third/3rd_qwt/qwt_plot_svgitem.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_svgitem.cpp rename to third/3rd_qwt/qwt_plot_svgitem.cpp diff --git a/qwtdemo/qwt/qwt_plot_svgitem.h b/third/3rd_qwt/qwt_plot_svgitem.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_svgitem.h rename to third/3rd_qwt/qwt_plot_svgitem.h diff --git a/qwtdemo/qwt/qwt_plot_textlabel.cpp b/third/3rd_qwt/qwt_plot_textlabel.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_textlabel.cpp rename to third/3rd_qwt/qwt_plot_textlabel.cpp diff --git a/qwtdemo/qwt/qwt_plot_textlabel.h b/third/3rd_qwt/qwt_plot_textlabel.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_textlabel.h rename to third/3rd_qwt/qwt_plot_textlabel.h diff --git a/qwtdemo/qwt/qwt_plot_tradingcurve.cpp b/third/3rd_qwt/qwt_plot_tradingcurve.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_tradingcurve.cpp rename to third/3rd_qwt/qwt_plot_tradingcurve.cpp diff --git a/qwtdemo/qwt/qwt_plot_tradingcurve.h b/third/3rd_qwt/qwt_plot_tradingcurve.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_tradingcurve.h rename to third/3rd_qwt/qwt_plot_tradingcurve.h diff --git a/qwtdemo/qwt/qwt_plot_xml.cpp b/third/3rd_qwt/qwt_plot_xml.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_xml.cpp rename to third/3rd_qwt/qwt_plot_xml.cpp diff --git a/qwtdemo/qwt/qwt_plot_zoneitem.cpp b/third/3rd_qwt/qwt_plot_zoneitem.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_zoneitem.cpp rename to third/3rd_qwt/qwt_plot_zoneitem.cpp diff --git a/qwtdemo/qwt/qwt_plot_zoneitem.h b/third/3rd_qwt/qwt_plot_zoneitem.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_zoneitem.h rename to third/3rd_qwt/qwt_plot_zoneitem.h diff --git a/qwtdemo/qwt/qwt_plot_zoomer.cpp b/third/3rd_qwt/qwt_plot_zoomer.cpp similarity index 100% rename from qwtdemo/qwt/qwt_plot_zoomer.cpp rename to third/3rd_qwt/qwt_plot_zoomer.cpp diff --git a/qwtdemo/qwt/qwt_plot_zoomer.h b/third/3rd_qwt/qwt_plot_zoomer.h similarity index 100% rename from qwtdemo/qwt/qwt_plot_zoomer.h rename to third/3rd_qwt/qwt_plot_zoomer.h diff --git a/qwtdemo/qwt/qwt_point_3d.cpp b/third/3rd_qwt/qwt_point_3d.cpp similarity index 100% rename from qwtdemo/qwt/qwt_point_3d.cpp rename to third/3rd_qwt/qwt_point_3d.cpp diff --git a/qwtdemo/qwt/qwt_point_3d.h b/third/3rd_qwt/qwt_point_3d.h similarity index 100% rename from qwtdemo/qwt/qwt_point_3d.h rename to third/3rd_qwt/qwt_point_3d.h diff --git a/qwtdemo/qwt/qwt_point_data.cpp b/third/3rd_qwt/qwt_point_data.cpp similarity index 100% rename from qwtdemo/qwt/qwt_point_data.cpp rename to third/3rd_qwt/qwt_point_data.cpp diff --git a/qwtdemo/qwt/qwt_point_data.h b/third/3rd_qwt/qwt_point_data.h similarity index 100% rename from qwtdemo/qwt/qwt_point_data.h rename to third/3rd_qwt/qwt_point_data.h diff --git a/qwtdemo/qwt/qwt_point_mapper.cpp b/third/3rd_qwt/qwt_point_mapper.cpp similarity index 100% rename from qwtdemo/qwt/qwt_point_mapper.cpp rename to third/3rd_qwt/qwt_point_mapper.cpp diff --git a/qwtdemo/qwt/qwt_point_mapper.h b/third/3rd_qwt/qwt_point_mapper.h similarity index 100% rename from qwtdemo/qwt/qwt_point_mapper.h rename to third/3rd_qwt/qwt_point_mapper.h diff --git a/qwtdemo/qwt/qwt_point_polar.cpp b/third/3rd_qwt/qwt_point_polar.cpp similarity index 100% rename from qwtdemo/qwt/qwt_point_polar.cpp rename to third/3rd_qwt/qwt_point_polar.cpp diff --git a/qwtdemo/qwt/qwt_point_polar.h b/third/3rd_qwt/qwt_point_polar.h similarity index 100% rename from qwtdemo/qwt/qwt_point_polar.h rename to third/3rd_qwt/qwt_point_polar.h diff --git a/qwtdemo/qwt/qwt_raster_data.cpp b/third/3rd_qwt/qwt_raster_data.cpp similarity index 100% rename from qwtdemo/qwt/qwt_raster_data.cpp rename to third/3rd_qwt/qwt_raster_data.cpp diff --git a/qwtdemo/qwt/qwt_raster_data.h b/third/3rd_qwt/qwt_raster_data.h similarity index 100% rename from qwtdemo/qwt/qwt_raster_data.h rename to third/3rd_qwt/qwt_raster_data.h diff --git a/qwtdemo/qwt/qwt_round_scale_draw.cpp b/third/3rd_qwt/qwt_round_scale_draw.cpp similarity index 100% rename from qwtdemo/qwt/qwt_round_scale_draw.cpp rename to third/3rd_qwt/qwt_round_scale_draw.cpp diff --git a/qwtdemo/qwt/qwt_round_scale_draw.h b/third/3rd_qwt/qwt_round_scale_draw.h similarity index 100% rename from qwtdemo/qwt/qwt_round_scale_draw.h rename to third/3rd_qwt/qwt_round_scale_draw.h diff --git a/qwtdemo/qwt/qwt_samples.h b/third/3rd_qwt/qwt_samples.h similarity index 100% rename from qwtdemo/qwt/qwt_samples.h rename to third/3rd_qwt/qwt_samples.h diff --git a/qwtdemo/qwt/qwt_sampling_thread.cpp b/third/3rd_qwt/qwt_sampling_thread.cpp similarity index 100% rename from qwtdemo/qwt/qwt_sampling_thread.cpp rename to third/3rd_qwt/qwt_sampling_thread.cpp diff --git a/qwtdemo/qwt/qwt_sampling_thread.h b/third/3rd_qwt/qwt_sampling_thread.h similarity index 100% rename from qwtdemo/qwt/qwt_sampling_thread.h rename to third/3rd_qwt/qwt_sampling_thread.h diff --git a/qwtdemo/qwt/qwt_scale_div.cpp b/third/3rd_qwt/qwt_scale_div.cpp similarity index 100% rename from qwtdemo/qwt/qwt_scale_div.cpp rename to third/3rd_qwt/qwt_scale_div.cpp diff --git a/qwtdemo/qwt/qwt_scale_div.h b/third/3rd_qwt/qwt_scale_div.h similarity index 100% rename from qwtdemo/qwt/qwt_scale_div.h rename to third/3rd_qwt/qwt_scale_div.h diff --git a/qwtdemo/qwt/qwt_scale_draw.cpp b/third/3rd_qwt/qwt_scale_draw.cpp similarity index 100% rename from qwtdemo/qwt/qwt_scale_draw.cpp rename to third/3rd_qwt/qwt_scale_draw.cpp diff --git a/qwtdemo/qwt/qwt_scale_draw.h b/third/3rd_qwt/qwt_scale_draw.h similarity index 100% rename from qwtdemo/qwt/qwt_scale_draw.h rename to third/3rd_qwt/qwt_scale_draw.h diff --git a/qwtdemo/qwt/qwt_scale_engine.cpp b/third/3rd_qwt/qwt_scale_engine.cpp similarity index 100% rename from qwtdemo/qwt/qwt_scale_engine.cpp rename to third/3rd_qwt/qwt_scale_engine.cpp diff --git a/qwtdemo/qwt/qwt_scale_engine.h b/third/3rd_qwt/qwt_scale_engine.h similarity index 100% rename from qwtdemo/qwt/qwt_scale_engine.h rename to third/3rd_qwt/qwt_scale_engine.h diff --git a/qwtdemo/qwt/qwt_scale_map.cpp b/third/3rd_qwt/qwt_scale_map.cpp similarity index 100% rename from qwtdemo/qwt/qwt_scale_map.cpp rename to third/3rd_qwt/qwt_scale_map.cpp diff --git a/qwtdemo/qwt/qwt_scale_map.h b/third/3rd_qwt/qwt_scale_map.h similarity index 100% rename from qwtdemo/qwt/qwt_scale_map.h rename to third/3rd_qwt/qwt_scale_map.h diff --git a/qwtdemo/qwt/qwt_scale_widget.cpp b/third/3rd_qwt/qwt_scale_widget.cpp similarity index 100% rename from qwtdemo/qwt/qwt_scale_widget.cpp rename to third/3rd_qwt/qwt_scale_widget.cpp diff --git a/qwtdemo/qwt/qwt_scale_widget.h b/third/3rd_qwt/qwt_scale_widget.h similarity index 100% rename from qwtdemo/qwt/qwt_scale_widget.h rename to third/3rd_qwt/qwt_scale_widget.h diff --git a/qwtdemo/qwt/qwt_series_data.cpp b/third/3rd_qwt/qwt_series_data.cpp similarity index 100% rename from qwtdemo/qwt/qwt_series_data.cpp rename to third/3rd_qwt/qwt_series_data.cpp diff --git a/qwtdemo/qwt/qwt_series_data.h b/third/3rd_qwt/qwt_series_data.h similarity index 100% rename from qwtdemo/qwt/qwt_series_data.h rename to third/3rd_qwt/qwt_series_data.h diff --git a/qwtdemo/qwt/qwt_series_store.h b/third/3rd_qwt/qwt_series_store.h similarity index 100% rename from qwtdemo/qwt/qwt_series_store.h rename to third/3rd_qwt/qwt_series_store.h diff --git a/qwtdemo/qwt/qwt_slider.cpp b/third/3rd_qwt/qwt_slider.cpp similarity index 100% rename from qwtdemo/qwt/qwt_slider.cpp rename to third/3rd_qwt/qwt_slider.cpp diff --git a/qwtdemo/qwt/qwt_slider.h b/third/3rd_qwt/qwt_slider.h similarity index 100% rename from qwtdemo/qwt/qwt_slider.h rename to third/3rd_qwt/qwt_slider.h diff --git a/qwtdemo/qwt/qwt_spline.cpp b/third/3rd_qwt/qwt_spline.cpp similarity index 100% rename from qwtdemo/qwt/qwt_spline.cpp rename to third/3rd_qwt/qwt_spline.cpp diff --git a/qwtdemo/qwt/qwt_spline.h b/third/3rd_qwt/qwt_spline.h similarity index 100% rename from qwtdemo/qwt/qwt_spline.h rename to third/3rd_qwt/qwt_spline.h diff --git a/qwtdemo/qwt/qwt_symbol.cpp b/third/3rd_qwt/qwt_symbol.cpp similarity index 100% rename from qwtdemo/qwt/qwt_symbol.cpp rename to third/3rd_qwt/qwt_symbol.cpp diff --git a/qwtdemo/qwt/qwt_symbol.h b/third/3rd_qwt/qwt_symbol.h similarity index 100% rename from qwtdemo/qwt/qwt_symbol.h rename to third/3rd_qwt/qwt_symbol.h diff --git a/qwtdemo/qwt/qwt_system_clock.cpp b/third/3rd_qwt/qwt_system_clock.cpp similarity index 100% rename from qwtdemo/qwt/qwt_system_clock.cpp rename to third/3rd_qwt/qwt_system_clock.cpp diff --git a/qwtdemo/qwt/qwt_system_clock.h b/third/3rd_qwt/qwt_system_clock.h similarity index 100% rename from qwtdemo/qwt/qwt_system_clock.h rename to third/3rd_qwt/qwt_system_clock.h diff --git a/qwtdemo/qwt/qwt_text.cpp b/third/3rd_qwt/qwt_text.cpp similarity index 100% rename from qwtdemo/qwt/qwt_text.cpp rename to third/3rd_qwt/qwt_text.cpp diff --git a/qwtdemo/qwt/qwt_text.h b/third/3rd_qwt/qwt_text.h similarity index 100% rename from qwtdemo/qwt/qwt_text.h rename to third/3rd_qwt/qwt_text.h diff --git a/qwtdemo/qwt/qwt_text_engine.cpp b/third/3rd_qwt/qwt_text_engine.cpp similarity index 100% rename from qwtdemo/qwt/qwt_text_engine.cpp rename to third/3rd_qwt/qwt_text_engine.cpp diff --git a/qwtdemo/qwt/qwt_text_engine.h b/third/3rd_qwt/qwt_text_engine.h similarity index 100% rename from qwtdemo/qwt/qwt_text_engine.h rename to third/3rd_qwt/qwt_text_engine.h diff --git a/qwtdemo/qwt/qwt_text_label.cpp b/third/3rd_qwt/qwt_text_label.cpp similarity index 100% rename from qwtdemo/qwt/qwt_text_label.cpp rename to third/3rd_qwt/qwt_text_label.cpp diff --git a/qwtdemo/qwt/qwt_text_label.h b/third/3rd_qwt/qwt_text_label.h similarity index 100% rename from qwtdemo/qwt/qwt_text_label.h rename to third/3rd_qwt/qwt_text_label.h diff --git a/qwtdemo/qwt/qwt_thermo.cpp b/third/3rd_qwt/qwt_thermo.cpp similarity index 100% rename from qwtdemo/qwt/qwt_thermo.cpp rename to third/3rd_qwt/qwt_thermo.cpp diff --git a/qwtdemo/qwt/qwt_thermo.h b/third/3rd_qwt/qwt_thermo.h similarity index 100% rename from qwtdemo/qwt/qwt_thermo.h rename to third/3rd_qwt/qwt_thermo.h diff --git a/qwtdemo/qwt/qwt_transform.cpp b/third/3rd_qwt/qwt_transform.cpp similarity index 100% rename from qwtdemo/qwt/qwt_transform.cpp rename to third/3rd_qwt/qwt_transform.cpp diff --git a/qwtdemo/qwt/qwt_transform.h b/third/3rd_qwt/qwt_transform.h similarity index 100% rename from qwtdemo/qwt/qwt_transform.h rename to third/3rd_qwt/qwt_transform.h diff --git a/qwtdemo/qwt/qwt_wheel.cpp b/third/3rd_qwt/qwt_wheel.cpp similarity index 100% rename from qwtdemo/qwt/qwt_wheel.cpp rename to third/3rd_qwt/qwt_wheel.cpp diff --git a/qwtdemo/qwt/qwt_wheel.h b/third/3rd_qwt/qwt_wheel.h similarity index 100% rename from qwtdemo/qwt/qwt_wheel.h rename to third/3rd_qwt/qwt_wheel.h diff --git a/qwtdemo/qwt/qwt_widget_overlay.cpp b/third/3rd_qwt/qwt_widget_overlay.cpp similarity index 100% rename from qwtdemo/qwt/qwt_widget_overlay.cpp rename to third/3rd_qwt/qwt_widget_overlay.cpp diff --git a/qwtdemo/qwt/qwt_widget_overlay.h b/third/3rd_qwt/qwt_widget_overlay.h similarity index 100% rename from qwtdemo/qwt/qwt_widget_overlay.h rename to third/3rd_qwt/qwt_widget_overlay.h diff --git a/3rd_qxtglobalshortcut/3rd_qxtglobalshortcut.pri b/third/3rd_qxtglobalshortcut/3rd_qxtglobalshortcut.pri similarity index 100% rename from 3rd_qxtglobalshortcut/3rd_qxtglobalshortcut.pri rename to third/3rd_qxtglobalshortcut/3rd_qxtglobalshortcut.pri diff --git a/3rd_qxtglobalshortcut/qxtglobal.cpp b/third/3rd_qxtglobalshortcut/qxtglobal.cpp similarity index 100% rename from 3rd_qxtglobalshortcut/qxtglobal.cpp rename to third/3rd_qxtglobalshortcut/qxtglobal.cpp diff --git a/3rd_qxtglobalshortcut/qxtglobal.h b/third/3rd_qxtglobalshortcut/qxtglobal.h similarity index 100% rename from 3rd_qxtglobalshortcut/qxtglobal.h rename to third/3rd_qxtglobalshortcut/qxtglobal.h diff --git a/3rd_qxtglobalshortcut/qxtglobalshortcut.cpp b/third/3rd_qxtglobalshortcut/qxtglobalshortcut.cpp similarity index 100% rename from 3rd_qxtglobalshortcut/qxtglobalshortcut.cpp rename to third/3rd_qxtglobalshortcut/qxtglobalshortcut.cpp diff --git a/3rd_qxtglobalshortcut/qxtglobalshortcut.h b/third/3rd_qxtglobalshortcut/qxtglobalshortcut.h similarity index 100% rename from 3rd_qxtglobalshortcut/qxtglobalshortcut.h rename to third/3rd_qxtglobalshortcut/qxtglobalshortcut.h diff --git a/3rd_qxtglobalshortcut/qxtglobalshortcut_mac.cpp b/third/3rd_qxtglobalshortcut/qxtglobalshortcut_mac.cpp similarity index 100% rename from 3rd_qxtglobalshortcut/qxtglobalshortcut_mac.cpp rename to third/3rd_qxtglobalshortcut/qxtglobalshortcut_mac.cpp diff --git a/3rd_qxtglobalshortcut/qxtglobalshortcut_p.h b/third/3rd_qxtglobalshortcut/qxtglobalshortcut_p.h similarity index 100% rename from 3rd_qxtglobalshortcut/qxtglobalshortcut_p.h rename to third/3rd_qxtglobalshortcut/qxtglobalshortcut_p.h diff --git a/3rd_qxtglobalshortcut/qxtglobalshortcut_win.cpp b/third/3rd_qxtglobalshortcut/qxtglobalshortcut_win.cpp similarity index 100% rename from 3rd_qxtglobalshortcut/qxtglobalshortcut_win.cpp rename to third/3rd_qxtglobalshortcut/qxtglobalshortcut_win.cpp diff --git a/3rd_qxtglobalshortcut/qxtglobalshortcut_x11.cpp b/third/3rd_qxtglobalshortcut/qxtglobalshortcut_x11.cpp similarity index 100% rename from 3rd_qxtglobalshortcut/qxtglobalshortcut_x11.cpp rename to third/3rd_qxtglobalshortcut/qxtglobalshortcut_x11.cpp diff --git a/3rd_qxtglobalshortcut/qxtwindowsystem.cpp b/third/3rd_qxtglobalshortcut/qxtwindowsystem.cpp similarity index 100% rename from 3rd_qxtglobalshortcut/qxtwindowsystem.cpp rename to third/3rd_qxtglobalshortcut/qxtwindowsystem.cpp diff --git a/3rd_qxtglobalshortcut/qxtwindowsystem.h b/third/3rd_qxtglobalshortcut/qxtwindowsystem.h similarity index 100% rename from 3rd_qxtglobalshortcut/qxtwindowsystem.h rename to third/3rd_qxtglobalshortcut/qxtwindowsystem.h diff --git a/3rd_qxtglobalshortcut/qxtwindowsystem_mac.cpp b/third/3rd_qxtglobalshortcut/qxtwindowsystem_mac.cpp similarity index 100% rename from 3rd_qxtglobalshortcut/qxtwindowsystem_mac.cpp rename to third/3rd_qxtglobalshortcut/qxtwindowsystem_mac.cpp diff --git a/3rd_qxtglobalshortcut/qxtwindowsystem_mac.h b/third/3rd_qxtglobalshortcut/qxtwindowsystem_mac.h similarity index 100% rename from 3rd_qxtglobalshortcut/qxtwindowsystem_mac.h rename to third/3rd_qxtglobalshortcut/qxtwindowsystem_mac.h diff --git a/3rd_qxtglobalshortcut/qxtwindowsystem_win.cpp b/third/3rd_qxtglobalshortcut/qxtwindowsystem_win.cpp similarity index 100% rename from 3rd_qxtglobalshortcut/qxtwindowsystem_win.cpp rename to third/3rd_qxtglobalshortcut/qxtwindowsystem_win.cpp diff --git a/3rd_qxtglobalshortcut/qxtwindowsystem_x11.cpp b/third/3rd_qxtglobalshortcut/qxtwindowsystem_x11.cpp similarity index 100% rename from 3rd_qxtglobalshortcut/qxtwindowsystem_x11.cpp rename to third/3rd_qxtglobalshortcut/qxtwindowsystem_x11.cpp diff --git a/3rd_qxtglobalshortcut/x11info.cpp b/third/3rd_qxtglobalshortcut/x11info.cpp similarity index 100% rename from 3rd_qxtglobalshortcut/x11info.cpp rename to third/3rd_qxtglobalshortcut/x11info.cpp diff --git a/3rd_qxtglobalshortcut/x11info.h b/third/3rd_qxtglobalshortcut/x11info.h similarity index 100% rename from 3rd_qxtglobalshortcut/x11info.h rename to third/3rd_qxtglobalshortcut/x11info.h diff --git a/designer/designer.pro b/third/designer/designer.pro similarity index 100% rename from designer/designer.pro rename to third/designer/designer.pro diff --git a/designer/designer.qrc b/third/designer/designer.qrc similarity index 100% rename from designer/designer.qrc rename to third/designer/designer.qrc diff --git a/designer/form/appfontdialog.cpp b/third/designer/form/appfontdialog.cpp similarity index 100% rename from designer/form/appfontdialog.cpp rename to third/designer/form/appfontdialog.cpp diff --git a/designer/form/appfontdialog.h b/third/designer/form/appfontdialog.h similarity index 100% rename from designer/form/appfontdialog.h rename to third/designer/form/appfontdialog.h diff --git a/designer/form/assistantclient.cpp b/third/designer/form/assistantclient.cpp similarity index 100% rename from designer/form/assistantclient.cpp rename to third/designer/form/assistantclient.cpp diff --git a/designer/form/assistantclient.h b/third/designer/form/assistantclient.h similarity index 100% rename from designer/form/assistantclient.h rename to third/designer/form/assistantclient.h diff --git a/designer/form/fontpanel.cpp b/third/designer/form/fontpanel.cpp similarity index 100% rename from designer/form/fontpanel.cpp rename to third/designer/form/fontpanel.cpp diff --git a/designer/form/fontpanel.h b/third/designer/form/fontpanel.h similarity index 100% rename from designer/form/fontpanel.h rename to third/designer/form/fontpanel.h diff --git a/designer/form/form.pri b/third/designer/form/form.pri similarity index 100% rename from designer/form/form.pri rename to third/designer/form/form.pri diff --git a/designer/form/mainwindow.cpp b/third/designer/form/mainwindow.cpp similarity index 100% rename from designer/form/mainwindow.cpp rename to third/designer/form/mainwindow.cpp diff --git a/designer/form/mainwindow.h b/third/designer/form/mainwindow.h similarity index 100% rename from designer/form/mainwindow.h rename to third/designer/form/mainwindow.h diff --git a/designer/form/newform.cpp b/third/designer/form/newform.cpp similarity index 100% rename from designer/form/newform.cpp rename to third/designer/form/newform.cpp diff --git a/designer/form/newform.h b/third/designer/form/newform.h similarity index 100% rename from designer/form/newform.h rename to third/designer/form/newform.h diff --git a/designer/form/preferencesdialog.cpp b/third/designer/form/preferencesdialog.cpp similarity index 100% rename from designer/form/preferencesdialog.cpp rename to third/designer/form/preferencesdialog.cpp diff --git a/designer/form/preferencesdialog.h b/third/designer/form/preferencesdialog.h similarity index 100% rename from designer/form/preferencesdialog.h rename to third/designer/form/preferencesdialog.h diff --git a/designer/form/preferencesdialog.ui b/third/designer/form/preferencesdialog.ui similarity index 100% rename from designer/form/preferencesdialog.ui rename to third/designer/form/preferencesdialog.ui diff --git a/designer/form/qttoolbardialog.cpp b/third/designer/form/qttoolbardialog.cpp similarity index 100% rename from designer/form/qttoolbardialog.cpp rename to third/designer/form/qttoolbardialog.cpp diff --git a/designer/form/qttoolbardialog.h b/third/designer/form/qttoolbardialog.h similarity index 100% rename from designer/form/qttoolbardialog.h rename to third/designer/form/qttoolbardialog.h diff --git a/designer/form/qttoolbardialog.ui b/third/designer/form/qttoolbardialog.ui similarity index 100% rename from designer/form/qttoolbardialog.ui rename to third/designer/form/qttoolbardialog.ui diff --git a/designer/form/saveformastemplate.cpp b/third/designer/form/saveformastemplate.cpp similarity index 100% rename from designer/form/saveformastemplate.cpp rename to third/designer/form/saveformastemplate.cpp diff --git a/designer/form/saveformastemplate.h b/third/designer/form/saveformastemplate.h similarity index 100% rename from designer/form/saveformastemplate.h rename to third/designer/form/saveformastemplate.h diff --git a/designer/form/saveformastemplate.ui b/third/designer/form/saveformastemplate.ui similarity index 100% rename from designer/form/saveformastemplate.ui rename to third/designer/form/saveformastemplate.ui diff --git a/designer/form/versiondialog.cpp b/third/designer/form/versiondialog.cpp similarity index 100% rename from designer/form/versiondialog.cpp rename to third/designer/form/versiondialog.cpp diff --git a/designer/form/versiondialog.h b/third/designer/form/versiondialog.h similarity index 100% rename from designer/form/versiondialog.h rename to third/designer/form/versiondialog.h diff --git a/designer/images/back.png b/third/designer/images/back.png similarity index 100% rename from designer/images/back.png rename to third/designer/images/back.png diff --git a/designer/images/designer.png b/third/designer/images/designer.png similarity index 100% rename from designer/images/designer.png rename to third/designer/images/designer.png diff --git a/designer/images/designer_zh_CN.qm b/third/designer/images/designer_zh_CN.qm similarity index 100% rename from designer/images/designer_zh_CN.qm rename to third/designer/images/designer_zh_CN.qm diff --git a/designer/images/down.png b/third/designer/images/down.png similarity index 100% rename from designer/images/down.png rename to third/designer/images/down.png diff --git a/designer/images/forward.png b/third/designer/images/forward.png similarity index 100% rename from designer/images/forward.png rename to third/designer/images/forward.png diff --git a/designer/images/minus.png b/third/designer/images/minus.png similarity index 100% rename from designer/images/minus.png rename to third/designer/images/minus.png diff --git a/designer/images/plus.png b/third/designer/images/plus.png similarity index 100% rename from designer/images/plus.png rename to third/designer/images/plus.png diff --git a/designer/images/up.png b/third/designer/images/up.png similarity index 100% rename from designer/images/up.png rename to third/designer/images/up.png diff --git a/designer/lib/extension/default_extensionfactory.cpp b/third/designer/lib/extension/default_extensionfactory.cpp similarity index 100% rename from designer/lib/extension/default_extensionfactory.cpp rename to third/designer/lib/extension/default_extensionfactory.cpp diff --git a/designer/lib/extension/default_extensionfactory.h b/third/designer/lib/extension/default_extensionfactory.h similarity index 100% rename from designer/lib/extension/default_extensionfactory.h rename to third/designer/lib/extension/default_extensionfactory.h diff --git a/designer/lib/extension/extension.cpp b/third/designer/lib/extension/extension.cpp similarity index 100% rename from designer/lib/extension/extension.cpp rename to third/designer/lib/extension/extension.cpp diff --git a/designer/lib/extension/extension.h b/third/designer/lib/extension/extension.h similarity index 100% rename from designer/lib/extension/extension.h rename to third/designer/lib/extension/extension.h diff --git a/designer/lib/extension/extension.pri b/third/designer/lib/extension/extension.pri similarity index 100% rename from designer/lib/extension/extension.pri rename to third/designer/lib/extension/extension.pri diff --git a/designer/lib/extension/extension_global.h b/third/designer/lib/extension/extension_global.h similarity index 100% rename from designer/lib/extension/extension_global.h rename to third/designer/lib/extension/extension_global.h diff --git a/designer/lib/extension/qextensionmanager.cpp b/third/designer/lib/extension/qextensionmanager.cpp similarity index 100% rename from designer/lib/extension/qextensionmanager.cpp rename to third/designer/lib/extension/qextensionmanager.cpp diff --git a/designer/lib/extension/qextensionmanager.h b/third/designer/lib/extension/qextensionmanager.h similarity index 100% rename from designer/lib/extension/qextensionmanager.h rename to third/designer/lib/extension/qextensionmanager.h diff --git a/designer/lib/lib.pro b/third/designer/lib/lib.pro similarity index 100% rename from designer/lib/lib.pro rename to third/designer/lib/lib.pro diff --git a/designer/lib/lib_pch.h b/third/designer/lib/lib_pch.h similarity index 100% rename from designer/lib/lib_pch.h rename to third/designer/lib/lib_pch.h diff --git a/designer/lib/sdk/abstractactioneditor.cpp b/third/designer/lib/sdk/abstractactioneditor.cpp similarity index 100% rename from designer/lib/sdk/abstractactioneditor.cpp rename to third/designer/lib/sdk/abstractactioneditor.cpp diff --git a/designer/lib/sdk/abstractactioneditor.h b/third/designer/lib/sdk/abstractactioneditor.h similarity index 100% rename from designer/lib/sdk/abstractactioneditor.h rename to third/designer/lib/sdk/abstractactioneditor.h diff --git a/designer/lib/sdk/abstractbrushmanager.h b/third/designer/lib/sdk/abstractbrushmanager.h similarity index 100% rename from designer/lib/sdk/abstractbrushmanager.h rename to third/designer/lib/sdk/abstractbrushmanager.h diff --git a/designer/lib/sdk/abstractdialoggui.cpp b/third/designer/lib/sdk/abstractdialoggui.cpp similarity index 100% rename from designer/lib/sdk/abstractdialoggui.cpp rename to third/designer/lib/sdk/abstractdialoggui.cpp diff --git a/designer/lib/sdk/abstractdialoggui_p.h b/third/designer/lib/sdk/abstractdialoggui_p.h similarity index 100% rename from designer/lib/sdk/abstractdialoggui_p.h rename to third/designer/lib/sdk/abstractdialoggui_p.h diff --git a/designer/lib/sdk/abstractdnditem.h b/third/designer/lib/sdk/abstractdnditem.h similarity index 100% rename from designer/lib/sdk/abstractdnditem.h rename to third/designer/lib/sdk/abstractdnditem.h diff --git a/designer/lib/sdk/abstractdnditem.qdoc b/third/designer/lib/sdk/abstractdnditem.qdoc similarity index 100% rename from designer/lib/sdk/abstractdnditem.qdoc rename to third/designer/lib/sdk/abstractdnditem.qdoc diff --git a/designer/lib/sdk/abstractformeditor.cpp b/third/designer/lib/sdk/abstractformeditor.cpp similarity index 100% rename from designer/lib/sdk/abstractformeditor.cpp rename to third/designer/lib/sdk/abstractformeditor.cpp diff --git a/designer/lib/sdk/abstractformeditor.h b/third/designer/lib/sdk/abstractformeditor.h similarity index 100% rename from designer/lib/sdk/abstractformeditor.h rename to third/designer/lib/sdk/abstractformeditor.h diff --git a/designer/lib/sdk/abstractformeditorplugin.cpp b/third/designer/lib/sdk/abstractformeditorplugin.cpp similarity index 100% rename from designer/lib/sdk/abstractformeditorplugin.cpp rename to third/designer/lib/sdk/abstractformeditorplugin.cpp diff --git a/designer/lib/sdk/abstractformeditorplugin.h b/third/designer/lib/sdk/abstractformeditorplugin.h similarity index 100% rename from designer/lib/sdk/abstractformeditorplugin.h rename to third/designer/lib/sdk/abstractformeditorplugin.h diff --git a/designer/lib/sdk/abstractformwindow.cpp b/third/designer/lib/sdk/abstractformwindow.cpp similarity index 100% rename from designer/lib/sdk/abstractformwindow.cpp rename to third/designer/lib/sdk/abstractformwindow.cpp diff --git a/designer/lib/sdk/abstractformwindow.h b/third/designer/lib/sdk/abstractformwindow.h similarity index 100% rename from designer/lib/sdk/abstractformwindow.h rename to third/designer/lib/sdk/abstractformwindow.h diff --git a/designer/lib/sdk/abstractformwindowcursor.cpp b/third/designer/lib/sdk/abstractformwindowcursor.cpp similarity index 100% rename from designer/lib/sdk/abstractformwindowcursor.cpp rename to third/designer/lib/sdk/abstractformwindowcursor.cpp diff --git a/designer/lib/sdk/abstractformwindowcursor.h b/third/designer/lib/sdk/abstractformwindowcursor.h similarity index 100% rename from designer/lib/sdk/abstractformwindowcursor.h rename to third/designer/lib/sdk/abstractformwindowcursor.h diff --git a/designer/lib/sdk/abstractformwindowmanager.cpp b/third/designer/lib/sdk/abstractformwindowmanager.cpp similarity index 100% rename from designer/lib/sdk/abstractformwindowmanager.cpp rename to third/designer/lib/sdk/abstractformwindowmanager.cpp diff --git a/designer/lib/sdk/abstractformwindowmanager.h b/third/designer/lib/sdk/abstractformwindowmanager.h similarity index 100% rename from designer/lib/sdk/abstractformwindowmanager.h rename to third/designer/lib/sdk/abstractformwindowmanager.h diff --git a/designer/lib/sdk/abstractformwindowtool.cpp b/third/designer/lib/sdk/abstractformwindowtool.cpp similarity index 100% rename from designer/lib/sdk/abstractformwindowtool.cpp rename to third/designer/lib/sdk/abstractformwindowtool.cpp diff --git a/designer/lib/sdk/abstractformwindowtool.h b/third/designer/lib/sdk/abstractformwindowtool.h similarity index 100% rename from designer/lib/sdk/abstractformwindowtool.h rename to third/designer/lib/sdk/abstractformwindowtool.h diff --git a/designer/lib/sdk/abstracticoncache.h b/third/designer/lib/sdk/abstracticoncache.h similarity index 100% rename from designer/lib/sdk/abstracticoncache.h rename to third/designer/lib/sdk/abstracticoncache.h diff --git a/designer/lib/sdk/abstracticoncache.qdoc b/third/designer/lib/sdk/abstracticoncache.qdoc similarity index 100% rename from designer/lib/sdk/abstracticoncache.qdoc rename to third/designer/lib/sdk/abstracticoncache.qdoc diff --git a/designer/lib/sdk/abstractintegration.cpp b/third/designer/lib/sdk/abstractintegration.cpp similarity index 100% rename from designer/lib/sdk/abstractintegration.cpp rename to third/designer/lib/sdk/abstractintegration.cpp diff --git a/designer/lib/sdk/abstractintegration.h b/third/designer/lib/sdk/abstractintegration.h similarity index 100% rename from designer/lib/sdk/abstractintegration.h rename to third/designer/lib/sdk/abstractintegration.h diff --git a/designer/lib/sdk/abstractintrospection.cpp b/third/designer/lib/sdk/abstractintrospection.cpp similarity index 100% rename from designer/lib/sdk/abstractintrospection.cpp rename to third/designer/lib/sdk/abstractintrospection.cpp diff --git a/designer/lib/sdk/abstractintrospection_p.h b/third/designer/lib/sdk/abstractintrospection_p.h similarity index 100% rename from designer/lib/sdk/abstractintrospection_p.h rename to third/designer/lib/sdk/abstractintrospection_p.h diff --git a/designer/lib/sdk/abstractlanguage.h b/third/designer/lib/sdk/abstractlanguage.h similarity index 100% rename from designer/lib/sdk/abstractlanguage.h rename to third/designer/lib/sdk/abstractlanguage.h diff --git a/designer/lib/sdk/abstractmetadatabase.cpp b/third/designer/lib/sdk/abstractmetadatabase.cpp similarity index 100% rename from designer/lib/sdk/abstractmetadatabase.cpp rename to third/designer/lib/sdk/abstractmetadatabase.cpp diff --git a/designer/lib/sdk/abstractmetadatabase.h b/third/designer/lib/sdk/abstractmetadatabase.h similarity index 100% rename from designer/lib/sdk/abstractmetadatabase.h rename to third/designer/lib/sdk/abstractmetadatabase.h diff --git a/designer/lib/sdk/abstractnewformwidget.cpp b/third/designer/lib/sdk/abstractnewformwidget.cpp similarity index 100% rename from designer/lib/sdk/abstractnewformwidget.cpp rename to third/designer/lib/sdk/abstractnewformwidget.cpp diff --git a/designer/lib/sdk/abstractnewformwidget_p.h b/third/designer/lib/sdk/abstractnewformwidget_p.h similarity index 100% rename from designer/lib/sdk/abstractnewformwidget_p.h rename to third/designer/lib/sdk/abstractnewformwidget_p.h diff --git a/designer/lib/sdk/abstractobjectinspector.cpp b/third/designer/lib/sdk/abstractobjectinspector.cpp similarity index 100% rename from designer/lib/sdk/abstractobjectinspector.cpp rename to third/designer/lib/sdk/abstractobjectinspector.cpp diff --git a/designer/lib/sdk/abstractobjectinspector.h b/third/designer/lib/sdk/abstractobjectinspector.h similarity index 100% rename from designer/lib/sdk/abstractobjectinspector.h rename to third/designer/lib/sdk/abstractobjectinspector.h diff --git a/designer/lib/sdk/abstractoptionspage_p.h b/third/designer/lib/sdk/abstractoptionspage_p.h similarity index 100% rename from designer/lib/sdk/abstractoptionspage_p.h rename to third/designer/lib/sdk/abstractoptionspage_p.h diff --git a/designer/lib/sdk/abstractpromotioninterface.cpp b/third/designer/lib/sdk/abstractpromotioninterface.cpp similarity index 100% rename from designer/lib/sdk/abstractpromotioninterface.cpp rename to third/designer/lib/sdk/abstractpromotioninterface.cpp diff --git a/designer/lib/sdk/abstractpromotioninterface.h b/third/designer/lib/sdk/abstractpromotioninterface.h similarity index 100% rename from designer/lib/sdk/abstractpromotioninterface.h rename to third/designer/lib/sdk/abstractpromotioninterface.h diff --git a/designer/lib/sdk/abstractpropertyeditor.cpp b/third/designer/lib/sdk/abstractpropertyeditor.cpp similarity index 100% rename from designer/lib/sdk/abstractpropertyeditor.cpp rename to third/designer/lib/sdk/abstractpropertyeditor.cpp diff --git a/designer/lib/sdk/abstractpropertyeditor.h b/third/designer/lib/sdk/abstractpropertyeditor.h similarity index 100% rename from designer/lib/sdk/abstractpropertyeditor.h rename to third/designer/lib/sdk/abstractpropertyeditor.h diff --git a/designer/lib/sdk/abstractresourcebrowser.cpp b/third/designer/lib/sdk/abstractresourcebrowser.cpp similarity index 100% rename from designer/lib/sdk/abstractresourcebrowser.cpp rename to third/designer/lib/sdk/abstractresourcebrowser.cpp diff --git a/designer/lib/sdk/abstractresourcebrowser.h b/third/designer/lib/sdk/abstractresourcebrowser.h similarity index 100% rename from designer/lib/sdk/abstractresourcebrowser.h rename to third/designer/lib/sdk/abstractresourcebrowser.h diff --git a/designer/lib/sdk/abstractsettings_p.h b/third/designer/lib/sdk/abstractsettings_p.h similarity index 100% rename from designer/lib/sdk/abstractsettings_p.h rename to third/designer/lib/sdk/abstractsettings_p.h diff --git a/designer/lib/sdk/abstractwidgetbox.cpp b/third/designer/lib/sdk/abstractwidgetbox.cpp similarity index 100% rename from designer/lib/sdk/abstractwidgetbox.cpp rename to third/designer/lib/sdk/abstractwidgetbox.cpp diff --git a/designer/lib/sdk/abstractwidgetbox.h b/third/designer/lib/sdk/abstractwidgetbox.h similarity index 100% rename from designer/lib/sdk/abstractwidgetbox.h rename to third/designer/lib/sdk/abstractwidgetbox.h diff --git a/designer/lib/sdk/abstractwidgetdatabase.cpp b/third/designer/lib/sdk/abstractwidgetdatabase.cpp similarity index 100% rename from designer/lib/sdk/abstractwidgetdatabase.cpp rename to third/designer/lib/sdk/abstractwidgetdatabase.cpp diff --git a/designer/lib/sdk/abstractwidgetdatabase.h b/third/designer/lib/sdk/abstractwidgetdatabase.h similarity index 100% rename from designer/lib/sdk/abstractwidgetdatabase.h rename to third/designer/lib/sdk/abstractwidgetdatabase.h diff --git a/designer/lib/sdk/abstractwidgetfactory.cpp b/third/designer/lib/sdk/abstractwidgetfactory.cpp similarity index 100% rename from designer/lib/sdk/abstractwidgetfactory.cpp rename to third/designer/lib/sdk/abstractwidgetfactory.cpp diff --git a/designer/lib/sdk/abstractwidgetfactory.h b/third/designer/lib/sdk/abstractwidgetfactory.h similarity index 100% rename from designer/lib/sdk/abstractwidgetfactory.h rename to third/designer/lib/sdk/abstractwidgetfactory.h diff --git a/designer/lib/sdk/dynamicpropertysheet.h b/third/designer/lib/sdk/dynamicpropertysheet.h similarity index 100% rename from designer/lib/sdk/dynamicpropertysheet.h rename to third/designer/lib/sdk/dynamicpropertysheet.h diff --git a/designer/lib/sdk/dynamicpropertysheet.qdoc b/third/designer/lib/sdk/dynamicpropertysheet.qdoc similarity index 100% rename from designer/lib/sdk/dynamicpropertysheet.qdoc rename to third/designer/lib/sdk/dynamicpropertysheet.qdoc diff --git a/designer/lib/sdk/extrainfo.cpp b/third/designer/lib/sdk/extrainfo.cpp similarity index 100% rename from designer/lib/sdk/extrainfo.cpp rename to third/designer/lib/sdk/extrainfo.cpp diff --git a/designer/lib/sdk/extrainfo.h b/third/designer/lib/sdk/extrainfo.h similarity index 100% rename from designer/lib/sdk/extrainfo.h rename to third/designer/lib/sdk/extrainfo.h diff --git a/designer/lib/sdk/layoutdecoration.h b/third/designer/lib/sdk/layoutdecoration.h similarity index 100% rename from designer/lib/sdk/layoutdecoration.h rename to third/designer/lib/sdk/layoutdecoration.h diff --git a/designer/lib/sdk/layoutdecoration.qdoc b/third/designer/lib/sdk/layoutdecoration.qdoc similarity index 100% rename from designer/lib/sdk/layoutdecoration.qdoc rename to third/designer/lib/sdk/layoutdecoration.qdoc diff --git a/designer/lib/sdk/membersheet.h b/third/designer/lib/sdk/membersheet.h similarity index 100% rename from designer/lib/sdk/membersheet.h rename to third/designer/lib/sdk/membersheet.h diff --git a/designer/lib/sdk/membersheet.qdoc b/third/designer/lib/sdk/membersheet.qdoc similarity index 100% rename from designer/lib/sdk/membersheet.qdoc rename to third/designer/lib/sdk/membersheet.qdoc diff --git a/designer/lib/sdk/propertysheet.h b/third/designer/lib/sdk/propertysheet.h similarity index 100% rename from designer/lib/sdk/propertysheet.h rename to third/designer/lib/sdk/propertysheet.h diff --git a/designer/lib/sdk/propertysheet.qdoc b/third/designer/lib/sdk/propertysheet.qdoc similarity index 100% rename from designer/lib/sdk/propertysheet.qdoc rename to third/designer/lib/sdk/propertysheet.qdoc diff --git a/designer/lib/sdk/script.cpp b/third/designer/lib/sdk/script.cpp similarity index 100% rename from designer/lib/sdk/script.cpp rename to third/designer/lib/sdk/script.cpp diff --git a/designer/lib/sdk/script_p.h b/third/designer/lib/sdk/script_p.h similarity index 100% rename from designer/lib/sdk/script_p.h rename to third/designer/lib/sdk/script_p.h diff --git a/designer/lib/sdk/sdk.pri b/third/designer/lib/sdk/sdk.pri similarity index 100% rename from designer/lib/sdk/sdk.pri rename to third/designer/lib/sdk/sdk.pri diff --git a/designer/lib/sdk/sdk_global.h b/third/designer/lib/sdk/sdk_global.h similarity index 100% rename from designer/lib/sdk/sdk_global.h rename to third/designer/lib/sdk/sdk_global.h diff --git a/designer/lib/sdk/taskmenu.h b/third/designer/lib/sdk/taskmenu.h similarity index 100% rename from designer/lib/sdk/taskmenu.h rename to third/designer/lib/sdk/taskmenu.h diff --git a/designer/lib/sdk/taskmenu.qdoc b/third/designer/lib/sdk/taskmenu.qdoc similarity index 100% rename from designer/lib/sdk/taskmenu.qdoc rename to third/designer/lib/sdk/taskmenu.qdoc diff --git a/designer/lib/shared/actioneditor.cpp b/third/designer/lib/shared/actioneditor.cpp similarity index 100% rename from designer/lib/shared/actioneditor.cpp rename to third/designer/lib/shared/actioneditor.cpp diff --git a/designer/lib/shared/actioneditor_p.h b/third/designer/lib/shared/actioneditor_p.h similarity index 100% rename from designer/lib/shared/actioneditor_p.h rename to third/designer/lib/shared/actioneditor_p.h diff --git a/designer/lib/shared/actionprovider_p.h b/third/designer/lib/shared/actionprovider_p.h similarity index 100% rename from designer/lib/shared/actionprovider_p.h rename to third/designer/lib/shared/actionprovider_p.h diff --git a/designer/lib/shared/actionrepository.cpp b/third/designer/lib/shared/actionrepository.cpp similarity index 100% rename from designer/lib/shared/actionrepository.cpp rename to third/designer/lib/shared/actionrepository.cpp diff --git a/designer/lib/shared/actionrepository_p.h b/third/designer/lib/shared/actionrepository_p.h similarity index 100% rename from designer/lib/shared/actionrepository_p.h rename to third/designer/lib/shared/actionrepository_p.h diff --git a/designer/lib/shared/addlinkdialog.ui b/third/designer/lib/shared/addlinkdialog.ui similarity index 100% rename from designer/lib/shared/addlinkdialog.ui rename to third/designer/lib/shared/addlinkdialog.ui diff --git a/designer/lib/shared/codedialog.cpp b/third/designer/lib/shared/codedialog.cpp similarity index 100% rename from designer/lib/shared/codedialog.cpp rename to third/designer/lib/shared/codedialog.cpp diff --git a/designer/lib/shared/codedialog_p.h b/third/designer/lib/shared/codedialog_p.h similarity index 100% rename from designer/lib/shared/codedialog_p.h rename to third/designer/lib/shared/codedialog_p.h diff --git a/designer/lib/shared/connectionedit.cpp b/third/designer/lib/shared/connectionedit.cpp similarity index 100% rename from designer/lib/shared/connectionedit.cpp rename to third/designer/lib/shared/connectionedit.cpp diff --git a/designer/lib/shared/connectionedit_p.h b/third/designer/lib/shared/connectionedit_p.h similarity index 100% rename from designer/lib/shared/connectionedit_p.h rename to third/designer/lib/shared/connectionedit_p.h diff --git a/designer/lib/shared/csshighlighter.cpp b/third/designer/lib/shared/csshighlighter.cpp similarity index 100% rename from designer/lib/shared/csshighlighter.cpp rename to third/designer/lib/shared/csshighlighter.cpp diff --git a/designer/lib/shared/csshighlighter_p.h b/third/designer/lib/shared/csshighlighter_p.h similarity index 100% rename from designer/lib/shared/csshighlighter_p.h rename to third/designer/lib/shared/csshighlighter_p.h diff --git a/designer/lib/shared/defaultgradients.xml b/third/designer/lib/shared/defaultgradients.xml similarity index 100% rename from designer/lib/shared/defaultgradients.xml rename to third/designer/lib/shared/defaultgradients.xml diff --git a/designer/lib/shared/deviceprofile.cpp b/third/designer/lib/shared/deviceprofile.cpp similarity index 100% rename from designer/lib/shared/deviceprofile.cpp rename to third/designer/lib/shared/deviceprofile.cpp diff --git a/designer/lib/shared/deviceprofile_p.h b/third/designer/lib/shared/deviceprofile_p.h similarity index 100% rename from designer/lib/shared/deviceprofile_p.h rename to third/designer/lib/shared/deviceprofile_p.h diff --git a/designer/lib/shared/dialoggui.cpp b/third/designer/lib/shared/dialoggui.cpp similarity index 100% rename from designer/lib/shared/dialoggui.cpp rename to third/designer/lib/shared/dialoggui.cpp diff --git a/designer/lib/shared/dialoggui_p.h b/third/designer/lib/shared/dialoggui_p.h similarity index 100% rename from designer/lib/shared/dialoggui_p.h rename to third/designer/lib/shared/dialoggui_p.h diff --git a/designer/lib/shared/extensionfactory_p.h b/third/designer/lib/shared/extensionfactory_p.h similarity index 100% rename from designer/lib/shared/extensionfactory_p.h rename to third/designer/lib/shared/extensionfactory_p.h diff --git a/designer/lib/shared/filterwidget.cpp b/third/designer/lib/shared/filterwidget.cpp similarity index 100% rename from designer/lib/shared/filterwidget.cpp rename to third/designer/lib/shared/filterwidget.cpp diff --git a/designer/lib/shared/filterwidget_p.h b/third/designer/lib/shared/filterwidget_p.h similarity index 100% rename from designer/lib/shared/filterwidget_p.h rename to third/designer/lib/shared/filterwidget_p.h diff --git a/designer/lib/shared/formlayoutmenu.cpp b/third/designer/lib/shared/formlayoutmenu.cpp similarity index 100% rename from designer/lib/shared/formlayoutmenu.cpp rename to third/designer/lib/shared/formlayoutmenu.cpp diff --git a/designer/lib/shared/formlayoutmenu_p.h b/third/designer/lib/shared/formlayoutmenu_p.h similarity index 100% rename from designer/lib/shared/formlayoutmenu_p.h rename to third/designer/lib/shared/formlayoutmenu_p.h diff --git a/designer/lib/shared/formlayoutrowdialog.ui b/third/designer/lib/shared/formlayoutrowdialog.ui similarity index 100% rename from designer/lib/shared/formlayoutrowdialog.ui rename to third/designer/lib/shared/formlayoutrowdialog.ui diff --git a/designer/lib/shared/formwindowbase.cpp b/third/designer/lib/shared/formwindowbase.cpp similarity index 100% rename from designer/lib/shared/formwindowbase.cpp rename to third/designer/lib/shared/formwindowbase.cpp diff --git a/designer/lib/shared/formwindowbase_p.h b/third/designer/lib/shared/formwindowbase_p.h similarity index 100% rename from designer/lib/shared/formwindowbase_p.h rename to third/designer/lib/shared/formwindowbase_p.h diff --git a/designer/lib/shared/grid.cpp b/third/designer/lib/shared/grid.cpp similarity index 100% rename from designer/lib/shared/grid.cpp rename to third/designer/lib/shared/grid.cpp diff --git a/designer/lib/shared/grid_p.h b/third/designer/lib/shared/grid_p.h similarity index 100% rename from designer/lib/shared/grid_p.h rename to third/designer/lib/shared/grid_p.h diff --git a/designer/lib/shared/gridpanel.cpp b/third/designer/lib/shared/gridpanel.cpp similarity index 100% rename from designer/lib/shared/gridpanel.cpp rename to third/designer/lib/shared/gridpanel.cpp diff --git a/designer/lib/shared/gridpanel.ui b/third/designer/lib/shared/gridpanel.ui similarity index 100% rename from designer/lib/shared/gridpanel.ui rename to third/designer/lib/shared/gridpanel.ui diff --git a/designer/lib/shared/gridpanel_p.h b/third/designer/lib/shared/gridpanel_p.h similarity index 100% rename from designer/lib/shared/gridpanel_p.h rename to third/designer/lib/shared/gridpanel_p.h diff --git a/designer/lib/shared/htmlhighlighter.cpp b/third/designer/lib/shared/htmlhighlighter.cpp similarity index 100% rename from designer/lib/shared/htmlhighlighter.cpp rename to third/designer/lib/shared/htmlhighlighter.cpp diff --git a/designer/lib/shared/htmlhighlighter_p.h b/third/designer/lib/shared/htmlhighlighter_p.h similarity index 100% rename from designer/lib/shared/htmlhighlighter_p.h rename to third/designer/lib/shared/htmlhighlighter_p.h diff --git a/designer/lib/shared/iconloader.cpp b/third/designer/lib/shared/iconloader.cpp similarity index 100% rename from designer/lib/shared/iconloader.cpp rename to third/designer/lib/shared/iconloader.cpp diff --git a/designer/lib/shared/iconloader_p.h b/third/designer/lib/shared/iconloader_p.h similarity index 100% rename from designer/lib/shared/iconloader_p.h rename to third/designer/lib/shared/iconloader_p.h diff --git a/designer/lib/shared/iconselector.cpp b/third/designer/lib/shared/iconselector.cpp similarity index 100% rename from designer/lib/shared/iconselector.cpp rename to third/designer/lib/shared/iconselector.cpp diff --git a/designer/lib/shared/iconselector_p.h b/third/designer/lib/shared/iconselector_p.h similarity index 100% rename from designer/lib/shared/iconselector_p.h rename to third/designer/lib/shared/iconselector_p.h diff --git a/designer/lib/shared/invisible_widget.cpp b/third/designer/lib/shared/invisible_widget.cpp similarity index 100% rename from designer/lib/shared/invisible_widget.cpp rename to third/designer/lib/shared/invisible_widget.cpp diff --git a/designer/lib/shared/invisible_widget_p.h b/third/designer/lib/shared/invisible_widget_p.h similarity index 100% rename from designer/lib/shared/invisible_widget_p.h rename to third/designer/lib/shared/invisible_widget_p.h diff --git a/designer/lib/shared/layout.cpp b/third/designer/lib/shared/layout.cpp similarity index 100% rename from designer/lib/shared/layout.cpp rename to third/designer/lib/shared/layout.cpp diff --git a/designer/lib/shared/layout_p.h b/third/designer/lib/shared/layout_p.h similarity index 100% rename from designer/lib/shared/layout_p.h rename to third/designer/lib/shared/layout_p.h diff --git a/designer/lib/shared/layoutinfo.cpp b/third/designer/lib/shared/layoutinfo.cpp similarity index 100% rename from designer/lib/shared/layoutinfo.cpp rename to third/designer/lib/shared/layoutinfo.cpp diff --git a/designer/lib/shared/layoutinfo_p.h b/third/designer/lib/shared/layoutinfo_p.h similarity index 100% rename from designer/lib/shared/layoutinfo_p.h rename to third/designer/lib/shared/layoutinfo_p.h diff --git a/designer/lib/shared/metadatabase.cpp b/third/designer/lib/shared/metadatabase.cpp similarity index 100% rename from designer/lib/shared/metadatabase.cpp rename to third/designer/lib/shared/metadatabase.cpp diff --git a/designer/lib/shared/metadatabase_p.h b/third/designer/lib/shared/metadatabase_p.h similarity index 100% rename from designer/lib/shared/metadatabase_p.h rename to third/designer/lib/shared/metadatabase_p.h diff --git a/designer/lib/shared/morphmenu.cpp b/third/designer/lib/shared/morphmenu.cpp similarity index 100% rename from designer/lib/shared/morphmenu.cpp rename to third/designer/lib/shared/morphmenu.cpp diff --git a/designer/lib/shared/morphmenu_p.h b/third/designer/lib/shared/morphmenu_p.h similarity index 100% rename from designer/lib/shared/morphmenu_p.h rename to third/designer/lib/shared/morphmenu_p.h diff --git a/designer/lib/shared/newactiondialog.cpp b/third/designer/lib/shared/newactiondialog.cpp similarity index 100% rename from designer/lib/shared/newactiondialog.cpp rename to third/designer/lib/shared/newactiondialog.cpp diff --git a/designer/lib/shared/newactiondialog.ui b/third/designer/lib/shared/newactiondialog.ui similarity index 100% rename from designer/lib/shared/newactiondialog.ui rename to third/designer/lib/shared/newactiondialog.ui diff --git a/designer/lib/shared/newactiondialog_p.h b/third/designer/lib/shared/newactiondialog_p.h similarity index 100% rename from designer/lib/shared/newactiondialog_p.h rename to third/designer/lib/shared/newactiondialog_p.h diff --git a/designer/lib/shared/newformwidget.cpp b/third/designer/lib/shared/newformwidget.cpp similarity index 100% rename from designer/lib/shared/newformwidget.cpp rename to third/designer/lib/shared/newformwidget.cpp diff --git a/designer/lib/shared/newformwidget.ui b/third/designer/lib/shared/newformwidget.ui similarity index 100% rename from designer/lib/shared/newformwidget.ui rename to third/designer/lib/shared/newformwidget.ui diff --git a/designer/lib/shared/newformwidget_p.h b/third/designer/lib/shared/newformwidget_p.h similarity index 100% rename from designer/lib/shared/newformwidget_p.h rename to third/designer/lib/shared/newformwidget_p.h diff --git a/designer/lib/shared/orderdialog.cpp b/third/designer/lib/shared/orderdialog.cpp similarity index 100% rename from designer/lib/shared/orderdialog.cpp rename to third/designer/lib/shared/orderdialog.cpp diff --git a/designer/lib/shared/orderdialog.ui b/third/designer/lib/shared/orderdialog.ui similarity index 100% rename from designer/lib/shared/orderdialog.ui rename to third/designer/lib/shared/orderdialog.ui diff --git a/designer/lib/shared/orderdialog_p.h b/third/designer/lib/shared/orderdialog_p.h similarity index 100% rename from designer/lib/shared/orderdialog_p.h rename to third/designer/lib/shared/orderdialog_p.h diff --git a/designer/lib/shared/plaintexteditor.cpp b/third/designer/lib/shared/plaintexteditor.cpp similarity index 100% rename from designer/lib/shared/plaintexteditor.cpp rename to third/designer/lib/shared/plaintexteditor.cpp diff --git a/designer/lib/shared/plaintexteditor_p.h b/third/designer/lib/shared/plaintexteditor_p.h similarity index 100% rename from designer/lib/shared/plaintexteditor_p.h rename to third/designer/lib/shared/plaintexteditor_p.h diff --git a/designer/lib/shared/plugindialog.cpp b/third/designer/lib/shared/plugindialog.cpp similarity index 100% rename from designer/lib/shared/plugindialog.cpp rename to third/designer/lib/shared/plugindialog.cpp diff --git a/designer/lib/shared/plugindialog.ui b/third/designer/lib/shared/plugindialog.ui similarity index 100% rename from designer/lib/shared/plugindialog.ui rename to third/designer/lib/shared/plugindialog.ui diff --git a/designer/lib/shared/plugindialog_p.h b/third/designer/lib/shared/plugindialog_p.h similarity index 100% rename from designer/lib/shared/plugindialog_p.h rename to third/designer/lib/shared/plugindialog_p.h diff --git a/designer/lib/shared/pluginmanager.cpp b/third/designer/lib/shared/pluginmanager.cpp similarity index 100% rename from designer/lib/shared/pluginmanager.cpp rename to third/designer/lib/shared/pluginmanager.cpp diff --git a/designer/lib/shared/pluginmanager_p.h b/third/designer/lib/shared/pluginmanager_p.h similarity index 100% rename from designer/lib/shared/pluginmanager_p.h rename to third/designer/lib/shared/pluginmanager_p.h diff --git a/designer/lib/shared/previewconfigurationwidget.cpp b/third/designer/lib/shared/previewconfigurationwidget.cpp similarity index 100% rename from designer/lib/shared/previewconfigurationwidget.cpp rename to third/designer/lib/shared/previewconfigurationwidget.cpp diff --git a/designer/lib/shared/previewconfigurationwidget.ui b/third/designer/lib/shared/previewconfigurationwidget.ui similarity index 100% rename from designer/lib/shared/previewconfigurationwidget.ui rename to third/designer/lib/shared/previewconfigurationwidget.ui diff --git a/designer/lib/shared/previewconfigurationwidget_p.h b/third/designer/lib/shared/previewconfigurationwidget_p.h similarity index 100% rename from designer/lib/shared/previewconfigurationwidget_p.h rename to third/designer/lib/shared/previewconfigurationwidget_p.h diff --git a/designer/lib/shared/previewmanager.cpp b/third/designer/lib/shared/previewmanager.cpp similarity index 100% rename from designer/lib/shared/previewmanager.cpp rename to third/designer/lib/shared/previewmanager.cpp diff --git a/designer/lib/shared/previewmanager_p.h b/third/designer/lib/shared/previewmanager_p.h similarity index 100% rename from designer/lib/shared/previewmanager_p.h rename to third/designer/lib/shared/previewmanager_p.h diff --git a/designer/lib/shared/promotionmodel.cpp b/third/designer/lib/shared/promotionmodel.cpp similarity index 100% rename from designer/lib/shared/promotionmodel.cpp rename to third/designer/lib/shared/promotionmodel.cpp diff --git a/designer/lib/shared/promotionmodel_p.h b/third/designer/lib/shared/promotionmodel_p.h similarity index 100% rename from designer/lib/shared/promotionmodel_p.h rename to third/designer/lib/shared/promotionmodel_p.h diff --git a/designer/lib/shared/promotiontaskmenu.cpp b/third/designer/lib/shared/promotiontaskmenu.cpp similarity index 100% rename from designer/lib/shared/promotiontaskmenu.cpp rename to third/designer/lib/shared/promotiontaskmenu.cpp diff --git a/designer/lib/shared/promotiontaskmenu_p.h b/third/designer/lib/shared/promotiontaskmenu_p.h similarity index 100% rename from designer/lib/shared/promotiontaskmenu_p.h rename to third/designer/lib/shared/promotiontaskmenu_p.h diff --git a/designer/lib/shared/propertylineedit.cpp b/third/designer/lib/shared/propertylineedit.cpp similarity index 100% rename from designer/lib/shared/propertylineedit.cpp rename to third/designer/lib/shared/propertylineedit.cpp diff --git a/designer/lib/shared/propertylineedit_p.h b/third/designer/lib/shared/propertylineedit_p.h similarity index 100% rename from designer/lib/shared/propertylineedit_p.h rename to third/designer/lib/shared/propertylineedit_p.h diff --git a/designer/lib/shared/qdesigner_command.cpp b/third/designer/lib/shared/qdesigner_command.cpp similarity index 100% rename from designer/lib/shared/qdesigner_command.cpp rename to third/designer/lib/shared/qdesigner_command.cpp diff --git a/designer/lib/shared/qdesigner_command2.cpp b/third/designer/lib/shared/qdesigner_command2.cpp similarity index 100% rename from designer/lib/shared/qdesigner_command2.cpp rename to third/designer/lib/shared/qdesigner_command2.cpp diff --git a/designer/lib/shared/qdesigner_command2_p.h b/third/designer/lib/shared/qdesigner_command2_p.h similarity index 100% rename from designer/lib/shared/qdesigner_command2_p.h rename to third/designer/lib/shared/qdesigner_command2_p.h diff --git a/designer/lib/shared/qdesigner_command_p.h b/third/designer/lib/shared/qdesigner_command_p.h similarity index 100% rename from designer/lib/shared/qdesigner_command_p.h rename to third/designer/lib/shared/qdesigner_command_p.h diff --git a/designer/lib/shared/qdesigner_dnditem.cpp b/third/designer/lib/shared/qdesigner_dnditem.cpp similarity index 100% rename from designer/lib/shared/qdesigner_dnditem.cpp rename to third/designer/lib/shared/qdesigner_dnditem.cpp diff --git a/designer/lib/shared/qdesigner_dnditem_p.h b/third/designer/lib/shared/qdesigner_dnditem_p.h similarity index 100% rename from designer/lib/shared/qdesigner_dnditem_p.h rename to third/designer/lib/shared/qdesigner_dnditem_p.h diff --git a/designer/lib/shared/qdesigner_dockwidget.cpp b/third/designer/lib/shared/qdesigner_dockwidget.cpp similarity index 100% rename from designer/lib/shared/qdesigner_dockwidget.cpp rename to third/designer/lib/shared/qdesigner_dockwidget.cpp diff --git a/designer/lib/shared/qdesigner_dockwidget_p.h b/third/designer/lib/shared/qdesigner_dockwidget_p.h similarity index 100% rename from designer/lib/shared/qdesigner_dockwidget_p.h rename to third/designer/lib/shared/qdesigner_dockwidget_p.h diff --git a/designer/lib/shared/qdesigner_formbuilder.cpp b/third/designer/lib/shared/qdesigner_formbuilder.cpp similarity index 100% rename from designer/lib/shared/qdesigner_formbuilder.cpp rename to third/designer/lib/shared/qdesigner_formbuilder.cpp diff --git a/designer/lib/shared/qdesigner_formbuilder_p.h b/third/designer/lib/shared/qdesigner_formbuilder_p.h similarity index 100% rename from designer/lib/shared/qdesigner_formbuilder_p.h rename to third/designer/lib/shared/qdesigner_formbuilder_p.h diff --git a/designer/lib/shared/qdesigner_formeditorcommand.cpp b/third/designer/lib/shared/qdesigner_formeditorcommand.cpp similarity index 100% rename from designer/lib/shared/qdesigner_formeditorcommand.cpp rename to third/designer/lib/shared/qdesigner_formeditorcommand.cpp diff --git a/designer/lib/shared/qdesigner_formeditorcommand_p.h b/third/designer/lib/shared/qdesigner_formeditorcommand_p.h similarity index 100% rename from designer/lib/shared/qdesigner_formeditorcommand_p.h rename to third/designer/lib/shared/qdesigner_formeditorcommand_p.h diff --git a/designer/lib/shared/qdesigner_formwindowcommand.cpp b/third/designer/lib/shared/qdesigner_formwindowcommand.cpp similarity index 100% rename from designer/lib/shared/qdesigner_formwindowcommand.cpp rename to third/designer/lib/shared/qdesigner_formwindowcommand.cpp diff --git a/designer/lib/shared/qdesigner_formwindowcommand_p.h b/third/designer/lib/shared/qdesigner_formwindowcommand_p.h similarity index 100% rename from designer/lib/shared/qdesigner_formwindowcommand_p.h rename to third/designer/lib/shared/qdesigner_formwindowcommand_p.h diff --git a/designer/lib/shared/qdesigner_formwindowmanager.cpp b/third/designer/lib/shared/qdesigner_formwindowmanager.cpp similarity index 100% rename from designer/lib/shared/qdesigner_formwindowmanager.cpp rename to third/designer/lib/shared/qdesigner_formwindowmanager.cpp diff --git a/designer/lib/shared/qdesigner_formwindowmanager_p.h b/third/designer/lib/shared/qdesigner_formwindowmanager_p.h similarity index 100% rename from designer/lib/shared/qdesigner_formwindowmanager_p.h rename to third/designer/lib/shared/qdesigner_formwindowmanager_p.h diff --git a/designer/lib/shared/qdesigner_integration.cpp b/third/designer/lib/shared/qdesigner_integration.cpp similarity index 100% rename from designer/lib/shared/qdesigner_integration.cpp rename to third/designer/lib/shared/qdesigner_integration.cpp diff --git a/designer/lib/shared/qdesigner_integration_p.h b/third/designer/lib/shared/qdesigner_integration_p.h similarity index 100% rename from designer/lib/shared/qdesigner_integration_p.h rename to third/designer/lib/shared/qdesigner_integration_p.h diff --git a/designer/lib/shared/qdesigner_introspection.cpp b/third/designer/lib/shared/qdesigner_introspection.cpp similarity index 100% rename from designer/lib/shared/qdesigner_introspection.cpp rename to third/designer/lib/shared/qdesigner_introspection.cpp diff --git a/designer/lib/shared/qdesigner_introspection_p.h b/third/designer/lib/shared/qdesigner_introspection_p.h similarity index 100% rename from designer/lib/shared/qdesigner_introspection_p.h rename to third/designer/lib/shared/qdesigner_introspection_p.h diff --git a/designer/lib/shared/qdesigner_membersheet.cpp b/third/designer/lib/shared/qdesigner_membersheet.cpp similarity index 100% rename from designer/lib/shared/qdesigner_membersheet.cpp rename to third/designer/lib/shared/qdesigner_membersheet.cpp diff --git a/designer/lib/shared/qdesigner_membersheet_p.h b/third/designer/lib/shared/qdesigner_membersheet_p.h similarity index 100% rename from designer/lib/shared/qdesigner_membersheet_p.h rename to third/designer/lib/shared/qdesigner_membersheet_p.h diff --git a/designer/lib/shared/qdesigner_menu.cpp b/third/designer/lib/shared/qdesigner_menu.cpp similarity index 100% rename from designer/lib/shared/qdesigner_menu.cpp rename to third/designer/lib/shared/qdesigner_menu.cpp diff --git a/designer/lib/shared/qdesigner_menu_p.h b/third/designer/lib/shared/qdesigner_menu_p.h similarity index 100% rename from designer/lib/shared/qdesigner_menu_p.h rename to third/designer/lib/shared/qdesigner_menu_p.h diff --git a/designer/lib/shared/qdesigner_menubar.cpp b/third/designer/lib/shared/qdesigner_menubar.cpp similarity index 100% rename from designer/lib/shared/qdesigner_menubar.cpp rename to third/designer/lib/shared/qdesigner_menubar.cpp diff --git a/designer/lib/shared/qdesigner_menubar_p.h b/third/designer/lib/shared/qdesigner_menubar_p.h similarity index 100% rename from designer/lib/shared/qdesigner_menubar_p.h rename to third/designer/lib/shared/qdesigner_menubar_p.h diff --git a/designer/lib/shared/qdesigner_objectinspector.cpp b/third/designer/lib/shared/qdesigner_objectinspector.cpp similarity index 100% rename from designer/lib/shared/qdesigner_objectinspector.cpp rename to third/designer/lib/shared/qdesigner_objectinspector.cpp diff --git a/designer/lib/shared/qdesigner_objectinspector_p.h b/third/designer/lib/shared/qdesigner_objectinspector_p.h similarity index 100% rename from designer/lib/shared/qdesigner_objectinspector_p.h rename to third/designer/lib/shared/qdesigner_objectinspector_p.h diff --git a/designer/lib/shared/qdesigner_promotion.cpp b/third/designer/lib/shared/qdesigner_promotion.cpp similarity index 100% rename from designer/lib/shared/qdesigner_promotion.cpp rename to third/designer/lib/shared/qdesigner_promotion.cpp diff --git a/designer/lib/shared/qdesigner_promotion_p.h b/third/designer/lib/shared/qdesigner_promotion_p.h similarity index 100% rename from designer/lib/shared/qdesigner_promotion_p.h rename to third/designer/lib/shared/qdesigner_promotion_p.h diff --git a/designer/lib/shared/qdesigner_promotiondialog.cpp b/third/designer/lib/shared/qdesigner_promotiondialog.cpp similarity index 100% rename from designer/lib/shared/qdesigner_promotiondialog.cpp rename to third/designer/lib/shared/qdesigner_promotiondialog.cpp diff --git a/designer/lib/shared/qdesigner_promotiondialog_p.h b/third/designer/lib/shared/qdesigner_promotiondialog_p.h similarity index 100% rename from designer/lib/shared/qdesigner_promotiondialog_p.h rename to third/designer/lib/shared/qdesigner_promotiondialog_p.h diff --git a/designer/lib/shared/qdesigner_propertycommand.cpp b/third/designer/lib/shared/qdesigner_propertycommand.cpp similarity index 100% rename from designer/lib/shared/qdesigner_propertycommand.cpp rename to third/designer/lib/shared/qdesigner_propertycommand.cpp diff --git a/designer/lib/shared/qdesigner_propertycommand_p.h b/third/designer/lib/shared/qdesigner_propertycommand_p.h similarity index 100% rename from designer/lib/shared/qdesigner_propertycommand_p.h rename to third/designer/lib/shared/qdesigner_propertycommand_p.h diff --git a/designer/lib/shared/qdesigner_propertyeditor.cpp b/third/designer/lib/shared/qdesigner_propertyeditor.cpp similarity index 100% rename from designer/lib/shared/qdesigner_propertyeditor.cpp rename to third/designer/lib/shared/qdesigner_propertyeditor.cpp diff --git a/designer/lib/shared/qdesigner_propertyeditor_p.h b/third/designer/lib/shared/qdesigner_propertyeditor_p.h similarity index 100% rename from designer/lib/shared/qdesigner_propertyeditor_p.h rename to third/designer/lib/shared/qdesigner_propertyeditor_p.h diff --git a/designer/lib/shared/qdesigner_propertysheet.cpp b/third/designer/lib/shared/qdesigner_propertysheet.cpp similarity index 100% rename from designer/lib/shared/qdesigner_propertysheet.cpp rename to third/designer/lib/shared/qdesigner_propertysheet.cpp diff --git a/designer/lib/shared/qdesigner_propertysheet_p.h b/third/designer/lib/shared/qdesigner_propertysheet_p.h similarity index 100% rename from designer/lib/shared/qdesigner_propertysheet_p.h rename to third/designer/lib/shared/qdesigner_propertysheet_p.h diff --git a/designer/lib/shared/qdesigner_qsettings.cpp b/third/designer/lib/shared/qdesigner_qsettings.cpp similarity index 100% rename from designer/lib/shared/qdesigner_qsettings.cpp rename to third/designer/lib/shared/qdesigner_qsettings.cpp diff --git a/designer/lib/shared/qdesigner_qsettings_p.h b/third/designer/lib/shared/qdesigner_qsettings_p.h similarity index 100% rename from designer/lib/shared/qdesigner_qsettings_p.h rename to third/designer/lib/shared/qdesigner_qsettings_p.h diff --git a/designer/lib/shared/qdesigner_stackedbox.cpp b/third/designer/lib/shared/qdesigner_stackedbox.cpp similarity index 100% rename from designer/lib/shared/qdesigner_stackedbox.cpp rename to third/designer/lib/shared/qdesigner_stackedbox.cpp diff --git a/designer/lib/shared/qdesigner_stackedbox_p.h b/third/designer/lib/shared/qdesigner_stackedbox_p.h similarity index 100% rename from designer/lib/shared/qdesigner_stackedbox_p.h rename to third/designer/lib/shared/qdesigner_stackedbox_p.h diff --git a/designer/lib/shared/qdesigner_tabwidget.cpp b/third/designer/lib/shared/qdesigner_tabwidget.cpp similarity index 100% rename from designer/lib/shared/qdesigner_tabwidget.cpp rename to third/designer/lib/shared/qdesigner_tabwidget.cpp diff --git a/designer/lib/shared/qdesigner_tabwidget_p.h b/third/designer/lib/shared/qdesigner_tabwidget_p.h similarity index 100% rename from designer/lib/shared/qdesigner_tabwidget_p.h rename to third/designer/lib/shared/qdesigner_tabwidget_p.h diff --git a/designer/lib/shared/qdesigner_taskmenu.cpp b/third/designer/lib/shared/qdesigner_taskmenu.cpp similarity index 100% rename from designer/lib/shared/qdesigner_taskmenu.cpp rename to third/designer/lib/shared/qdesigner_taskmenu.cpp diff --git a/designer/lib/shared/qdesigner_taskmenu_p.h b/third/designer/lib/shared/qdesigner_taskmenu_p.h similarity index 100% rename from designer/lib/shared/qdesigner_taskmenu_p.h rename to third/designer/lib/shared/qdesigner_taskmenu_p.h diff --git a/designer/lib/shared/qdesigner_toolbar.cpp b/third/designer/lib/shared/qdesigner_toolbar.cpp similarity index 100% rename from designer/lib/shared/qdesigner_toolbar.cpp rename to third/designer/lib/shared/qdesigner_toolbar.cpp diff --git a/designer/lib/shared/qdesigner_toolbar_p.h b/third/designer/lib/shared/qdesigner_toolbar_p.h similarity index 100% rename from designer/lib/shared/qdesigner_toolbar_p.h rename to third/designer/lib/shared/qdesigner_toolbar_p.h diff --git a/designer/lib/shared/qdesigner_toolbox.cpp b/third/designer/lib/shared/qdesigner_toolbox.cpp similarity index 100% rename from designer/lib/shared/qdesigner_toolbox.cpp rename to third/designer/lib/shared/qdesigner_toolbox.cpp diff --git a/designer/lib/shared/qdesigner_toolbox_p.h b/third/designer/lib/shared/qdesigner_toolbox_p.h similarity index 100% rename from designer/lib/shared/qdesigner_toolbox_p.h rename to third/designer/lib/shared/qdesigner_toolbox_p.h diff --git a/designer/lib/shared/qdesigner_utils.cpp b/third/designer/lib/shared/qdesigner_utils.cpp similarity index 100% rename from designer/lib/shared/qdesigner_utils.cpp rename to third/designer/lib/shared/qdesigner_utils.cpp diff --git a/designer/lib/shared/qdesigner_utils_p.h b/third/designer/lib/shared/qdesigner_utils_p.h similarity index 100% rename from designer/lib/shared/qdesigner_utils_p.h rename to third/designer/lib/shared/qdesigner_utils_p.h diff --git a/designer/lib/shared/qdesigner_widget.cpp b/third/designer/lib/shared/qdesigner_widget.cpp similarity index 100% rename from designer/lib/shared/qdesigner_widget.cpp rename to third/designer/lib/shared/qdesigner_widget.cpp diff --git a/designer/lib/shared/qdesigner_widget_p.h b/third/designer/lib/shared/qdesigner_widget_p.h similarity index 100% rename from designer/lib/shared/qdesigner_widget_p.h rename to third/designer/lib/shared/qdesigner_widget_p.h diff --git a/designer/lib/shared/qdesigner_widgetbox.cpp b/third/designer/lib/shared/qdesigner_widgetbox.cpp similarity index 100% rename from designer/lib/shared/qdesigner_widgetbox.cpp rename to third/designer/lib/shared/qdesigner_widgetbox.cpp diff --git a/designer/lib/shared/qdesigner_widgetbox_p.h b/third/designer/lib/shared/qdesigner_widgetbox_p.h similarity index 100% rename from designer/lib/shared/qdesigner_widgetbox_p.h rename to third/designer/lib/shared/qdesigner_widgetbox_p.h diff --git a/designer/lib/shared/qdesigner_widgetitem.cpp b/third/designer/lib/shared/qdesigner_widgetitem.cpp similarity index 100% rename from designer/lib/shared/qdesigner_widgetitem.cpp rename to third/designer/lib/shared/qdesigner_widgetitem.cpp diff --git a/designer/lib/shared/qdesigner_widgetitem_p.h b/third/designer/lib/shared/qdesigner_widgetitem_p.h similarity index 100% rename from designer/lib/shared/qdesigner_widgetitem_p.h rename to third/designer/lib/shared/qdesigner_widgetitem_p.h diff --git a/designer/lib/shared/qlayout_widget.cpp b/third/designer/lib/shared/qlayout_widget.cpp similarity index 100% rename from designer/lib/shared/qlayout_widget.cpp rename to third/designer/lib/shared/qlayout_widget.cpp diff --git a/designer/lib/shared/qlayout_widget_p.h b/third/designer/lib/shared/qlayout_widget_p.h similarity index 100% rename from designer/lib/shared/qlayout_widget_p.h rename to third/designer/lib/shared/qlayout_widget_p.h diff --git a/designer/lib/shared/qscripthighlighter.cpp b/third/designer/lib/shared/qscripthighlighter.cpp similarity index 100% rename from designer/lib/shared/qscripthighlighter.cpp rename to third/designer/lib/shared/qscripthighlighter.cpp diff --git a/designer/lib/shared/qscripthighlighter_p.h b/third/designer/lib/shared/qscripthighlighter_p.h similarity index 100% rename from designer/lib/shared/qscripthighlighter_p.h rename to third/designer/lib/shared/qscripthighlighter_p.h diff --git a/designer/lib/shared/qsimpleresource.cpp b/third/designer/lib/shared/qsimpleresource.cpp similarity index 100% rename from designer/lib/shared/qsimpleresource.cpp rename to third/designer/lib/shared/qsimpleresource.cpp diff --git a/designer/lib/shared/qsimpleresource_p.h b/third/designer/lib/shared/qsimpleresource_p.h similarity index 100% rename from designer/lib/shared/qsimpleresource_p.h rename to third/designer/lib/shared/qsimpleresource_p.h diff --git a/designer/lib/shared/qtresourceeditordialog.cpp b/third/designer/lib/shared/qtresourceeditordialog.cpp similarity index 100% rename from designer/lib/shared/qtresourceeditordialog.cpp rename to third/designer/lib/shared/qtresourceeditordialog.cpp diff --git a/designer/lib/shared/qtresourceeditordialog.ui b/third/designer/lib/shared/qtresourceeditordialog.ui similarity index 100% rename from designer/lib/shared/qtresourceeditordialog.ui rename to third/designer/lib/shared/qtresourceeditordialog.ui diff --git a/designer/lib/shared/qtresourceeditordialog_p.h b/third/designer/lib/shared/qtresourceeditordialog_p.h similarity index 100% rename from designer/lib/shared/qtresourceeditordialog_p.h rename to third/designer/lib/shared/qtresourceeditordialog_p.h diff --git a/designer/lib/shared/qtresourcemodel.cpp b/third/designer/lib/shared/qtresourcemodel.cpp similarity index 100% rename from designer/lib/shared/qtresourcemodel.cpp rename to third/designer/lib/shared/qtresourcemodel.cpp diff --git a/designer/lib/shared/qtresourcemodel_p.h b/third/designer/lib/shared/qtresourcemodel_p.h similarity index 100% rename from designer/lib/shared/qtresourcemodel_p.h rename to third/designer/lib/shared/qtresourcemodel_p.h diff --git a/designer/lib/shared/qtresourceview.cpp b/third/designer/lib/shared/qtresourceview.cpp similarity index 100% rename from designer/lib/shared/qtresourceview.cpp rename to third/designer/lib/shared/qtresourceview.cpp diff --git a/designer/lib/shared/qtresourceview_p.h b/third/designer/lib/shared/qtresourceview_p.h similarity index 100% rename from designer/lib/shared/qtresourceview_p.h rename to third/designer/lib/shared/qtresourceview_p.h diff --git a/designer/lib/shared/richtexteditor.cpp b/third/designer/lib/shared/richtexteditor.cpp similarity index 100% rename from designer/lib/shared/richtexteditor.cpp rename to third/designer/lib/shared/richtexteditor.cpp diff --git a/designer/lib/shared/richtexteditor_p.h b/third/designer/lib/shared/richtexteditor_p.h similarity index 100% rename from designer/lib/shared/richtexteditor_p.h rename to third/designer/lib/shared/richtexteditor_p.h diff --git a/designer/lib/shared/scriptcommand.cpp b/third/designer/lib/shared/scriptcommand.cpp similarity index 100% rename from designer/lib/shared/scriptcommand.cpp rename to third/designer/lib/shared/scriptcommand.cpp diff --git a/designer/lib/shared/scriptcommand_p.h b/third/designer/lib/shared/scriptcommand_p.h similarity index 100% rename from designer/lib/shared/scriptcommand_p.h rename to third/designer/lib/shared/scriptcommand_p.h diff --git a/designer/lib/shared/scriptdialog.cpp b/third/designer/lib/shared/scriptdialog.cpp similarity index 100% rename from designer/lib/shared/scriptdialog.cpp rename to third/designer/lib/shared/scriptdialog.cpp diff --git a/designer/lib/shared/scriptdialog_p.h b/third/designer/lib/shared/scriptdialog_p.h similarity index 100% rename from designer/lib/shared/scriptdialog_p.h rename to third/designer/lib/shared/scriptdialog_p.h diff --git a/designer/lib/shared/scripterrordialog.cpp b/third/designer/lib/shared/scripterrordialog.cpp similarity index 100% rename from designer/lib/shared/scripterrordialog.cpp rename to third/designer/lib/shared/scripterrordialog.cpp diff --git a/designer/lib/shared/scripterrordialog_p.h b/third/designer/lib/shared/scripterrordialog_p.h similarity index 100% rename from designer/lib/shared/scripterrordialog_p.h rename to third/designer/lib/shared/scripterrordialog_p.h diff --git a/designer/lib/shared/selectsignaldialog.ui b/third/designer/lib/shared/selectsignaldialog.ui similarity index 100% rename from designer/lib/shared/selectsignaldialog.ui rename to third/designer/lib/shared/selectsignaldialog.ui diff --git a/designer/lib/shared/shared.pri b/third/designer/lib/shared/shared.pri similarity index 100% rename from designer/lib/shared/shared.pri rename to third/designer/lib/shared/shared.pri diff --git a/designer/lib/shared/shared.qrc b/third/designer/lib/shared/shared.qrc similarity index 100% rename from designer/lib/shared/shared.qrc rename to third/designer/lib/shared/shared.qrc diff --git a/designer/lib/shared/shared_enums_p.h b/third/designer/lib/shared/shared_enums_p.h similarity index 100% rename from designer/lib/shared/shared_enums_p.h rename to third/designer/lib/shared/shared_enums_p.h diff --git a/designer/lib/shared/shared_global_p.h b/third/designer/lib/shared/shared_global_p.h similarity index 100% rename from designer/lib/shared/shared_global_p.h rename to third/designer/lib/shared/shared_global_p.h diff --git a/designer/lib/shared/shared_settings.cpp b/third/designer/lib/shared/shared_settings.cpp similarity index 100% rename from designer/lib/shared/shared_settings.cpp rename to third/designer/lib/shared/shared_settings.cpp diff --git a/designer/lib/shared/shared_settings_p.h b/third/designer/lib/shared/shared_settings_p.h similarity index 100% rename from designer/lib/shared/shared_settings_p.h rename to third/designer/lib/shared/shared_settings_p.h diff --git a/designer/lib/shared/sheet_delegate.cpp b/third/designer/lib/shared/sheet_delegate.cpp similarity index 100% rename from designer/lib/shared/sheet_delegate.cpp rename to third/designer/lib/shared/sheet_delegate.cpp diff --git a/designer/lib/shared/sheet_delegate_p.h b/third/designer/lib/shared/sheet_delegate_p.h similarity index 100% rename from designer/lib/shared/sheet_delegate_p.h rename to third/designer/lib/shared/sheet_delegate_p.h diff --git a/designer/lib/shared/signalslotdialog.cpp b/third/designer/lib/shared/signalslotdialog.cpp similarity index 100% rename from designer/lib/shared/signalslotdialog.cpp rename to third/designer/lib/shared/signalslotdialog.cpp diff --git a/designer/lib/shared/signalslotdialog.ui b/third/designer/lib/shared/signalslotdialog.ui similarity index 100% rename from designer/lib/shared/signalslotdialog.ui rename to third/designer/lib/shared/signalslotdialog.ui diff --git a/designer/lib/shared/signalslotdialog_p.h b/third/designer/lib/shared/signalslotdialog_p.h similarity index 100% rename from designer/lib/shared/signalslotdialog_p.h rename to third/designer/lib/shared/signalslotdialog_p.h diff --git a/designer/lib/shared/spacer_widget.cpp b/third/designer/lib/shared/spacer_widget.cpp similarity index 100% rename from designer/lib/shared/spacer_widget.cpp rename to third/designer/lib/shared/spacer_widget.cpp diff --git a/designer/lib/shared/spacer_widget_p.h b/third/designer/lib/shared/spacer_widget_p.h similarity index 100% rename from designer/lib/shared/spacer_widget_p.h rename to third/designer/lib/shared/spacer_widget_p.h diff --git a/designer/lib/shared/stylesheeteditor.cpp b/third/designer/lib/shared/stylesheeteditor.cpp similarity index 100% rename from designer/lib/shared/stylesheeteditor.cpp rename to third/designer/lib/shared/stylesheeteditor.cpp diff --git a/designer/lib/shared/stylesheeteditor_p.h b/third/designer/lib/shared/stylesheeteditor_p.h similarity index 100% rename from designer/lib/shared/stylesheeteditor_p.h rename to third/designer/lib/shared/stylesheeteditor_p.h diff --git a/designer/lib/shared/templates/forms/240x320/Dialog_with_Buttons_Bottom.ui b/third/designer/lib/shared/templates/forms/240x320/Dialog_with_Buttons_Bottom.ui similarity index 100% rename from designer/lib/shared/templates/forms/240x320/Dialog_with_Buttons_Bottom.ui rename to third/designer/lib/shared/templates/forms/240x320/Dialog_with_Buttons_Bottom.ui diff --git a/designer/lib/shared/templates/forms/240x320/Dialog_with_Buttons_Right.ui b/third/designer/lib/shared/templates/forms/240x320/Dialog_with_Buttons_Right.ui similarity index 100% rename from designer/lib/shared/templates/forms/240x320/Dialog_with_Buttons_Right.ui rename to third/designer/lib/shared/templates/forms/240x320/Dialog_with_Buttons_Right.ui diff --git a/designer/lib/shared/templates/forms/320x240/Dialog_with_Buttons_Bottom.ui b/third/designer/lib/shared/templates/forms/320x240/Dialog_with_Buttons_Bottom.ui similarity index 100% rename from designer/lib/shared/templates/forms/320x240/Dialog_with_Buttons_Bottom.ui rename to third/designer/lib/shared/templates/forms/320x240/Dialog_with_Buttons_Bottom.ui diff --git a/designer/lib/shared/templates/forms/320x240/Dialog_with_Buttons_Right.ui b/third/designer/lib/shared/templates/forms/320x240/Dialog_with_Buttons_Right.ui similarity index 100% rename from designer/lib/shared/templates/forms/320x240/Dialog_with_Buttons_Right.ui rename to third/designer/lib/shared/templates/forms/320x240/Dialog_with_Buttons_Right.ui diff --git a/designer/lib/shared/templates/forms/480x640/Dialog_with_Buttons_Bottom.ui b/third/designer/lib/shared/templates/forms/480x640/Dialog_with_Buttons_Bottom.ui similarity index 100% rename from designer/lib/shared/templates/forms/480x640/Dialog_with_Buttons_Bottom.ui rename to third/designer/lib/shared/templates/forms/480x640/Dialog_with_Buttons_Bottom.ui diff --git a/designer/lib/shared/templates/forms/480x640/Dialog_with_Buttons_Right.ui b/third/designer/lib/shared/templates/forms/480x640/Dialog_with_Buttons_Right.ui similarity index 100% rename from designer/lib/shared/templates/forms/480x640/Dialog_with_Buttons_Right.ui rename to third/designer/lib/shared/templates/forms/480x640/Dialog_with_Buttons_Right.ui diff --git a/designer/lib/shared/templates/forms/640x480/Dialog_with_Buttons_Bottom.ui b/third/designer/lib/shared/templates/forms/640x480/Dialog_with_Buttons_Bottom.ui similarity index 100% rename from designer/lib/shared/templates/forms/640x480/Dialog_with_Buttons_Bottom.ui rename to third/designer/lib/shared/templates/forms/640x480/Dialog_with_Buttons_Bottom.ui diff --git a/designer/lib/shared/templates/forms/640x480/Dialog_with_Buttons_Right.ui b/third/designer/lib/shared/templates/forms/640x480/Dialog_with_Buttons_Right.ui similarity index 100% rename from designer/lib/shared/templates/forms/640x480/Dialog_with_Buttons_Right.ui rename to third/designer/lib/shared/templates/forms/640x480/Dialog_with_Buttons_Right.ui diff --git a/designer/lib/shared/templates/forms/Dialog_with_Buttons_Bottom.ui b/third/designer/lib/shared/templates/forms/Dialog_with_Buttons_Bottom.ui similarity index 100% rename from designer/lib/shared/templates/forms/Dialog_with_Buttons_Bottom.ui rename to third/designer/lib/shared/templates/forms/Dialog_with_Buttons_Bottom.ui diff --git a/designer/lib/shared/templates/forms/Dialog_with_Buttons_Right.ui b/third/designer/lib/shared/templates/forms/Dialog_with_Buttons_Right.ui similarity index 100% rename from designer/lib/shared/templates/forms/Dialog_with_Buttons_Right.ui rename to third/designer/lib/shared/templates/forms/Dialog_with_Buttons_Right.ui diff --git a/designer/lib/shared/templates/forms/Dialog_without_Buttons.ui b/third/designer/lib/shared/templates/forms/Dialog_without_Buttons.ui similarity index 100% rename from designer/lib/shared/templates/forms/Dialog_without_Buttons.ui rename to third/designer/lib/shared/templates/forms/Dialog_without_Buttons.ui diff --git a/designer/lib/shared/templates/forms/Main_Window.ui b/third/designer/lib/shared/templates/forms/Main_Window.ui similarity index 100% rename from designer/lib/shared/templates/forms/Main_Window.ui rename to third/designer/lib/shared/templates/forms/Main_Window.ui diff --git a/designer/lib/shared/templates/forms/Widget.ui b/third/designer/lib/shared/templates/forms/Widget.ui similarity index 100% rename from designer/lib/shared/templates/forms/Widget.ui rename to third/designer/lib/shared/templates/forms/Widget.ui diff --git a/designer/lib/shared/textpropertyeditor.cpp b/third/designer/lib/shared/textpropertyeditor.cpp similarity index 100% rename from designer/lib/shared/textpropertyeditor.cpp rename to third/designer/lib/shared/textpropertyeditor.cpp diff --git a/designer/lib/shared/textpropertyeditor_p.h b/third/designer/lib/shared/textpropertyeditor_p.h similarity index 100% rename from designer/lib/shared/textpropertyeditor_p.h rename to third/designer/lib/shared/textpropertyeditor_p.h diff --git a/designer/lib/shared/widgetdatabase.cpp b/third/designer/lib/shared/widgetdatabase.cpp similarity index 100% rename from designer/lib/shared/widgetdatabase.cpp rename to third/designer/lib/shared/widgetdatabase.cpp diff --git a/designer/lib/shared/widgetdatabase_p.h b/third/designer/lib/shared/widgetdatabase_p.h similarity index 100% rename from designer/lib/shared/widgetdatabase_p.h rename to third/designer/lib/shared/widgetdatabase_p.h diff --git a/designer/lib/shared/widgetfactory.cpp b/third/designer/lib/shared/widgetfactory.cpp similarity index 100% rename from designer/lib/shared/widgetfactory.cpp rename to third/designer/lib/shared/widgetfactory.cpp diff --git a/designer/lib/shared/widgetfactory_p.h b/third/designer/lib/shared/widgetfactory_p.h similarity index 100% rename from designer/lib/shared/widgetfactory_p.h rename to third/designer/lib/shared/widgetfactory_p.h diff --git a/designer/lib/shared/zoomwidget.cpp b/third/designer/lib/shared/zoomwidget.cpp similarity index 100% rename from designer/lib/shared/zoomwidget.cpp rename to third/designer/lib/shared/zoomwidget.cpp diff --git a/designer/lib/shared/zoomwidget_p.h b/third/designer/lib/shared/zoomwidget_p.h similarity index 100% rename from designer/lib/shared/zoomwidget_p.h rename to third/designer/lib/shared/zoomwidget_p.h diff --git a/designer/lib/uilib/abstractformbuilder.cpp b/third/designer/lib/uilib/abstractformbuilder.cpp similarity index 100% rename from designer/lib/uilib/abstractformbuilder.cpp rename to third/designer/lib/uilib/abstractformbuilder.cpp diff --git a/designer/lib/uilib/abstractformbuilder.h b/third/designer/lib/uilib/abstractformbuilder.h similarity index 100% rename from designer/lib/uilib/abstractformbuilder.h rename to third/designer/lib/uilib/abstractformbuilder.h diff --git a/designer/lib/uilib/container.h b/third/designer/lib/uilib/container.h similarity index 100% rename from designer/lib/uilib/container.h rename to third/designer/lib/uilib/container.h diff --git a/designer/lib/uilib/container.qdoc b/third/designer/lib/uilib/container.qdoc similarity index 100% rename from designer/lib/uilib/container.qdoc rename to third/designer/lib/uilib/container.qdoc diff --git a/designer/lib/uilib/customwidget.h b/third/designer/lib/uilib/customwidget.h similarity index 100% rename from designer/lib/uilib/customwidget.h rename to third/designer/lib/uilib/customwidget.h diff --git a/designer/lib/uilib/customwidget.qdoc b/third/designer/lib/uilib/customwidget.qdoc similarity index 100% rename from designer/lib/uilib/customwidget.qdoc rename to third/designer/lib/uilib/customwidget.qdoc diff --git a/designer/lib/uilib/formbuilder.cpp b/third/designer/lib/uilib/formbuilder.cpp similarity index 100% rename from designer/lib/uilib/formbuilder.cpp rename to third/designer/lib/uilib/formbuilder.cpp diff --git a/designer/lib/uilib/formbuilder.h b/third/designer/lib/uilib/formbuilder.h similarity index 100% rename from designer/lib/uilib/formbuilder.h rename to third/designer/lib/uilib/formbuilder.h diff --git a/designer/lib/uilib/formbuilderextra.cpp b/third/designer/lib/uilib/formbuilderextra.cpp similarity index 100% rename from designer/lib/uilib/formbuilderextra.cpp rename to third/designer/lib/uilib/formbuilderextra.cpp diff --git a/designer/lib/uilib/formbuilderextra_p.h b/third/designer/lib/uilib/formbuilderextra_p.h similarity index 100% rename from designer/lib/uilib/formbuilderextra_p.h rename to third/designer/lib/uilib/formbuilderextra_p.h diff --git a/designer/lib/uilib/formscriptrunner.cpp b/third/designer/lib/uilib/formscriptrunner.cpp similarity index 100% rename from designer/lib/uilib/formscriptrunner.cpp rename to third/designer/lib/uilib/formscriptrunner.cpp diff --git a/designer/lib/uilib/formscriptrunner_p.h b/third/designer/lib/uilib/formscriptrunner_p.h similarity index 100% rename from designer/lib/uilib/formscriptrunner_p.h rename to third/designer/lib/uilib/formscriptrunner_p.h diff --git a/designer/lib/uilib/properties.cpp b/third/designer/lib/uilib/properties.cpp similarity index 100% rename from designer/lib/uilib/properties.cpp rename to third/designer/lib/uilib/properties.cpp diff --git a/designer/lib/uilib/properties_p.h b/third/designer/lib/uilib/properties_p.h similarity index 100% rename from designer/lib/uilib/properties_p.h rename to third/designer/lib/uilib/properties_p.h diff --git a/designer/lib/uilib/qdesignerexportwidget.h b/third/designer/lib/uilib/qdesignerexportwidget.h similarity index 100% rename from designer/lib/uilib/qdesignerexportwidget.h rename to third/designer/lib/uilib/qdesignerexportwidget.h diff --git a/designer/lib/uilib/resourcebuilder.cpp b/third/designer/lib/uilib/resourcebuilder.cpp similarity index 100% rename from designer/lib/uilib/resourcebuilder.cpp rename to third/designer/lib/uilib/resourcebuilder.cpp diff --git a/designer/lib/uilib/resourcebuilder_p.h b/third/designer/lib/uilib/resourcebuilder_p.h similarity index 100% rename from designer/lib/uilib/resourcebuilder_p.h rename to third/designer/lib/uilib/resourcebuilder_p.h diff --git a/designer/lib/uilib/textbuilder.cpp b/third/designer/lib/uilib/textbuilder.cpp similarity index 100% rename from designer/lib/uilib/textbuilder.cpp rename to third/designer/lib/uilib/textbuilder.cpp diff --git a/designer/lib/uilib/textbuilder_p.h b/third/designer/lib/uilib/textbuilder_p.h similarity index 100% rename from designer/lib/uilib/textbuilder_p.h rename to third/designer/lib/uilib/textbuilder_p.h diff --git a/designer/lib/uilib/ui4.cpp b/third/designer/lib/uilib/ui4.cpp similarity index 100% rename from designer/lib/uilib/ui4.cpp rename to third/designer/lib/uilib/ui4.cpp diff --git a/designer/lib/uilib/ui4_p.h b/third/designer/lib/uilib/ui4_p.h similarity index 100% rename from designer/lib/uilib/ui4_p.h rename to third/designer/lib/uilib/ui4_p.h diff --git a/designer/lib/uilib/uilib.pri b/third/designer/lib/uilib/uilib.pri similarity index 100% rename from designer/lib/uilib/uilib.pri rename to third/designer/lib/uilib/uilib.pri diff --git a/designer/lib/uilib/uilib_global.h b/third/designer/lib/uilib/uilib_global.h similarity index 100% rename from designer/lib/uilib/uilib_global.h rename to third/designer/lib/uilib/uilib_global.h diff --git a/designer/lib/uilib/widgets.table b/third/designer/lib/uilib/widgets.table similarity index 100% rename from designer/lib/uilib/widgets.table rename to third/designer/lib/uilib/widgets.table diff --git a/designer/main.cpp b/third/designer/main.cpp similarity index 100% rename from designer/main.cpp rename to third/designer/main.cpp diff --git a/designer/main.ico b/third/designer/main.ico similarity index 100% rename from designer/main.ico rename to third/designer/main.ico diff --git a/designer/main.rc b/third/designer/main.rc similarity index 100% rename from designer/main.rc rename to third/designer/main.rc diff --git a/designer/qdesigner/designer_enums.h b/third/designer/qdesigner/designer_enums.h similarity index 100% rename from designer/qdesigner/designer_enums.h rename to third/designer/qdesigner/designer_enums.h diff --git a/designer/qdesigner/qdesigner.cpp b/third/designer/qdesigner/qdesigner.cpp similarity index 100% rename from designer/qdesigner/qdesigner.cpp rename to third/designer/qdesigner/qdesigner.cpp diff --git a/designer/qdesigner/qdesigner.h b/third/designer/qdesigner/qdesigner.h similarity index 100% rename from designer/qdesigner/qdesigner.h rename to third/designer/qdesigner/qdesigner.h diff --git a/designer/qdesigner/qdesigner.pri b/third/designer/qdesigner/qdesigner.pri similarity index 100% rename from designer/qdesigner/qdesigner.pri rename to third/designer/qdesigner/qdesigner.pri diff --git a/designer/qdesigner/qdesigner_actions.cpp b/third/designer/qdesigner/qdesigner_actions.cpp similarity index 100% rename from designer/qdesigner/qdesigner_actions.cpp rename to third/designer/qdesigner/qdesigner_actions.cpp diff --git a/designer/qdesigner/qdesigner_actions.h b/third/designer/qdesigner/qdesigner_actions.h similarity index 100% rename from designer/qdesigner/qdesigner_actions.h rename to third/designer/qdesigner/qdesigner_actions.h diff --git a/designer/qdesigner/qdesigner_appearanceoptions.cpp b/third/designer/qdesigner/qdesigner_appearanceoptions.cpp similarity index 100% rename from designer/qdesigner/qdesigner_appearanceoptions.cpp rename to third/designer/qdesigner/qdesigner_appearanceoptions.cpp diff --git a/designer/qdesigner/qdesigner_appearanceoptions.h b/third/designer/qdesigner/qdesigner_appearanceoptions.h similarity index 100% rename from designer/qdesigner/qdesigner_appearanceoptions.h rename to third/designer/qdesigner/qdesigner_appearanceoptions.h diff --git a/designer/qdesigner/qdesigner_appearanceoptions.ui b/third/designer/qdesigner/qdesigner_appearanceoptions.ui similarity index 100% rename from designer/qdesigner/qdesigner_appearanceoptions.ui rename to third/designer/qdesigner/qdesigner_appearanceoptions.ui diff --git a/designer/qdesigner/qdesigner_formwindow.cpp b/third/designer/qdesigner/qdesigner_formwindow.cpp similarity index 100% rename from designer/qdesigner/qdesigner_formwindow.cpp rename to third/designer/qdesigner/qdesigner_formwindow.cpp diff --git a/designer/qdesigner/qdesigner_formwindow.h b/third/designer/qdesigner/qdesigner_formwindow.h similarity index 100% rename from designer/qdesigner/qdesigner_formwindow.h rename to third/designer/qdesigner/qdesigner_formwindow.h diff --git a/designer/qdesigner/qdesigner_pch.h b/third/designer/qdesigner/qdesigner_pch.h similarity index 100% rename from designer/qdesigner/qdesigner_pch.h rename to third/designer/qdesigner/qdesigner_pch.h diff --git a/designer/qdesigner/qdesigner_server.cpp b/third/designer/qdesigner/qdesigner_server.cpp similarity index 100% rename from designer/qdesigner/qdesigner_server.cpp rename to third/designer/qdesigner/qdesigner_server.cpp diff --git a/designer/qdesigner/qdesigner_server.h b/third/designer/qdesigner/qdesigner_server.h similarity index 100% rename from designer/qdesigner/qdesigner_server.h rename to third/designer/qdesigner/qdesigner_server.h diff --git a/designer/qdesigner/qdesigner_settings.cpp b/third/designer/qdesigner/qdesigner_settings.cpp similarity index 100% rename from designer/qdesigner/qdesigner_settings.cpp rename to third/designer/qdesigner/qdesigner_settings.cpp diff --git a/designer/qdesigner/qdesigner_settings.h b/third/designer/qdesigner/qdesigner_settings.h similarity index 100% rename from designer/qdesigner/qdesigner_settings.h rename to third/designer/qdesigner/qdesigner_settings.h diff --git a/designer/qdesigner/qdesigner_toolwindow.cpp b/third/designer/qdesigner/qdesigner_toolwindow.cpp similarity index 100% rename from designer/qdesigner/qdesigner_toolwindow.cpp rename to third/designer/qdesigner/qdesigner_toolwindow.cpp diff --git a/designer/qdesigner/qdesigner_toolwindow.h b/third/designer/qdesigner/qdesigner_toolwindow.h similarity index 100% rename from designer/qdesigner/qdesigner_toolwindow.h rename to third/designer/qdesigner/qdesigner_toolwindow.h diff --git a/designer/qdesigner/qdesigner_workbench.cpp b/third/designer/qdesigner/qdesigner_workbench.cpp similarity index 100% rename from designer/qdesigner/qdesigner_workbench.cpp rename to third/designer/qdesigner/qdesigner_workbench.cpp diff --git a/designer/qdesigner/qdesigner_workbench.h b/third/designer/qdesigner/qdesigner_workbench.h similarity index 100% rename from designer/qdesigner/qdesigner_workbench.h rename to third/designer/qdesigner/qdesigner_workbench.h diff --git a/designer/readme.md b/third/designer/readme.md similarity index 100% rename from designer/readme.md rename to third/designer/readme.md diff --git a/hotkey/frmhotkey.cpp b/third/hotkey/frmhotkey.cpp similarity index 100% rename from hotkey/frmhotkey.cpp rename to third/hotkey/frmhotkey.cpp diff --git a/hotkey/frmhotkey.h b/third/hotkey/frmhotkey.h similarity index 100% rename from hotkey/frmhotkey.h rename to third/hotkey/frmhotkey.h diff --git a/hotkey/frmhotkey.ui b/third/hotkey/frmhotkey.ui similarity index 100% rename from hotkey/frmhotkey.ui rename to third/hotkey/frmhotkey.ui diff --git a/hotkey/hotkey.pro b/third/hotkey/hotkey.pro similarity index 100% rename from hotkey/hotkey.pro rename to third/hotkey/hotkey.pro diff --git a/hotkey/main.cpp b/third/hotkey/main.cpp similarity index 100% rename from hotkey/main.cpp rename to third/hotkey/main.cpp diff --git a/miniblink/file/demo.html b/third/miniblink/file/demo.html similarity index 100% rename from miniblink/file/demo.html rename to third/miniblink/file/demo.html diff --git a/miniblink/file/echarts.min.js b/third/miniblink/file/echarts.min.js similarity index 100% rename from miniblink/file/echarts.min.js rename to third/miniblink/file/echarts.min.js diff --git a/miniblink/file/gauge.html b/third/miniblink/file/gauge.html similarity index 100% rename from miniblink/file/gauge.html rename to third/miniblink/file/gauge.html diff --git a/miniblink/main.cpp b/third/miniblink/main.cpp similarity index 100% rename from miniblink/main.cpp rename to third/miniblink/main.cpp diff --git a/miniblink/miniblink.pro b/third/miniblink/miniblink.pro similarity index 57% rename from miniblink/miniblink.pro rename to third/miniblink/miniblink.pro index 1894498..ef66b69 100644 --- a/miniblink/miniblink.pro +++ b/third/miniblink/miniblink.pro @@ -13,3 +13,17 @@ FORMS += widget.ui INCLUDEPATH += $$PWD/miniblink include ($$PWD/miniblink/miniblink.pri) + +#自动拷贝文件 +src_file = $$PWD/file/* +dst_file = $$DESTDIR +win32 { +#转换斜杠 / 到 \\ +src_file ~= s,/,\\,g +dst_file ~= s,/,\\,g +dst_file2 ~= s,/,\\,g +QMAKE_POST_LINK += copy $$src_file $$dst_file +} +unix { +QMAKE_POST_LINK += cp -r -f $$src_file $$dst_file +} diff --git a/miniblink/miniblink/miniblink.cpp b/third/miniblink/miniblink/miniblink.cpp similarity index 100% rename from miniblink/miniblink/miniblink.cpp rename to third/miniblink/miniblink/miniblink.cpp diff --git a/miniblink/miniblink/miniblink.h b/third/miniblink/miniblink/miniblink.h similarity index 100% rename from miniblink/miniblink/miniblink.h rename to third/miniblink/miniblink/miniblink.h diff --git a/miniblink/miniblink/miniblink.pri b/third/miniblink/miniblink/miniblink.pri similarity index 100% rename from miniblink/miniblink/miniblink.pri rename to third/miniblink/miniblink/miniblink.pri diff --git a/miniblink/miniblink/wke.h b/third/miniblink/miniblink/wke.h similarity index 100% rename from miniblink/miniblink/wke.h rename to third/miniblink/miniblink/wke.h diff --git a/miniblink/readme.md b/third/miniblink/readme.md similarity index 100% rename from miniblink/readme.md rename to third/miniblink/readme.md diff --git a/miniblink/widget.cpp b/third/miniblink/widget.cpp similarity index 100% rename from miniblink/widget.cpp rename to third/miniblink/widget.cpp diff --git a/miniblink/widget.h b/third/miniblink/widget.h similarity index 100% rename from miniblink/widget.h rename to third/miniblink/widget.h diff --git a/miniblink/widget.ui b/third/miniblink/widget.ui similarity index 100% rename from miniblink/widget.ui rename to third/miniblink/widget.ui diff --git a/qwtdemo/examples/animation/animation.pro b/third/qwtdemo/examples/animation/animation.pro similarity index 100% rename from qwtdemo/examples/animation/animation.pro rename to third/qwtdemo/examples/animation/animation.pro diff --git a/qwtdemo/examples/animation/main.cpp b/third/qwtdemo/examples/animation/main.cpp similarity index 100% rename from qwtdemo/examples/animation/main.cpp rename to third/qwtdemo/examples/animation/main.cpp diff --git a/qwtdemo/examples/animation/plot.cpp b/third/qwtdemo/examples/animation/plot.cpp similarity index 100% rename from qwtdemo/examples/animation/plot.cpp rename to third/qwtdemo/examples/animation/plot.cpp diff --git a/qwtdemo/examples/animation/plot.h b/third/qwtdemo/examples/animation/plot.h similarity index 100% rename from qwtdemo/examples/animation/plot.h rename to third/qwtdemo/examples/animation/plot.h diff --git a/qwtdemo/examples/barchart/barchart.cpp b/third/qwtdemo/examples/barchart/barchart.cpp similarity index 100% rename from qwtdemo/examples/barchart/barchart.cpp rename to third/qwtdemo/examples/barchart/barchart.cpp diff --git a/qwtdemo/examples/barchart/barchart.h b/third/qwtdemo/examples/barchart/barchart.h similarity index 100% rename from qwtdemo/examples/barchart/barchart.h rename to third/qwtdemo/examples/barchart/barchart.h diff --git a/qwtdemo/examples/barchart/barchart.pro b/third/qwtdemo/examples/barchart/barchart.pro similarity index 100% rename from qwtdemo/examples/barchart/barchart.pro rename to third/qwtdemo/examples/barchart/barchart.pro diff --git a/qwtdemo/examples/barchart/main.cpp b/third/qwtdemo/examples/barchart/main.cpp similarity index 100% rename from qwtdemo/examples/barchart/main.cpp rename to third/qwtdemo/examples/barchart/main.cpp diff --git a/qwtdemo/examples/bode/bode.pro b/third/qwtdemo/examples/bode/bode.pro similarity index 100% rename from qwtdemo/examples/bode/bode.pro rename to third/qwtdemo/examples/bode/bode.pro diff --git a/qwtdemo/examples/bode/complexnumber.h b/third/qwtdemo/examples/bode/complexnumber.h similarity index 100% rename from qwtdemo/examples/bode/complexnumber.h rename to third/qwtdemo/examples/bode/complexnumber.h diff --git a/qwtdemo/examples/bode/main.cpp b/third/qwtdemo/examples/bode/main.cpp similarity index 100% rename from qwtdemo/examples/bode/main.cpp rename to third/qwtdemo/examples/bode/main.cpp diff --git a/qwtdemo/examples/bode/mainwindow.cpp b/third/qwtdemo/examples/bode/mainwindow.cpp similarity index 100% rename from qwtdemo/examples/bode/mainwindow.cpp rename to third/qwtdemo/examples/bode/mainwindow.cpp diff --git a/qwtdemo/examples/bode/mainwindow.h b/third/qwtdemo/examples/bode/mainwindow.h similarity index 100% rename from qwtdemo/examples/bode/mainwindow.h rename to third/qwtdemo/examples/bode/mainwindow.h diff --git a/qwtdemo/examples/bode/pixmaps.h b/third/qwtdemo/examples/bode/pixmaps.h similarity index 100% rename from qwtdemo/examples/bode/pixmaps.h rename to third/qwtdemo/examples/bode/pixmaps.h diff --git a/qwtdemo/examples/bode/plot.cpp b/third/qwtdemo/examples/bode/plot.cpp similarity index 100% rename from qwtdemo/examples/bode/plot.cpp rename to third/qwtdemo/examples/bode/plot.cpp diff --git a/qwtdemo/examples/bode/plot.h b/third/qwtdemo/examples/bode/plot.h similarity index 100% rename from qwtdemo/examples/bode/plot.h rename to third/qwtdemo/examples/bode/plot.h diff --git a/qwtdemo/examples/controls/controls.pro b/third/qwtdemo/examples/controls/controls.pro similarity index 100% rename from qwtdemo/examples/controls/controls.pro rename to third/qwtdemo/examples/controls/controls.pro diff --git a/qwtdemo/examples/controls/dialbox.cpp b/third/qwtdemo/examples/controls/dialbox.cpp similarity index 100% rename from qwtdemo/examples/controls/dialbox.cpp rename to third/qwtdemo/examples/controls/dialbox.cpp diff --git a/qwtdemo/examples/controls/dialbox.h b/third/qwtdemo/examples/controls/dialbox.h similarity index 100% rename from qwtdemo/examples/controls/dialbox.h rename to third/qwtdemo/examples/controls/dialbox.h diff --git a/qwtdemo/examples/controls/dialtab.cpp b/third/qwtdemo/examples/controls/dialtab.cpp similarity index 100% rename from qwtdemo/examples/controls/dialtab.cpp rename to third/qwtdemo/examples/controls/dialtab.cpp diff --git a/qwtdemo/examples/controls/dialtab.h b/third/qwtdemo/examples/controls/dialtab.h similarity index 100% rename from qwtdemo/examples/controls/dialtab.h rename to third/qwtdemo/examples/controls/dialtab.h diff --git a/qwtdemo/examples/controls/knobbox.cpp b/third/qwtdemo/examples/controls/knobbox.cpp similarity index 100% rename from qwtdemo/examples/controls/knobbox.cpp rename to third/qwtdemo/examples/controls/knobbox.cpp diff --git a/qwtdemo/examples/controls/knobbox.h b/third/qwtdemo/examples/controls/knobbox.h similarity index 100% rename from qwtdemo/examples/controls/knobbox.h rename to third/qwtdemo/examples/controls/knobbox.h diff --git a/qwtdemo/examples/controls/knobtab.cpp b/third/qwtdemo/examples/controls/knobtab.cpp similarity index 100% rename from qwtdemo/examples/controls/knobtab.cpp rename to third/qwtdemo/examples/controls/knobtab.cpp diff --git a/qwtdemo/examples/controls/knobtab.h b/third/qwtdemo/examples/controls/knobtab.h similarity index 100% rename from qwtdemo/examples/controls/knobtab.h rename to third/qwtdemo/examples/controls/knobtab.h diff --git a/qwtdemo/examples/controls/main.cpp b/third/qwtdemo/examples/controls/main.cpp similarity index 100% rename from qwtdemo/examples/controls/main.cpp rename to third/qwtdemo/examples/controls/main.cpp diff --git a/qwtdemo/examples/controls/sliderbox.cpp b/third/qwtdemo/examples/controls/sliderbox.cpp similarity index 100% rename from qwtdemo/examples/controls/sliderbox.cpp rename to third/qwtdemo/examples/controls/sliderbox.cpp diff --git a/qwtdemo/examples/controls/sliderbox.h b/third/qwtdemo/examples/controls/sliderbox.h similarity index 100% rename from qwtdemo/examples/controls/sliderbox.h rename to third/qwtdemo/examples/controls/sliderbox.h diff --git a/qwtdemo/examples/controls/slidertab.cpp b/third/qwtdemo/examples/controls/slidertab.cpp similarity index 100% rename from qwtdemo/examples/controls/slidertab.cpp rename to third/qwtdemo/examples/controls/slidertab.cpp diff --git a/qwtdemo/examples/controls/slidertab.h b/third/qwtdemo/examples/controls/slidertab.h similarity index 100% rename from qwtdemo/examples/controls/slidertab.h rename to third/qwtdemo/examples/controls/slidertab.h diff --git a/qwtdemo/examples/controls/wheelbox.cpp b/third/qwtdemo/examples/controls/wheelbox.cpp similarity index 100% rename from qwtdemo/examples/controls/wheelbox.cpp rename to third/qwtdemo/examples/controls/wheelbox.cpp diff --git a/qwtdemo/examples/controls/wheelbox.h b/third/qwtdemo/examples/controls/wheelbox.h similarity index 100% rename from qwtdemo/examples/controls/wheelbox.h rename to third/qwtdemo/examples/controls/wheelbox.h diff --git a/qwtdemo/examples/controls/wheeltab.cpp b/third/qwtdemo/examples/controls/wheeltab.cpp similarity index 100% rename from qwtdemo/examples/controls/wheeltab.cpp rename to third/qwtdemo/examples/controls/wheeltab.cpp diff --git a/qwtdemo/examples/controls/wheeltab.h b/third/qwtdemo/examples/controls/wheeltab.h similarity index 100% rename from qwtdemo/examples/controls/wheeltab.h rename to third/qwtdemo/examples/controls/wheeltab.h diff --git a/qwtdemo/examples/cpuplot/cpupiemarker.cpp b/third/qwtdemo/examples/cpuplot/cpupiemarker.cpp similarity index 100% rename from qwtdemo/examples/cpuplot/cpupiemarker.cpp rename to third/qwtdemo/examples/cpuplot/cpupiemarker.cpp diff --git a/qwtdemo/examples/cpuplot/cpupiemarker.h b/third/qwtdemo/examples/cpuplot/cpupiemarker.h similarity index 100% rename from qwtdemo/examples/cpuplot/cpupiemarker.h rename to third/qwtdemo/examples/cpuplot/cpupiemarker.h diff --git a/qwtdemo/examples/cpuplot/cpuplot.cpp b/third/qwtdemo/examples/cpuplot/cpuplot.cpp similarity index 100% rename from qwtdemo/examples/cpuplot/cpuplot.cpp rename to third/qwtdemo/examples/cpuplot/cpuplot.cpp diff --git a/qwtdemo/examples/cpuplot/cpuplot.h b/third/qwtdemo/examples/cpuplot/cpuplot.h similarity index 100% rename from qwtdemo/examples/cpuplot/cpuplot.h rename to third/qwtdemo/examples/cpuplot/cpuplot.h diff --git a/qwtdemo/examples/cpuplot/cpuplot.pro b/third/qwtdemo/examples/cpuplot/cpuplot.pro similarity index 100% rename from qwtdemo/examples/cpuplot/cpuplot.pro rename to third/qwtdemo/examples/cpuplot/cpuplot.pro diff --git a/qwtdemo/examples/cpuplot/cpustat.cpp b/third/qwtdemo/examples/cpuplot/cpustat.cpp similarity index 100% rename from qwtdemo/examples/cpuplot/cpustat.cpp rename to third/qwtdemo/examples/cpuplot/cpustat.cpp diff --git a/qwtdemo/examples/cpuplot/cpustat.h b/third/qwtdemo/examples/cpuplot/cpustat.h similarity index 100% rename from qwtdemo/examples/cpuplot/cpustat.h rename to third/qwtdemo/examples/cpuplot/cpustat.h diff --git a/qwtdemo/examples/curvdemo1/curvdemo1.cpp b/third/qwtdemo/examples/curvdemo1/curvdemo1.cpp similarity index 100% rename from qwtdemo/examples/curvdemo1/curvdemo1.cpp rename to third/qwtdemo/examples/curvdemo1/curvdemo1.cpp diff --git a/qwtdemo/examples/curvdemo1/curvdemo1.pro b/third/qwtdemo/examples/curvdemo1/curvdemo1.pro similarity index 100% rename from qwtdemo/examples/curvdemo1/curvdemo1.pro rename to third/qwtdemo/examples/curvdemo1/curvdemo1.pro diff --git a/qwtdemo/examples/dials/attitude_indicator.cpp b/third/qwtdemo/examples/dials/attitude_indicator.cpp similarity index 100% rename from qwtdemo/examples/dials/attitude_indicator.cpp rename to third/qwtdemo/examples/dials/attitude_indicator.cpp diff --git a/qwtdemo/examples/dials/attitude_indicator.h b/third/qwtdemo/examples/dials/attitude_indicator.h similarity index 100% rename from qwtdemo/examples/dials/attitude_indicator.h rename to third/qwtdemo/examples/dials/attitude_indicator.h diff --git a/qwtdemo/examples/dials/cockpit_grid.cpp b/third/qwtdemo/examples/dials/cockpit_grid.cpp similarity index 100% rename from qwtdemo/examples/dials/cockpit_grid.cpp rename to third/qwtdemo/examples/dials/cockpit_grid.cpp diff --git a/qwtdemo/examples/dials/cockpit_grid.h b/third/qwtdemo/examples/dials/cockpit_grid.h similarity index 100% rename from qwtdemo/examples/dials/cockpit_grid.h rename to third/qwtdemo/examples/dials/cockpit_grid.h diff --git a/qwtdemo/examples/dials/compass_grid.cpp b/third/qwtdemo/examples/dials/compass_grid.cpp similarity index 100% rename from qwtdemo/examples/dials/compass_grid.cpp rename to third/qwtdemo/examples/dials/compass_grid.cpp diff --git a/qwtdemo/examples/dials/compass_grid.h b/third/qwtdemo/examples/dials/compass_grid.h similarity index 100% rename from qwtdemo/examples/dials/compass_grid.h rename to third/qwtdemo/examples/dials/compass_grid.h diff --git a/qwtdemo/examples/dials/dials.cpp b/third/qwtdemo/examples/dials/dials.cpp similarity index 100% rename from qwtdemo/examples/dials/dials.cpp rename to third/qwtdemo/examples/dials/dials.cpp diff --git a/qwtdemo/examples/dials/dials.pro b/third/qwtdemo/examples/dials/dials.pro similarity index 100% rename from qwtdemo/examples/dials/dials.pro rename to third/qwtdemo/examples/dials/dials.pro diff --git a/qwtdemo/examples/dials/speedo_meter.cpp b/third/qwtdemo/examples/dials/speedo_meter.cpp similarity index 100% rename from qwtdemo/examples/dials/speedo_meter.cpp rename to third/qwtdemo/examples/dials/speedo_meter.cpp diff --git a/qwtdemo/examples/dials/speedo_meter.h b/third/qwtdemo/examples/dials/speedo_meter.h similarity index 100% rename from qwtdemo/examples/dials/speedo_meter.h rename to third/qwtdemo/examples/dials/speedo_meter.h diff --git a/qwtdemo/examples/distrowatch/barchart.cpp b/third/qwtdemo/examples/distrowatch/barchart.cpp similarity index 100% rename from qwtdemo/examples/distrowatch/barchart.cpp rename to third/qwtdemo/examples/distrowatch/barchart.cpp diff --git a/qwtdemo/examples/distrowatch/barchart.h b/third/qwtdemo/examples/distrowatch/barchart.h similarity index 100% rename from qwtdemo/examples/distrowatch/barchart.h rename to third/qwtdemo/examples/distrowatch/barchart.h diff --git a/qwtdemo/examples/distrowatch/distrowatch.pro b/third/qwtdemo/examples/distrowatch/distrowatch.pro similarity index 100% rename from qwtdemo/examples/distrowatch/distrowatch.pro rename to third/qwtdemo/examples/distrowatch/distrowatch.pro diff --git a/qwtdemo/examples/distrowatch/main.cpp b/third/qwtdemo/examples/distrowatch/main.cpp similarity index 100% rename from qwtdemo/examples/distrowatch/main.cpp rename to third/qwtdemo/examples/distrowatch/main.cpp diff --git a/qwtdemo/examples/event_filter/README b/third/qwtdemo/examples/event_filter/README similarity index 100% rename from qwtdemo/examples/event_filter/README rename to third/qwtdemo/examples/event_filter/README diff --git a/qwtdemo/examples/event_filter/canvaspicker.cpp b/third/qwtdemo/examples/event_filter/canvaspicker.cpp similarity index 100% rename from qwtdemo/examples/event_filter/canvaspicker.cpp rename to third/qwtdemo/examples/event_filter/canvaspicker.cpp diff --git a/qwtdemo/examples/event_filter/canvaspicker.h b/third/qwtdemo/examples/event_filter/canvaspicker.h similarity index 100% rename from qwtdemo/examples/event_filter/canvaspicker.h rename to third/qwtdemo/examples/event_filter/canvaspicker.h diff --git a/qwtdemo/examples/event_filter/colorbar.cpp b/third/qwtdemo/examples/event_filter/colorbar.cpp similarity index 100% rename from qwtdemo/examples/event_filter/colorbar.cpp rename to third/qwtdemo/examples/event_filter/colorbar.cpp diff --git a/qwtdemo/examples/event_filter/colorbar.h b/third/qwtdemo/examples/event_filter/colorbar.h similarity index 100% rename from qwtdemo/examples/event_filter/colorbar.h rename to third/qwtdemo/examples/event_filter/colorbar.h diff --git a/qwtdemo/examples/event_filter/event_filter.cpp b/third/qwtdemo/examples/event_filter/event_filter.cpp similarity index 100% rename from qwtdemo/examples/event_filter/event_filter.cpp rename to third/qwtdemo/examples/event_filter/event_filter.cpp diff --git a/qwtdemo/examples/event_filter/event_filter.pro b/third/qwtdemo/examples/event_filter/event_filter.pro similarity index 100% rename from qwtdemo/examples/event_filter/event_filter.pro rename to third/qwtdemo/examples/event_filter/event_filter.pro diff --git a/qwtdemo/examples/event_filter/plot.cpp b/third/qwtdemo/examples/event_filter/plot.cpp similarity index 100% rename from qwtdemo/examples/event_filter/plot.cpp rename to third/qwtdemo/examples/event_filter/plot.cpp diff --git a/qwtdemo/examples/event_filter/plot.h b/third/qwtdemo/examples/event_filter/plot.h similarity index 100% rename from qwtdemo/examples/event_filter/plot.h rename to third/qwtdemo/examples/event_filter/plot.h diff --git a/qwtdemo/examples/event_filter/scalepicker.cpp b/third/qwtdemo/examples/event_filter/scalepicker.cpp similarity index 100% rename from qwtdemo/examples/event_filter/scalepicker.cpp rename to third/qwtdemo/examples/event_filter/scalepicker.cpp diff --git a/qwtdemo/examples/event_filter/scalepicker.h b/third/qwtdemo/examples/event_filter/scalepicker.h similarity index 100% rename from qwtdemo/examples/event_filter/scalepicker.h rename to third/qwtdemo/examples/event_filter/scalepicker.h diff --git a/qwtdemo/examples/examples.pro b/third/qwtdemo/examples/examples.pro similarity index 100% rename from qwtdemo/examples/examples.pro rename to third/qwtdemo/examples/examples.pro diff --git a/qwtdemo/examples/friedberg/friedberg.pro b/third/qwtdemo/examples/friedberg/friedberg.pro similarity index 100% rename from qwtdemo/examples/friedberg/friedberg.pro rename to third/qwtdemo/examples/friedberg/friedberg.pro diff --git a/qwtdemo/examples/friedberg/friedberg2007.cpp b/third/qwtdemo/examples/friedberg/friedberg2007.cpp similarity index 100% rename from qwtdemo/examples/friedberg/friedberg2007.cpp rename to third/qwtdemo/examples/friedberg/friedberg2007.cpp diff --git a/qwtdemo/examples/friedberg/friedberg2007.h b/third/qwtdemo/examples/friedberg/friedberg2007.h similarity index 100% rename from qwtdemo/examples/friedberg/friedberg2007.h rename to third/qwtdemo/examples/friedberg/friedberg2007.h diff --git a/qwtdemo/examples/friedberg/main.cpp b/third/qwtdemo/examples/friedberg/main.cpp similarity index 100% rename from qwtdemo/examples/friedberg/main.cpp rename to third/qwtdemo/examples/friedberg/main.cpp diff --git a/qwtdemo/examples/friedberg/plot.cpp b/third/qwtdemo/examples/friedberg/plot.cpp similarity index 100% rename from qwtdemo/examples/friedberg/plot.cpp rename to third/qwtdemo/examples/friedberg/plot.cpp diff --git a/qwtdemo/examples/friedberg/plot.h b/third/qwtdemo/examples/friedberg/plot.h similarity index 100% rename from qwtdemo/examples/friedberg/plot.h rename to third/qwtdemo/examples/friedberg/plot.h diff --git a/qwtdemo/examples/itemeditor/editor.cpp b/third/qwtdemo/examples/itemeditor/editor.cpp similarity index 100% rename from qwtdemo/examples/itemeditor/editor.cpp rename to third/qwtdemo/examples/itemeditor/editor.cpp diff --git a/qwtdemo/examples/itemeditor/editor.h b/third/qwtdemo/examples/itemeditor/editor.h similarity index 100% rename from qwtdemo/examples/itemeditor/editor.h rename to third/qwtdemo/examples/itemeditor/editor.h diff --git a/qwtdemo/examples/itemeditor/itemeditor.pro b/third/qwtdemo/examples/itemeditor/itemeditor.pro similarity index 100% rename from qwtdemo/examples/itemeditor/itemeditor.pro rename to third/qwtdemo/examples/itemeditor/itemeditor.pro diff --git a/qwtdemo/examples/itemeditor/main.cpp b/third/qwtdemo/examples/itemeditor/main.cpp similarity index 100% rename from qwtdemo/examples/itemeditor/main.cpp rename to third/qwtdemo/examples/itemeditor/main.cpp diff --git a/qwtdemo/examples/itemeditor/plot.cpp b/third/qwtdemo/examples/itemeditor/plot.cpp similarity index 100% rename from qwtdemo/examples/itemeditor/plot.cpp rename to third/qwtdemo/examples/itemeditor/plot.cpp diff --git a/qwtdemo/examples/itemeditor/plot.h b/third/qwtdemo/examples/itemeditor/plot.h similarity index 100% rename from qwtdemo/examples/itemeditor/plot.h rename to third/qwtdemo/examples/itemeditor/plot.h diff --git a/qwtdemo/examples/itemeditor/shapefactory.cpp b/third/qwtdemo/examples/itemeditor/shapefactory.cpp similarity index 100% rename from qwtdemo/examples/itemeditor/shapefactory.cpp rename to third/qwtdemo/examples/itemeditor/shapefactory.cpp diff --git a/qwtdemo/examples/itemeditor/shapefactory.h b/third/qwtdemo/examples/itemeditor/shapefactory.h similarity index 100% rename from qwtdemo/examples/itemeditor/shapefactory.h rename to third/qwtdemo/examples/itemeditor/shapefactory.h diff --git a/qwtdemo/examples/legends/legends.pro b/third/qwtdemo/examples/legends/legends.pro similarity index 100% rename from qwtdemo/examples/legends/legends.pro rename to third/qwtdemo/examples/legends/legends.pro diff --git a/qwtdemo/examples/legends/main.cpp b/third/qwtdemo/examples/legends/main.cpp similarity index 100% rename from qwtdemo/examples/legends/main.cpp rename to third/qwtdemo/examples/legends/main.cpp diff --git a/qwtdemo/examples/legends/mainwindow.cpp b/third/qwtdemo/examples/legends/mainwindow.cpp similarity index 100% rename from qwtdemo/examples/legends/mainwindow.cpp rename to third/qwtdemo/examples/legends/mainwindow.cpp diff --git a/qwtdemo/examples/legends/mainwindow.h b/third/qwtdemo/examples/legends/mainwindow.h similarity index 100% rename from qwtdemo/examples/legends/mainwindow.h rename to third/qwtdemo/examples/legends/mainwindow.h diff --git a/qwtdemo/examples/legends/panel.cpp b/third/qwtdemo/examples/legends/panel.cpp similarity index 100% rename from qwtdemo/examples/legends/panel.cpp rename to third/qwtdemo/examples/legends/panel.cpp diff --git a/qwtdemo/examples/legends/panel.h b/third/qwtdemo/examples/legends/panel.h similarity index 100% rename from qwtdemo/examples/legends/panel.h rename to third/qwtdemo/examples/legends/panel.h diff --git a/qwtdemo/examples/legends/plot.cpp b/third/qwtdemo/examples/legends/plot.cpp similarity index 100% rename from qwtdemo/examples/legends/plot.cpp rename to third/qwtdemo/examples/legends/plot.cpp diff --git a/qwtdemo/examples/legends/plot.h b/third/qwtdemo/examples/legends/plot.h similarity index 100% rename from qwtdemo/examples/legends/plot.h rename to third/qwtdemo/examples/legends/plot.h diff --git a/qwtdemo/examples/legends/settings.h b/third/qwtdemo/examples/legends/settings.h similarity index 100% rename from qwtdemo/examples/legends/settings.h rename to third/qwtdemo/examples/legends/settings.h diff --git a/qwtdemo/examples/oscilloscope/curvedata.cpp b/third/qwtdemo/examples/oscilloscope/curvedata.cpp similarity index 100% rename from qwtdemo/examples/oscilloscope/curvedata.cpp rename to third/qwtdemo/examples/oscilloscope/curvedata.cpp diff --git a/qwtdemo/examples/oscilloscope/curvedata.h b/third/qwtdemo/examples/oscilloscope/curvedata.h similarity index 100% rename from qwtdemo/examples/oscilloscope/curvedata.h rename to third/qwtdemo/examples/oscilloscope/curvedata.h diff --git a/qwtdemo/examples/oscilloscope/knob.cpp b/third/qwtdemo/examples/oscilloscope/knob.cpp similarity index 100% rename from qwtdemo/examples/oscilloscope/knob.cpp rename to third/qwtdemo/examples/oscilloscope/knob.cpp diff --git a/qwtdemo/examples/oscilloscope/knob.h b/third/qwtdemo/examples/oscilloscope/knob.h similarity index 100% rename from qwtdemo/examples/oscilloscope/knob.h rename to third/qwtdemo/examples/oscilloscope/knob.h diff --git a/qwtdemo/examples/oscilloscope/main.cpp b/third/qwtdemo/examples/oscilloscope/main.cpp similarity index 100% rename from qwtdemo/examples/oscilloscope/main.cpp rename to third/qwtdemo/examples/oscilloscope/main.cpp diff --git a/qwtdemo/examples/oscilloscope/mainwindow.cpp b/third/qwtdemo/examples/oscilloscope/mainwindow.cpp similarity index 100% rename from qwtdemo/examples/oscilloscope/mainwindow.cpp rename to third/qwtdemo/examples/oscilloscope/mainwindow.cpp diff --git a/qwtdemo/examples/oscilloscope/mainwindow.h b/third/qwtdemo/examples/oscilloscope/mainwindow.h similarity index 100% rename from qwtdemo/examples/oscilloscope/mainwindow.h rename to third/qwtdemo/examples/oscilloscope/mainwindow.h diff --git a/qwtdemo/examples/oscilloscope/osci.css b/third/qwtdemo/examples/oscilloscope/osci.css similarity index 100% rename from qwtdemo/examples/oscilloscope/osci.css rename to third/qwtdemo/examples/oscilloscope/osci.css diff --git a/qwtdemo/examples/oscilloscope/oscilloscope.pro b/third/qwtdemo/examples/oscilloscope/oscilloscope.pro similarity index 100% rename from qwtdemo/examples/oscilloscope/oscilloscope.pro rename to third/qwtdemo/examples/oscilloscope/oscilloscope.pro diff --git a/qwtdemo/examples/oscilloscope/plot.cpp b/third/qwtdemo/examples/oscilloscope/plot.cpp similarity index 100% rename from qwtdemo/examples/oscilloscope/plot.cpp rename to third/qwtdemo/examples/oscilloscope/plot.cpp diff --git a/qwtdemo/examples/oscilloscope/plot.h b/third/qwtdemo/examples/oscilloscope/plot.h similarity index 100% rename from qwtdemo/examples/oscilloscope/plot.h rename to third/qwtdemo/examples/oscilloscope/plot.h diff --git a/qwtdemo/examples/oscilloscope/samplingthread.cpp b/third/qwtdemo/examples/oscilloscope/samplingthread.cpp similarity index 100% rename from qwtdemo/examples/oscilloscope/samplingthread.cpp rename to third/qwtdemo/examples/oscilloscope/samplingthread.cpp diff --git a/qwtdemo/examples/oscilloscope/samplingthread.h b/third/qwtdemo/examples/oscilloscope/samplingthread.h similarity index 100% rename from qwtdemo/examples/oscilloscope/samplingthread.h rename to third/qwtdemo/examples/oscilloscope/samplingthread.h diff --git a/qwtdemo/examples/oscilloscope/signaldata.cpp b/third/qwtdemo/examples/oscilloscope/signaldata.cpp similarity index 100% rename from qwtdemo/examples/oscilloscope/signaldata.cpp rename to third/qwtdemo/examples/oscilloscope/signaldata.cpp diff --git a/qwtdemo/examples/oscilloscope/signaldata.h b/third/qwtdemo/examples/oscilloscope/signaldata.h similarity index 100% rename from qwtdemo/examples/oscilloscope/signaldata.h rename to third/qwtdemo/examples/oscilloscope/signaldata.h diff --git a/qwtdemo/examples/oscilloscope/wheelbox.cpp b/third/qwtdemo/examples/oscilloscope/wheelbox.cpp similarity index 100% rename from qwtdemo/examples/oscilloscope/wheelbox.cpp rename to third/qwtdemo/examples/oscilloscope/wheelbox.cpp diff --git a/qwtdemo/examples/oscilloscope/wheelbox.h b/third/qwtdemo/examples/oscilloscope/wheelbox.h similarity index 100% rename from qwtdemo/examples/oscilloscope/wheelbox.h rename to third/qwtdemo/examples/oscilloscope/wheelbox.h diff --git a/qwtdemo/examples/radio/ampfrm.cpp b/third/qwtdemo/examples/radio/ampfrm.cpp similarity index 100% rename from qwtdemo/examples/radio/ampfrm.cpp rename to third/qwtdemo/examples/radio/ampfrm.cpp diff --git a/qwtdemo/examples/radio/ampfrm.h b/third/qwtdemo/examples/radio/ampfrm.h similarity index 100% rename from qwtdemo/examples/radio/ampfrm.h rename to third/qwtdemo/examples/radio/ampfrm.h diff --git a/qwtdemo/examples/radio/mainwindow.cpp b/third/qwtdemo/examples/radio/mainwindow.cpp similarity index 100% rename from qwtdemo/examples/radio/mainwindow.cpp rename to third/qwtdemo/examples/radio/mainwindow.cpp diff --git a/qwtdemo/examples/radio/mainwindow.h b/third/qwtdemo/examples/radio/mainwindow.h similarity index 100% rename from qwtdemo/examples/radio/mainwindow.h rename to third/qwtdemo/examples/radio/mainwindow.h diff --git a/qwtdemo/examples/radio/radio.cpp b/third/qwtdemo/examples/radio/radio.cpp similarity index 100% rename from qwtdemo/examples/radio/radio.cpp rename to third/qwtdemo/examples/radio/radio.cpp diff --git a/qwtdemo/examples/radio/radio.pro b/third/qwtdemo/examples/radio/radio.pro similarity index 100% rename from qwtdemo/examples/radio/radio.pro rename to third/qwtdemo/examples/radio/radio.pro diff --git a/qwtdemo/examples/radio/tunerfrm.cpp b/third/qwtdemo/examples/radio/tunerfrm.cpp similarity index 100% rename from qwtdemo/examples/radio/tunerfrm.cpp rename to third/qwtdemo/examples/radio/tunerfrm.cpp diff --git a/qwtdemo/examples/radio/tunerfrm.h b/third/qwtdemo/examples/radio/tunerfrm.h similarity index 100% rename from qwtdemo/examples/radio/tunerfrm.h rename to third/qwtdemo/examples/radio/tunerfrm.h diff --git a/qwtdemo/examples/rasterview/main.cpp b/third/qwtdemo/examples/rasterview/main.cpp similarity index 100% rename from qwtdemo/examples/rasterview/main.cpp rename to third/qwtdemo/examples/rasterview/main.cpp diff --git a/qwtdemo/examples/rasterview/plot.cpp b/third/qwtdemo/examples/rasterview/plot.cpp similarity index 100% rename from qwtdemo/examples/rasterview/plot.cpp rename to third/qwtdemo/examples/rasterview/plot.cpp diff --git a/qwtdemo/examples/rasterview/plot.h b/third/qwtdemo/examples/rasterview/plot.h similarity index 100% rename from qwtdemo/examples/rasterview/plot.h rename to third/qwtdemo/examples/rasterview/plot.h diff --git a/qwtdemo/examples/rasterview/rasterview.pro b/third/qwtdemo/examples/rasterview/rasterview.pro similarity index 100% rename from qwtdemo/examples/rasterview/rasterview.pro rename to third/qwtdemo/examples/rasterview/rasterview.pro diff --git a/qwtdemo/examples/realtime/README b/third/qwtdemo/examples/realtime/README similarity index 100% rename from qwtdemo/examples/realtime/README rename to third/qwtdemo/examples/realtime/README diff --git a/qwtdemo/examples/realtime/clear.xpm b/third/qwtdemo/examples/realtime/clear.xpm similarity index 100% rename from qwtdemo/examples/realtime/clear.xpm rename to third/qwtdemo/examples/realtime/clear.xpm diff --git a/qwtdemo/examples/realtime/incrementalplot.cpp b/third/qwtdemo/examples/realtime/incrementalplot.cpp similarity index 100% rename from qwtdemo/examples/realtime/incrementalplot.cpp rename to third/qwtdemo/examples/realtime/incrementalplot.cpp diff --git a/qwtdemo/examples/realtime/incrementalplot.h b/third/qwtdemo/examples/realtime/incrementalplot.h similarity index 100% rename from qwtdemo/examples/realtime/incrementalplot.h rename to third/qwtdemo/examples/realtime/incrementalplot.h diff --git a/qwtdemo/examples/realtime/main.cpp b/third/qwtdemo/examples/realtime/main.cpp similarity index 100% rename from qwtdemo/examples/realtime/main.cpp rename to third/qwtdemo/examples/realtime/main.cpp diff --git a/qwtdemo/examples/realtime/mainwindow.cpp b/third/qwtdemo/examples/realtime/mainwindow.cpp similarity index 100% rename from qwtdemo/examples/realtime/mainwindow.cpp rename to third/qwtdemo/examples/realtime/mainwindow.cpp diff --git a/qwtdemo/examples/realtime/mainwindow.h b/third/qwtdemo/examples/realtime/mainwindow.h similarity index 100% rename from qwtdemo/examples/realtime/mainwindow.h rename to third/qwtdemo/examples/realtime/mainwindow.h diff --git a/qwtdemo/examples/realtime/randomplot.cpp b/third/qwtdemo/examples/realtime/randomplot.cpp similarity index 100% rename from qwtdemo/examples/realtime/randomplot.cpp rename to third/qwtdemo/examples/realtime/randomplot.cpp diff --git a/qwtdemo/examples/realtime/randomplot.h b/third/qwtdemo/examples/realtime/randomplot.h similarity index 100% rename from qwtdemo/examples/realtime/randomplot.h rename to third/qwtdemo/examples/realtime/randomplot.h diff --git a/qwtdemo/examples/realtime/realtime.pro b/third/qwtdemo/examples/realtime/realtime.pro similarity index 100% rename from qwtdemo/examples/realtime/realtime.pro rename to third/qwtdemo/examples/realtime/realtime.pro diff --git a/qwtdemo/examples/realtime/scrollbar.cpp b/third/qwtdemo/examples/realtime/scrollbar.cpp similarity index 100% rename from qwtdemo/examples/realtime/scrollbar.cpp rename to third/qwtdemo/examples/realtime/scrollbar.cpp diff --git a/qwtdemo/examples/realtime/scrollbar.h b/third/qwtdemo/examples/realtime/scrollbar.h similarity index 100% rename from qwtdemo/examples/realtime/scrollbar.h rename to third/qwtdemo/examples/realtime/scrollbar.h diff --git a/qwtdemo/examples/realtime/scrollzoomer.cpp b/third/qwtdemo/examples/realtime/scrollzoomer.cpp similarity index 100% rename from qwtdemo/examples/realtime/scrollzoomer.cpp rename to third/qwtdemo/examples/realtime/scrollzoomer.cpp diff --git a/qwtdemo/examples/realtime/scrollzoomer.h b/third/qwtdemo/examples/realtime/scrollzoomer.h similarity index 100% rename from qwtdemo/examples/realtime/scrollzoomer.h rename to third/qwtdemo/examples/realtime/scrollzoomer.h diff --git a/qwtdemo/examples/realtime/start.xpm b/third/qwtdemo/examples/realtime/start.xpm similarity index 100% rename from qwtdemo/examples/realtime/start.xpm rename to third/qwtdemo/examples/realtime/start.xpm diff --git a/qwtdemo/examples/refreshtest/circularbuffer.cpp b/third/qwtdemo/examples/refreshtest/circularbuffer.cpp similarity index 100% rename from qwtdemo/examples/refreshtest/circularbuffer.cpp rename to third/qwtdemo/examples/refreshtest/circularbuffer.cpp diff --git a/qwtdemo/examples/refreshtest/circularbuffer.h b/third/qwtdemo/examples/refreshtest/circularbuffer.h similarity index 100% rename from qwtdemo/examples/refreshtest/circularbuffer.h rename to third/qwtdemo/examples/refreshtest/circularbuffer.h diff --git a/qwtdemo/examples/refreshtest/main.cpp b/third/qwtdemo/examples/refreshtest/main.cpp similarity index 100% rename from qwtdemo/examples/refreshtest/main.cpp rename to third/qwtdemo/examples/refreshtest/main.cpp diff --git a/qwtdemo/examples/refreshtest/mainwindow.cpp b/third/qwtdemo/examples/refreshtest/mainwindow.cpp similarity index 100% rename from qwtdemo/examples/refreshtest/mainwindow.cpp rename to third/qwtdemo/examples/refreshtest/mainwindow.cpp diff --git a/qwtdemo/examples/refreshtest/mainwindow.h b/third/qwtdemo/examples/refreshtest/mainwindow.h similarity index 100% rename from qwtdemo/examples/refreshtest/mainwindow.h rename to third/qwtdemo/examples/refreshtest/mainwindow.h diff --git a/qwtdemo/examples/refreshtest/panel.cpp b/third/qwtdemo/examples/refreshtest/panel.cpp similarity index 100% rename from qwtdemo/examples/refreshtest/panel.cpp rename to third/qwtdemo/examples/refreshtest/panel.cpp diff --git a/qwtdemo/examples/refreshtest/panel.h b/third/qwtdemo/examples/refreshtest/panel.h similarity index 100% rename from qwtdemo/examples/refreshtest/panel.h rename to third/qwtdemo/examples/refreshtest/panel.h diff --git a/qwtdemo/examples/refreshtest/plot.cpp b/third/qwtdemo/examples/refreshtest/plot.cpp similarity index 100% rename from qwtdemo/examples/refreshtest/plot.cpp rename to third/qwtdemo/examples/refreshtest/plot.cpp diff --git a/qwtdemo/examples/refreshtest/plot.h b/third/qwtdemo/examples/refreshtest/plot.h similarity index 100% rename from qwtdemo/examples/refreshtest/plot.h rename to third/qwtdemo/examples/refreshtest/plot.h diff --git a/qwtdemo/examples/refreshtest/refreshtest.pro b/third/qwtdemo/examples/refreshtest/refreshtest.pro similarity index 100% rename from qwtdemo/examples/refreshtest/refreshtest.pro rename to third/qwtdemo/examples/refreshtest/refreshtest.pro diff --git a/qwtdemo/examples/refreshtest/settings.h b/third/qwtdemo/examples/refreshtest/settings.h similarity index 100% rename from qwtdemo/examples/refreshtest/settings.h rename to third/qwtdemo/examples/refreshtest/settings.h diff --git a/qwtdemo/examples/scatterplot/main.cpp b/third/qwtdemo/examples/scatterplot/main.cpp similarity index 100% rename from qwtdemo/examples/scatterplot/main.cpp rename to third/qwtdemo/examples/scatterplot/main.cpp diff --git a/qwtdemo/examples/scatterplot/mainwindow.cpp b/third/qwtdemo/examples/scatterplot/mainwindow.cpp similarity index 100% rename from qwtdemo/examples/scatterplot/mainwindow.cpp rename to third/qwtdemo/examples/scatterplot/mainwindow.cpp diff --git a/qwtdemo/examples/scatterplot/mainwindow.h b/third/qwtdemo/examples/scatterplot/mainwindow.h similarity index 100% rename from qwtdemo/examples/scatterplot/mainwindow.h rename to third/qwtdemo/examples/scatterplot/mainwindow.h diff --git a/qwtdemo/examples/scatterplot/plot.cpp b/third/qwtdemo/examples/scatterplot/plot.cpp similarity index 100% rename from qwtdemo/examples/scatterplot/plot.cpp rename to third/qwtdemo/examples/scatterplot/plot.cpp diff --git a/qwtdemo/examples/scatterplot/plot.h b/third/qwtdemo/examples/scatterplot/plot.h similarity index 100% rename from qwtdemo/examples/scatterplot/plot.h rename to third/qwtdemo/examples/scatterplot/plot.h diff --git a/qwtdemo/examples/scatterplot/scatterplot.pro b/third/qwtdemo/examples/scatterplot/scatterplot.pro similarity index 100% rename from qwtdemo/examples/scatterplot/scatterplot.pro rename to third/qwtdemo/examples/scatterplot/scatterplot.pro diff --git a/qwtdemo/examples/simpleplot/simpleplot.cpp b/third/qwtdemo/examples/simpleplot/simpleplot.cpp similarity index 100% rename from qwtdemo/examples/simpleplot/simpleplot.cpp rename to third/qwtdemo/examples/simpleplot/simpleplot.cpp diff --git a/qwtdemo/examples/simpleplot/simpleplot.pro b/third/qwtdemo/examples/simpleplot/simpleplot.pro similarity index 100% rename from qwtdemo/examples/simpleplot/simpleplot.pro rename to third/qwtdemo/examples/simpleplot/simpleplot.pro diff --git a/qwtdemo/examples/sinusplot/sinusplot.cpp b/third/qwtdemo/examples/sinusplot/sinusplot.cpp similarity index 100% rename from qwtdemo/examples/sinusplot/sinusplot.cpp rename to third/qwtdemo/examples/sinusplot/sinusplot.cpp diff --git a/qwtdemo/examples/sinusplot/sinusplot.pro b/third/qwtdemo/examples/sinusplot/sinusplot.pro similarity index 100% rename from qwtdemo/examples/sinusplot/sinusplot.pro rename to third/qwtdemo/examples/sinusplot/sinusplot.pro diff --git a/qwtdemo/examples/spectrogram/main.cpp b/third/qwtdemo/examples/spectrogram/main.cpp similarity index 100% rename from qwtdemo/examples/spectrogram/main.cpp rename to third/qwtdemo/examples/spectrogram/main.cpp diff --git a/qwtdemo/examples/spectrogram/plot.cpp b/third/qwtdemo/examples/spectrogram/plot.cpp similarity index 100% rename from qwtdemo/examples/spectrogram/plot.cpp rename to third/qwtdemo/examples/spectrogram/plot.cpp diff --git a/qwtdemo/examples/spectrogram/plot.h b/third/qwtdemo/examples/spectrogram/plot.h similarity index 100% rename from qwtdemo/examples/spectrogram/plot.h rename to third/qwtdemo/examples/spectrogram/plot.h diff --git a/qwtdemo/examples/spectrogram/spectrogram.pro b/third/qwtdemo/examples/spectrogram/spectrogram.pro similarity index 100% rename from qwtdemo/examples/spectrogram/spectrogram.pro rename to third/qwtdemo/examples/spectrogram/spectrogram.pro diff --git a/qwtdemo/examples/stockchart/griditem.cpp b/third/qwtdemo/examples/stockchart/griditem.cpp similarity index 100% rename from qwtdemo/examples/stockchart/griditem.cpp rename to third/qwtdemo/examples/stockchart/griditem.cpp diff --git a/qwtdemo/examples/stockchart/griditem.h b/third/qwtdemo/examples/stockchart/griditem.h similarity index 100% rename from qwtdemo/examples/stockchart/griditem.h rename to third/qwtdemo/examples/stockchart/griditem.h diff --git a/qwtdemo/examples/stockchart/legend.cpp b/third/qwtdemo/examples/stockchart/legend.cpp similarity index 100% rename from qwtdemo/examples/stockchart/legend.cpp rename to third/qwtdemo/examples/stockchart/legend.cpp diff --git a/qwtdemo/examples/stockchart/legend.h b/third/qwtdemo/examples/stockchart/legend.h similarity index 100% rename from qwtdemo/examples/stockchart/legend.h rename to third/qwtdemo/examples/stockchart/legend.h diff --git a/qwtdemo/examples/stockchart/main.cpp b/third/qwtdemo/examples/stockchart/main.cpp similarity index 100% rename from qwtdemo/examples/stockchart/main.cpp rename to third/qwtdemo/examples/stockchart/main.cpp diff --git a/qwtdemo/examples/stockchart/plot.cpp b/third/qwtdemo/examples/stockchart/plot.cpp similarity index 100% rename from qwtdemo/examples/stockchart/plot.cpp rename to third/qwtdemo/examples/stockchart/plot.cpp diff --git a/qwtdemo/examples/stockchart/plot.h b/third/qwtdemo/examples/stockchart/plot.h similarity index 100% rename from qwtdemo/examples/stockchart/plot.h rename to third/qwtdemo/examples/stockchart/plot.h diff --git a/qwtdemo/examples/stockchart/quotefactory.cpp b/third/qwtdemo/examples/stockchart/quotefactory.cpp similarity index 100% rename from qwtdemo/examples/stockchart/quotefactory.cpp rename to third/qwtdemo/examples/stockchart/quotefactory.cpp diff --git a/qwtdemo/examples/stockchart/quotefactory.h b/third/qwtdemo/examples/stockchart/quotefactory.h similarity index 100% rename from qwtdemo/examples/stockchart/quotefactory.h rename to third/qwtdemo/examples/stockchart/quotefactory.h diff --git a/qwtdemo/examples/stockchart/stockchart.pro b/third/qwtdemo/examples/stockchart/stockchart.pro similarity index 100% rename from qwtdemo/examples/stockchart/stockchart.pro rename to third/qwtdemo/examples/stockchart/stockchart.pro diff --git a/qwtdemo/examples/stylesheets/blue.css b/third/qwtdemo/examples/stylesheets/blue.css similarity index 100% rename from qwtdemo/examples/stylesheets/blue.css rename to third/qwtdemo/examples/stylesheets/blue.css diff --git a/qwtdemo/examples/stylesheets/choco.css b/third/qwtdemo/examples/stylesheets/choco.css similarity index 100% rename from qwtdemo/examples/stylesheets/choco.css rename to third/qwtdemo/examples/stylesheets/choco.css diff --git a/qwtdemo/examples/stylesheets/oily.css b/third/qwtdemo/examples/stylesheets/oily.css similarity index 100% rename from qwtdemo/examples/stylesheets/oily.css rename to third/qwtdemo/examples/stylesheets/oily.css diff --git a/qwtdemo/examples/stylesheets/rosy.css b/third/qwtdemo/examples/stylesheets/rosy.css similarity index 100% rename from qwtdemo/examples/stylesheets/rosy.css rename to third/qwtdemo/examples/stylesheets/rosy.css diff --git a/qwtdemo/examples/sysinfo/sysinfo.cpp b/third/qwtdemo/examples/sysinfo/sysinfo.cpp similarity index 100% rename from qwtdemo/examples/sysinfo/sysinfo.cpp rename to third/qwtdemo/examples/sysinfo/sysinfo.cpp diff --git a/qwtdemo/examples/sysinfo/sysinfo.pro b/third/qwtdemo/examples/sysinfo/sysinfo.pro similarity index 100% rename from qwtdemo/examples/sysinfo/sysinfo.pro rename to third/qwtdemo/examples/sysinfo/sysinfo.pro diff --git a/qwtdemo/examples/tvplot/main.cpp b/third/qwtdemo/examples/tvplot/main.cpp similarity index 100% rename from qwtdemo/examples/tvplot/main.cpp rename to third/qwtdemo/examples/tvplot/main.cpp diff --git a/qwtdemo/examples/tvplot/tvplot.cpp b/third/qwtdemo/examples/tvplot/tvplot.cpp similarity index 100% rename from qwtdemo/examples/tvplot/tvplot.cpp rename to third/qwtdemo/examples/tvplot/tvplot.cpp diff --git a/qwtdemo/examples/tvplot/tvplot.h b/third/qwtdemo/examples/tvplot/tvplot.h similarity index 100% rename from qwtdemo/examples/tvplot/tvplot.h rename to third/qwtdemo/examples/tvplot/tvplot.h diff --git a/qwtdemo/examples/tvplot/tvplot.pro b/third/qwtdemo/examples/tvplot/tvplot.pro similarity index 100% rename from qwtdemo/examples/tvplot/tvplot.pro rename to third/qwtdemo/examples/tvplot/tvplot.pro diff --git a/qwtdemo/frmmain.cpp b/third/qwtdemo/frmmain.cpp similarity index 100% rename from qwtdemo/frmmain.cpp rename to third/qwtdemo/frmmain.cpp diff --git a/qwtdemo/frmmain.h b/third/qwtdemo/frmmain.h similarity index 100% rename from qwtdemo/frmmain.h rename to third/qwtdemo/frmmain.h diff --git a/qwtdemo/frmmain.ui b/third/qwtdemo/frmmain.ui similarity index 100% rename from qwtdemo/frmmain.ui rename to third/qwtdemo/frmmain.ui diff --git a/qwtdemo/main.cpp b/third/qwtdemo/main.cpp similarity index 100% rename from qwtdemo/main.cpp rename to third/qwtdemo/main.cpp diff --git a/qwtdemo/qwtdemo.pro b/third/qwtdemo/qwtdemo.pro similarity index 75% rename from qwtdemo/qwtdemo.pro rename to third/qwtdemo/qwtdemo.pro index 3ab4645..51367e8 100644 --- a/qwtdemo/qwtdemo.pro +++ b/third/qwtdemo/qwtdemo.pro @@ -8,6 +8,6 @@ SOURCES += frmmain.cpp FORMS += frmmain.ui HEADERS += frmmain.h -include ($$PWD/qwt/qwt.pri) INCLUDEPATH += $$PWD -INCLUDEPATH += $$PWD/qwt +INCLUDEPATH += $$PWD/../3rd_qwt +include ($$PWD/../3rd_qwt/3rd_qwt.pri) diff --git a/shortcut/frmshortcut.cpp b/third/shortcut/frmshortcut.cpp similarity index 100% rename from shortcut/frmshortcut.cpp rename to third/shortcut/frmshortcut.cpp diff --git a/shortcut/frmshortcut.h b/third/shortcut/frmshortcut.h similarity index 100% rename from shortcut/frmshortcut.h rename to third/shortcut/frmshortcut.h diff --git a/shortcut/frmshortcut.ui b/third/shortcut/frmshortcut.ui similarity index 100% rename from shortcut/frmshortcut.ui rename to third/shortcut/frmshortcut.ui diff --git a/shortcut/main.cpp b/third/shortcut/main.cpp similarity index 100% rename from shortcut/main.cpp rename to third/shortcut/main.cpp diff --git a/shortcut/shortcut.pro b/third/shortcut/shortcut.pro similarity index 100% rename from shortcut/shortcut.pro rename to third/shortcut/shortcut.pro diff --git a/third/third.pro b/third/third.pro new file mode 100644 index 0000000..deeee15 --- /dev/null +++ b/third/third.pro @@ -0,0 +1,23 @@ +TEMPLATE = subdirs +SUBDIRS += hotkey +SUBDIRS += qwtdemo +SUBDIRS += shortcut + +#这个项目依赖QtDesigner模块,一般在arm上默认没有这个模块需要自行编译 +#所以arm上如果没有QtDesigner模块不要加载下面这个子项目 + +lessThan(QT_MAJOR_VERSION, 5) { +SUBDIRS += designer +SUBDIRS -= hotkey +} + +#Qt6有些项目还不支持 +greaterThan(QT_MAJOR_VERSION, 5) { +SUBDIRS -= qwtdemo +SUBDIRS -= hotkey +SUBDIRS -= shortcut +} + +win32 { +SUBDIRS += miniblink +} diff --git a/tool/0snap/base64helper.jpg b/tool/0snap/base64helper.jpg new file mode 100644 index 0000000..538af2e Binary files /dev/null and b/tool/0snap/base64helper.jpg differ diff --git a/tool/0snap/comtool.jpg b/tool/0snap/comtool.jpg new file mode 100644 index 0000000..9ae8ca3 Binary files /dev/null and b/tool/0snap/comtool.jpg differ diff --git a/tool/0snap/countcode.jpg b/tool/0snap/countcode.jpg new file mode 100644 index 0000000..4b7ca82 Binary files /dev/null and b/tool/0snap/countcode.jpg differ diff --git a/tool/0snap/emailtool.jpg b/tool/0snap/emailtool.jpg new file mode 100644 index 0000000..f2f513c Binary files /dev/null and b/tool/0snap/emailtool.jpg differ diff --git a/tool/0snap/keydemo.jpg b/tool/0snap/keydemo.jpg new file mode 100644 index 0000000..a5ebc44 Binary files /dev/null and b/tool/0snap/keydemo.jpg differ diff --git a/tool/0snap/keytool.jpg b/tool/0snap/keytool.jpg new file mode 100644 index 0000000..651267b Binary files /dev/null and b/tool/0snap/keytool.jpg differ diff --git a/tool/0snap/livedemo.jpg b/tool/0snap/livedemo.jpg new file mode 100644 index 0000000..613dc73 Binary files /dev/null and b/tool/0snap/livedemo.jpg differ diff --git a/tool/0snap/livetool.jpg b/tool/0snap/livetool.jpg new file mode 100644 index 0000000..012cfb2 Binary files /dev/null and b/tool/0snap/livetool.jpg differ diff --git a/tool/0snap/moneytool.jpg b/tool/0snap/moneytool.jpg new file mode 100644 index 0000000..27a6a8d Binary files /dev/null and b/tool/0snap/moneytool.jpg differ diff --git a/tool/0snap/netserver.jpg b/tool/0snap/netserver.jpg new file mode 100644 index 0000000..55a2ebe Binary files /dev/null and b/tool/0snap/netserver.jpg differ diff --git a/tool/0snap/netserver2.jpg b/tool/0snap/netserver2.jpg new file mode 100644 index 0000000..711ebbc Binary files /dev/null and b/tool/0snap/netserver2.jpg differ diff --git a/tool/0snap/nettool.jpg b/tool/0snap/nettool.jpg new file mode 100644 index 0000000..3cce979 Binary files /dev/null and b/tool/0snap/nettool.jpg differ diff --git a/tool/0snap/pngtool.jpg b/tool/0snap/pngtool.jpg new file mode 100644 index 0000000..e922d21 Binary files /dev/null and b/tool/0snap/pngtool.jpg differ diff --git a/3rd_qextserialport/3rd_qextserialport.pri b/tool/3rd_qextserialport/3rd_qextserialport.pri similarity index 100% rename from 3rd_qextserialport/3rd_qextserialport.pri rename to tool/3rd_qextserialport/3rd_qextserialport.pri diff --git a/3rd_qextserialport/qextserialport.cpp b/tool/3rd_qextserialport/qextserialport.cpp similarity index 100% rename from 3rd_qextserialport/qextserialport.cpp rename to tool/3rd_qextserialport/qextserialport.cpp diff --git a/3rd_qextserialport/qextserialport.h b/tool/3rd_qextserialport/qextserialport.h similarity index 100% rename from 3rd_qextserialport/qextserialport.h rename to tool/3rd_qextserialport/qextserialport.h diff --git a/3rd_qextserialport/qextserialport_global.h b/tool/3rd_qextserialport/qextserialport_global.h similarity index 100% rename from 3rd_qextserialport/qextserialport_global.h rename to tool/3rd_qextserialport/qextserialport_global.h diff --git a/3rd_qextserialport/qextserialport_p.h b/tool/3rd_qextserialport/qextserialport_p.h similarity index 100% rename from 3rd_qextserialport/qextserialport_p.h rename to tool/3rd_qextserialport/qextserialport_p.h diff --git a/3rd_qextserialport/qextserialport_unix.cpp b/tool/3rd_qextserialport/qextserialport_unix.cpp similarity index 100% rename from 3rd_qextserialport/qextserialport_unix.cpp rename to tool/3rd_qextserialport/qextserialport_unix.cpp diff --git a/3rd_qextserialport/qextserialport_win.cpp b/tool/3rd_qextserialport/qextserialport_win.cpp similarity index 100% rename from 3rd_qextserialport/qextserialport_win.cpp rename to tool/3rd_qextserialport/qextserialport_win.cpp diff --git a/3rd_smtpclient/3rd_smtpclient.pri b/tool/3rd_smtpclient/3rd_smtpclient.pri similarity index 100% rename from 3rd_smtpclient/3rd_smtpclient.pri rename to tool/3rd_smtpclient/3rd_smtpclient.pri diff --git a/3rd_smtpclient/emailaddress.cpp b/tool/3rd_smtpclient/emailaddress.cpp similarity index 100% rename from 3rd_smtpclient/emailaddress.cpp rename to tool/3rd_smtpclient/emailaddress.cpp diff --git a/3rd_smtpclient/emailaddress.h b/tool/3rd_smtpclient/emailaddress.h similarity index 100% rename from 3rd_smtpclient/emailaddress.h rename to tool/3rd_smtpclient/emailaddress.h diff --git a/3rd_smtpclient/mimeattachment.cpp b/tool/3rd_smtpclient/mimeattachment.cpp similarity index 100% rename from 3rd_smtpclient/mimeattachment.cpp rename to tool/3rd_smtpclient/mimeattachment.cpp diff --git a/3rd_smtpclient/mimeattachment.h b/tool/3rd_smtpclient/mimeattachment.h similarity index 100% rename from 3rd_smtpclient/mimeattachment.h rename to tool/3rd_smtpclient/mimeattachment.h diff --git a/3rd_smtpclient/mimecontentformatter.cpp b/tool/3rd_smtpclient/mimecontentformatter.cpp similarity index 100% rename from 3rd_smtpclient/mimecontentformatter.cpp rename to tool/3rd_smtpclient/mimecontentformatter.cpp diff --git a/3rd_smtpclient/mimecontentformatter.h b/tool/3rd_smtpclient/mimecontentformatter.h similarity index 100% rename from 3rd_smtpclient/mimecontentformatter.h rename to tool/3rd_smtpclient/mimecontentformatter.h diff --git a/3rd_smtpclient/mimefile.cpp b/tool/3rd_smtpclient/mimefile.cpp similarity index 100% rename from 3rd_smtpclient/mimefile.cpp rename to tool/3rd_smtpclient/mimefile.cpp diff --git a/3rd_smtpclient/mimefile.h b/tool/3rd_smtpclient/mimefile.h similarity index 100% rename from 3rd_smtpclient/mimefile.h rename to tool/3rd_smtpclient/mimefile.h diff --git a/3rd_smtpclient/mimehtml.cpp b/tool/3rd_smtpclient/mimehtml.cpp similarity index 100% rename from 3rd_smtpclient/mimehtml.cpp rename to tool/3rd_smtpclient/mimehtml.cpp diff --git a/3rd_smtpclient/mimehtml.h b/tool/3rd_smtpclient/mimehtml.h similarity index 100% rename from 3rd_smtpclient/mimehtml.h rename to tool/3rd_smtpclient/mimehtml.h diff --git a/3rd_smtpclient/mimeinlinefile.cpp b/tool/3rd_smtpclient/mimeinlinefile.cpp similarity index 100% rename from 3rd_smtpclient/mimeinlinefile.cpp rename to tool/3rd_smtpclient/mimeinlinefile.cpp diff --git a/3rd_smtpclient/mimeinlinefile.h b/tool/3rd_smtpclient/mimeinlinefile.h similarity index 100% rename from 3rd_smtpclient/mimeinlinefile.h rename to tool/3rd_smtpclient/mimeinlinefile.h diff --git a/3rd_smtpclient/mimemessage.cpp b/tool/3rd_smtpclient/mimemessage.cpp similarity index 100% rename from 3rd_smtpclient/mimemessage.cpp rename to tool/3rd_smtpclient/mimemessage.cpp diff --git a/3rd_smtpclient/mimemessage.h b/tool/3rd_smtpclient/mimemessage.h similarity index 100% rename from 3rd_smtpclient/mimemessage.h rename to tool/3rd_smtpclient/mimemessage.h diff --git a/3rd_smtpclient/mimemultipart.cpp b/tool/3rd_smtpclient/mimemultipart.cpp similarity index 100% rename from 3rd_smtpclient/mimemultipart.cpp rename to tool/3rd_smtpclient/mimemultipart.cpp diff --git a/3rd_smtpclient/mimemultipart.h b/tool/3rd_smtpclient/mimemultipart.h similarity index 100% rename from 3rd_smtpclient/mimemultipart.h rename to tool/3rd_smtpclient/mimemultipart.h diff --git a/3rd_smtpclient/mimepart.cpp b/tool/3rd_smtpclient/mimepart.cpp similarity index 100% rename from 3rd_smtpclient/mimepart.cpp rename to tool/3rd_smtpclient/mimepart.cpp diff --git a/3rd_smtpclient/mimepart.h b/tool/3rd_smtpclient/mimepart.h similarity index 100% rename from 3rd_smtpclient/mimepart.h rename to tool/3rd_smtpclient/mimepart.h diff --git a/3rd_smtpclient/mimetext.cpp b/tool/3rd_smtpclient/mimetext.cpp similarity index 100% rename from 3rd_smtpclient/mimetext.cpp rename to tool/3rd_smtpclient/mimetext.cpp diff --git a/3rd_smtpclient/mimetext.h b/tool/3rd_smtpclient/mimetext.h similarity index 100% rename from 3rd_smtpclient/mimetext.h rename to tool/3rd_smtpclient/mimetext.h diff --git a/3rd_smtpclient/quotedprintable.cpp b/tool/3rd_smtpclient/quotedprintable.cpp similarity index 100% rename from 3rd_smtpclient/quotedprintable.cpp rename to tool/3rd_smtpclient/quotedprintable.cpp diff --git a/3rd_smtpclient/quotedprintable.h b/tool/3rd_smtpclient/quotedprintable.h similarity index 100% rename from 3rd_smtpclient/quotedprintable.h rename to tool/3rd_smtpclient/quotedprintable.h diff --git a/3rd_smtpclient/smtpclient.cpp b/tool/3rd_smtpclient/smtpclient.cpp similarity index 100% rename from 3rd_smtpclient/smtpclient.cpp rename to tool/3rd_smtpclient/smtpclient.cpp diff --git a/3rd_smtpclient/smtpclient.h b/tool/3rd_smtpclient/smtpclient.h similarity index 100% rename from 3rd_smtpclient/smtpclient.h rename to tool/3rd_smtpclient/smtpclient.h diff --git a/3rd_smtpclient/smtpmime.h b/tool/3rd_smtpclient/smtpmime.h similarity index 100% rename from 3rd_smtpclient/smtpmime.h rename to tool/3rd_smtpclient/smtpmime.h diff --git a/base64helper/base64helper.cpp b/tool/base64helper/base64helper.cpp similarity index 100% rename from base64helper/base64helper.cpp rename to tool/base64helper/base64helper.cpp diff --git a/base64helper/base64helper.h b/tool/base64helper/base64helper.h similarity index 100% rename from base64helper/base64helper.h rename to tool/base64helper/base64helper.h diff --git a/base64helper/base64helper.pro b/tool/base64helper/base64helper.pro similarity index 100% rename from base64helper/base64helper.pro rename to tool/base64helper/base64helper.pro diff --git a/base64helper/frmbase64helper.cpp b/tool/base64helper/frmbase64helper.cpp similarity index 100% rename from base64helper/frmbase64helper.cpp rename to tool/base64helper/frmbase64helper.cpp diff --git a/base64helper/frmbase64helper.h b/tool/base64helper/frmbase64helper.h similarity index 100% rename from base64helper/frmbase64helper.h rename to tool/base64helper/frmbase64helper.h diff --git a/base64helper/frmbase64helper.ui b/tool/base64helper/frmbase64helper.ui similarity index 100% rename from base64helper/frmbase64helper.ui rename to tool/base64helper/frmbase64helper.ui diff --git a/base64helper/main.cpp b/tool/base64helper/main.cpp similarity index 100% rename from base64helper/main.cpp rename to tool/base64helper/main.cpp diff --git a/tool/comtool/api/api.pri b/tool/comtool/api/api.pri new file mode 100644 index 0000000..b3c61ec --- /dev/null +++ b/tool/comtool/api/api.pri @@ -0,0 +1,11 @@ +HEADERS += \ + $$PWD/appconfig.h \ + $$PWD/appdata.h \ + $$PWD/quihelper.h \ + $$PWD/quihelperdata.h + +SOURCES += \ + $$PWD/appconfig.cpp \ + $$PWD/appdata.cpp \ + $$PWD/quihelper.cpp \ + $$PWD/quihelperdata.cpp diff --git a/comtool/api/appconfig.cpp b/tool/comtool/api/appconfig.cpp similarity index 100% rename from comtool/api/appconfig.cpp rename to tool/comtool/api/appconfig.cpp diff --git a/comtool/api/appconfig.h b/tool/comtool/api/appconfig.h similarity index 100% rename from comtool/api/appconfig.h rename to tool/comtool/api/appconfig.h diff --git a/comtool/api/appdata.cpp b/tool/comtool/api/appdata.cpp similarity index 66% rename from comtool/api/appdata.cpp rename to tool/comtool/api/appdata.cpp index 7cbf7fa..a0c1789 100644 --- a/comtool/api/appdata.cpp +++ b/tool/comtool/api/appdata.cpp @@ -83,7 +83,37 @@ void AppData::saveData(const QString &data) void AppData::loadIP(QComboBox *cbox) { //获取本机所有IP - QStringList ips = QUIHelper::getLocalIPs(); + static QStringList ips; + if (ips.count() == 0) { +#ifdef emsdk + ips << "127.0.0.1"; +#else + QList netInterfaces = QNetworkInterface::allInterfaces(); + foreach (const QNetworkInterface &netInterface, netInterfaces) { + //移除虚拟机和抓包工具的虚拟网卡 + QString humanReadableName = netInterface.humanReadableName().toLower(); + if (humanReadableName.startsWith("vmware network adapter") || humanReadableName.startsWith("npcap loopback adapter")) { + continue; + } + + //过滤当前网络接口 + bool flag = (netInterface.flags() == (QNetworkInterface::IsUp | QNetworkInterface::IsRunning | QNetworkInterface::CanBroadcast | QNetworkInterface::CanMulticast)); + if (flag) { + QList addrs = netInterface.addressEntries(); + foreach (QNetworkAddressEntry addr, addrs) { + //只取出IPV4的地址 + if (addr.ip().protocol() == QAbstractSocket::IPv4Protocol) { + QString ip4 = addr.ip().toString(); + if (ip4 != "127.0.0.1") { + ips << ip4; + } + } + } + } + } +#endif + } + cbox->clear(); cbox->addItems(ips); if (!ips.contains("127.0.0.1")) { diff --git a/comtool/api/appdata.h b/tool/comtool/api/appdata.h similarity index 100% rename from comtool/api/appdata.h rename to tool/comtool/api/appdata.h diff --git a/tool/comtool/api/quihelper.cpp b/tool/comtool/api/quihelper.cpp new file mode 100644 index 0000000..2b3eabf --- /dev/null +++ b/tool/comtool/api/quihelper.cpp @@ -0,0 +1,420 @@ +#include "quihelper.h" + +int QUIHelper::getScreenIndex() +{ + //需要对多个屏幕进行处理 + int screenIndex = 0; +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + int screenCount = qApp->screens().count(); +#else + int screenCount = qApp->desktop()->screenCount(); +#endif + + if (screenCount > 1) { + //找到当前鼠标所在屏幕 + QPoint pos = QCursor::pos(); + for (int i = 0; i < screenCount; ++i) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + if (qApp->screens().at(i)->geometry().contains(pos)) { +#else + if (qApp->desktop()->screenGeometry(i).contains(pos)) { +#endif + screenIndex = i; + break; + } + } + } + return screenIndex; +} + +QRect QUIHelper::getScreenRect(bool available) +{ + QRect rect; + int screenIndex = QUIHelper::getScreenIndex(); + if (available) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + rect = qApp->screens().at(screenIndex)->availableGeometry(); +#else + rect = qApp->desktop()->availableGeometry(screenIndex); +#endif + } else { +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + rect = qApp->screens().at(screenIndex)->geometry(); +#else + rect = qApp->desktop()->screenGeometry(screenIndex); +#endif + } + return rect; +} + +int QUIHelper::deskWidth() +{ + return getScreenRect().width(); +} + +int QUIHelper::deskHeight() +{ + return getScreenRect().height(); +} + +QWidget *QUIHelper::centerBaseForm = 0; +void QUIHelper::setFormInCenter(QWidget *form) +{ + int formWidth = form->width(); + int formHeight = form->height(); + + //如果=0表示采用系统桌面屏幕为参照 + QRect rect; + if (centerBaseForm == 0) { + rect = getScreenRect(); + } else { + rect = centerBaseForm->geometry(); + } + + int deskWidth = rect.width(); + int deskHeight = rect.height(); + QPoint movePoint(deskWidth / 2 - formWidth / 2 + rect.x(), deskHeight / 2 - formHeight / 2 + rect.y()); + form->move(movePoint); +} + +QString QUIHelper::appName() +{ + //没有必要每次都获取,只有当变量为空时才去获取一次 + static QString name; + if (name.isEmpty()) { + name = qApp->applicationFilePath(); + //下面的方法主要为了过滤安卓的路径 lib程序名_armeabi-v7a + QStringList list = name.split("/"); + name = list.at(list.count() - 1).split(".").at(0); + } + + return name; +} + +QString QUIHelper::appPath() +{ +#ifdef Q_OS_ANDROID + //return QString("/sdcard/Android/%1").arg(appName()); + return QString("/storage/emulated/0/%1").arg(appName()); +#else + return qApp->applicationDirPath(); +#endif +} + +QString QUIHelper::getUuid() +{ + QString uuid = QUuid::createUuid().toString(); + uuid.replace("{", ""); + uuid.replace("}", ""); + return uuid; +} + +void QUIHelper::initRand() +{ + //初始化随机数种子 + QTime t = QTime::currentTime(); + srand(t.msec() + t.second() * 1000); +} + +void QUIHelper::newDir(const QString &dirName) +{ + QString strDir = dirName; + + //如果路径中包含斜杠字符则说明是绝对路径 + //linux系统路径字符带有 / windows系统 路径字符带有 :/ + if (!strDir.startsWith("/") && !strDir.contains(":/")) { + strDir = QString("%1/%2").arg(QUIHelper::appPath()).arg(strDir); + } + + QDir dir(strDir); + if (!dir.exists()) { + dir.mkpath(strDir); + } +} + +void QUIHelper::sleep(int msec) +{ + if (msec <= 0) { + return; + } + +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + QThread::msleep(msec); +#else + QTime endTime = QTime::currentTime().addMSecs(msec); + while (QTime::currentTime() < endTime) { + QCoreApplication::processEvents(QEventLoop::AllEvents, 100); + } +#endif +} + +void QUIHelper::setStyle() +{ + //打印下所有内置风格的名字 + qDebug() << "Qt内置的样式" << QStyleFactory::keys(); +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + qApp->setStyle(QStyleFactory::create("Fusion")); +#else + qApp->setStyle(QStyleFactory::create("Cleanlooks")); +#endif + //qApp->setPalette(QPalette("#FFFFFF")); +} + +void QUIHelper::setFont(int fontSize) +{ + QFont font; + font.setFamily("MicroSoft Yahei"); +#ifdef Q_OS_ANDROID + font.setPixelSize(15); +#elif __arm__ + font.setPixelSize(25); +#else + font.setPixelSize(fontSize); +#endif + +#ifndef rk3399 + qApp->setFont(font); +#endif +} + +void QUIHelper::setCode(bool utf8) +{ +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + //如果想要控制台打印信息中文正常就注释掉这个设置 + if (utf8) { + QTextCodec *codec = QTextCodec::codecForName("utf-8"); + QTextCodec::setCodecForLocale(codec); + } +#else +#if _MSC_VER + QTextCodec *codec = QTextCodec::codecForName("gbk"); +#else + QTextCodec *codec = QTextCodec::codecForName("utf-8"); +#endif + QTextCodec::setCodecForLocale(codec); + QTextCodec::setCodecForCStrings(codec); + QTextCodec::setCodecForTr(codec); +#endif +} + +void QUIHelper::setTranslator(const QString &qmFile) +{ + //过滤下不存在的就不用设置了 + if (!QFile(qmFile).exists()) { + return; + } + + QTranslator *translator = new QTranslator(qApp); + translator->load(qmFile); + qApp->installTranslator(translator); +} + +void QUIHelper::initAll() +{ + //初始化随机数种子 + QUIHelper::initRand(); + //设置样式风格 + QUIHelper::setStyle(); + //设置字体 + QUIHelper::setFont(13); + //设置编码 + QUIHelper::setCode(); + //设置翻译文件支持多个 + QUIHelper::setTranslator(":/qm/widgets.qm"); + QUIHelper::setTranslator(":/qm/qt_zh_CN.qm"); + QUIHelper::setTranslator(":/qm/designer_zh_CN.qm"); +} + +void QUIHelper::setFramelessForm(QWidget *widgetMain, bool tool, bool top, bool menu) +{ + widgetMain->setProperty("form", true); + widgetMain->setProperty("canMove", true); + + //根据设定逐个追加属性 +#ifdef __arm__ + widgetMain->setWindowFlags(Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint); +#else + widgetMain->setWindowFlags(Qt::FramelessWindowHint); +#endif + if (tool) { + widgetMain->setWindowFlags(widgetMain->windowFlags() | Qt::Tool); + } + if (top) { + widgetMain->setWindowFlags(widgetMain->windowFlags() | Qt::WindowStaysOnTopHint); + } + if (menu) { + //如果是其他系统比如neokylin会产生系统边框 +#ifdef Q_OS_WIN + widgetMain->setWindowFlags(widgetMain->windowFlags() | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint); +#endif + } +} + +int QUIHelper::showMessageBox(const QString &info, int type, int closeSec, bool exec) +{ + int result = 0; + if (type == 0) { + showMessageBoxInfo(info, closeSec, exec); + } else if (type == 1) { + showMessageBoxError(info, closeSec, exec); + } else if (type == 2) { + result = showMessageBoxQuestion(info); + } + + return result; +} + +void QUIHelper::showMessageBoxInfo(const QString &info, int closeSec, bool exec) +{ + QMessageBox box(QMessageBox::Information, "提示", info); + box.setStandardButtons(QMessageBox::Yes); + box.setButtonText(QMessageBox::Yes, QString("确 定")); + box.exec(); + //QMessageBox::information(0, "提示", info, QMessageBox::Yes); +} + +void QUIHelper::showMessageBoxError(const QString &info, int closeSec, bool exec) +{ + QMessageBox box(QMessageBox::Critical, "错误", info); + box.setStandardButtons(QMessageBox::Yes); + box.setButtonText(QMessageBox::Yes, QString("确 定")); + box.exec(); + //QMessageBox::critical(0, "错误", info, QMessageBox::Yes); +} + +int QUIHelper::showMessageBoxQuestion(const QString &info) +{ + QMessageBox box(QMessageBox::Question, "询问", info); + box.setStandardButtons(QMessageBox::Yes | QMessageBox::No); + box.setButtonText(QMessageBox::Yes, QString("确 定")); + box.setButtonText(QMessageBox::No, QString("取 消")); + return box.exec(); + //return QMessageBox::question(0, "询问", info, QMessageBox::Yes | QMessageBox::No); +} + +QString QUIHelper::getXorEncryptDecrypt(const QString &value, char key) +{ + //矫正范围外的数据 + if (key < 0 || key >= 127) { + key = 127; + } + + QString result = value; + int count = result.count(); + for (int i = 0; i < count; i++) { + result[i] = QChar(result.at(i).toLatin1() ^ key); + } + return result; +} + +uchar QUIHelper::getOrCode(const QByteArray &data) +{ + int len = data.length(); + uchar result = 0; + for (int i = 0; i < len; i++) { + result ^= data.at(i); + } + + return result; +} + +uchar QUIHelper::getCheckCode(const QByteArray &data) +{ + int len = data.length(); + uchar temp = 0; + for (uchar i = 0; i < len; i++) { + temp += data.at(i); + } + + return temp % 256; +} + +void QUIHelper::initTableView(QTableView *tableView, int rowHeight, bool headVisible, bool edit, bool stretchLast) +{ + //取消自动换行 + tableView->setWordWrap(false); + //超出文本不显示省略号 + tableView->setTextElideMode(Qt::ElideNone); + //奇数偶数行颜色交替 + tableView->setAlternatingRowColors(false); + //垂直表头是否可见 + tableView->verticalHeader()->setVisible(headVisible); + //选中一行表头是否加粗 + tableView->horizontalHeader()->setHighlightSections(false); + //最后一行拉伸填充 + tableView->horizontalHeader()->setStretchLastSection(stretchLast); + //行标题最小宽度尺寸 + tableView->horizontalHeader()->setMinimumSectionSize(0); + //行标题最小高度,等同于和默认行高一致 + tableView->horizontalHeader()->setFixedHeight(rowHeight); + //默认行高 + tableView->verticalHeader()->setDefaultSectionSize(rowHeight); + //选中时一行整体选中 + tableView->setSelectionBehavior(QAbstractItemView::SelectRows); + //只允许选择单个 + tableView->setSelectionMode(QAbstractItemView::SingleSelection); + + //表头不可单击 +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + tableView->horizontalHeader()->setSectionsClickable(false); +#else + tableView->horizontalHeader()->setClickable(false); +#endif + + //鼠标按下即进入编辑模式 + if (edit) { + tableView->setEditTriggers(QAbstractItemView::CurrentChanged | QAbstractItemView::DoubleClicked); + } else { + tableView->setEditTriggers(QAbstractItemView::NoEditTriggers); + } +} + +void QUIHelper::openFile(const QString &fileName, const QString &msg) +{ +#ifdef __arm__ + return; +#endif + if (fileName.isEmpty()) { + return; + } + if (QUIHelper::showMessageBoxQuestion(msg + "成功!确定现在就打开吗?") == QMessageBox::Yes) { + QString url = QString("file:///%1").arg(fileName); + QDesktopServices::openUrl(QUrl(url, QUrl::TolerantMode)); + } +} + +bool QUIHelper::checkIniFile(const QString &iniFile) +{ + //如果配置文件大小为0,则以初始值继续运行,并生成配置文件 + QFile file(iniFile); + if (file.size() == 0) { + return false; + } + + //如果配置文件不完整,则以初始值继续运行,并生成配置文件 + if (file.open(QFile::ReadOnly)) { + bool ok = true; + while (!file.atEnd()) { + QString line = file.readLine(); + line.replace("\r", ""); + line.replace("\n", ""); + QStringList list = line.split("="); + + if (list.count() == 2) { + if (list.at(1) == "") { + qDebug() << "ini node no value" << list.at(0); + ok = false; + break; + } + } + } + + if (!ok) { + return false; + } + } else { + return false; + } + + return true; +} diff --git a/tool/comtool/api/quihelper.h b/tool/comtool/api/quihelper.h new file mode 100644 index 0000000..dc40547 --- /dev/null +++ b/tool/comtool/api/quihelper.h @@ -0,0 +1,70 @@ +#ifndef QUIHELPER2_H +#define QUIHELPER2_H + +#include "head.h" + +class QUIHelper +{ +public: + //获取当前鼠标所在屏幕索引+尺寸 + static int getScreenIndex(); + static QRect getScreenRect(bool available = true); + + //获取桌面宽度高度+居中显示 + static int deskWidth(); + static int deskHeight(); + + //居中显示窗体 + //定义标志位指定是以桌面为参照还是主程序界面为参照 + static QWidget *centerBaseForm; + static void setFormInCenter(QWidget *form); + + //程序文件名称+当前所在路径 + static QString appName(); + static QString appPath(); + + //获取uuid+初始化随机数种子+新建目录+延时 + static QString getUuid(); + static void initRand(); + static void newDir(const QString &dirName); + static void sleep(int msec); + + //设置样式+字体+编码+居中+翻译 + static void setStyle(); + static void setFont(int fontSize = 12); + static void setCode(bool utf8 = true); + static void setTranslator(const QString &qmFile); + //一次性设置所有 + static void initAll(); + + //设置无边框 + static void setFramelessForm(QWidget *widgetMain, bool tool = false, bool top = false, bool menu = true); + + //弹出框 + static int showMessageBox(const QString &info, int type = 0, int closeSec = 0, bool exec = false); + //弹出消息框 + static void showMessageBoxInfo(const QString &info, int closeSec = 0, bool exec = false); + //弹出错误框 + static void showMessageBoxError(const QString &info, int closeSec = 0, bool exec = false); + //弹出询问框 + static int showMessageBoxQuestion(const QString &info); + + //异或加密-只支持字符,如果是中文需要将其转换base64编码 + static QString getXorEncryptDecrypt(const QString &value, char key); + //异或校验 + static uchar getOrCode(const QByteArray &data); + //计算校验码 + static uchar getCheckCode(const QByteArray &data); + + //初始化表格 + static void initTableView(QTableView *tableView, int rowHeight = 25, + bool headVisible = false, bool edit = false, + bool stretchLast = true); + //打开文件带提示框 + static void openFile(const QString &fileName, const QString &msg); + + //检查ini配置文件 + static bool checkIniFile(const QString &iniFile); +}; + +#endif // QUIHELPER2_H diff --git a/tool/comtool/api/quihelperdata.cpp b/tool/comtool/api/quihelperdata.cpp new file mode 100644 index 0000000..0d26a90 --- /dev/null +++ b/tool/comtool/api/quihelperdata.cpp @@ -0,0 +1,450 @@ +#include "quihelperdata.h" +#include "quihelper.h" + +int QUIHelperData::strHexToDecimal(const QString &strHex) +{ + bool ok; + return strHex.toInt(&ok, 16); +} + +int QUIHelperData::strDecimalToDecimal(const QString &strDecimal) +{ + bool ok; + return strDecimal.toInt(&ok, 10); +} + +int QUIHelperData::strBinToDecimal(const QString &strBin) +{ + bool ok; + return strBin.toInt(&ok, 2); +} + +QString QUIHelperData::strHexToStrBin(const QString &strHex) +{ + uchar decimal = strHexToDecimal(strHex); + QString bin = QString::number(decimal, 2); + uchar len = bin.length(); + + if (len < 8) { + for (int i = 0; i < 8 - len; i++) { + bin = "0" + bin; + } + } + + return bin; +} + +QString QUIHelperData::decimalToStrBin1(int decimal) +{ + QString bin = QString::number(decimal, 2); + uchar len = bin.length(); + if (len <= 8) { + for (int i = 0; i < 8 - len; i++) { + bin = "0" + bin; + } + } + + return bin; +} + +QString QUIHelperData::decimalToStrBin2(int decimal) +{ + QString bin = QString::number(decimal, 2); + uchar len = bin.length(); + if (len <= 16) { + for (int i = 0; i < 16 - len; i++) { + bin = "0" + bin; + } + } + + return bin; +} + +QString QUIHelperData::decimalToStrHex(int decimal) +{ + QString temp = QString::number(decimal, 16); + if (temp.length() == 1) { + temp = "0" + temp; + } + + return temp; +} + +QByteArray QUIHelperData::intToByte(int data) +{ + QByteArray result; + result.resize(4); + result[3] = (uchar)(0x000000ff & data); + result[2] = (uchar)((0x0000ff00 & data) >> 8); + result[1] = (uchar)((0x00ff0000 & data) >> 16); + result[0] = (uchar)((0xff000000 & data) >> 24); + return result; +} + +QByteArray QUIHelperData::intToByteRec(int data) +{ + QByteArray result; + result.resize(4); + result[0] = (uchar)(0x000000ff & data); + result[1] = (uchar)((0x0000ff00 & data) >> 8); + result[2] = (uchar)((0x00ff0000 & data) >> 16); + result[3] = (uchar)((0xff000000 & data) >> 24); + return result; +} + +int QUIHelperData::byteToInt(const QByteArray &data) +{ + int i = data.at(3) & 0x000000ff; + i |= ((data.at(2) << 8) & 0x0000ff00); + i |= ((data.at(1) << 16) & 0x00ff0000); + i |= ((data.at(0) << 24) & 0xff000000); + return i; +} + +int QUIHelperData::byteToIntRec(const QByteArray &data) +{ + int i = data.at(0) & 0x000000ff; + i |= ((data.at(1) << 8) & 0x0000ff00); + i |= ((data.at(2) << 16) & 0x00ff0000); + i |= ((data.at(3) << 24) & 0xff000000); + return i; +} + +quint32 QUIHelperData::byteToUInt(const QByteArray &data) +{ + quint32 i = data.at(3) & 0x000000ff; + i |= ((data.at(2) << 8) & 0x0000ff00); + i |= ((data.at(1) << 16) & 0x00ff0000); + i |= ((data.at(0) << 24) & 0xff000000); + return i; +} + +quint32 QUIHelperData::byteToUIntRec(const QByteArray &data) +{ + quint32 i = data.at(0) & 0x000000ff; + i |= ((data.at(1) << 8) & 0x0000ff00); + i |= ((data.at(2) << 16) & 0x00ff0000); + i |= ((data.at(3) << 24) & 0xff000000); + return i; +} + +QByteArray QUIHelperData::ushortToByte(ushort data) +{ + QByteArray result; + result.resize(2); + result[1] = (uchar)(0x000000ff & data); + result[0] = (uchar)((0x0000ff00 & data) >> 8); + return result; +} + +QByteArray QUIHelperData::ushortToByteRec(ushort data) +{ + QByteArray result; + result.resize(2); + result[0] = (uchar)(0x000000ff & data); + result[1] = (uchar)((0x0000ff00 & data) >> 8); + return result; +} + +int QUIHelperData::byteToUShort(const QByteArray &data) +{ + int i = data.at(1) & 0x000000FF; + i |= ((data.at(0) << 8) & 0x0000FF00); + if (i >= 32768) { + i = i - 65536; + } + + return i; +} + +int QUIHelperData::byteToUShortRec(const QByteArray &data) +{ + int i = data.at(0) & 0x000000FF; + i |= ((data.at(1) << 8) & 0x0000FF00); + if (i >= 32768) { + i = i - 65536; + } + + return i; +} + +QString QUIHelperData::getValue(quint8 value) +{ + QString result = QString::number(value); + if (result.length() <= 1) { + result = QString("0%1").arg(result); + } + return result; +} + +QString QUIHelperData::getXorEncryptDecrypt(const QString &value, char key) +{ + //矫正范围外的数据 + if (key < 0 || key >= 127) { + key = 127; + } + + QString result = value; + int count = result.count(); + for (int i = 0; i < count; i++) { + result[i] = QChar(result.at(i).toLatin1() ^ key); + } + return result; +} + +uchar QUIHelperData::getOrCode(const QByteArray &data) +{ + int len = data.length(); + uchar result = 0; + for (int i = 0; i < len; i++) { + result ^= data.at(i); + } + + return result; +} + +uchar QUIHelperData::getCheckCode(const QByteArray &data) +{ + int len = data.length(); + uchar temp = 0; + for (uchar i = 0; i < len; i++) { + temp += data.at(i); + } + + return temp % 256; +} + +//函数功能:计算CRC16 +//参数1:*data 16位CRC校验数据, +//参数2:len 数据流长度 +//参数3:init 初始化值 +//参数4:table 16位CRC查找表 + +//正序CRC计算 +quint16 QUIHelperData::getCrc16(quint8 *data, int len, quint16 init, const quint16 *table) +{ + quint16 crc_16 = init; + quint8 temp; + while (len-- > 0) { + temp = crc_16 & 0xff; + crc_16 = (crc_16 >> 8) ^ table[(temp ^ *data++) & 0xff]; + } + + return crc_16; +} + +//逆序CRC计算 +quint16 QUIHelperData::getCrc16Rec(quint8 *data, int len, quint16 init, const quint16 *table) +{ + quint16 crc_16 = init; + quint8 temp; + while (len-- > 0) { + temp = crc_16 >> 8; + crc_16 = (crc_16 << 8) ^ table[(temp ^ *data++) & 0xff]; + } + + return crc_16; +} + +//Modbus CRC16校验 +quint16 QUIHelperData::getModbus16(quint8 *data, int len) +{ + //MODBUS CRC-16表 8005 逆序 + const quint16 table_16[256] = { + 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, + 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, + 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, + 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, + 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40, + 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41, + 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641, + 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040, + 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240, + 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441, + 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41, + 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840, + 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41, + 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40, + 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640, + 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041, + 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240, + 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441, + 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41, + 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840, + 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41, + 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40, + 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640, + 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041, + 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241, + 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440, + 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40, + 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841, + 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40, + 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41, + 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641, + 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040 + }; + + return getCrc16(data, len, 0xFFFF, table_16); +} + +//CRC16校验 +QByteArray QUIHelperData::getCrcCode(const QByteArray &data) +{ + quint16 result = getModbus16((quint8 *)data.data(), data.length()); + return QUIHelperData::ushortToByteRec(result); +} + +static QMap listChar; +void QUIHelperData::initAscii() +{ + //0x20为空格,空格以下都是不可见字符 + if (listChar.count() == 0) { + listChar.insert(0, "\\NUL"); + listChar.insert(1, "\\SOH"); + listChar.insert(2, "\\STX"); + listChar.insert(3, "\\ETX"); + listChar.insert(4, "\\EOT"); + listChar.insert(5, "\\ENQ"); + listChar.insert(6, "\\ACK"); + listChar.insert(7, "\\BEL"); + listChar.insert(8, "\\BS"); + listChar.insert(9, "\\HT"); + listChar.insert(10, "\\LF"); + listChar.insert(11, "\\VT"); + listChar.insert(12, "\\FF"); + listChar.insert(13, "\\CR"); + listChar.insert(14, "\\SO"); + listChar.insert(15, "\\SI"); + listChar.insert(16, "\\DLE"); + listChar.insert(17, "\\DC1"); + listChar.insert(18, "\\DC2"); + listChar.insert(19, "\\DC3"); + listChar.insert(20, "\\DC4"); + listChar.insert(21, "\\NAK"); + listChar.insert(22, "\\SYN"); + listChar.insert(23, "\\ETB"); + listChar.insert(24, "\\CAN"); + listChar.insert(25, "\\EM"); + listChar.insert(26, "\\SUB"); + listChar.insert(27, "\\ESC"); + listChar.insert(28, "\\FS"); + listChar.insert(29, "\\GS"); + listChar.insert(30, "\\RS"); + listChar.insert(31, "\\US"); + listChar.insert(0x5C, "\\"); + listChar.insert(0x7F, "\\DEL"); + } +} + +QString QUIHelperData::byteArrayToAsciiStr(const QByteArray &data) +{ + //先初始化字符表 + initAscii(); + + QString temp; + int len = data.size(); + for (int i = 0; i < len; i++) { + char byte = data.at(i); + QString value = listChar.value(byte); + if (!value.isEmpty()) { + } else if (byte >= 0 && byte <= 0x7F) { + value = QString("%1").arg(byte); + } else { + value = decimalToStrHex((quint8)byte); + value = QString("\\x%1").arg(value.toUpper()); + } + + temp += value; + } + + return temp.trimmed(); +} + +QByteArray QUIHelperData::asciiStrToByteArray(const QString &data) +{ + //先初始化字符表 + initAscii(); + + QByteArray buffer; + QStringList list = data.split("\\"); + + int count = list.count(); + for (int i = 1; i < count; i++) { + QString str = list.at(i); + int key = 0; + if (str.contains("x")) { + key = strHexToDecimal(str.mid(1, 2)); + } else { + key = listChar.key("\\" + str); + } + + buffer.append(key); + } + + return buffer; +} + +char QUIHelperData::hexStrToChar(char data) +{ + if ((data >= '0') && (data <= '9')) { + return data - 0x30; + } else if ((data >= 'A') && (data <= 'F')) { + return data - 'A' + 10; + } else if ((data >= 'a') && (data <= 'f')) { + return data - 'a' + 10; + } else { + return (-1); + } +} + +QByteArray QUIHelperData::hexStrToByteArray(const QString &data) +{ + QByteArray senddata; + int hexdata, lowhexdata; + int hexdatalen = 0; + int len = data.length(); + senddata.resize(len / 2); + char lstr, hstr; + + for (int i = 0; i < len;) { + hstr = data.at(i).toLatin1(); + if (hstr == ' ') { + i++; + continue; + } + + i++; + if (i >= len) { + break; + } + + lstr = data.at(i).toLatin1(); + hexdata = hexStrToChar(hstr); + lowhexdata = hexStrToChar(lstr); + + if ((hexdata == 16) || (lowhexdata == 16)) { + break; + } else { + hexdata = hexdata * 16 + lowhexdata; + } + + i++; + senddata[hexdatalen] = (char)hexdata; + hexdatalen++; + } + + senddata.resize(hexdatalen); + return senddata; +} + +QString QUIHelperData::byteArrayToHexStr(const QByteArray &data) +{ + QString temp = ""; + QString hex = data.toHex(); + for (int i = 0; i < hex.length(); i = i + 2) { + temp += hex.mid(i, 2) + " "; + } + + return temp.trimmed().toUpper(); +} diff --git a/tool/comtool/api/quihelperdata.h b/tool/comtool/api/quihelperdata.h new file mode 100644 index 0000000..b5e3815 --- /dev/null +++ b/tool/comtool/api/quihelperdata.h @@ -0,0 +1,70 @@ +#ifndef QUIHELPERDATA_H +#define QUIHELPERDATA_H + +#include + +class QUIHelperData +{ +public: + //16进制字符串转10进制 + static int strHexToDecimal(const QString &strHex); + //10进制字符串转10进制 + static int strDecimalToDecimal(const QString &strDecimal); + //2进制字符串转10进制 + static int strBinToDecimal(const QString &strBin); + + //16进制字符串转2进制字符串 + static QString strHexToStrBin(const QString &strHex); + //10进制转2进制字符串一个字节 + static QString decimalToStrBin1(int decimal); + //10进制转2进制字符串两个字节 + static QString decimalToStrBin2(int decimal); + //10进制转16进制字符串,补零. + static QString decimalToStrHex(int decimal); + + //int转字节数组 + static QByteArray intToByte(int data); + static QByteArray intToByteRec(int data); + + //字节数组转int + static int byteToInt(const QByteArray &data); + static int byteToIntRec(const QByteArray &data); + static quint32 byteToUInt(const QByteArray &data); + static quint32 byteToUIntRec(const QByteArray &data); + + //ushort转字节数组 + static QByteArray ushortToByte(ushort data); + static QByteArray ushortToByteRec(ushort data); + + //字节数组转ushort + static int byteToUShort(const QByteArray &data); + static int byteToUShortRec(const QByteArray &data); + + //字符串补全 + static QString getValue(quint8 value); + + //异或加密-只支持字符,如果是中文需要将其转换base64编码 + static QString getXorEncryptDecrypt(const QString &value, char key); + //异或校验 + static uchar getOrCode(const QByteArray &data); + //计算校验码 + static uchar getCheckCode(const QByteArray &data); + + //CRC校验 + static quint16 getCrc16Rec(quint8 *data, int len, quint16 init, const quint16 *table); + static quint16 getCrc16(quint8 *data, int len, quint16 init, const quint16 *table); + static quint16 getModbus16(quint8 *data, int len); + static QByteArray getCrcCode(const QByteArray &data); + + //字节数组与Ascii字符串互转 + static void initAscii(); + static QString byteArrayToAsciiStr(const QByteArray &data); + static QByteArray asciiStrToByteArray(const QString &data); + + //16进制字符串与字节数组互转 + static char hexStrToChar(char data); + static QByteArray hexStrToByteArray(const QString &data); + static QString byteArrayToHexStr(const QByteArray &data); +}; + +#endif // QUIHELPERDATA_H diff --git a/comtool/comtool.pro b/tool/comtool/comtool.pro similarity index 87% rename from comtool/comtool.pro rename to tool/comtool/comtool.pro index 2f3eded..07074ef 100644 --- a/comtool/comtool.pro +++ b/tool/comtool/comtool.pro @@ -7,9 +7,10 @@ TEMPLATE = app DESTDIR = $$PWD/../bin RC_FILE = qrc/main.rc -SOURCES += main.cpp HEADERS += head.h +SOURCES += main.cpp RESOURCES += qrc/main.qrc +CONFIG += warn_off INCLUDEPATH += $$PWD INCLUDEPATH += $$PWD/api @@ -18,8 +19,5 @@ INCLUDEPATH += $$PWD/form include ($$PWD/api/api.pri) include ($$PWD/form/form.pri) -INCLUDEPATH += $$PWD/../core_qui -include ($$PWD/../core_qui/core_qui.pri) - INCLUDEPATH += $$PWD/../3rd_qextserialport include ($$PWD/../3rd_qextserialport/3rd_qextserialport.pri) diff --git a/comtool/file/device.txt b/tool/comtool/file/device.txt similarity index 100% rename from comtool/file/device.txt rename to tool/comtool/file/device.txt diff --git a/comtool/file/send.txt b/tool/comtool/file/send.txt similarity index 100% rename from comtool/file/send.txt rename to tool/comtool/file/send.txt diff --git a/comtool/form/form.pri b/tool/comtool/form/form.pri similarity index 100% rename from comtool/form/form.pri rename to tool/comtool/form/form.pri diff --git a/comtool/form/frmcomtool.cpp b/tool/comtool/form/frmcomtool.cpp similarity index 97% rename from comtool/form/frmcomtool.cpp rename to tool/comtool/form/frmcomtool.cpp index d9db3b3..6d110c8 100644 --- a/comtool/form/frmcomtool.cpp +++ b/tool/comtool/form/frmcomtool.cpp @@ -1,6 +1,7 @@ #include "frmcomtool.h" #include "ui_frmcomtool.h" #include "quihelper.h" +#include "quihelperdata.h" frmComTool::frmComTool(QWidget *parent) : QWidget(parent), ui(new Ui::frmComTool) { @@ -313,9 +314,9 @@ void frmComTool::readData() if (isShow) { QString buffer; if (ui->ckHexReceive->isChecked()) { - buffer = QUIHelper::byteArrayToHexStr(data); + buffer = QUIHelperData::byteArrayToHexStr(data); } else { - //buffer = QUIHelper::byteArrayToAsciiStr(data); + //buffer = QUIHelperData::byteArrayToAsciiStr(data); buffer = QString::fromLocal8Bit(data); } @@ -371,9 +372,9 @@ void frmComTool::sendData(QString data) QByteArray buffer; if (ui->ckHexSend->isChecked()) { - buffer = QUIHelper::hexStrToByteArray(data); + buffer = QUIHelperData::hexStrToByteArray(data); } else { - buffer = QUIHelper::asciiStrToByteArray(data); + buffer = QUIHelperData::asciiStrToByteArray(data); } com->write(buffer); @@ -563,9 +564,9 @@ void frmComTool::readDataNet() QString buffer; if (ui->ckHexReceive->isChecked()) { - buffer = QUIHelper::byteArrayToHexStr(data); + buffer = QUIHelperData::byteArrayToHexStr(data); } else { - buffer = QUIHelper::byteArrayToAsciiStr(data); + buffer = QUIHelperData::byteArrayToAsciiStr(data); } append(5, buffer); diff --git a/comtool/form/frmcomtool.h b/tool/comtool/form/frmcomtool.h similarity index 100% rename from comtool/form/frmcomtool.h rename to tool/comtool/form/frmcomtool.h diff --git a/comtool/form/frmcomtool.ui b/tool/comtool/form/frmcomtool.ui similarity index 100% rename from comtool/form/frmcomtool.ui rename to tool/comtool/form/frmcomtool.ui diff --git a/tool/comtool/head.h b/tool/comtool/head.h new file mode 100644 index 0000000..2f5ee75 --- /dev/null +++ b/tool/comtool/head.h @@ -0,0 +1,18 @@ +#include +#include +#include + +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) +#include +#endif + +#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0)) +#include +#endif + +#pragma execution_character_set("utf-8") +#define TIMEMS qPrintable(QTime::currentTime().toString("HH:mm:ss zzz")) +#define STRDATETIME qPrintable(QDateTime::currentDateTime().toString("yyyy-MM-dd-HH-mm-ss")) + +#include "appconfig.h" +#include "appdata.h" diff --git a/comtool/main.cpp b/tool/comtool/main.cpp similarity index 70% rename from comtool/main.cpp rename to tool/comtool/main.cpp index 0be7c0f..1e2fd8a 100644 --- a/comtool/main.cpp +++ b/tool/comtool/main.cpp @@ -6,16 +6,9 @@ int main(int argc, char *argv[]) QApplication a(argc, argv); a.setWindowIcon(QIcon(":/main.ico")); - QFont font; - font.setFamily(QUIConfig::FontName); - font.setPixelSize(QUIConfig::FontSize); - a.setFont(font); - //设置编码以及加载中文翻译文件 - QUIHelper::initRand(); - QUIHelper::setCode(); - QUIHelper::setTranslator(); - + QUIHelper::initAll(); + //读取配置文件 AppConfig::ConfigFile = QString("%1/%2.ini").arg(QUIHelper::appPath()).arg(QUIHelper::appName()); AppConfig::readConfig(); @@ -24,7 +17,8 @@ int main(int argc, char *argv[]) AppData::readDeviceData(); frmComTool w; - w.setWindowTitle("串口调试助手 V2021 (QQ: 517216493 WX: feiyangqingyun)"); + w.setWindowTitle("串口调试助手 V2022 (QQ: 517216493 WX: feiyangqingyun)"); + w.resize(900, 650); QUIHelper::setFormInCenter(&w); w.show(); diff --git a/comtool/qrc/main.ico b/tool/comtool/qrc/main.ico similarity index 100% rename from comtool/qrc/main.ico rename to tool/comtool/qrc/main.ico diff --git a/nettool/qrc/main.qrc b/tool/comtool/qrc/main.qrc similarity index 55% rename from nettool/qrc/main.qrc rename to tool/comtool/qrc/main.qrc index 91c2747..8bd6284 100644 --- a/nettool/qrc/main.qrc +++ b/tool/comtool/qrc/main.qrc @@ -1,5 +1,7 @@ main.ico + qm/qt_zh_CN.qm + qm/widgets.qm diff --git a/comtool/qrc/main.rc b/tool/comtool/qrc/main.rc similarity index 100% rename from comtool/qrc/main.rc rename to tool/comtool/qrc/main.rc diff --git a/core_qui/qrc/qm/qt_zh_CN.qm b/tool/comtool/qrc/qm/qt_zh_CN.qm similarity index 100% rename from core_qui/qrc/qm/qt_zh_CN.qm rename to tool/comtool/qrc/qm/qt_zh_CN.qm diff --git a/core_qui/qrc/qm/widgets.qm b/tool/comtool/qrc/qm/widgets.qm similarity index 100% rename from core_qui/qrc/qm/widgets.qm rename to tool/comtool/qrc/qm/widgets.qm diff --git a/comtool/readme.md b/tool/comtool/readme.md similarity index 100% rename from comtool/readme.md rename to tool/comtool/readme.md diff --git a/countcode/countcode.pro b/tool/countcode/countcode.pro similarity index 95% rename from countcode/countcode.pro rename to tool/countcode/countcode.pro index 08afea3..e1d8f74 100644 --- a/countcode/countcode.pro +++ b/tool/countcode/countcode.pro @@ -1,14 +1,14 @@ -QT += core gui -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat - -TARGET = countcode -TEMPLATE = app -DESTDIR = $$PWD/../bin -CONFIG += warn_off - -SOURCES += main.cpp -SOURCES += frmcountcode.cpp -HEADERS += frmcountcode.h -FORMS += frmcountcode.ui - +QT += core gui +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat + +TARGET = countcode +TEMPLATE = app +DESTDIR = $$PWD/../bin +CONFIG += warn_off + +SOURCES += main.cpp +SOURCES += frmcountcode.cpp +HEADERS += frmcountcode.h +FORMS += frmcountcode.ui + diff --git a/countcode/frmcountcode.cpp b/tool/countcode/frmcountcode.cpp similarity index 96% rename from countcode/frmcountcode.cpp rename to tool/countcode/frmcountcode.cpp index 197eab8..f850aaa 100644 --- a/countcode/frmcountcode.cpp +++ b/tool/countcode/frmcountcode.cpp @@ -1,279 +1,279 @@ -#pragma execution_character_set("utf-8") - -#include "frmcountcode.h" -#include "ui_frmcountcode.h" -#include "qfile.h" -#include "qtextstream.h" -#include "qfiledialog.h" -#include "qfileinfo.h" -#include "qdebug.h" - -frmCountCode::frmCountCode(QWidget *parent) : QWidget(parent), ui(new Ui::frmCountCode) -{ - ui->setupUi(this); - this->initForm(); - on_btnClear_clicked(); -} - -frmCountCode::~frmCountCode() -{ - delete ui; -} - -void frmCountCode::initForm() -{ - QStringList headText; - headText << "文件名" << "类型" << "大小" << "总行数" << "代码行数" << "注释行数" << "空白行数" << "路径"; - QList columnWidth; - columnWidth << 130 << 50 << 70 << 80 << 70 << 70 << 70 << 150; - - int columnCount = headText.count(); - ui->tableWidget->setColumnCount(columnCount); - ui->tableWidget->setHorizontalHeaderLabels(headText); - ui->tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows); - ui->tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers); - ui->tableWidget->setSelectionMode(QAbstractItemView::SingleSelection); - ui->tableWidget->verticalHeader()->setVisible(false); - ui->tableWidget->horizontalHeader()->setStretchLastSection(true); - ui->tableWidget->horizontalHeader()->setHighlightSections(false); - ui->tableWidget->verticalHeader()->setDefaultSectionSize(20); - ui->tableWidget->verticalHeader()->setHighlightSections(false); - - for (int i = 0; i < columnCount; i++) { - ui->tableWidget->setColumnWidth(i, columnWidth.at(i)); - } - - //设置前景色 - ui->txtCount->setStyleSheet("color:#17A086;"); - ui->txtSize->setStyleSheet("color:#CA5AA6;"); - ui->txtRow->setStyleSheet("color:#CD1B19;"); - ui->txtCode->setStyleSheet("color:#22A3A9;"); - ui->txtNote->setStyleSheet("color:#D64D54;"); - ui->txtBlank->setStyleSheet("color:#A279C5;"); - - //设置字体加粗 - QFont font; - font.setBold(true); - if (font.pointSize() > 0) { - font.setPointSize(font.pointSize() + 1); - } else { - font.setPixelSize(font.pixelSize() + 2); - } - - ui->txtCount->setFont(font); - ui->txtSize->setFont(font); - ui->txtRow->setFont(font); - ui->txtCode->setFont(font); - ui->txtNote->setFont(font); - ui->txtBlank->setFont(font); - -#if (QT_VERSION > QT_VERSION_CHECK(4,7,0)) - ui->txtFilter->setPlaceholderText("中间空格隔开,例如 *.h *.cpp *.c"); -#endif -} - -bool frmCountCode::checkFile(const QString &fileName) -{ - if (fileName.startsWith("moc_") || fileName.startsWith("ui_") || fileName.startsWith("qrc_")) { - return false; - } - - QFileInfo file(fileName); - QString suffix = "*." + file.suffix(); - QString filter = ui->txtFilter->text().trimmed(); - QStringList filters = filter.split(" "); - return filters.contains(suffix); -} - -void frmCountCode::countCode(const QString &filePath) -{ - QDir dir(filePath); - QFileInfoList fileInfos = dir.entryInfoList(); - foreach (QFileInfo fileInfo, fileInfos) { - QString fileName = fileInfo.fileName(); - if (fileInfo.isFile()) { - if (checkFile(fileName)) { - listFile << fileInfo.filePath(); - } - } else { - if (fileName == "." || fileName == "..") { - continue; - } - - //递归找出文件 - countCode(fileInfo.absoluteFilePath()); - } - } -} - -void frmCountCode::countCode(const QStringList &files) -{ - int lineCode; - int lineBlank; - int lineNotes; - int count = files.count(); - on_btnClear_clicked(); - ui->tableWidget->setRowCount(count); - - quint32 totalLines = 0; - quint32 totalBytes = 0; - quint32 totalCodes = 0; - quint32 totalNotes = 0; - quint32 totalBlanks = 0; - - for (int i = 0; i < count; i++) { - QFileInfo fileInfo(files.at(i)); - countCode(fileInfo.filePath(), lineCode, lineBlank, lineNotes); - int lineAll = lineCode + lineBlank + lineNotes; - - QTableWidgetItem *itemName = new QTableWidgetItem; - itemName->setText(fileInfo.fileName()); - - QTableWidgetItem *itemSuffix = new QTableWidgetItem; - itemSuffix->setText(fileInfo.suffix()); - - QTableWidgetItem *itemSize = new QTableWidgetItem; - itemSize->setText(QString::number(fileInfo.size())); - - QTableWidgetItem *itemLine = new QTableWidgetItem; - itemLine->setText(QString::number(lineAll)); - - QTableWidgetItem *itemCode = new QTableWidgetItem; - itemCode->setText(QString::number(lineCode)); - - QTableWidgetItem *itemNote = new QTableWidgetItem; - itemNote->setText(QString::number(lineNotes)); - - QTableWidgetItem *itemBlank = new QTableWidgetItem; - itemBlank->setText(QString::number(lineBlank)); - - QTableWidgetItem *itemPath = new QTableWidgetItem; - itemPath->setText(fileInfo.filePath()); - - itemSuffix->setTextAlignment(Qt::AlignCenter); - itemSize->setTextAlignment(Qt::AlignCenter); - itemLine->setTextAlignment(Qt::AlignCenter); - itemCode->setTextAlignment(Qt::AlignCenter); - itemNote->setTextAlignment(Qt::AlignCenter); - itemBlank->setTextAlignment(Qt::AlignCenter); - - ui->tableWidget->setItem(i, 0, itemName); - ui->tableWidget->setItem(i, 1, itemSuffix); - ui->tableWidget->setItem(i, 2, itemSize); - ui->tableWidget->setItem(i, 3, itemLine); - ui->tableWidget->setItem(i, 4, itemCode); - ui->tableWidget->setItem(i, 5, itemNote); - ui->tableWidget->setItem(i, 6, itemBlank); - ui->tableWidget->setItem(i, 7, itemPath); - - totalBytes += fileInfo.size(); - totalLines += lineAll; - totalCodes += lineCode; - totalNotes += lineNotes; - totalBlanks += lineBlank; - - if (i % 100 == 0) { - qApp->processEvents(); - } - } - - //显示统计结果 - listFile.clear(); - ui->txtCount->setText(QString::number(count)); - ui->txtSize->setText(QString::number(totalBytes)); - ui->txtRow->setText(QString::number(totalLines)); - ui->txtCode->setText(QString::number(totalCodes)); - ui->txtNote->setText(QString::number(totalNotes)); - ui->txtBlank->setText(QString::number(totalBlanks)); - - //计算百分比 - double percent = 0.0; - //代码行所占百分比 - percent = ((double)totalCodes / totalLines) * 100; - ui->labPercentCode->setText(QString("%1%").arg(percent, 5, 'f', 2, QChar(' '))); - //注释行所占百分比 - percent = ((double)totalNotes / totalLines) * 100; - ui->labPercentNote->setText(QString("%1%").arg(percent, 5, 'f', 2, QChar(' '))); - //空行所占百分比 - percent = ((double)totalBlanks / totalLines) * 100; - ui->labPercentBlank->setText(QString("%1%").arg(percent, 5, 'f', 2, QChar(' '))); -} - -void frmCountCode::countCode(const QString &fileName, int &lineCode, int &lineBlank, int &lineNotes) -{ - lineCode = lineBlank = lineNotes = 0; - QFile file(fileName); - if (file.open(QFile::ReadOnly)) { - QTextStream out(&file); - QString line; - bool isNote = false; - while (!out.atEnd()) { - line = out.readLine(); - - //移除前面的空行 - if (line.startsWith(" ")) { - line.remove(" "); - } - - //判断当前行是否是注释 - if (line.startsWith("/*")) { - isNote = true; - } - - //注释部分 - if (isNote) { - lineNotes++; - } else { - if (line.startsWith("//")) { //注释行 - lineNotes++; - } else if (line.isEmpty()) { //空白行 - lineBlank++; - } else { //代码行 - lineCode++; - } - } - - //注释结束 - if (line.endsWith("*/")) { - isNote = false; - } - } - } -} - -void frmCountCode::on_btnOpenFile_clicked() -{ - QString filter = QString("代码文件(%1)").arg(ui->txtFilter->text().trimmed()); - QStringList files = QFileDialog::getOpenFileNames(this, "选择文件", "./", filter); - if (files.size() > 0) { - ui->txtFile->setText(files.join("|")); - countCode(files); - } -} - -void frmCountCode::on_btnOpenPath_clicked() -{ - QString path = QFileDialog::getExistingDirectory(this, "选择目录", "./", QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); - if (!path.isEmpty()) { - ui->txtPath->setText(path); - listFile.clear(); - countCode(path); - countCode(listFile); - } -} - -void frmCountCode::on_btnClear_clicked() -{ - ui->txtCount->setText("0"); - ui->txtSize->setText("0"); - ui->txtRow->setText("0"); - - ui->txtCode->setText("0"); - ui->txtNote->setText("0"); - ui->txtBlank->setText("0"); - - ui->labPercentCode->setText("0%"); - ui->labPercentNote->setText("0%"); - ui->labPercentBlank->setText("0%"); - ui->tableWidget->setRowCount(0); -} +#pragma execution_character_set("utf-8") + +#include "frmcountcode.h" +#include "ui_frmcountcode.h" +#include "qfile.h" +#include "qtextstream.h" +#include "qfiledialog.h" +#include "qfileinfo.h" +#include "qdebug.h" + +frmCountCode::frmCountCode(QWidget *parent) : QWidget(parent), ui(new Ui::frmCountCode) +{ + ui->setupUi(this); + this->initForm(); + on_btnClear_clicked(); +} + +frmCountCode::~frmCountCode() +{ + delete ui; +} + +void frmCountCode::initForm() +{ + QStringList headText; + headText << "文件名" << "类型" << "大小" << "总行数" << "代码行数" << "注释行数" << "空白行数" << "路径"; + QList columnWidth; + columnWidth << 130 << 50 << 70 << 80 << 70 << 70 << 70 << 150; + + int columnCount = headText.count(); + ui->tableWidget->setColumnCount(columnCount); + ui->tableWidget->setHorizontalHeaderLabels(headText); + ui->tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows); + ui->tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers); + ui->tableWidget->setSelectionMode(QAbstractItemView::SingleSelection); + ui->tableWidget->verticalHeader()->setVisible(false); + ui->tableWidget->horizontalHeader()->setStretchLastSection(true); + ui->tableWidget->horizontalHeader()->setHighlightSections(false); + ui->tableWidget->verticalHeader()->setDefaultSectionSize(20); + ui->tableWidget->verticalHeader()->setHighlightSections(false); + + for (int i = 0; i < columnCount; i++) { + ui->tableWidget->setColumnWidth(i, columnWidth.at(i)); + } + + //设置前景色 + ui->txtCount->setStyleSheet("color:#17A086;"); + ui->txtSize->setStyleSheet("color:#CA5AA6;"); + ui->txtRow->setStyleSheet("color:#CD1B19;"); + ui->txtCode->setStyleSheet("color:#22A3A9;"); + ui->txtNote->setStyleSheet("color:#D64D54;"); + ui->txtBlank->setStyleSheet("color:#A279C5;"); + + //设置字体加粗 + QFont font; + font.setBold(true); + if (font.pointSize() > 0) { + font.setPointSize(font.pointSize() + 1); + } else { + font.setPixelSize(font.pixelSize() + 2); + } + + ui->txtCount->setFont(font); + ui->txtSize->setFont(font); + ui->txtRow->setFont(font); + ui->txtCode->setFont(font); + ui->txtNote->setFont(font); + ui->txtBlank->setFont(font); + +#if (QT_VERSION > QT_VERSION_CHECK(4,7,0)) + ui->txtFilter->setPlaceholderText("中间空格隔开,例如 *.h *.cpp *.c"); +#endif +} + +bool frmCountCode::checkFile(const QString &fileName) +{ + if (fileName.startsWith("moc_") || fileName.startsWith("ui_") || fileName.startsWith("qrc_")) { + return false; + } + + QFileInfo file(fileName); + QString suffix = "*." + file.suffix(); + QString filter = ui->txtFilter->text().trimmed(); + QStringList filters = filter.split(" "); + return filters.contains(suffix); +} + +void frmCountCode::countCode(const QString &filePath) +{ + QDir dir(filePath); + QFileInfoList fileInfos = dir.entryInfoList(); + foreach (QFileInfo fileInfo, fileInfos) { + QString fileName = fileInfo.fileName(); + if (fileInfo.isFile()) { + if (checkFile(fileName)) { + listFile << fileInfo.filePath(); + } + } else { + if (fileName == "." || fileName == "..") { + continue; + } + + //递归找出文件 + countCode(fileInfo.absoluteFilePath()); + } + } +} + +void frmCountCode::countCode(const QStringList &files) +{ + int lineCode; + int lineBlank; + int lineNotes; + int count = files.count(); + on_btnClear_clicked(); + ui->tableWidget->setRowCount(count); + + quint32 totalLines = 0; + quint32 totalBytes = 0; + quint32 totalCodes = 0; + quint32 totalNotes = 0; + quint32 totalBlanks = 0; + + for (int i = 0; i < count; i++) { + QFileInfo fileInfo(files.at(i)); + countCode(fileInfo.filePath(), lineCode, lineBlank, lineNotes); + int lineAll = lineCode + lineBlank + lineNotes; + + QTableWidgetItem *itemName = new QTableWidgetItem; + itemName->setText(fileInfo.fileName()); + + QTableWidgetItem *itemSuffix = new QTableWidgetItem; + itemSuffix->setText(fileInfo.suffix()); + + QTableWidgetItem *itemSize = new QTableWidgetItem; + itemSize->setText(QString::number(fileInfo.size())); + + QTableWidgetItem *itemLine = new QTableWidgetItem; + itemLine->setText(QString::number(lineAll)); + + QTableWidgetItem *itemCode = new QTableWidgetItem; + itemCode->setText(QString::number(lineCode)); + + QTableWidgetItem *itemNote = new QTableWidgetItem; + itemNote->setText(QString::number(lineNotes)); + + QTableWidgetItem *itemBlank = new QTableWidgetItem; + itemBlank->setText(QString::number(lineBlank)); + + QTableWidgetItem *itemPath = new QTableWidgetItem; + itemPath->setText(fileInfo.filePath()); + + itemSuffix->setTextAlignment(Qt::AlignCenter); + itemSize->setTextAlignment(Qt::AlignCenter); + itemLine->setTextAlignment(Qt::AlignCenter); + itemCode->setTextAlignment(Qt::AlignCenter); + itemNote->setTextAlignment(Qt::AlignCenter); + itemBlank->setTextAlignment(Qt::AlignCenter); + + ui->tableWidget->setItem(i, 0, itemName); + ui->tableWidget->setItem(i, 1, itemSuffix); + ui->tableWidget->setItem(i, 2, itemSize); + ui->tableWidget->setItem(i, 3, itemLine); + ui->tableWidget->setItem(i, 4, itemCode); + ui->tableWidget->setItem(i, 5, itemNote); + ui->tableWidget->setItem(i, 6, itemBlank); + ui->tableWidget->setItem(i, 7, itemPath); + + totalBytes += fileInfo.size(); + totalLines += lineAll; + totalCodes += lineCode; + totalNotes += lineNotes; + totalBlanks += lineBlank; + + if (i % 100 == 0) { + qApp->processEvents(); + } + } + + //显示统计结果 + listFile.clear(); + ui->txtCount->setText(QString::number(count)); + ui->txtSize->setText(QString::number(totalBytes)); + ui->txtRow->setText(QString::number(totalLines)); + ui->txtCode->setText(QString::number(totalCodes)); + ui->txtNote->setText(QString::number(totalNotes)); + ui->txtBlank->setText(QString::number(totalBlanks)); + + //计算百分比 + double percent = 0.0; + //代码行所占百分比 + percent = ((double)totalCodes / totalLines) * 100; + ui->labPercentCode->setText(QString("%1%").arg(percent, 5, 'f', 2, QChar(' '))); + //注释行所占百分比 + percent = ((double)totalNotes / totalLines) * 100; + ui->labPercentNote->setText(QString("%1%").arg(percent, 5, 'f', 2, QChar(' '))); + //空行所占百分比 + percent = ((double)totalBlanks / totalLines) * 100; + ui->labPercentBlank->setText(QString("%1%").arg(percent, 5, 'f', 2, QChar(' '))); +} + +void frmCountCode::countCode(const QString &fileName, int &lineCode, int &lineBlank, int &lineNotes) +{ + lineCode = lineBlank = lineNotes = 0; + QFile file(fileName); + if (file.open(QFile::ReadOnly)) { + QTextStream out(&file); + QString line; + bool isNote = false; + while (!out.atEnd()) { + line = out.readLine(); + + //移除前面的空行 + if (line.startsWith(" ")) { + line.remove(" "); + } + + //判断当前行是否是注释 + if (line.startsWith("/*")) { + isNote = true; + } + + //注释部分 + if (isNote) { + lineNotes++; + } else { + if (line.startsWith("//")) { //注释行 + lineNotes++; + } else if (line.isEmpty()) { //空白行 + lineBlank++; + } else { //代码行 + lineCode++; + } + } + + //注释结束 + if (line.endsWith("*/")) { + isNote = false; + } + } + } +} + +void frmCountCode::on_btnOpenFile_clicked() +{ + QString filter = QString("代码文件(%1)").arg(ui->txtFilter->text().trimmed()); + QStringList files = QFileDialog::getOpenFileNames(this, "选择文件", "./", filter); + if (files.size() > 0) { + ui->txtFile->setText(files.join("|")); + countCode(files); + } +} + +void frmCountCode::on_btnOpenPath_clicked() +{ + QString path = QFileDialog::getExistingDirectory(this, "选择目录", "./", QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); + if (!path.isEmpty()) { + ui->txtPath->setText(path); + listFile.clear(); + countCode(path); + countCode(listFile); + } +} + +void frmCountCode::on_btnClear_clicked() +{ + ui->txtCount->setText("0"); + ui->txtSize->setText("0"); + ui->txtRow->setText("0"); + + ui->txtCode->setText("0"); + ui->txtNote->setText("0"); + ui->txtBlank->setText("0"); + + ui->labPercentCode->setText("0%"); + ui->labPercentNote->setText("0%"); + ui->labPercentBlank->setText("0%"); + ui->tableWidget->setRowCount(0); +} diff --git a/countcode/frmcountcode.h b/tool/countcode/frmcountcode.h similarity index 95% rename from countcode/frmcountcode.h rename to tool/countcode/frmcountcode.h index c431936..f35f45b 100644 --- a/countcode/frmcountcode.h +++ b/tool/countcode/frmcountcode.h @@ -1,35 +1,35 @@ -#ifndef FRMCOUNTCODE_H -#define FRMCOUNTCODE_H - -#include - -namespace Ui { -class frmCountCode; -} - -class frmCountCode : public QWidget -{ - Q_OBJECT - -public: - explicit frmCountCode(QWidget *parent = 0); - ~frmCountCode(); - -private: - Ui::frmCountCode *ui; - QStringList listFile; - -private: - void initForm(); - bool checkFile(const QString &fileName); - void countCode(const QString &filePath); - void countCode(const QStringList &files); - void countCode(const QString &fileName, int &lineCode, int &lineBlank, int &lineNotes); - -private slots: - void on_btnOpenFile_clicked(); - void on_btnOpenPath_clicked(); - void on_btnClear_clicked(); -}; - -#endif // FRMCOUNTCODE_H +#ifndef FRMCOUNTCODE_H +#define FRMCOUNTCODE_H + +#include + +namespace Ui { +class frmCountCode; +} + +class frmCountCode : public QWidget +{ + Q_OBJECT + +public: + explicit frmCountCode(QWidget *parent = 0); + ~frmCountCode(); + +private: + Ui::frmCountCode *ui; + QStringList listFile; + +private: + void initForm(); + bool checkFile(const QString &fileName); + void countCode(const QString &filePath); + void countCode(const QStringList &files); + void countCode(const QString &fileName, int &lineCode, int &lineBlank, int &lineNotes); + +private slots: + void on_btnOpenFile_clicked(); + void on_btnOpenPath_clicked(); + void on_btnClear_clicked(); +}; + +#endif // FRMCOUNTCODE_H diff --git a/countcode/frmcountcode.ui b/tool/countcode/frmcountcode.ui similarity index 96% rename from countcode/frmcountcode.ui rename to tool/countcode/frmcountcode.ui index 9de56f8..3913afa 100644 --- a/countcode/frmcountcode.ui +++ b/tool/countcode/frmcountcode.ui @@ -1,411 +1,411 @@ - - - frmCountCode - - - - 0 - 0 - 800 - 600 - - - - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - 80 - 16777215 - - - - Qt::AlignCenter - - - true - - - - - - - - 0 - 0 - - - - Qt::AlignCenter - - - true - - - - - - - - 0 - 0 - - - - Qt::AlignCenter - - - true - - - - - - - - 0 - 0 - - - - Qt::AlignCenter - - - true - - - - - - - - 80 - 16777215 - - - - Qt::AlignCenter - - - true - - - - - - - - 60 - 0 - - - - QFrame::Box - - - QFrame::Sunken - - - - - - Qt::AlignCenter - - - - - - - 空白行数 - - - - - - - - 0 - 0 - - - - Qt::AlignCenter - - - true - - - - - - - 过滤 - - - - - - - 文件 - - - - - - - true - - - - - - - true - - - - - - - 目录 - - - - - - - *.h *.cpp *.c *.cs *.java *.js - - - - - - - QFrame::Box - - - QFrame::Sunken - - - - - - Qt::AlignCenter - - - - - - - QFrame::Box - - - QFrame::Sunken - - - - - - Qt::AlignCenter - - - - - - - 文件数 - - - - - - - 代码行数 - - - - - - - 注释行数 - - - - - - - 字节数 - - - - - - - 总行数 - - - - - - - - - 打开文件 - - - - - - - 打开目录 - - - - - - - 清空结果 - - - - - - - - - - - :/images/toolbar/ic_files.png:/images/toolbar/ic_files.png - - - 选择文件 - - - Ctrl+O - - - - - - :/images/toolbar/ic_folder.png:/images/toolbar/ic_folder.png - - - 选择目录 - - - Ctrl+Shift+O - - - - - - :/images/toolbar/ic_about.png:/images/toolbar/ic_about.png - - - 关于 - - - - - - :/images/toolbar/ic_clean.png:/images/toolbar/ic_clean.png - - - 清空列表 - - - - - - :/images/toolbar/ic_delete.png:/images/toolbar/ic_delete.png - - - 删除选中行 - - - - - true - - - true - - - 中文 - - - - - true - - - English - - - - - true - - - true - - - UTF8 - - - - - true - - - GB18030 - - - - - 退出 - - - Ctrl+Q - - - - - - btnOpenFile - btnOpenPath - btnClear - tableWidget - txtCount - txtSize - txtRow - txtCode - txtNote - txtBlank - txtFile - txtPath - txtFilter - - - - + + + frmCountCode + + + + 0 + 0 + 800 + 600 + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + 80 + 16777215 + + + + Qt::AlignCenter + + + true + + + + + + + + 0 + 0 + + + + Qt::AlignCenter + + + true + + + + + + + + 0 + 0 + + + + Qt::AlignCenter + + + true + + + + + + + + 0 + 0 + + + + Qt::AlignCenter + + + true + + + + + + + + 80 + 16777215 + + + + Qt::AlignCenter + + + true + + + + + + + + 60 + 0 + + + + QFrame::Box + + + QFrame::Sunken + + + + + + Qt::AlignCenter + + + + + + + 空白行数 + + + + + + + + 0 + 0 + + + + Qt::AlignCenter + + + true + + + + + + + 过滤 + + + + + + + 文件 + + + + + + + true + + + + + + + true + + + + + + + 目录 + + + + + + + *.h *.cpp *.c *.cs *.java *.js + + + + + + + QFrame::Box + + + QFrame::Sunken + + + + + + Qt::AlignCenter + + + + + + + QFrame::Box + + + QFrame::Sunken + + + + + + Qt::AlignCenter + + + + + + + 文件数 + + + + + + + 代码行数 + + + + + + + 注释行数 + + + + + + + 字节数 + + + + + + + 总行数 + + + + + + + + + 打开文件 + + + + + + + 打开目录 + + + + + + + 清空结果 + + + + + + + + + + + :/images/toolbar/ic_files.png:/images/toolbar/ic_files.png + + + 选择文件 + + + Ctrl+O + + + + + + :/images/toolbar/ic_folder.png:/images/toolbar/ic_folder.png + + + 选择目录 + + + Ctrl+Shift+O + + + + + + :/images/toolbar/ic_about.png:/images/toolbar/ic_about.png + + + 关于 + + + + + + :/images/toolbar/ic_clean.png:/images/toolbar/ic_clean.png + + + 清空列表 + + + + + + :/images/toolbar/ic_delete.png:/images/toolbar/ic_delete.png + + + 删除选中行 + + + + + true + + + true + + + 中文 + + + + + true + + + English + + + + + true + + + true + + + UTF8 + + + + + true + + + GB18030 + + + + + 退出 + + + Ctrl+Q + + + + + + btnOpenFile + btnOpenPath + btnClear + tableWidget + txtCount + txtSize + txtRow + txtCode + txtNote + txtBlank + txtFile + txtPath + txtFilter + + + + diff --git a/countcode/main.cpp b/tool/countcode/main.cpp similarity index 96% rename from countcode/main.cpp rename to tool/countcode/main.cpp index 194f9bc..64b723d 100644 --- a/countcode/main.cpp +++ b/tool/countcode/main.cpp @@ -1,31 +1,31 @@ -#pragma execution_character_set("utf-8") - -#include "frmcountcode.h" -#include -#include - -int main(int argc, char *argv[]) -{ - QApplication a(argc, argv); - a.setFont(QFont("Microsoft Yahei", 9)); - -#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0)) -#if _MSC_VER - QTextCodec *codec = QTextCodec::codecForName("gbk"); -#else - QTextCodec *codec = QTextCodec::codecForName("utf-8"); -#endif - QTextCodec::setCodecForLocale(codec); - QTextCodec::setCodecForCStrings(codec); - QTextCodec::setCodecForTr(codec); -#else - QTextCodec *codec = QTextCodec::codecForName("utf-8"); - QTextCodec::setCodecForLocale(codec); -#endif - - frmCountCode w; - w.setWindowTitle("代码行数统计"); - w.show(); - - return a.exec(); -} +#pragma execution_character_set("utf-8") + +#include "frmcountcode.h" +#include +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + a.setFont(QFont("Microsoft Yahei", 9)); + +#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0)) +#if _MSC_VER + QTextCodec *codec = QTextCodec::codecForName("gbk"); +#else + QTextCodec *codec = QTextCodec::codecForName("utf-8"); +#endif + QTextCodec::setCodecForLocale(codec); + QTextCodec::setCodecForCStrings(codec); + QTextCodec::setCodecForTr(codec); +#else + QTextCodec *codec = QTextCodec::codecForName("utf-8"); + QTextCodec::setCodecForLocale(codec); +#endif + + frmCountCode w; + w.setWindowTitle("代码行数统计"); + w.show(); + + return a.exec(); +} diff --git a/emailtool/emailtool.pro b/tool/emailtool/emailtool.pro similarity index 100% rename from emailtool/emailtool.pro rename to tool/emailtool/emailtool.pro diff --git a/emailtool/frmemailtool.cpp b/tool/emailtool/frmemailtool.cpp similarity index 100% rename from emailtool/frmemailtool.cpp rename to tool/emailtool/frmemailtool.cpp diff --git a/emailtool/frmemailtool.h b/tool/emailtool/frmemailtool.h similarity index 100% rename from emailtool/frmemailtool.h rename to tool/emailtool/frmemailtool.h diff --git a/emailtool/frmemailtool.ui b/tool/emailtool/frmemailtool.ui similarity index 100% rename from emailtool/frmemailtool.ui rename to tool/emailtool/frmemailtool.ui diff --git a/emailtool/main.cpp b/tool/emailtool/main.cpp similarity index 100% rename from emailtool/main.cpp rename to tool/emailtool/main.cpp diff --git a/emailtool/readme.txt b/tool/emailtool/readme.txt similarity index 100% rename from emailtool/readme.txt rename to tool/emailtool/readme.txt diff --git a/emailtool/sendemailthread.cpp b/tool/emailtool/sendemailthread.cpp similarity index 100% rename from emailtool/sendemailthread.cpp rename to tool/emailtool/sendemailthread.cpp diff --git a/emailtool/sendemailthread.h b/tool/emailtool/sendemailthread.h similarity index 100% rename from emailtool/sendemailthread.h rename to tool/emailtool/sendemailthread.h diff --git a/key/keydemo/appkey.cpp b/tool/keydemo/appkey.cpp similarity index 100% rename from key/keydemo/appkey.cpp rename to tool/keydemo/appkey.cpp diff --git a/key/keydemo/appkey.h b/tool/keydemo/appkey.h similarity index 100% rename from key/keydemo/appkey.h rename to tool/keydemo/appkey.h diff --git a/key/keydemo/frmmain.cpp b/tool/keydemo/frmmain.cpp similarity index 100% rename from key/keydemo/frmmain.cpp rename to tool/keydemo/frmmain.cpp diff --git a/key/keydemo/frmmain.h b/tool/keydemo/frmmain.h similarity index 100% rename from key/keydemo/frmmain.h rename to tool/keydemo/frmmain.h diff --git a/key/keydemo/frmmain.ui b/tool/keydemo/frmmain.ui similarity index 100% rename from key/keydemo/frmmain.ui rename to tool/keydemo/frmmain.ui diff --git a/key/keydemo/keydemo.pro b/tool/keydemo/keydemo.pro similarity index 66% rename from key/keydemo/keydemo.pro rename to tool/keydemo/keydemo.pro index 5c28892..e9745da 100644 --- a/key/keydemo/keydemo.pro +++ b/tool/keydemo/keydemo.pro @@ -1,12 +1,6 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2019-02-17T20:23:58 -# -#------------------------------------------------- - -QT += core gui - +QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat TARGET = keydemo TEMPLATE = app diff --git a/key/keydemo/main.cpp b/tool/keydemo/main.cpp similarity index 100% rename from key/keydemo/main.cpp rename to tool/keydemo/main.cpp diff --git a/key/keytool/frmmain.cpp b/tool/keytool/frmmain.cpp similarity index 100% rename from key/keytool/frmmain.cpp rename to tool/keytool/frmmain.cpp diff --git a/key/keytool/frmmain.h b/tool/keytool/frmmain.h similarity index 100% rename from key/keytool/frmmain.h rename to tool/keytool/frmmain.h diff --git a/key/keytool/frmmain.ui b/tool/keytool/frmmain.ui similarity index 100% rename from key/keytool/frmmain.ui rename to tool/keytool/frmmain.ui diff --git a/key/keytool/keytool.pro b/tool/keytool/keytool.pro similarity index 65% rename from key/keytool/keytool.pro rename to tool/keytool/keytool.pro index 16c64ae..4d10e8a 100644 --- a/key/keytool/keytool.pro +++ b/tool/keytool/keytool.pro @@ -1,12 +1,6 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2019-02-17T20:23:58 -# -#------------------------------------------------- - -QT += core gui - +QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat TARGET = keytool TEMPLATE = app diff --git a/key/keytool/main.cpp b/tool/keytool/main.cpp similarity index 100% rename from key/keytool/main.cpp rename to tool/keytool/main.cpp diff --git a/live/livedemo/applive.cpp b/tool/livedemo/applive.cpp similarity index 100% rename from live/livedemo/applive.cpp rename to tool/livedemo/applive.cpp diff --git a/live/livedemo/applive.h b/tool/livedemo/applive.h similarity index 100% rename from live/livedemo/applive.h rename to tool/livedemo/applive.h diff --git a/live/livedemo/frmmain.cpp b/tool/livedemo/frmmain.cpp similarity index 100% rename from live/livedemo/frmmain.cpp rename to tool/livedemo/frmmain.cpp diff --git a/live/livedemo/frmmain.h b/tool/livedemo/frmmain.h similarity index 100% rename from live/livedemo/frmmain.h rename to tool/livedemo/frmmain.h diff --git a/live/livedemo/frmmain.ui b/tool/livedemo/frmmain.ui similarity index 100% rename from live/livedemo/frmmain.ui rename to tool/livedemo/frmmain.ui diff --git a/live/livedemo/livedemo.pro b/tool/livedemo/livedemo.pro similarity index 65% rename from live/livedemo/livedemo.pro rename to tool/livedemo/livedemo.pro index bb0cf6a..d334b9e 100644 --- a/live/livedemo/livedemo.pro +++ b/tool/livedemo/livedemo.pro @@ -1,12 +1,6 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2019-02-17T20:23:58 -# -#------------------------------------------------- - -QT += core gui network - +QT += core gui network greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat TARGET = livedemo TEMPLATE = app diff --git a/live/livedemo/main.cpp b/tool/livedemo/main.cpp similarity index 100% rename from live/livedemo/main.cpp rename to tool/livedemo/main.cpp diff --git a/live/livetool/app.cpp b/tool/livetool/app.cpp similarity index 100% rename from live/livetool/app.cpp rename to tool/livetool/app.cpp diff --git a/live/livetool/app.h b/tool/livetool/app.h similarity index 100% rename from live/livetool/app.h rename to tool/livetool/app.h diff --git a/live/livetool/frmmain.cpp b/tool/livetool/frmmain.cpp similarity index 100% rename from live/livetool/frmmain.cpp rename to tool/livetool/frmmain.cpp diff --git a/live/livetool/frmmain.h b/tool/livetool/frmmain.h similarity index 100% rename from live/livetool/frmmain.h rename to tool/livetool/frmmain.h diff --git a/live/livetool/frmmain.ui b/tool/livetool/frmmain.ui similarity index 100% rename from live/livetool/frmmain.ui rename to tool/livetool/frmmain.ui diff --git a/live/livetool/livetool.pro b/tool/livetool/livetool.pro similarity index 67% rename from live/livetool/livetool.pro rename to tool/livetool/livetool.pro index f11590b..e771722 100644 --- a/live/livetool/livetool.pro +++ b/tool/livetool/livetool.pro @@ -1,12 +1,6 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2019-02-15T14:34:50 -# -#------------------------------------------------- - -QT += core gui network - +QT += core gui network greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat TARGET = livetool TEMPLATE = app diff --git a/live/livetool/main.cpp b/tool/livetool/main.cpp similarity index 100% rename from live/livetool/main.cpp rename to tool/livetool/main.cpp diff --git a/live/livetool/main.ico b/tool/livetool/main.ico similarity index 100% rename from live/livetool/main.ico rename to tool/livetool/main.ico diff --git a/live/livetool/main.qrc b/tool/livetool/main.qrc similarity index 100% rename from live/livetool/main.qrc rename to tool/livetool/main.qrc diff --git a/trayicon/trayicon.cpp b/tool/livetool/trayicon.cpp similarity index 100% rename from trayicon/trayicon.cpp rename to tool/livetool/trayicon.cpp diff --git a/trayicon/trayicon.h b/tool/livetool/trayicon.h similarity index 100% rename from trayicon/trayicon.h rename to tool/livetool/trayicon.h diff --git a/mouseline/main.cpp b/tool/moneytool/main.cpp similarity index 100% rename from mouseline/main.cpp rename to tool/moneytool/main.cpp diff --git a/moneytool/moneytool.pro b/tool/moneytool/moneytool.pro similarity index 100% rename from moneytool/moneytool.pro rename to tool/moneytool/moneytool.pro diff --git a/moneytool/widget.cpp b/tool/moneytool/widget.cpp similarity index 100% rename from moneytool/widget.cpp rename to tool/moneytool/widget.cpp diff --git a/moneytool/widget.h b/tool/moneytool/widget.h similarity index 100% rename from moneytool/widget.h rename to tool/moneytool/widget.h diff --git a/moneytool/widget.ui b/tool/moneytool/widget.ui similarity index 100% rename from moneytool/widget.ui rename to tool/moneytool/widget.ui diff --git a/netserver/api/api.pri b/tool/netserver/api/api.pri similarity index 62% rename from netserver/api/api.pri rename to tool/netserver/api/api.pri index eec1c5d..335ed6d 100644 --- a/netserver/api/api.pri +++ b/tool/netserver/api/api.pri @@ -1,9 +1,13 @@ HEADERS += \ $$PWD/appconfig.h \ + $$PWD/quihelper.h \ + $$PWD/quihelperdata.h \ $$PWD/tcpserver1.h \ $$PWD/tcpserver2.h SOURCES += \ $$PWD/appconfig.cpp \ + $$PWD/quihelper.cpp \ + $$PWD/quihelperdata.cpp \ $$PWD/tcpserver1.cpp \ $$PWD/tcpserver2.cpp diff --git a/netserver/api/appconfig.cpp b/tool/netserver/api/appconfig.cpp similarity index 100% rename from netserver/api/appconfig.cpp rename to tool/netserver/api/appconfig.cpp diff --git a/netserver/api/appconfig.h b/tool/netserver/api/appconfig.h similarity index 100% rename from netserver/api/appconfig.h rename to tool/netserver/api/appconfig.h diff --git a/tool/netserver/api/quihelper.cpp b/tool/netserver/api/quihelper.cpp new file mode 100644 index 0000000..2b3eabf --- /dev/null +++ b/tool/netserver/api/quihelper.cpp @@ -0,0 +1,420 @@ +#include "quihelper.h" + +int QUIHelper::getScreenIndex() +{ + //需要对多个屏幕进行处理 + int screenIndex = 0; +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + int screenCount = qApp->screens().count(); +#else + int screenCount = qApp->desktop()->screenCount(); +#endif + + if (screenCount > 1) { + //找到当前鼠标所在屏幕 + QPoint pos = QCursor::pos(); + for (int i = 0; i < screenCount; ++i) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + if (qApp->screens().at(i)->geometry().contains(pos)) { +#else + if (qApp->desktop()->screenGeometry(i).contains(pos)) { +#endif + screenIndex = i; + break; + } + } + } + return screenIndex; +} + +QRect QUIHelper::getScreenRect(bool available) +{ + QRect rect; + int screenIndex = QUIHelper::getScreenIndex(); + if (available) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + rect = qApp->screens().at(screenIndex)->availableGeometry(); +#else + rect = qApp->desktop()->availableGeometry(screenIndex); +#endif + } else { +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + rect = qApp->screens().at(screenIndex)->geometry(); +#else + rect = qApp->desktop()->screenGeometry(screenIndex); +#endif + } + return rect; +} + +int QUIHelper::deskWidth() +{ + return getScreenRect().width(); +} + +int QUIHelper::deskHeight() +{ + return getScreenRect().height(); +} + +QWidget *QUIHelper::centerBaseForm = 0; +void QUIHelper::setFormInCenter(QWidget *form) +{ + int formWidth = form->width(); + int formHeight = form->height(); + + //如果=0表示采用系统桌面屏幕为参照 + QRect rect; + if (centerBaseForm == 0) { + rect = getScreenRect(); + } else { + rect = centerBaseForm->geometry(); + } + + int deskWidth = rect.width(); + int deskHeight = rect.height(); + QPoint movePoint(deskWidth / 2 - formWidth / 2 + rect.x(), deskHeight / 2 - formHeight / 2 + rect.y()); + form->move(movePoint); +} + +QString QUIHelper::appName() +{ + //没有必要每次都获取,只有当变量为空时才去获取一次 + static QString name; + if (name.isEmpty()) { + name = qApp->applicationFilePath(); + //下面的方法主要为了过滤安卓的路径 lib程序名_armeabi-v7a + QStringList list = name.split("/"); + name = list.at(list.count() - 1).split(".").at(0); + } + + return name; +} + +QString QUIHelper::appPath() +{ +#ifdef Q_OS_ANDROID + //return QString("/sdcard/Android/%1").arg(appName()); + return QString("/storage/emulated/0/%1").arg(appName()); +#else + return qApp->applicationDirPath(); +#endif +} + +QString QUIHelper::getUuid() +{ + QString uuid = QUuid::createUuid().toString(); + uuid.replace("{", ""); + uuid.replace("}", ""); + return uuid; +} + +void QUIHelper::initRand() +{ + //初始化随机数种子 + QTime t = QTime::currentTime(); + srand(t.msec() + t.second() * 1000); +} + +void QUIHelper::newDir(const QString &dirName) +{ + QString strDir = dirName; + + //如果路径中包含斜杠字符则说明是绝对路径 + //linux系统路径字符带有 / windows系统 路径字符带有 :/ + if (!strDir.startsWith("/") && !strDir.contains(":/")) { + strDir = QString("%1/%2").arg(QUIHelper::appPath()).arg(strDir); + } + + QDir dir(strDir); + if (!dir.exists()) { + dir.mkpath(strDir); + } +} + +void QUIHelper::sleep(int msec) +{ + if (msec <= 0) { + return; + } + +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + QThread::msleep(msec); +#else + QTime endTime = QTime::currentTime().addMSecs(msec); + while (QTime::currentTime() < endTime) { + QCoreApplication::processEvents(QEventLoop::AllEvents, 100); + } +#endif +} + +void QUIHelper::setStyle() +{ + //打印下所有内置风格的名字 + qDebug() << "Qt内置的样式" << QStyleFactory::keys(); +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + qApp->setStyle(QStyleFactory::create("Fusion")); +#else + qApp->setStyle(QStyleFactory::create("Cleanlooks")); +#endif + //qApp->setPalette(QPalette("#FFFFFF")); +} + +void QUIHelper::setFont(int fontSize) +{ + QFont font; + font.setFamily("MicroSoft Yahei"); +#ifdef Q_OS_ANDROID + font.setPixelSize(15); +#elif __arm__ + font.setPixelSize(25); +#else + font.setPixelSize(fontSize); +#endif + +#ifndef rk3399 + qApp->setFont(font); +#endif +} + +void QUIHelper::setCode(bool utf8) +{ +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + //如果想要控制台打印信息中文正常就注释掉这个设置 + if (utf8) { + QTextCodec *codec = QTextCodec::codecForName("utf-8"); + QTextCodec::setCodecForLocale(codec); + } +#else +#if _MSC_VER + QTextCodec *codec = QTextCodec::codecForName("gbk"); +#else + QTextCodec *codec = QTextCodec::codecForName("utf-8"); +#endif + QTextCodec::setCodecForLocale(codec); + QTextCodec::setCodecForCStrings(codec); + QTextCodec::setCodecForTr(codec); +#endif +} + +void QUIHelper::setTranslator(const QString &qmFile) +{ + //过滤下不存在的就不用设置了 + if (!QFile(qmFile).exists()) { + return; + } + + QTranslator *translator = new QTranslator(qApp); + translator->load(qmFile); + qApp->installTranslator(translator); +} + +void QUIHelper::initAll() +{ + //初始化随机数种子 + QUIHelper::initRand(); + //设置样式风格 + QUIHelper::setStyle(); + //设置字体 + QUIHelper::setFont(13); + //设置编码 + QUIHelper::setCode(); + //设置翻译文件支持多个 + QUIHelper::setTranslator(":/qm/widgets.qm"); + QUIHelper::setTranslator(":/qm/qt_zh_CN.qm"); + QUIHelper::setTranslator(":/qm/designer_zh_CN.qm"); +} + +void QUIHelper::setFramelessForm(QWidget *widgetMain, bool tool, bool top, bool menu) +{ + widgetMain->setProperty("form", true); + widgetMain->setProperty("canMove", true); + + //根据设定逐个追加属性 +#ifdef __arm__ + widgetMain->setWindowFlags(Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint); +#else + widgetMain->setWindowFlags(Qt::FramelessWindowHint); +#endif + if (tool) { + widgetMain->setWindowFlags(widgetMain->windowFlags() | Qt::Tool); + } + if (top) { + widgetMain->setWindowFlags(widgetMain->windowFlags() | Qt::WindowStaysOnTopHint); + } + if (menu) { + //如果是其他系统比如neokylin会产生系统边框 +#ifdef Q_OS_WIN + widgetMain->setWindowFlags(widgetMain->windowFlags() | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint); +#endif + } +} + +int QUIHelper::showMessageBox(const QString &info, int type, int closeSec, bool exec) +{ + int result = 0; + if (type == 0) { + showMessageBoxInfo(info, closeSec, exec); + } else if (type == 1) { + showMessageBoxError(info, closeSec, exec); + } else if (type == 2) { + result = showMessageBoxQuestion(info); + } + + return result; +} + +void QUIHelper::showMessageBoxInfo(const QString &info, int closeSec, bool exec) +{ + QMessageBox box(QMessageBox::Information, "提示", info); + box.setStandardButtons(QMessageBox::Yes); + box.setButtonText(QMessageBox::Yes, QString("确 定")); + box.exec(); + //QMessageBox::information(0, "提示", info, QMessageBox::Yes); +} + +void QUIHelper::showMessageBoxError(const QString &info, int closeSec, bool exec) +{ + QMessageBox box(QMessageBox::Critical, "错误", info); + box.setStandardButtons(QMessageBox::Yes); + box.setButtonText(QMessageBox::Yes, QString("确 定")); + box.exec(); + //QMessageBox::critical(0, "错误", info, QMessageBox::Yes); +} + +int QUIHelper::showMessageBoxQuestion(const QString &info) +{ + QMessageBox box(QMessageBox::Question, "询问", info); + box.setStandardButtons(QMessageBox::Yes | QMessageBox::No); + box.setButtonText(QMessageBox::Yes, QString("确 定")); + box.setButtonText(QMessageBox::No, QString("取 消")); + return box.exec(); + //return QMessageBox::question(0, "询问", info, QMessageBox::Yes | QMessageBox::No); +} + +QString QUIHelper::getXorEncryptDecrypt(const QString &value, char key) +{ + //矫正范围外的数据 + if (key < 0 || key >= 127) { + key = 127; + } + + QString result = value; + int count = result.count(); + for (int i = 0; i < count; i++) { + result[i] = QChar(result.at(i).toLatin1() ^ key); + } + return result; +} + +uchar QUIHelper::getOrCode(const QByteArray &data) +{ + int len = data.length(); + uchar result = 0; + for (int i = 0; i < len; i++) { + result ^= data.at(i); + } + + return result; +} + +uchar QUIHelper::getCheckCode(const QByteArray &data) +{ + int len = data.length(); + uchar temp = 0; + for (uchar i = 0; i < len; i++) { + temp += data.at(i); + } + + return temp % 256; +} + +void QUIHelper::initTableView(QTableView *tableView, int rowHeight, bool headVisible, bool edit, bool stretchLast) +{ + //取消自动换行 + tableView->setWordWrap(false); + //超出文本不显示省略号 + tableView->setTextElideMode(Qt::ElideNone); + //奇数偶数行颜色交替 + tableView->setAlternatingRowColors(false); + //垂直表头是否可见 + tableView->verticalHeader()->setVisible(headVisible); + //选中一行表头是否加粗 + tableView->horizontalHeader()->setHighlightSections(false); + //最后一行拉伸填充 + tableView->horizontalHeader()->setStretchLastSection(stretchLast); + //行标题最小宽度尺寸 + tableView->horizontalHeader()->setMinimumSectionSize(0); + //行标题最小高度,等同于和默认行高一致 + tableView->horizontalHeader()->setFixedHeight(rowHeight); + //默认行高 + tableView->verticalHeader()->setDefaultSectionSize(rowHeight); + //选中时一行整体选中 + tableView->setSelectionBehavior(QAbstractItemView::SelectRows); + //只允许选择单个 + tableView->setSelectionMode(QAbstractItemView::SingleSelection); + + //表头不可单击 +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + tableView->horizontalHeader()->setSectionsClickable(false); +#else + tableView->horizontalHeader()->setClickable(false); +#endif + + //鼠标按下即进入编辑模式 + if (edit) { + tableView->setEditTriggers(QAbstractItemView::CurrentChanged | QAbstractItemView::DoubleClicked); + } else { + tableView->setEditTriggers(QAbstractItemView::NoEditTriggers); + } +} + +void QUIHelper::openFile(const QString &fileName, const QString &msg) +{ +#ifdef __arm__ + return; +#endif + if (fileName.isEmpty()) { + return; + } + if (QUIHelper::showMessageBoxQuestion(msg + "成功!确定现在就打开吗?") == QMessageBox::Yes) { + QString url = QString("file:///%1").arg(fileName); + QDesktopServices::openUrl(QUrl(url, QUrl::TolerantMode)); + } +} + +bool QUIHelper::checkIniFile(const QString &iniFile) +{ + //如果配置文件大小为0,则以初始值继续运行,并生成配置文件 + QFile file(iniFile); + if (file.size() == 0) { + return false; + } + + //如果配置文件不完整,则以初始值继续运行,并生成配置文件 + if (file.open(QFile::ReadOnly)) { + bool ok = true; + while (!file.atEnd()) { + QString line = file.readLine(); + line.replace("\r", ""); + line.replace("\n", ""); + QStringList list = line.split("="); + + if (list.count() == 2) { + if (list.at(1) == "") { + qDebug() << "ini node no value" << list.at(0); + ok = false; + break; + } + } + } + + if (!ok) { + return false; + } + } else { + return false; + } + + return true; +} diff --git a/tool/netserver/api/quihelper.h b/tool/netserver/api/quihelper.h new file mode 100644 index 0000000..dc40547 --- /dev/null +++ b/tool/netserver/api/quihelper.h @@ -0,0 +1,70 @@ +#ifndef QUIHELPER2_H +#define QUIHELPER2_H + +#include "head.h" + +class QUIHelper +{ +public: + //获取当前鼠标所在屏幕索引+尺寸 + static int getScreenIndex(); + static QRect getScreenRect(bool available = true); + + //获取桌面宽度高度+居中显示 + static int deskWidth(); + static int deskHeight(); + + //居中显示窗体 + //定义标志位指定是以桌面为参照还是主程序界面为参照 + static QWidget *centerBaseForm; + static void setFormInCenter(QWidget *form); + + //程序文件名称+当前所在路径 + static QString appName(); + static QString appPath(); + + //获取uuid+初始化随机数种子+新建目录+延时 + static QString getUuid(); + static void initRand(); + static void newDir(const QString &dirName); + static void sleep(int msec); + + //设置样式+字体+编码+居中+翻译 + static void setStyle(); + static void setFont(int fontSize = 12); + static void setCode(bool utf8 = true); + static void setTranslator(const QString &qmFile); + //一次性设置所有 + static void initAll(); + + //设置无边框 + static void setFramelessForm(QWidget *widgetMain, bool tool = false, bool top = false, bool menu = true); + + //弹出框 + static int showMessageBox(const QString &info, int type = 0, int closeSec = 0, bool exec = false); + //弹出消息框 + static void showMessageBoxInfo(const QString &info, int closeSec = 0, bool exec = false); + //弹出错误框 + static void showMessageBoxError(const QString &info, int closeSec = 0, bool exec = false); + //弹出询问框 + static int showMessageBoxQuestion(const QString &info); + + //异或加密-只支持字符,如果是中文需要将其转换base64编码 + static QString getXorEncryptDecrypt(const QString &value, char key); + //异或校验 + static uchar getOrCode(const QByteArray &data); + //计算校验码 + static uchar getCheckCode(const QByteArray &data); + + //初始化表格 + static void initTableView(QTableView *tableView, int rowHeight = 25, + bool headVisible = false, bool edit = false, + bool stretchLast = true); + //打开文件带提示框 + static void openFile(const QString &fileName, const QString &msg); + + //检查ini配置文件 + static bool checkIniFile(const QString &iniFile); +}; + +#endif // QUIHELPER2_H diff --git a/tool/netserver/api/quihelperdata.cpp b/tool/netserver/api/quihelperdata.cpp new file mode 100644 index 0000000..0d26a90 --- /dev/null +++ b/tool/netserver/api/quihelperdata.cpp @@ -0,0 +1,450 @@ +#include "quihelperdata.h" +#include "quihelper.h" + +int QUIHelperData::strHexToDecimal(const QString &strHex) +{ + bool ok; + return strHex.toInt(&ok, 16); +} + +int QUIHelperData::strDecimalToDecimal(const QString &strDecimal) +{ + bool ok; + return strDecimal.toInt(&ok, 10); +} + +int QUIHelperData::strBinToDecimal(const QString &strBin) +{ + bool ok; + return strBin.toInt(&ok, 2); +} + +QString QUIHelperData::strHexToStrBin(const QString &strHex) +{ + uchar decimal = strHexToDecimal(strHex); + QString bin = QString::number(decimal, 2); + uchar len = bin.length(); + + if (len < 8) { + for (int i = 0; i < 8 - len; i++) { + bin = "0" + bin; + } + } + + return bin; +} + +QString QUIHelperData::decimalToStrBin1(int decimal) +{ + QString bin = QString::number(decimal, 2); + uchar len = bin.length(); + if (len <= 8) { + for (int i = 0; i < 8 - len; i++) { + bin = "0" + bin; + } + } + + return bin; +} + +QString QUIHelperData::decimalToStrBin2(int decimal) +{ + QString bin = QString::number(decimal, 2); + uchar len = bin.length(); + if (len <= 16) { + for (int i = 0; i < 16 - len; i++) { + bin = "0" + bin; + } + } + + return bin; +} + +QString QUIHelperData::decimalToStrHex(int decimal) +{ + QString temp = QString::number(decimal, 16); + if (temp.length() == 1) { + temp = "0" + temp; + } + + return temp; +} + +QByteArray QUIHelperData::intToByte(int data) +{ + QByteArray result; + result.resize(4); + result[3] = (uchar)(0x000000ff & data); + result[2] = (uchar)((0x0000ff00 & data) >> 8); + result[1] = (uchar)((0x00ff0000 & data) >> 16); + result[0] = (uchar)((0xff000000 & data) >> 24); + return result; +} + +QByteArray QUIHelperData::intToByteRec(int data) +{ + QByteArray result; + result.resize(4); + result[0] = (uchar)(0x000000ff & data); + result[1] = (uchar)((0x0000ff00 & data) >> 8); + result[2] = (uchar)((0x00ff0000 & data) >> 16); + result[3] = (uchar)((0xff000000 & data) >> 24); + return result; +} + +int QUIHelperData::byteToInt(const QByteArray &data) +{ + int i = data.at(3) & 0x000000ff; + i |= ((data.at(2) << 8) & 0x0000ff00); + i |= ((data.at(1) << 16) & 0x00ff0000); + i |= ((data.at(0) << 24) & 0xff000000); + return i; +} + +int QUIHelperData::byteToIntRec(const QByteArray &data) +{ + int i = data.at(0) & 0x000000ff; + i |= ((data.at(1) << 8) & 0x0000ff00); + i |= ((data.at(2) << 16) & 0x00ff0000); + i |= ((data.at(3) << 24) & 0xff000000); + return i; +} + +quint32 QUIHelperData::byteToUInt(const QByteArray &data) +{ + quint32 i = data.at(3) & 0x000000ff; + i |= ((data.at(2) << 8) & 0x0000ff00); + i |= ((data.at(1) << 16) & 0x00ff0000); + i |= ((data.at(0) << 24) & 0xff000000); + return i; +} + +quint32 QUIHelperData::byteToUIntRec(const QByteArray &data) +{ + quint32 i = data.at(0) & 0x000000ff; + i |= ((data.at(1) << 8) & 0x0000ff00); + i |= ((data.at(2) << 16) & 0x00ff0000); + i |= ((data.at(3) << 24) & 0xff000000); + return i; +} + +QByteArray QUIHelperData::ushortToByte(ushort data) +{ + QByteArray result; + result.resize(2); + result[1] = (uchar)(0x000000ff & data); + result[0] = (uchar)((0x0000ff00 & data) >> 8); + return result; +} + +QByteArray QUIHelperData::ushortToByteRec(ushort data) +{ + QByteArray result; + result.resize(2); + result[0] = (uchar)(0x000000ff & data); + result[1] = (uchar)((0x0000ff00 & data) >> 8); + return result; +} + +int QUIHelperData::byteToUShort(const QByteArray &data) +{ + int i = data.at(1) & 0x000000FF; + i |= ((data.at(0) << 8) & 0x0000FF00); + if (i >= 32768) { + i = i - 65536; + } + + return i; +} + +int QUIHelperData::byteToUShortRec(const QByteArray &data) +{ + int i = data.at(0) & 0x000000FF; + i |= ((data.at(1) << 8) & 0x0000FF00); + if (i >= 32768) { + i = i - 65536; + } + + return i; +} + +QString QUIHelperData::getValue(quint8 value) +{ + QString result = QString::number(value); + if (result.length() <= 1) { + result = QString("0%1").arg(result); + } + return result; +} + +QString QUIHelperData::getXorEncryptDecrypt(const QString &value, char key) +{ + //矫正范围外的数据 + if (key < 0 || key >= 127) { + key = 127; + } + + QString result = value; + int count = result.count(); + for (int i = 0; i < count; i++) { + result[i] = QChar(result.at(i).toLatin1() ^ key); + } + return result; +} + +uchar QUIHelperData::getOrCode(const QByteArray &data) +{ + int len = data.length(); + uchar result = 0; + for (int i = 0; i < len; i++) { + result ^= data.at(i); + } + + return result; +} + +uchar QUIHelperData::getCheckCode(const QByteArray &data) +{ + int len = data.length(); + uchar temp = 0; + for (uchar i = 0; i < len; i++) { + temp += data.at(i); + } + + return temp % 256; +} + +//函数功能:计算CRC16 +//参数1:*data 16位CRC校验数据, +//参数2:len 数据流长度 +//参数3:init 初始化值 +//参数4:table 16位CRC查找表 + +//正序CRC计算 +quint16 QUIHelperData::getCrc16(quint8 *data, int len, quint16 init, const quint16 *table) +{ + quint16 crc_16 = init; + quint8 temp; + while (len-- > 0) { + temp = crc_16 & 0xff; + crc_16 = (crc_16 >> 8) ^ table[(temp ^ *data++) & 0xff]; + } + + return crc_16; +} + +//逆序CRC计算 +quint16 QUIHelperData::getCrc16Rec(quint8 *data, int len, quint16 init, const quint16 *table) +{ + quint16 crc_16 = init; + quint8 temp; + while (len-- > 0) { + temp = crc_16 >> 8; + crc_16 = (crc_16 << 8) ^ table[(temp ^ *data++) & 0xff]; + } + + return crc_16; +} + +//Modbus CRC16校验 +quint16 QUIHelperData::getModbus16(quint8 *data, int len) +{ + //MODBUS CRC-16表 8005 逆序 + const quint16 table_16[256] = { + 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, + 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, + 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, + 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, + 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40, + 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41, + 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641, + 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040, + 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240, + 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441, + 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41, + 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840, + 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41, + 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40, + 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640, + 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041, + 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240, + 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441, + 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41, + 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840, + 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41, + 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40, + 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640, + 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041, + 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241, + 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440, + 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40, + 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841, + 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40, + 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41, + 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641, + 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040 + }; + + return getCrc16(data, len, 0xFFFF, table_16); +} + +//CRC16校验 +QByteArray QUIHelperData::getCrcCode(const QByteArray &data) +{ + quint16 result = getModbus16((quint8 *)data.data(), data.length()); + return QUIHelperData::ushortToByteRec(result); +} + +static QMap listChar; +void QUIHelperData::initAscii() +{ + //0x20为空格,空格以下都是不可见字符 + if (listChar.count() == 0) { + listChar.insert(0, "\\NUL"); + listChar.insert(1, "\\SOH"); + listChar.insert(2, "\\STX"); + listChar.insert(3, "\\ETX"); + listChar.insert(4, "\\EOT"); + listChar.insert(5, "\\ENQ"); + listChar.insert(6, "\\ACK"); + listChar.insert(7, "\\BEL"); + listChar.insert(8, "\\BS"); + listChar.insert(9, "\\HT"); + listChar.insert(10, "\\LF"); + listChar.insert(11, "\\VT"); + listChar.insert(12, "\\FF"); + listChar.insert(13, "\\CR"); + listChar.insert(14, "\\SO"); + listChar.insert(15, "\\SI"); + listChar.insert(16, "\\DLE"); + listChar.insert(17, "\\DC1"); + listChar.insert(18, "\\DC2"); + listChar.insert(19, "\\DC3"); + listChar.insert(20, "\\DC4"); + listChar.insert(21, "\\NAK"); + listChar.insert(22, "\\SYN"); + listChar.insert(23, "\\ETB"); + listChar.insert(24, "\\CAN"); + listChar.insert(25, "\\EM"); + listChar.insert(26, "\\SUB"); + listChar.insert(27, "\\ESC"); + listChar.insert(28, "\\FS"); + listChar.insert(29, "\\GS"); + listChar.insert(30, "\\RS"); + listChar.insert(31, "\\US"); + listChar.insert(0x5C, "\\"); + listChar.insert(0x7F, "\\DEL"); + } +} + +QString QUIHelperData::byteArrayToAsciiStr(const QByteArray &data) +{ + //先初始化字符表 + initAscii(); + + QString temp; + int len = data.size(); + for (int i = 0; i < len; i++) { + char byte = data.at(i); + QString value = listChar.value(byte); + if (!value.isEmpty()) { + } else if (byte >= 0 && byte <= 0x7F) { + value = QString("%1").arg(byte); + } else { + value = decimalToStrHex((quint8)byte); + value = QString("\\x%1").arg(value.toUpper()); + } + + temp += value; + } + + return temp.trimmed(); +} + +QByteArray QUIHelperData::asciiStrToByteArray(const QString &data) +{ + //先初始化字符表 + initAscii(); + + QByteArray buffer; + QStringList list = data.split("\\"); + + int count = list.count(); + for (int i = 1; i < count; i++) { + QString str = list.at(i); + int key = 0; + if (str.contains("x")) { + key = strHexToDecimal(str.mid(1, 2)); + } else { + key = listChar.key("\\" + str); + } + + buffer.append(key); + } + + return buffer; +} + +char QUIHelperData::hexStrToChar(char data) +{ + if ((data >= '0') && (data <= '9')) { + return data - 0x30; + } else if ((data >= 'A') && (data <= 'F')) { + return data - 'A' + 10; + } else if ((data >= 'a') && (data <= 'f')) { + return data - 'a' + 10; + } else { + return (-1); + } +} + +QByteArray QUIHelperData::hexStrToByteArray(const QString &data) +{ + QByteArray senddata; + int hexdata, lowhexdata; + int hexdatalen = 0; + int len = data.length(); + senddata.resize(len / 2); + char lstr, hstr; + + for (int i = 0; i < len;) { + hstr = data.at(i).toLatin1(); + if (hstr == ' ') { + i++; + continue; + } + + i++; + if (i >= len) { + break; + } + + lstr = data.at(i).toLatin1(); + hexdata = hexStrToChar(hstr); + lowhexdata = hexStrToChar(lstr); + + if ((hexdata == 16) || (lowhexdata == 16)) { + break; + } else { + hexdata = hexdata * 16 + lowhexdata; + } + + i++; + senddata[hexdatalen] = (char)hexdata; + hexdatalen++; + } + + senddata.resize(hexdatalen); + return senddata; +} + +QString QUIHelperData::byteArrayToHexStr(const QByteArray &data) +{ + QString temp = ""; + QString hex = data.toHex(); + for (int i = 0; i < hex.length(); i = i + 2) { + temp += hex.mid(i, 2) + " "; + } + + return temp.trimmed().toUpper(); +} diff --git a/tool/netserver/api/quihelperdata.h b/tool/netserver/api/quihelperdata.h new file mode 100644 index 0000000..b5e3815 --- /dev/null +++ b/tool/netserver/api/quihelperdata.h @@ -0,0 +1,70 @@ +#ifndef QUIHELPERDATA_H +#define QUIHELPERDATA_H + +#include + +class QUIHelperData +{ +public: + //16进制字符串转10进制 + static int strHexToDecimal(const QString &strHex); + //10进制字符串转10进制 + static int strDecimalToDecimal(const QString &strDecimal); + //2进制字符串转10进制 + static int strBinToDecimal(const QString &strBin); + + //16进制字符串转2进制字符串 + static QString strHexToStrBin(const QString &strHex); + //10进制转2进制字符串一个字节 + static QString decimalToStrBin1(int decimal); + //10进制转2进制字符串两个字节 + static QString decimalToStrBin2(int decimal); + //10进制转16进制字符串,补零. + static QString decimalToStrHex(int decimal); + + //int转字节数组 + static QByteArray intToByte(int data); + static QByteArray intToByteRec(int data); + + //字节数组转int + static int byteToInt(const QByteArray &data); + static int byteToIntRec(const QByteArray &data); + static quint32 byteToUInt(const QByteArray &data); + static quint32 byteToUIntRec(const QByteArray &data); + + //ushort转字节数组 + static QByteArray ushortToByte(ushort data); + static QByteArray ushortToByteRec(ushort data); + + //字节数组转ushort + static int byteToUShort(const QByteArray &data); + static int byteToUShortRec(const QByteArray &data); + + //字符串补全 + static QString getValue(quint8 value); + + //异或加密-只支持字符,如果是中文需要将其转换base64编码 + static QString getXorEncryptDecrypt(const QString &value, char key); + //异或校验 + static uchar getOrCode(const QByteArray &data); + //计算校验码 + static uchar getCheckCode(const QByteArray &data); + + //CRC校验 + static quint16 getCrc16Rec(quint8 *data, int len, quint16 init, const quint16 *table); + static quint16 getCrc16(quint8 *data, int len, quint16 init, const quint16 *table); + static quint16 getModbus16(quint8 *data, int len); + static QByteArray getCrcCode(const QByteArray &data); + + //字节数组与Ascii字符串互转 + static void initAscii(); + static QString byteArrayToAsciiStr(const QByteArray &data); + static QByteArray asciiStrToByteArray(const QString &data); + + //16进制字符串与字节数组互转 + static char hexStrToChar(char data); + static QByteArray hexStrToByteArray(const QString &data); + static QString byteArrayToHexStr(const QByteArray &data); +}; + +#endif // QUIHELPERDATA_H diff --git a/netserver/api/tcpserver1.cpp b/tool/netserver/api/tcpserver1.cpp similarity index 96% rename from netserver/api/tcpserver1.cpp rename to tool/netserver/api/tcpserver1.cpp index 5a460c1..e253b0e 100644 --- a/netserver/api/tcpserver1.cpp +++ b/tool/netserver/api/tcpserver1.cpp @@ -1,5 +1,6 @@ #include "tcpserver1.h" #include "quihelper.h" +#include "quihelperdata.h" TcpClient1::TcpClient1(QObject *parent) : QTcpSocket(parent) { @@ -59,7 +60,7 @@ void TcpClient1::readData() QString buffer; if (AppConfig::HexData1) { - buffer = QUIHelper::byteArrayToHexStr(data); + buffer = QUIHelperData::byteArrayToHexStr(data); } else { buffer = QString(data); } @@ -71,7 +72,7 @@ void TcpClient1::sendData(const QString &data) { QByteArray buffer; if (AppConfig::HexData1) { - buffer = QUIHelper::hexStrToByteArray(data); + buffer = QUIHelperData::hexStrToByteArray(data); } else { buffer = data.toLatin1(); } diff --git a/netserver/api/tcpserver1.h b/tool/netserver/api/tcpserver1.h similarity index 100% rename from netserver/api/tcpserver1.h rename to tool/netserver/api/tcpserver1.h diff --git a/netserver/api/tcpserver2.cpp b/tool/netserver/api/tcpserver2.cpp similarity index 96% rename from netserver/api/tcpserver2.cpp rename to tool/netserver/api/tcpserver2.cpp index 1d91ee5..1171853 100644 --- a/netserver/api/tcpserver2.cpp +++ b/tool/netserver/api/tcpserver2.cpp @@ -1,5 +1,6 @@ #include "tcpserver2.h" #include "quihelper.h" +#include "quihelperdata.h" TcpClient2::TcpClient2(QObject *parent) : QTcpSocket(parent) { @@ -59,7 +60,7 @@ void TcpClient2::readData() QString buffer; if (AppConfig::HexData2) { - buffer = QUIHelper::byteArrayToHexStr(data); + buffer = QUIHelperData::byteArrayToHexStr(data); } else { buffer = QString(data); } @@ -71,7 +72,7 @@ void TcpClient2::sendData(const QString &data) { QByteArray buffer; if (AppConfig::HexData2) { - buffer = QUIHelper::hexStrToByteArray(data); + buffer = QUIHelperData::hexStrToByteArray(data); } else { buffer = data.toLatin1(); } diff --git a/netserver/api/tcpserver2.h b/tool/netserver/api/tcpserver2.h similarity index 100% rename from netserver/api/tcpserver2.h rename to tool/netserver/api/tcpserver2.h diff --git a/netserver/form/form.pri b/tool/netserver/form/form.pri similarity index 100% rename from netserver/form/form.pri rename to tool/netserver/form/form.pri diff --git a/netserver/form/frmmain.cpp b/tool/netserver/form/frmmain.cpp similarity index 99% rename from netserver/form/frmmain.cpp rename to tool/netserver/form/frmmain.cpp index 03e7e7b..1518348 100644 --- a/netserver/form/frmmain.cpp +++ b/tool/netserver/form/frmmain.cpp @@ -37,7 +37,7 @@ void frmMain::initConfig() { ui->txtListenPort1->setText(QString::number(AppConfig::ListenPort1)); connect(ui->txtListenPort1, SIGNAL(textChanged(QString)), this, SLOT(saveConfig())); -qDebug()<txtListenPort2->setText(QString::number(AppConfig::ListenPort2)); connect(ui->txtListenPort2, SIGNAL(textChanged(QString)), this, SLOT(saveConfig())); } diff --git a/netserver/form/frmmain.h b/tool/netserver/form/frmmain.h similarity index 100% rename from netserver/form/frmmain.h rename to tool/netserver/form/frmmain.h diff --git a/netserver/form/frmmain.ui b/tool/netserver/form/frmmain.ui similarity index 100% rename from netserver/form/frmmain.ui rename to tool/netserver/form/frmmain.ui diff --git a/tool/netserver/head.h b/tool/netserver/head.h new file mode 100644 index 0000000..9646601 --- /dev/null +++ b/tool/netserver/head.h @@ -0,0 +1,17 @@ +#include +#include +#include + +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) +#include +#endif + +#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0)) +#include +#endif + +#pragma execution_character_set("utf-8") +#define TIMEMS qPrintable(QTime::currentTime().toString("HH:mm:ss zzz")) +#define STRDATETIME qPrintable(QDateTime::currentDateTime().toString("yyyy-MM-dd-HH-mm-ss")) + +#include "appconfig.h" diff --git a/netserver/main.cpp b/tool/netserver/main.cpp similarity index 54% rename from netserver/main.cpp rename to tool/netserver/main.cpp index 32654e4..37024ba 100644 --- a/netserver/main.cpp +++ b/tool/netserver/main.cpp @@ -6,21 +6,17 @@ int main(int argc, char *argv[]) QApplication a(argc, argv); a.setWindowIcon(QIcon(":/main.ico")); - QFont font; - font.setFamily(QUIConfig::FontName); - font.setPixelSize(QUIConfig::FontSize); - a.setFont(font); - //设置编码以及加载中文翻译文件 - QUIHelper::initRand(); - QUIHelper::setCode(); - QUIHelper::setTranslator(); + QUIHelper::initAll(); + //读取配置文件 AppConfig::ConfigFile = QString("%1/%2.ini").arg(QUIHelper::appPath()).arg(QUIHelper::appName()); AppConfig::readConfig(); frmMain w; - w.setWindowTitle(QString("网络中转服务器V2021 本机IP: %1 QQ: 517216493").arg(QUIHelper::getLocalIP())); + w.setWindowTitle("网络中转服务器 V2022 (QQ: 517216493 WX: feiyangqingyun)"); + w.resize(900, 650); + QUIHelper::setFormInCenter(&w); w.show(); return a.exec(); diff --git a/netserver/netserver.pro b/tool/netserver/netserver.pro similarity index 85% rename from netserver/netserver.pro rename to tool/netserver/netserver.pro index 31aec32..f963869 100644 --- a/netserver/netserver.pro +++ b/tool/netserver/netserver.pro @@ -7,9 +7,10 @@ TEMPLATE = app DESTDIR = $$PWD/../bin RC_FILE = qrc/main.rc -SOURCES += main.cpp HEADERS += head.h +SOURCES += main.cpp RESOURCES += qrc/main.qrc +CONFIG += warn_off INCLUDEPATH += $$PWD INCLUDEPATH += $$PWD/api @@ -17,6 +18,3 @@ INCLUDEPATH += $$PWD/form include ($$PWD/api/api.pri) include ($$PWD/form/form.pri) - -INCLUDEPATH += $$PWD/../core_qui -include ($$PWD/../core_qui/core_qui.pri) diff --git a/netserver/qrc/main.ico b/tool/netserver/qrc/main.ico similarity index 100% rename from netserver/qrc/main.ico rename to tool/netserver/qrc/main.ico diff --git a/trayicon/main.qrc b/tool/netserver/qrc/main.qrc similarity index 55% rename from trayicon/main.qrc rename to tool/netserver/qrc/main.qrc index 91c2747..8bd6284 100644 --- a/trayicon/main.qrc +++ b/tool/netserver/qrc/main.qrc @@ -1,5 +1,7 @@ main.ico + qm/qt_zh_CN.qm + qm/widgets.qm diff --git a/netserver/qrc/main.rc b/tool/netserver/qrc/main.rc similarity index 100% rename from netserver/qrc/main.rc rename to tool/netserver/qrc/main.rc diff --git a/styledemo/qrc/qm/qt_zh_CN.qm b/tool/netserver/qrc/qm/qt_zh_CN.qm similarity index 100% rename from styledemo/qrc/qm/qt_zh_CN.qm rename to tool/netserver/qrc/qm/qt_zh_CN.qm diff --git a/styledemo/qrc/qm/widgets.qm b/tool/netserver/qrc/qm/widgets.qm similarity index 100% rename from styledemo/qrc/qm/widgets.qm rename to tool/netserver/qrc/qm/widgets.qm diff --git a/netserver/readme.md b/tool/netserver/readme.md similarity index 100% rename from netserver/readme.md rename to tool/netserver/readme.md diff --git a/nettool/api/api.pri b/tool/nettool/api/api.pri similarity index 69% rename from nettool/api/api.pri rename to tool/nettool/api/api.pri index 6448d50..e83bc79 100644 --- a/nettool/api/api.pri +++ b/tool/nettool/api/api.pri @@ -1,10 +1,14 @@ HEADERS += $$PWD/appconfig.h \ - $$PWD/appdata.h + $$PWD/appdata.h \ + $$PWD/quihelper.h \ + $$PWD/quihelperdata.h HEADERS += $$PWD/tcpclient.h HEADERS += $$PWD/tcpserver.h SOURCES += $$PWD/appconfig.cpp \ - $$PWD/appdata.cpp + $$PWD/appdata.cpp \ + $$PWD/quihelper.cpp \ + $$PWD/quihelperdata.cpp SOURCES += $$PWD/tcpclient.cpp SOURCES += $$PWD/tcpserver.cpp diff --git a/nettool/api/appconfig.cpp b/tool/nettool/api/appconfig.cpp similarity index 100% rename from nettool/api/appconfig.cpp rename to tool/nettool/api/appconfig.cpp diff --git a/nettool/api/appconfig.h b/tool/nettool/api/appconfig.h similarity index 100% rename from nettool/api/appconfig.h rename to tool/nettool/api/appconfig.h diff --git a/nettool/api/appdata.cpp b/tool/nettool/api/appdata.cpp similarity index 66% rename from nettool/api/appdata.cpp rename to tool/nettool/api/appdata.cpp index 7cbf7fa..a0c1789 100644 --- a/nettool/api/appdata.cpp +++ b/tool/nettool/api/appdata.cpp @@ -83,7 +83,37 @@ void AppData::saveData(const QString &data) void AppData::loadIP(QComboBox *cbox) { //获取本机所有IP - QStringList ips = QUIHelper::getLocalIPs(); + static QStringList ips; + if (ips.count() == 0) { +#ifdef emsdk + ips << "127.0.0.1"; +#else + QList netInterfaces = QNetworkInterface::allInterfaces(); + foreach (const QNetworkInterface &netInterface, netInterfaces) { + //移除虚拟机和抓包工具的虚拟网卡 + QString humanReadableName = netInterface.humanReadableName().toLower(); + if (humanReadableName.startsWith("vmware network adapter") || humanReadableName.startsWith("npcap loopback adapter")) { + continue; + } + + //过滤当前网络接口 + bool flag = (netInterface.flags() == (QNetworkInterface::IsUp | QNetworkInterface::IsRunning | QNetworkInterface::CanBroadcast | QNetworkInterface::CanMulticast)); + if (flag) { + QList addrs = netInterface.addressEntries(); + foreach (QNetworkAddressEntry addr, addrs) { + //只取出IPV4的地址 + if (addr.ip().protocol() == QAbstractSocket::IPv4Protocol) { + QString ip4 = addr.ip().toString(); + if (ip4 != "127.0.0.1") { + ips << ip4; + } + } + } + } + } +#endif + } + cbox->clear(); cbox->addItems(ips); if (!ips.contains("127.0.0.1")) { diff --git a/nettool/api/appdata.h b/tool/nettool/api/appdata.h similarity index 100% rename from nettool/api/appdata.h rename to tool/nettool/api/appdata.h diff --git a/tool/nettool/api/quihelper.cpp b/tool/nettool/api/quihelper.cpp new file mode 100644 index 0000000..2b3eabf --- /dev/null +++ b/tool/nettool/api/quihelper.cpp @@ -0,0 +1,420 @@ +#include "quihelper.h" + +int QUIHelper::getScreenIndex() +{ + //需要对多个屏幕进行处理 + int screenIndex = 0; +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + int screenCount = qApp->screens().count(); +#else + int screenCount = qApp->desktop()->screenCount(); +#endif + + if (screenCount > 1) { + //找到当前鼠标所在屏幕 + QPoint pos = QCursor::pos(); + for (int i = 0; i < screenCount; ++i) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + if (qApp->screens().at(i)->geometry().contains(pos)) { +#else + if (qApp->desktop()->screenGeometry(i).contains(pos)) { +#endif + screenIndex = i; + break; + } + } + } + return screenIndex; +} + +QRect QUIHelper::getScreenRect(bool available) +{ + QRect rect; + int screenIndex = QUIHelper::getScreenIndex(); + if (available) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + rect = qApp->screens().at(screenIndex)->availableGeometry(); +#else + rect = qApp->desktop()->availableGeometry(screenIndex); +#endif + } else { +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + rect = qApp->screens().at(screenIndex)->geometry(); +#else + rect = qApp->desktop()->screenGeometry(screenIndex); +#endif + } + return rect; +} + +int QUIHelper::deskWidth() +{ + return getScreenRect().width(); +} + +int QUIHelper::deskHeight() +{ + return getScreenRect().height(); +} + +QWidget *QUIHelper::centerBaseForm = 0; +void QUIHelper::setFormInCenter(QWidget *form) +{ + int formWidth = form->width(); + int formHeight = form->height(); + + //如果=0表示采用系统桌面屏幕为参照 + QRect rect; + if (centerBaseForm == 0) { + rect = getScreenRect(); + } else { + rect = centerBaseForm->geometry(); + } + + int deskWidth = rect.width(); + int deskHeight = rect.height(); + QPoint movePoint(deskWidth / 2 - formWidth / 2 + rect.x(), deskHeight / 2 - formHeight / 2 + rect.y()); + form->move(movePoint); +} + +QString QUIHelper::appName() +{ + //没有必要每次都获取,只有当变量为空时才去获取一次 + static QString name; + if (name.isEmpty()) { + name = qApp->applicationFilePath(); + //下面的方法主要为了过滤安卓的路径 lib程序名_armeabi-v7a + QStringList list = name.split("/"); + name = list.at(list.count() - 1).split(".").at(0); + } + + return name; +} + +QString QUIHelper::appPath() +{ +#ifdef Q_OS_ANDROID + //return QString("/sdcard/Android/%1").arg(appName()); + return QString("/storage/emulated/0/%1").arg(appName()); +#else + return qApp->applicationDirPath(); +#endif +} + +QString QUIHelper::getUuid() +{ + QString uuid = QUuid::createUuid().toString(); + uuid.replace("{", ""); + uuid.replace("}", ""); + return uuid; +} + +void QUIHelper::initRand() +{ + //初始化随机数种子 + QTime t = QTime::currentTime(); + srand(t.msec() + t.second() * 1000); +} + +void QUIHelper::newDir(const QString &dirName) +{ + QString strDir = dirName; + + //如果路径中包含斜杠字符则说明是绝对路径 + //linux系统路径字符带有 / windows系统 路径字符带有 :/ + if (!strDir.startsWith("/") && !strDir.contains(":/")) { + strDir = QString("%1/%2").arg(QUIHelper::appPath()).arg(strDir); + } + + QDir dir(strDir); + if (!dir.exists()) { + dir.mkpath(strDir); + } +} + +void QUIHelper::sleep(int msec) +{ + if (msec <= 0) { + return; + } + +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + QThread::msleep(msec); +#else + QTime endTime = QTime::currentTime().addMSecs(msec); + while (QTime::currentTime() < endTime) { + QCoreApplication::processEvents(QEventLoop::AllEvents, 100); + } +#endif +} + +void QUIHelper::setStyle() +{ + //打印下所有内置风格的名字 + qDebug() << "Qt内置的样式" << QStyleFactory::keys(); +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + qApp->setStyle(QStyleFactory::create("Fusion")); +#else + qApp->setStyle(QStyleFactory::create("Cleanlooks")); +#endif + //qApp->setPalette(QPalette("#FFFFFF")); +} + +void QUIHelper::setFont(int fontSize) +{ + QFont font; + font.setFamily("MicroSoft Yahei"); +#ifdef Q_OS_ANDROID + font.setPixelSize(15); +#elif __arm__ + font.setPixelSize(25); +#else + font.setPixelSize(fontSize); +#endif + +#ifndef rk3399 + qApp->setFont(font); +#endif +} + +void QUIHelper::setCode(bool utf8) +{ +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + //如果想要控制台打印信息中文正常就注释掉这个设置 + if (utf8) { + QTextCodec *codec = QTextCodec::codecForName("utf-8"); + QTextCodec::setCodecForLocale(codec); + } +#else +#if _MSC_VER + QTextCodec *codec = QTextCodec::codecForName("gbk"); +#else + QTextCodec *codec = QTextCodec::codecForName("utf-8"); +#endif + QTextCodec::setCodecForLocale(codec); + QTextCodec::setCodecForCStrings(codec); + QTextCodec::setCodecForTr(codec); +#endif +} + +void QUIHelper::setTranslator(const QString &qmFile) +{ + //过滤下不存在的就不用设置了 + if (!QFile(qmFile).exists()) { + return; + } + + QTranslator *translator = new QTranslator(qApp); + translator->load(qmFile); + qApp->installTranslator(translator); +} + +void QUIHelper::initAll() +{ + //初始化随机数种子 + QUIHelper::initRand(); + //设置样式风格 + QUIHelper::setStyle(); + //设置字体 + QUIHelper::setFont(13); + //设置编码 + QUIHelper::setCode(); + //设置翻译文件支持多个 + QUIHelper::setTranslator(":/qm/widgets.qm"); + QUIHelper::setTranslator(":/qm/qt_zh_CN.qm"); + QUIHelper::setTranslator(":/qm/designer_zh_CN.qm"); +} + +void QUIHelper::setFramelessForm(QWidget *widgetMain, bool tool, bool top, bool menu) +{ + widgetMain->setProperty("form", true); + widgetMain->setProperty("canMove", true); + + //根据设定逐个追加属性 +#ifdef __arm__ + widgetMain->setWindowFlags(Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint); +#else + widgetMain->setWindowFlags(Qt::FramelessWindowHint); +#endif + if (tool) { + widgetMain->setWindowFlags(widgetMain->windowFlags() | Qt::Tool); + } + if (top) { + widgetMain->setWindowFlags(widgetMain->windowFlags() | Qt::WindowStaysOnTopHint); + } + if (menu) { + //如果是其他系统比如neokylin会产生系统边框 +#ifdef Q_OS_WIN + widgetMain->setWindowFlags(widgetMain->windowFlags() | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint); +#endif + } +} + +int QUIHelper::showMessageBox(const QString &info, int type, int closeSec, bool exec) +{ + int result = 0; + if (type == 0) { + showMessageBoxInfo(info, closeSec, exec); + } else if (type == 1) { + showMessageBoxError(info, closeSec, exec); + } else if (type == 2) { + result = showMessageBoxQuestion(info); + } + + return result; +} + +void QUIHelper::showMessageBoxInfo(const QString &info, int closeSec, bool exec) +{ + QMessageBox box(QMessageBox::Information, "提示", info); + box.setStandardButtons(QMessageBox::Yes); + box.setButtonText(QMessageBox::Yes, QString("确 定")); + box.exec(); + //QMessageBox::information(0, "提示", info, QMessageBox::Yes); +} + +void QUIHelper::showMessageBoxError(const QString &info, int closeSec, bool exec) +{ + QMessageBox box(QMessageBox::Critical, "错误", info); + box.setStandardButtons(QMessageBox::Yes); + box.setButtonText(QMessageBox::Yes, QString("确 定")); + box.exec(); + //QMessageBox::critical(0, "错误", info, QMessageBox::Yes); +} + +int QUIHelper::showMessageBoxQuestion(const QString &info) +{ + QMessageBox box(QMessageBox::Question, "询问", info); + box.setStandardButtons(QMessageBox::Yes | QMessageBox::No); + box.setButtonText(QMessageBox::Yes, QString("确 定")); + box.setButtonText(QMessageBox::No, QString("取 消")); + return box.exec(); + //return QMessageBox::question(0, "询问", info, QMessageBox::Yes | QMessageBox::No); +} + +QString QUIHelper::getXorEncryptDecrypt(const QString &value, char key) +{ + //矫正范围外的数据 + if (key < 0 || key >= 127) { + key = 127; + } + + QString result = value; + int count = result.count(); + for (int i = 0; i < count; i++) { + result[i] = QChar(result.at(i).toLatin1() ^ key); + } + return result; +} + +uchar QUIHelper::getOrCode(const QByteArray &data) +{ + int len = data.length(); + uchar result = 0; + for (int i = 0; i < len; i++) { + result ^= data.at(i); + } + + return result; +} + +uchar QUIHelper::getCheckCode(const QByteArray &data) +{ + int len = data.length(); + uchar temp = 0; + for (uchar i = 0; i < len; i++) { + temp += data.at(i); + } + + return temp % 256; +} + +void QUIHelper::initTableView(QTableView *tableView, int rowHeight, bool headVisible, bool edit, bool stretchLast) +{ + //取消自动换行 + tableView->setWordWrap(false); + //超出文本不显示省略号 + tableView->setTextElideMode(Qt::ElideNone); + //奇数偶数行颜色交替 + tableView->setAlternatingRowColors(false); + //垂直表头是否可见 + tableView->verticalHeader()->setVisible(headVisible); + //选中一行表头是否加粗 + tableView->horizontalHeader()->setHighlightSections(false); + //最后一行拉伸填充 + tableView->horizontalHeader()->setStretchLastSection(stretchLast); + //行标题最小宽度尺寸 + tableView->horizontalHeader()->setMinimumSectionSize(0); + //行标题最小高度,等同于和默认行高一致 + tableView->horizontalHeader()->setFixedHeight(rowHeight); + //默认行高 + tableView->verticalHeader()->setDefaultSectionSize(rowHeight); + //选中时一行整体选中 + tableView->setSelectionBehavior(QAbstractItemView::SelectRows); + //只允许选择单个 + tableView->setSelectionMode(QAbstractItemView::SingleSelection); + + //表头不可单击 +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + tableView->horizontalHeader()->setSectionsClickable(false); +#else + tableView->horizontalHeader()->setClickable(false); +#endif + + //鼠标按下即进入编辑模式 + if (edit) { + tableView->setEditTriggers(QAbstractItemView::CurrentChanged | QAbstractItemView::DoubleClicked); + } else { + tableView->setEditTriggers(QAbstractItemView::NoEditTriggers); + } +} + +void QUIHelper::openFile(const QString &fileName, const QString &msg) +{ +#ifdef __arm__ + return; +#endif + if (fileName.isEmpty()) { + return; + } + if (QUIHelper::showMessageBoxQuestion(msg + "成功!确定现在就打开吗?") == QMessageBox::Yes) { + QString url = QString("file:///%1").arg(fileName); + QDesktopServices::openUrl(QUrl(url, QUrl::TolerantMode)); + } +} + +bool QUIHelper::checkIniFile(const QString &iniFile) +{ + //如果配置文件大小为0,则以初始值继续运行,并生成配置文件 + QFile file(iniFile); + if (file.size() == 0) { + return false; + } + + //如果配置文件不完整,则以初始值继续运行,并生成配置文件 + if (file.open(QFile::ReadOnly)) { + bool ok = true; + while (!file.atEnd()) { + QString line = file.readLine(); + line.replace("\r", ""); + line.replace("\n", ""); + QStringList list = line.split("="); + + if (list.count() == 2) { + if (list.at(1) == "") { + qDebug() << "ini node no value" << list.at(0); + ok = false; + break; + } + } + } + + if (!ok) { + return false; + } + } else { + return false; + } + + return true; +} diff --git a/tool/nettool/api/quihelper.h b/tool/nettool/api/quihelper.h new file mode 100644 index 0000000..dc40547 --- /dev/null +++ b/tool/nettool/api/quihelper.h @@ -0,0 +1,70 @@ +#ifndef QUIHELPER2_H +#define QUIHELPER2_H + +#include "head.h" + +class QUIHelper +{ +public: + //获取当前鼠标所在屏幕索引+尺寸 + static int getScreenIndex(); + static QRect getScreenRect(bool available = true); + + //获取桌面宽度高度+居中显示 + static int deskWidth(); + static int deskHeight(); + + //居中显示窗体 + //定义标志位指定是以桌面为参照还是主程序界面为参照 + static QWidget *centerBaseForm; + static void setFormInCenter(QWidget *form); + + //程序文件名称+当前所在路径 + static QString appName(); + static QString appPath(); + + //获取uuid+初始化随机数种子+新建目录+延时 + static QString getUuid(); + static void initRand(); + static void newDir(const QString &dirName); + static void sleep(int msec); + + //设置样式+字体+编码+居中+翻译 + static void setStyle(); + static void setFont(int fontSize = 12); + static void setCode(bool utf8 = true); + static void setTranslator(const QString &qmFile); + //一次性设置所有 + static void initAll(); + + //设置无边框 + static void setFramelessForm(QWidget *widgetMain, bool tool = false, bool top = false, bool menu = true); + + //弹出框 + static int showMessageBox(const QString &info, int type = 0, int closeSec = 0, bool exec = false); + //弹出消息框 + static void showMessageBoxInfo(const QString &info, int closeSec = 0, bool exec = false); + //弹出错误框 + static void showMessageBoxError(const QString &info, int closeSec = 0, bool exec = false); + //弹出询问框 + static int showMessageBoxQuestion(const QString &info); + + //异或加密-只支持字符,如果是中文需要将其转换base64编码 + static QString getXorEncryptDecrypt(const QString &value, char key); + //异或校验 + static uchar getOrCode(const QByteArray &data); + //计算校验码 + static uchar getCheckCode(const QByteArray &data); + + //初始化表格 + static void initTableView(QTableView *tableView, int rowHeight = 25, + bool headVisible = false, bool edit = false, + bool stretchLast = true); + //打开文件带提示框 + static void openFile(const QString &fileName, const QString &msg); + + //检查ini配置文件 + static bool checkIniFile(const QString &iniFile); +}; + +#endif // QUIHELPER2_H diff --git a/tool/nettool/api/quihelperdata.cpp b/tool/nettool/api/quihelperdata.cpp new file mode 100644 index 0000000..0d26a90 --- /dev/null +++ b/tool/nettool/api/quihelperdata.cpp @@ -0,0 +1,450 @@ +#include "quihelperdata.h" +#include "quihelper.h" + +int QUIHelperData::strHexToDecimal(const QString &strHex) +{ + bool ok; + return strHex.toInt(&ok, 16); +} + +int QUIHelperData::strDecimalToDecimal(const QString &strDecimal) +{ + bool ok; + return strDecimal.toInt(&ok, 10); +} + +int QUIHelperData::strBinToDecimal(const QString &strBin) +{ + bool ok; + return strBin.toInt(&ok, 2); +} + +QString QUIHelperData::strHexToStrBin(const QString &strHex) +{ + uchar decimal = strHexToDecimal(strHex); + QString bin = QString::number(decimal, 2); + uchar len = bin.length(); + + if (len < 8) { + for (int i = 0; i < 8 - len; i++) { + bin = "0" + bin; + } + } + + return bin; +} + +QString QUIHelperData::decimalToStrBin1(int decimal) +{ + QString bin = QString::number(decimal, 2); + uchar len = bin.length(); + if (len <= 8) { + for (int i = 0; i < 8 - len; i++) { + bin = "0" + bin; + } + } + + return bin; +} + +QString QUIHelperData::decimalToStrBin2(int decimal) +{ + QString bin = QString::number(decimal, 2); + uchar len = bin.length(); + if (len <= 16) { + for (int i = 0; i < 16 - len; i++) { + bin = "0" + bin; + } + } + + return bin; +} + +QString QUIHelperData::decimalToStrHex(int decimal) +{ + QString temp = QString::number(decimal, 16); + if (temp.length() == 1) { + temp = "0" + temp; + } + + return temp; +} + +QByteArray QUIHelperData::intToByte(int data) +{ + QByteArray result; + result.resize(4); + result[3] = (uchar)(0x000000ff & data); + result[2] = (uchar)((0x0000ff00 & data) >> 8); + result[1] = (uchar)((0x00ff0000 & data) >> 16); + result[0] = (uchar)((0xff000000 & data) >> 24); + return result; +} + +QByteArray QUIHelperData::intToByteRec(int data) +{ + QByteArray result; + result.resize(4); + result[0] = (uchar)(0x000000ff & data); + result[1] = (uchar)((0x0000ff00 & data) >> 8); + result[2] = (uchar)((0x00ff0000 & data) >> 16); + result[3] = (uchar)((0xff000000 & data) >> 24); + return result; +} + +int QUIHelperData::byteToInt(const QByteArray &data) +{ + int i = data.at(3) & 0x000000ff; + i |= ((data.at(2) << 8) & 0x0000ff00); + i |= ((data.at(1) << 16) & 0x00ff0000); + i |= ((data.at(0) << 24) & 0xff000000); + return i; +} + +int QUIHelperData::byteToIntRec(const QByteArray &data) +{ + int i = data.at(0) & 0x000000ff; + i |= ((data.at(1) << 8) & 0x0000ff00); + i |= ((data.at(2) << 16) & 0x00ff0000); + i |= ((data.at(3) << 24) & 0xff000000); + return i; +} + +quint32 QUIHelperData::byteToUInt(const QByteArray &data) +{ + quint32 i = data.at(3) & 0x000000ff; + i |= ((data.at(2) << 8) & 0x0000ff00); + i |= ((data.at(1) << 16) & 0x00ff0000); + i |= ((data.at(0) << 24) & 0xff000000); + return i; +} + +quint32 QUIHelperData::byteToUIntRec(const QByteArray &data) +{ + quint32 i = data.at(0) & 0x000000ff; + i |= ((data.at(1) << 8) & 0x0000ff00); + i |= ((data.at(2) << 16) & 0x00ff0000); + i |= ((data.at(3) << 24) & 0xff000000); + return i; +} + +QByteArray QUIHelperData::ushortToByte(ushort data) +{ + QByteArray result; + result.resize(2); + result[1] = (uchar)(0x000000ff & data); + result[0] = (uchar)((0x0000ff00 & data) >> 8); + return result; +} + +QByteArray QUIHelperData::ushortToByteRec(ushort data) +{ + QByteArray result; + result.resize(2); + result[0] = (uchar)(0x000000ff & data); + result[1] = (uchar)((0x0000ff00 & data) >> 8); + return result; +} + +int QUIHelperData::byteToUShort(const QByteArray &data) +{ + int i = data.at(1) & 0x000000FF; + i |= ((data.at(0) << 8) & 0x0000FF00); + if (i >= 32768) { + i = i - 65536; + } + + return i; +} + +int QUIHelperData::byteToUShortRec(const QByteArray &data) +{ + int i = data.at(0) & 0x000000FF; + i |= ((data.at(1) << 8) & 0x0000FF00); + if (i >= 32768) { + i = i - 65536; + } + + return i; +} + +QString QUIHelperData::getValue(quint8 value) +{ + QString result = QString::number(value); + if (result.length() <= 1) { + result = QString("0%1").arg(result); + } + return result; +} + +QString QUIHelperData::getXorEncryptDecrypt(const QString &value, char key) +{ + //矫正范围外的数据 + if (key < 0 || key >= 127) { + key = 127; + } + + QString result = value; + int count = result.count(); + for (int i = 0; i < count; i++) { + result[i] = QChar(result.at(i).toLatin1() ^ key); + } + return result; +} + +uchar QUIHelperData::getOrCode(const QByteArray &data) +{ + int len = data.length(); + uchar result = 0; + for (int i = 0; i < len; i++) { + result ^= data.at(i); + } + + return result; +} + +uchar QUIHelperData::getCheckCode(const QByteArray &data) +{ + int len = data.length(); + uchar temp = 0; + for (uchar i = 0; i < len; i++) { + temp += data.at(i); + } + + return temp % 256; +} + +//函数功能:计算CRC16 +//参数1:*data 16位CRC校验数据, +//参数2:len 数据流长度 +//参数3:init 初始化值 +//参数4:table 16位CRC查找表 + +//正序CRC计算 +quint16 QUIHelperData::getCrc16(quint8 *data, int len, quint16 init, const quint16 *table) +{ + quint16 crc_16 = init; + quint8 temp; + while (len-- > 0) { + temp = crc_16 & 0xff; + crc_16 = (crc_16 >> 8) ^ table[(temp ^ *data++) & 0xff]; + } + + return crc_16; +} + +//逆序CRC计算 +quint16 QUIHelperData::getCrc16Rec(quint8 *data, int len, quint16 init, const quint16 *table) +{ + quint16 crc_16 = init; + quint8 temp; + while (len-- > 0) { + temp = crc_16 >> 8; + crc_16 = (crc_16 << 8) ^ table[(temp ^ *data++) & 0xff]; + } + + return crc_16; +} + +//Modbus CRC16校验 +quint16 QUIHelperData::getModbus16(quint8 *data, int len) +{ + //MODBUS CRC-16表 8005 逆序 + const quint16 table_16[256] = { + 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, + 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, + 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, + 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, + 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40, + 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41, + 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641, + 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040, + 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240, + 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441, + 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41, + 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840, + 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41, + 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40, + 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640, + 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041, + 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240, + 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441, + 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41, + 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840, + 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41, + 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40, + 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640, + 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041, + 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241, + 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440, + 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40, + 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841, + 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40, + 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41, + 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641, + 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040 + }; + + return getCrc16(data, len, 0xFFFF, table_16); +} + +//CRC16校验 +QByteArray QUIHelperData::getCrcCode(const QByteArray &data) +{ + quint16 result = getModbus16((quint8 *)data.data(), data.length()); + return QUIHelperData::ushortToByteRec(result); +} + +static QMap listChar; +void QUIHelperData::initAscii() +{ + //0x20为空格,空格以下都是不可见字符 + if (listChar.count() == 0) { + listChar.insert(0, "\\NUL"); + listChar.insert(1, "\\SOH"); + listChar.insert(2, "\\STX"); + listChar.insert(3, "\\ETX"); + listChar.insert(4, "\\EOT"); + listChar.insert(5, "\\ENQ"); + listChar.insert(6, "\\ACK"); + listChar.insert(7, "\\BEL"); + listChar.insert(8, "\\BS"); + listChar.insert(9, "\\HT"); + listChar.insert(10, "\\LF"); + listChar.insert(11, "\\VT"); + listChar.insert(12, "\\FF"); + listChar.insert(13, "\\CR"); + listChar.insert(14, "\\SO"); + listChar.insert(15, "\\SI"); + listChar.insert(16, "\\DLE"); + listChar.insert(17, "\\DC1"); + listChar.insert(18, "\\DC2"); + listChar.insert(19, "\\DC3"); + listChar.insert(20, "\\DC4"); + listChar.insert(21, "\\NAK"); + listChar.insert(22, "\\SYN"); + listChar.insert(23, "\\ETB"); + listChar.insert(24, "\\CAN"); + listChar.insert(25, "\\EM"); + listChar.insert(26, "\\SUB"); + listChar.insert(27, "\\ESC"); + listChar.insert(28, "\\FS"); + listChar.insert(29, "\\GS"); + listChar.insert(30, "\\RS"); + listChar.insert(31, "\\US"); + listChar.insert(0x5C, "\\"); + listChar.insert(0x7F, "\\DEL"); + } +} + +QString QUIHelperData::byteArrayToAsciiStr(const QByteArray &data) +{ + //先初始化字符表 + initAscii(); + + QString temp; + int len = data.size(); + for (int i = 0; i < len; i++) { + char byte = data.at(i); + QString value = listChar.value(byte); + if (!value.isEmpty()) { + } else if (byte >= 0 && byte <= 0x7F) { + value = QString("%1").arg(byte); + } else { + value = decimalToStrHex((quint8)byte); + value = QString("\\x%1").arg(value.toUpper()); + } + + temp += value; + } + + return temp.trimmed(); +} + +QByteArray QUIHelperData::asciiStrToByteArray(const QString &data) +{ + //先初始化字符表 + initAscii(); + + QByteArray buffer; + QStringList list = data.split("\\"); + + int count = list.count(); + for (int i = 1; i < count; i++) { + QString str = list.at(i); + int key = 0; + if (str.contains("x")) { + key = strHexToDecimal(str.mid(1, 2)); + } else { + key = listChar.key("\\" + str); + } + + buffer.append(key); + } + + return buffer; +} + +char QUIHelperData::hexStrToChar(char data) +{ + if ((data >= '0') && (data <= '9')) { + return data - 0x30; + } else if ((data >= 'A') && (data <= 'F')) { + return data - 'A' + 10; + } else if ((data >= 'a') && (data <= 'f')) { + return data - 'a' + 10; + } else { + return (-1); + } +} + +QByteArray QUIHelperData::hexStrToByteArray(const QString &data) +{ + QByteArray senddata; + int hexdata, lowhexdata; + int hexdatalen = 0; + int len = data.length(); + senddata.resize(len / 2); + char lstr, hstr; + + for (int i = 0; i < len;) { + hstr = data.at(i).toLatin1(); + if (hstr == ' ') { + i++; + continue; + } + + i++; + if (i >= len) { + break; + } + + lstr = data.at(i).toLatin1(); + hexdata = hexStrToChar(hstr); + lowhexdata = hexStrToChar(lstr); + + if ((hexdata == 16) || (lowhexdata == 16)) { + break; + } else { + hexdata = hexdata * 16 + lowhexdata; + } + + i++; + senddata[hexdatalen] = (char)hexdata; + hexdatalen++; + } + + senddata.resize(hexdatalen); + return senddata; +} + +QString QUIHelperData::byteArrayToHexStr(const QByteArray &data) +{ + QString temp = ""; + QString hex = data.toHex(); + for (int i = 0; i < hex.length(); i = i + 2) { + temp += hex.mid(i, 2) + " "; + } + + return temp.trimmed().toUpper(); +} diff --git a/tool/nettool/api/quihelperdata.h b/tool/nettool/api/quihelperdata.h new file mode 100644 index 0000000..b5e3815 --- /dev/null +++ b/tool/nettool/api/quihelperdata.h @@ -0,0 +1,70 @@ +#ifndef QUIHELPERDATA_H +#define QUIHELPERDATA_H + +#include + +class QUIHelperData +{ +public: + //16进制字符串转10进制 + static int strHexToDecimal(const QString &strHex); + //10进制字符串转10进制 + static int strDecimalToDecimal(const QString &strDecimal); + //2进制字符串转10进制 + static int strBinToDecimal(const QString &strBin); + + //16进制字符串转2进制字符串 + static QString strHexToStrBin(const QString &strHex); + //10进制转2进制字符串一个字节 + static QString decimalToStrBin1(int decimal); + //10进制转2进制字符串两个字节 + static QString decimalToStrBin2(int decimal); + //10进制转16进制字符串,补零. + static QString decimalToStrHex(int decimal); + + //int转字节数组 + static QByteArray intToByte(int data); + static QByteArray intToByteRec(int data); + + //字节数组转int + static int byteToInt(const QByteArray &data); + static int byteToIntRec(const QByteArray &data); + static quint32 byteToUInt(const QByteArray &data); + static quint32 byteToUIntRec(const QByteArray &data); + + //ushort转字节数组 + static QByteArray ushortToByte(ushort data); + static QByteArray ushortToByteRec(ushort data); + + //字节数组转ushort + static int byteToUShort(const QByteArray &data); + static int byteToUShortRec(const QByteArray &data); + + //字符串补全 + static QString getValue(quint8 value); + + //异或加密-只支持字符,如果是中文需要将其转换base64编码 + static QString getXorEncryptDecrypt(const QString &value, char key); + //异或校验 + static uchar getOrCode(const QByteArray &data); + //计算校验码 + static uchar getCheckCode(const QByteArray &data); + + //CRC校验 + static quint16 getCrc16Rec(quint8 *data, int len, quint16 init, const quint16 *table); + static quint16 getCrc16(quint8 *data, int len, quint16 init, const quint16 *table); + static quint16 getModbus16(quint8 *data, int len); + static QByteArray getCrcCode(const QByteArray &data); + + //字节数组与Ascii字符串互转 + static void initAscii(); + static QString byteArrayToAsciiStr(const QByteArray &data); + static QByteArray asciiStrToByteArray(const QString &data); + + //16进制字符串与字节数组互转 + static char hexStrToChar(char data); + static QByteArray hexStrToByteArray(const QString &data); + static QString byteArrayToHexStr(const QByteArray &data); +}; + +#endif // QUIHELPERDATA_H diff --git a/nettool/api/tcpclient.cpp b/tool/nettool/api/tcpclient.cpp similarity index 89% rename from nettool/api/tcpclient.cpp rename to tool/nettool/api/tcpclient.cpp index d1f022a..49b346c 100644 --- a/nettool/api/tcpclient.cpp +++ b/tool/nettool/api/tcpclient.cpp @@ -1,5 +1,6 @@ #include "tcpclient.h" #include "quihelper.h" +#include "quihelperdata.h" TcpClient::TcpClient(QTcpSocket *socket, QObject *parent) : QObject(parent) { @@ -48,9 +49,9 @@ void TcpClient::slot_readData() QString buffer; if (AppConfig::HexReceiveTcpServer) { - buffer = QUIHelper::byteArrayToHexStr(data); + buffer = QUIHelperData::byteArrayToHexStr(data); } else if (AppConfig::AsciiTcpServer) { - buffer = QUIHelper::byteArrayToAsciiStr(data); + buffer = QUIHelperData::byteArrayToAsciiStr(data); } else { buffer = QString(data); } @@ -73,9 +74,9 @@ void TcpClient::sendData(const QString &data) { QByteArray buffer; if (AppConfig::HexSendTcpServer) { - buffer = QUIHelper::hexStrToByteArray(data); + buffer = QUIHelperData::hexStrToByteArray(data); } else if (AppConfig::AsciiTcpServer) { - buffer = QUIHelper::asciiStrToByteArray(data); + buffer = QUIHelperData::asciiStrToByteArray(data); } else { buffer = data.toUtf8(); } diff --git a/nettool/api/tcpclient.h b/tool/nettool/api/tcpclient.h similarity index 100% rename from nettool/api/tcpclient.h rename to tool/nettool/api/tcpclient.h diff --git a/nettool/api/tcpserver.cpp b/tool/nettool/api/tcpserver.cpp similarity index 100% rename from nettool/api/tcpserver.cpp rename to tool/nettool/api/tcpserver.cpp diff --git a/nettool/api/tcpserver.h b/tool/nettool/api/tcpserver.h similarity index 100% rename from nettool/api/tcpserver.h rename to tool/nettool/api/tcpserver.h diff --git a/nettool/api/webclient.cpp b/tool/nettool/api/webclient.cpp similarity index 95% rename from nettool/api/webclient.cpp rename to tool/nettool/api/webclient.cpp index 43d18b3..3cc6278 100644 --- a/nettool/api/webclient.cpp +++ b/tool/nettool/api/webclient.cpp @@ -1,5 +1,6 @@ #include "webclient.h" #include "quihelper.h" +#include "quihelperdata.h" WebClient::WebClient(QWebSocket *socket, QObject *parent) : QObject(parent) { @@ -62,7 +63,7 @@ void WebClient::binaryFrameReceived(const QByteArray &data, bool isLastFrame) { QString buffer; if (AppConfig::HexReceiveWebClient) { - buffer = QUIHelper::byteArrayToHexStr(data); + buffer = QUIHelperData::byteArrayToHexStr(data); } else { buffer = QString(data); } @@ -84,7 +85,7 @@ void WebClient::sendData(const QString &data) { QByteArray buffer; if (AppConfig::HexSendWebServer) { - buffer = QUIHelper::hexStrToByteArray(data); + buffer = QUIHelperData::hexStrToByteArray(data); } else { buffer = data.toUtf8(); } diff --git a/nettool/api/webclient.h b/tool/nettool/api/webclient.h similarity index 100% rename from nettool/api/webclient.h rename to tool/nettool/api/webclient.h diff --git a/nettool/api/webserver.cpp b/tool/nettool/api/webserver.cpp similarity index 100% rename from nettool/api/webserver.cpp rename to tool/nettool/api/webserver.cpp diff --git a/nettool/api/webserver.h b/tool/nettool/api/webserver.h similarity index 100% rename from nettool/api/webserver.h rename to tool/nettool/api/webserver.h diff --git a/nettool/file/device.txt b/tool/nettool/file/device.txt similarity index 100% rename from nettool/file/device.txt rename to tool/nettool/file/device.txt diff --git a/nettool/file/send.txt b/tool/nettool/file/send.txt similarity index 100% rename from nettool/file/send.txt rename to tool/nettool/file/send.txt diff --git a/nettool/form/form.pri b/tool/nettool/form/form.pri similarity index 100% rename from nettool/form/form.pri rename to tool/nettool/form/form.pri diff --git a/nettool/form/frmmain.cpp b/tool/nettool/form/frmmain.cpp similarity index 100% rename from nettool/form/frmmain.cpp rename to tool/nettool/form/frmmain.cpp diff --git a/nettool/form/frmmain.h b/tool/nettool/form/frmmain.h similarity index 100% rename from nettool/form/frmmain.h rename to tool/nettool/form/frmmain.h diff --git a/nettool/form/frmmain.ui b/tool/nettool/form/frmmain.ui similarity index 100% rename from nettool/form/frmmain.ui rename to tool/nettool/form/frmmain.ui diff --git a/nettool/form/frmtcpclient.cpp b/tool/nettool/form/frmtcpclient.cpp similarity index 94% rename from nettool/form/frmtcpclient.cpp rename to tool/nettool/form/frmtcpclient.cpp index 36b5cc7..d33cd1f 100644 --- a/nettool/form/frmtcpclient.cpp +++ b/tool/nettool/form/frmtcpclient.cpp @@ -1,6 +1,7 @@ #include "frmtcpclient.h" #include "ui_frmtcpclient.h" #include "quihelper.h" +#include "quihelperdata.h" frmTcpClient::frmTcpClient(QWidget *parent) : QWidget(parent), ui(new Ui::frmTcpClient) { @@ -53,13 +54,7 @@ void frmTcpClient::initForm() //填充数据到下拉框 ui->cboxInterval->addItems(AppData::Intervals); ui->cboxData->addItems(AppData::Datas); - AppData::loadIP(ui->cboxBindIP); - - //打印下外网地址 -#ifndef emsdk - QString ip = QUIHelper::getNetIP(QUIHelper::getHtml("http://whois.pconline.com.cn/")); - append(1, QString("外网IP -> %1").arg(ip)); -#endif + AppData::loadIP(ui->cboxBindIP); } void frmTcpClient::initConfig() @@ -204,9 +199,9 @@ void frmTcpClient::readData() QString buffer; if (AppConfig::HexReceiveTcpClient) { - buffer = QUIHelper::byteArrayToHexStr(data); + buffer = QUIHelperData::byteArrayToHexStr(data); } else if (AppConfig::AsciiTcpClient) { - buffer = QUIHelper::byteArrayToAsciiStr(data); + buffer = QUIHelperData::byteArrayToAsciiStr(data); } else { buffer = QString(data); } @@ -229,9 +224,9 @@ void frmTcpClient::sendData(const QString &data) { QByteArray buffer; if (AppConfig::HexSendTcpClient) { - buffer = QUIHelper::hexStrToByteArray(data); + buffer = QUIHelperData::hexStrToByteArray(data); } else if (AppConfig::AsciiTcpClient) { - buffer = QUIHelper::asciiStrToByteArray(data); + buffer = QUIHelperData::asciiStrToByteArray(data); } else { buffer = data.toUtf8(); } diff --git a/nettool/form/frmtcpclient.h b/tool/nettool/form/frmtcpclient.h similarity index 100% rename from nettool/form/frmtcpclient.h rename to tool/nettool/form/frmtcpclient.h diff --git a/nettool/form/frmtcpclient.ui b/tool/nettool/form/frmtcpclient.ui similarity index 100% rename from nettool/form/frmtcpclient.ui rename to tool/nettool/form/frmtcpclient.ui diff --git a/nettool/form/frmtcpserver.cpp b/tool/nettool/form/frmtcpserver.cpp similarity index 100% rename from nettool/form/frmtcpserver.cpp rename to tool/nettool/form/frmtcpserver.cpp diff --git a/nettool/form/frmtcpserver.h b/tool/nettool/form/frmtcpserver.h similarity index 100% rename from nettool/form/frmtcpserver.h rename to tool/nettool/form/frmtcpserver.h diff --git a/nettool/form/frmtcpserver.ui b/tool/nettool/form/frmtcpserver.ui similarity index 100% rename from nettool/form/frmtcpserver.ui rename to tool/nettool/form/frmtcpserver.ui diff --git a/nettool/form/frmudpclient.cpp b/tool/nettool/form/frmudpclient.cpp similarity index 96% rename from nettool/form/frmudpclient.cpp rename to tool/nettool/form/frmudpclient.cpp index 9835529..0091c88 100644 --- a/nettool/form/frmudpclient.cpp +++ b/tool/nettool/form/frmudpclient.cpp @@ -1,6 +1,7 @@ #include "frmudpclient.h" #include "ui_frmudpclient.h" #include "quihelper.h" +#include "quihelperdata.h" frmUdpClient::frmUdpClient(QWidget *parent) : QWidget(parent), ui(new Ui::frmUdpClient) { @@ -181,9 +182,9 @@ void frmUdpClient::readData() socket->readDatagram(data.data(), data.size(), &host, &port); if (AppConfig::HexReceiveUdpClient) { - buffer = QUIHelper::byteArrayToHexStr(data); + buffer = QUIHelperData::byteArrayToHexStr(data); } else if (AppConfig::AsciiUdpClient) { - buffer = QUIHelper::byteArrayToAsciiStr(data); + buffer = QUIHelperData::byteArrayToAsciiStr(data); } else { buffer = QString(data); } @@ -213,9 +214,9 @@ void frmUdpClient::sendData(const QString &ip, int port, const QString &data) { QByteArray buffer; if (AppConfig::HexSendUdpClient) { - buffer = QUIHelper::hexStrToByteArray(data); + buffer = QUIHelperData::hexStrToByteArray(data); } else if (AppConfig::AsciiUdpClient) { - buffer = QUIHelper::asciiStrToByteArray(data); + buffer = QUIHelperData::asciiStrToByteArray(data); } else { buffer = data.toUtf8(); } diff --git a/nettool/form/frmudpclient.h b/tool/nettool/form/frmudpclient.h similarity index 100% rename from nettool/form/frmudpclient.h rename to tool/nettool/form/frmudpclient.h diff --git a/nettool/form/frmudpclient.ui b/tool/nettool/form/frmudpclient.ui similarity index 100% rename from nettool/form/frmudpclient.ui rename to tool/nettool/form/frmudpclient.ui diff --git a/nettool/form/frmudpserver.cpp b/tool/nettool/form/frmudpserver.cpp similarity index 96% rename from nettool/form/frmudpserver.cpp rename to tool/nettool/form/frmudpserver.cpp index c9d2a20..b74a03d 100644 --- a/nettool/form/frmudpserver.cpp +++ b/tool/nettool/form/frmudpserver.cpp @@ -1,6 +1,7 @@ #include "frmudpserver.h" #include "ui_frmudpserver.h" #include "quihelper.h" +#include "quihelperdata.h" frmUdpServer::frmUdpServer(QWidget *parent) : QWidget(parent), ui(new Ui::frmUdpServer) { @@ -178,9 +179,9 @@ void frmUdpServer::readData() socket->readDatagram(data.data(), data.size(), &host, &port); if (AppConfig::HexReceiveUdpServer) { - buffer = QUIHelper::byteArrayToHexStr(data); + buffer = QUIHelperData::byteArrayToHexStr(data); } else if (AppConfig::AsciiUdpServer) { - buffer = QUIHelper::byteArrayToAsciiStr(data); + buffer = QUIHelperData::byteArrayToAsciiStr(data); } else { buffer = QString(data); } @@ -223,9 +224,9 @@ void frmUdpServer::sendData(const QString &ip, int port, const QString &data) { QByteArray buffer; if (AppConfig::HexSendUdpServer) { - buffer = QUIHelper::hexStrToByteArray(data); + buffer = QUIHelperData::hexStrToByteArray(data); } else if (AppConfig::AsciiUdpServer) { - buffer = QUIHelper::asciiStrToByteArray(data); + buffer = QUIHelperData::asciiStrToByteArray(data); } else { buffer = data.toUtf8(); } diff --git a/nettool/form/frmudpserver.h b/tool/nettool/form/frmudpserver.h similarity index 100% rename from nettool/form/frmudpserver.h rename to tool/nettool/form/frmudpserver.h diff --git a/nettool/form/frmudpserver.ui b/tool/nettool/form/frmudpserver.ui similarity index 100% rename from nettool/form/frmudpserver.ui rename to tool/nettool/form/frmudpserver.ui diff --git a/nettool/form/frmwebclient.cpp b/tool/nettool/form/frmwebclient.cpp similarity index 98% rename from nettool/form/frmwebclient.cpp rename to tool/nettool/form/frmwebclient.cpp index 85737dc..14c2b40 100644 --- a/nettool/form/frmwebclient.cpp +++ b/tool/nettool/form/frmwebclient.cpp @@ -1,6 +1,7 @@ #include "frmwebclient.h" #include "ui_frmwebclient.h" #include "quihelper.h" +#include "quihelperdata.h" frmWebClient::frmWebClient(QWidget *parent) : QWidget(parent), ui(new Ui::frmWebClient) { @@ -186,7 +187,7 @@ void frmWebClient::sendData(const QString &data) { QByteArray buffer; if (AppConfig::HexSendWebClient) { - buffer = QUIHelper::hexStrToByteArray(data); + buffer = QUIHelperData::hexStrToByteArray(data); } else { buffer = data.toUtf8(); } @@ -221,7 +222,7 @@ void frmWebClient::binaryFrameReceived(const QByteArray &data, bool isLastFrame) { QString buffer; if (AppConfig::HexReceiveWebClient) { - buffer = QUIHelper::byteArrayToHexStr(data); + buffer = QUIHelperData::byteArrayToHexStr(data); } else { buffer = QString(data); } diff --git a/nettool/form/frmwebclient.h b/tool/nettool/form/frmwebclient.h similarity index 100% rename from nettool/form/frmwebclient.h rename to tool/nettool/form/frmwebclient.h diff --git a/nettool/form/frmwebclient.ui b/tool/nettool/form/frmwebclient.ui similarity index 100% rename from nettool/form/frmwebclient.ui rename to tool/nettool/form/frmwebclient.ui diff --git a/nettool/form/frmwebserver.cpp b/tool/nettool/form/frmwebserver.cpp similarity index 100% rename from nettool/form/frmwebserver.cpp rename to tool/nettool/form/frmwebserver.cpp diff --git a/nettool/form/frmwebserver.h b/tool/nettool/form/frmwebserver.h similarity index 100% rename from nettool/form/frmwebserver.h rename to tool/nettool/form/frmwebserver.h diff --git a/nettool/form/frmwebserver.ui b/tool/nettool/form/frmwebserver.ui similarity index 100% rename from nettool/form/frmwebserver.ui rename to tool/nettool/form/frmwebserver.ui diff --git a/nettool/head.h b/tool/nettool/head.h similarity index 67% rename from nettool/head.h rename to tool/nettool/head.h index 4c827d2..0f655d6 100644 --- a/nettool/head.h +++ b/tool/nettool/head.h @@ -14,5 +14,8 @@ #endif #pragma execution_character_set("utf-8") +#define TIMEMS qPrintable(QTime::currentTime().toString("HH:mm:ss zzz")) +#define STRDATETIME qPrintable(QDateTime::currentDateTime().toString("yyyy-MM-dd-HH-mm-ss")) + #include "appconfig.h" #include "appdata.h" diff --git a/nettool/main.cpp b/tool/nettool/main.cpp similarity index 75% rename from nettool/main.cpp rename to tool/nettool/main.cpp index c5d849b..48ccc35 100644 --- a/nettool/main.cpp +++ b/tool/nettool/main.cpp @@ -7,11 +7,9 @@ int main(int argc, char *argv[]) a.setWindowIcon(QIcon(":/main.ico")); //设置编码+字体+中文翻译文件 - QUIHelper::initRand(); - QUIHelper::setCode(); - QUIHelper::setFont(":/DroidSansFallback.ttf"); - QUIHelper::setTranslator(); + QUIHelper::initAll(); + //读取配置文件 AppConfig::ConfigFile = QString("%1/%2.ini").arg(QUIHelper::appPath()).arg(QUIHelper::appName()); AppConfig::readConfig(); @@ -20,10 +18,10 @@ int main(int argc, char *argv[]) AppData::readDeviceData(); frmMain w; - w.setWindowTitle("网络调试助手 V2021 (QQ: 517216493 WX: feiyangqingyun)"); + w.setWindowTitle("网络调试助手 V2022 (QQ: 517216493 WX: feiyangqingyun)"); w.resize(950, 700); QUIHelper::setFormInCenter(&w); - w.show(); + w.show(); return a.exec(); } diff --git a/nettool/nettool.pro b/tool/nettool/nettool.pro similarity index 88% rename from nettool/nettool.pro rename to tool/nettool/nettool.pro index 6713e7a..40a4616 100644 --- a/nettool/nettool.pro +++ b/tool/nettool/nettool.pro @@ -19,9 +19,10 @@ RESOURCES += qrc/font.qrc DESTDIR = $$PWD/../bin } -SOURCES += main.cpp HEADERS += head.h +SOURCES += main.cpp RESOURCES += qrc/main.qrc +CONFIG += warn_off INCLUDEPATH += $$PWD INCLUDEPATH += $$PWD/api @@ -29,6 +30,3 @@ INCLUDEPATH += $$PWD/form include ($$PWD/api/api.pri) include ($$PWD/form/form.pri) - -INCLUDEPATH += $$PWD/../core_qui -include ($$PWD/../core_qui/core_qui.pri) diff --git a/nettool/qrc/DroidSansFallback.ttf b/tool/nettool/qrc/DroidSansFallback.ttf similarity index 100% rename from nettool/qrc/DroidSansFallback.ttf rename to tool/nettool/qrc/DroidSansFallback.ttf diff --git a/nettool/qrc/font.qrc b/tool/nettool/qrc/font.qrc similarity index 100% rename from nettool/qrc/font.qrc rename to tool/nettool/qrc/font.qrc diff --git a/nettool/qrc/main.ico b/tool/nettool/qrc/main.ico similarity index 100% rename from nettool/qrc/main.ico rename to tool/nettool/qrc/main.ico diff --git a/tool/nettool/qrc/main.qrc b/tool/nettool/qrc/main.qrc new file mode 100644 index 0000000..8bd6284 --- /dev/null +++ b/tool/nettool/qrc/main.qrc @@ -0,0 +1,7 @@ + + + main.ico + qm/qt_zh_CN.qm + qm/widgets.qm + + diff --git a/nettool/qrc/main.rc b/tool/nettool/qrc/main.rc similarity index 100% rename from nettool/qrc/main.rc rename to tool/nettool/qrc/main.rc diff --git a/tool/nettool/qrc/qm/qt_zh_CN.qm b/tool/nettool/qrc/qm/qt_zh_CN.qm new file mode 100644 index 0000000..623b8e3 Binary files /dev/null and b/tool/nettool/qrc/qm/qt_zh_CN.qm differ diff --git a/tool/nettool/qrc/qm/widgets.qm b/tool/nettool/qrc/qm/widgets.qm new file mode 100644 index 0000000..244bf0d Binary files /dev/null and b/tool/nettool/qrc/qm/widgets.qm differ diff --git a/nettool/readme.md b/tool/nettool/readme.md similarity index 100% rename from nettool/readme.md rename to tool/nettool/readme.md diff --git a/pngtool/frmpngtool.cpp b/tool/pngtool/frmpngtool.cpp similarity index 100% rename from pngtool/frmpngtool.cpp rename to tool/pngtool/frmpngtool.cpp diff --git a/pngtool/frmpngtool.h b/tool/pngtool/frmpngtool.h similarity index 100% rename from pngtool/frmpngtool.h rename to tool/pngtool/frmpngtool.h diff --git a/pngtool/frmpngtool.ui b/tool/pngtool/frmpngtool.ui similarity index 100% rename from pngtool/frmpngtool.ui rename to tool/pngtool/frmpngtool.ui diff --git a/pngtool/main.cpp b/tool/pngtool/main.cpp similarity index 100% rename from pngtool/main.cpp rename to tool/pngtool/main.cpp diff --git a/pngtool/pngtool.pro b/tool/pngtool/pngtool.pro similarity index 100% rename from pngtool/pngtool.pro rename to tool/pngtool/pngtool.pro diff --git a/tool/tool.pro b/tool/tool.pro new file mode 100644 index 0000000..785a4ea --- /dev/null +++ b/tool/tool.pro @@ -0,0 +1,20 @@ +TEMPLATE = subdirs +SUBDIRS += comtool +SUBDIRS += nettool +SUBDIRS += netserver + +SUBDIRS += base64helper +SUBDIRS += countcode +SUBDIRS += emailtool +SUBDIRS += moneytool +SUBDIRS += pngtool + +SUBDIRS += keytool +SUBDIRS += keydemo +SUBDIRS += livetool +SUBDIRS += livedemo + +#Qt6有些代码没适配 +greaterThan(QT_MAJOR_VERSION, 5) { +SUBDIRS -= emailtool +} diff --git a/ui/0snap/flatui.jpg b/ui/0snap/flatui.jpg new file mode 100644 index 0000000..946a44a Binary files /dev/null and b/ui/0snap/flatui.jpg differ diff --git a/ui/0snap/styledemo1.jpg b/ui/0snap/styledemo1.jpg new file mode 100644 index 0000000..f4ae34a Binary files /dev/null and b/ui/0snap/styledemo1.jpg differ diff --git a/ui/0snap/styledemo2.jpg b/ui/0snap/styledemo2.jpg new file mode 100644 index 0000000..826ffa1 Binary files /dev/null and b/ui/0snap/styledemo2.jpg differ diff --git a/ui/0snap/styledemo3.jpg b/ui/0snap/styledemo3.jpg new file mode 100644 index 0000000..42c4801 Binary files /dev/null and b/ui/0snap/styledemo3.jpg differ diff --git a/ui/0snap/uidemo1.jpg b/ui/0snap/uidemo1.jpg new file mode 100644 index 0000000..c60e2a0 Binary files /dev/null and b/ui/0snap/uidemo1.jpg differ diff --git a/ui/0snap/uidemo10.jpg b/ui/0snap/uidemo10.jpg new file mode 100644 index 0000000..0dbe46c Binary files /dev/null and b/ui/0snap/uidemo10.jpg differ diff --git a/ui/0snap/uidemo8.jpg b/ui/0snap/uidemo8.jpg new file mode 100644 index 0000000..44edec4 Binary files /dev/null and b/ui/0snap/uidemo8.jpg differ diff --git a/ui/0snap/uidemo9.jpg b/ui/0snap/uidemo9.jpg new file mode 100644 index 0000000..6ca4562 Binary files /dev/null and b/ui/0snap/uidemo9.jpg differ diff --git a/ui/core_common/appdata.cpp b/ui/core_common/appdata.cpp new file mode 100644 index 0000000..04b5888 --- /dev/null +++ b/ui/core_common/appdata.cpp @@ -0,0 +1,22 @@ +#include "appdata.h" +#include "quihelper.h" + +QString AppData::Version = "V20211105"; +QString AppData::TitleFlag = "(QQ: 517216493 WX: feiyangqingyun)"; + +int AppData::RowHeight = 25; +int AppData::RightWidth = 180; +int AppData::FormWidth = 950; +int AppData::FormHeight = 650; + +void AppData::checkRatio() +{ + //根据分辨率设定宽高 + int width = QUIHelper::deskWidth(); + if (width > 1440) { + RowHeight = RowHeight < 25 ? 25 : RowHeight; + RightWidth = RightWidth < 220 ? 220 : RightWidth; + FormWidth = FormWidth < 1250 ? 1250 : FormWidth; + FormHeight = FormHeight < 850 ? 850 : FormHeight; + } +} diff --git a/ui/core_common/appdata.h b/ui/core_common/appdata.h new file mode 100644 index 0000000..30ff918 --- /dev/null +++ b/ui/core_common/appdata.h @@ -0,0 +1,20 @@ +#ifndef APPDATA_H +#define APPDATA_H + +#include "head.h" + +class AppData +{ +public: + static QString Version; //版本号 + static QString TitleFlag; //标题标识 + + static int RowHeight; //行高 + static int RightWidth; //右侧宽度 + static int FormWidth; //窗体宽度 + static int FormHeight; //窗体高度 + + static void checkRatio(); //校验分辨率 +}; + +#endif // APPDATA_H diff --git a/ui/core_common/appinit.cpp b/ui/core_common/appinit.cpp new file mode 100644 index 0000000..ab7f9df --- /dev/null +++ b/ui/core_common/appinit.cpp @@ -0,0 +1,56 @@ +#include "appinit.h" +#include "qmutex.h" +#include "qapplication.h" +#include "qevent.h" +#include "qwidget.h" + +QScopedPointer AppInit::self; +AppInit *AppInit::Instance() +{ + if (self.isNull()) { + static QMutex mutex; + QMutexLocker locker(&mutex); + if (self.isNull()) { + self.reset(new AppInit); + } + } + + return self.data(); +} + +AppInit::AppInit(QObject *parent) : QObject(parent) +{ +} + +bool AppInit::eventFilter(QObject *watched, QEvent *event) +{ + QWidget *w = (QWidget *)watched; + if (!w->property("canMove").toBool()) { + return QObject::eventFilter(watched, event); + } + + static QPoint mousePoint; + static bool mousePressed = false; + + QMouseEvent *mouseEvent = static_cast(event); + if (mouseEvent->type() == QEvent::MouseButtonPress) { + if (mouseEvent->button() == Qt::LeftButton) { + mousePressed = true; + mousePoint = mouseEvent->globalPos() - w->pos(); + } + } else if (mouseEvent->type() == QEvent::MouseButtonRelease) { + mousePressed = false; + } else if (mouseEvent->type() == QEvent::MouseMove) { + if (mousePressed) { + w->move(mouseEvent->globalPos() - mousePoint); + return true; + } + } + + return QObject::eventFilter(watched, event); +} + +void AppInit::start() +{ + qApp->installEventFilter(this); +} diff --git a/ui/core_common/appinit.h b/ui/core_common/appinit.h new file mode 100644 index 0000000..467ad84 --- /dev/null +++ b/ui/core_common/appinit.h @@ -0,0 +1,23 @@ +#ifndef APPINIT_H +#define APPINIT_H + +#include + +class AppInit : public QObject +{ + Q_OBJECT +public: + static AppInit *Instance(); + explicit AppInit(QObject *parent = 0); + +protected: + bool eventFilter(QObject *watched, QEvent *event); + +private: + static QScopedPointer self; + +public slots: + void start(); +}; + +#endif // APPINIT_H diff --git a/ui/core_common/base64helper.cpp b/ui/core_common/base64helper.cpp new file mode 100644 index 0000000..6093970 --- /dev/null +++ b/ui/core_common/base64helper.cpp @@ -0,0 +1,41 @@ +#include "base64helper.h" +#include "qbuffer.h" +#include "qdebug.h" + +QString Base64Helper::imageToBase64(const QImage &image) +{ + return QString(imageToBase64x(image)); +} + +QByteArray Base64Helper::imageToBase64x(const QImage &image) +{ + //这个转换可能比较耗时建议在线程中执行 + QByteArray data; + QBuffer buffer(&data); + image.save(&buffer, "JPG"); + data = data.toBase64(); + return data; +} + +QImage Base64Helper::base64ToImage(const QString &data) +{ + return base64ToImagex(data.toUtf8()); +} + +QImage Base64Helper::base64ToImagex(const QByteArray &data) +{ + //这个转换可能比较耗时建议在线程中执行 + QImage image; + image.loadFromData(QByteArray::fromBase64(data)); + return image; +} + +QString Base64Helper::textToBase64(const QString &text) +{ + return QString(text.toLocal8Bit().toBase64()); +} + +QString Base64Helper::base64ToText(const QString &text) +{ + return QString(QByteArray::fromBase64(text.toLocal8Bit())); +} diff --git a/ui/core_common/base64helper.h b/ui/core_common/base64helper.h new file mode 100644 index 0000000..e17cae6 --- /dev/null +++ b/ui/core_common/base64helper.h @@ -0,0 +1,37 @@ +#ifndef BASE64HELPER_H +#define BASE64HELPER_H + +/** + * base64编码转换类 作者:feiyangqingyun(QQ:517216493) 2016-12-16 + * 1. 图片转base64字符串。 + * 2. base64字符串转图片。 + * 3. 字符转base64字符串。 + * 4. base64字符串转字符。 + * 5. 后期增加数据压缩。 + * 6. Qt6对base64编码转换进行了重写效率提升至少200%。 + */ + +#include + +#ifdef quc +class Q_DECL_EXPORT Base64Helper +#else +class Base64Helper +#endif + +{ +public: + //图片转base64字符串 + static QString imageToBase64(const QImage &image); + static QByteArray imageToBase64x(const QImage &image); + + //base64字符串转图片 + static QImage base64ToImage(const QString &data); + static QImage base64ToImagex(const QByteArray &data); + + //字符串与base64互转 + static QString textToBase64(const QString &text); + static QString base64ToText(const QString &text); +}; + +#endif // BASE64HELPER_H diff --git a/core_qui/core_qui.pri b/ui/core_common/core_common.pri similarity index 59% rename from core_qui/core_qui.pri rename to ui/core_common/core_common.pri index ca7e635..b2628da 100644 --- a/core_qui/core_qui.pri +++ b/ui/core_common/core_common.pri @@ -21,27 +21,19 @@ CONFIG += resources_big include ($$PWD/h3.pri) HEADERS += \ + $$PWD/appdata.h \ + $$PWD/appinit.h \ + $$PWD/base64helper.h \ $$PWD/iconhelper.h \ - $$PWD/quiconfig.h \ - $$PWD/quidateselect.h \ - $$PWD/quihead.h \ - $$PWD/quihelper.h \ - $$PWD/quiinputbox.h \ - $$PWD/quimessagebox.h \ - $$PWD/quistyle.h \ - $$PWD/quitipbox.h \ - $$PWD/quiwidget.h + $$PWD/quihelper.h SOURCES += \ + $$PWD/appdata.cpp \ + $$PWD/appinit.cpp \ + $$PWD/base64helper.cpp \ $$PWD/iconhelper.cpp \ - $$PWD/quiconfig.cpp \ - $$PWD/quidateselect.cpp \ - $$PWD/quihelper.cpp \ - $$PWD/quiinputbox.cpp \ - $$PWD/quimessagebox.cpp \ - $$PWD/quistyle.cpp \ - $$PWD/quitipbox.cpp \ - $$PWD/quiwidget.cpp + $$PWD/quihelper.cpp RESOURCES += $$PWD/qrc/qm.qrc RESOURCES += $$PWD/qrc/font.qrc +RESOURCES += $$PWD/qrc/image.qrc diff --git a/core_qui/h3.pri b/ui/core_common/h3.pri similarity index 100% rename from core_qui/h3.pri rename to ui/core_common/h3.pri diff --git a/navbutton/iconhelper.cpp b/ui/core_common/iconhelper.cpp similarity index 100% rename from navbutton/iconhelper.cpp rename to ui/core_common/iconhelper.cpp diff --git a/navbutton/iconhelper.h b/ui/core_common/iconhelper.h similarity index 100% rename from navbutton/iconhelper.h rename to ui/core_common/iconhelper.h diff --git a/core_qui/qrc/font.qrc b/ui/core_common/qrc/font.qrc similarity index 100% rename from core_qui/qrc/font.qrc rename to ui/core_common/qrc/font.qrc diff --git a/core_qui/qrc/font/fontawesome-webfont.ttf b/ui/core_common/qrc/font/fontawesome-webfont.ttf similarity index 100% rename from core_qui/qrc/font/fontawesome-webfont.ttf rename to ui/core_common/qrc/font/fontawesome-webfont.ttf diff --git a/core_qui/qrc/font/iconfont.ttf b/ui/core_common/qrc/font/iconfont.ttf similarity index 100% rename from core_qui/qrc/font/iconfont.ttf rename to ui/core_common/qrc/font/iconfont.ttf diff --git a/core_qui/qrc/font/pe-icon-set-weather.ttf b/ui/core_common/qrc/font/pe-icon-set-weather.ttf similarity index 100% rename from core_qui/qrc/font/pe-icon-set-weather.ttf rename to ui/core_common/qrc/font/pe-icon-set-weather.ttf diff --git a/zhtopy/main.qrc b/ui/core_common/qrc/image.qrc similarity index 57% rename from zhtopy/main.qrc rename to ui/core_common/qrc/image.qrc index 7523df2..458c609 100644 --- a/zhtopy/main.qrc +++ b/ui/core_common/qrc/image.qrc @@ -1,5 +1,5 @@ - image/zhtopy.txt + image/bg_novideo.png diff --git a/ui/core_common/qrc/image/bg_novideo.png b/ui/core_common/qrc/image/bg_novideo.png new file mode 100644 index 0000000..510dfb8 Binary files /dev/null and b/ui/core_common/qrc/image/bg_novideo.png differ diff --git a/core_qui/qrc/qm.qrc b/ui/core_common/qrc/qm.qrc similarity index 100% rename from core_qui/qrc/qm.qrc rename to ui/core_common/qrc/qm.qrc diff --git a/ui/core_common/qrc/qm/qt_zh_CN.qm b/ui/core_common/qrc/qm/qt_zh_CN.qm new file mode 100644 index 0000000..623b8e3 Binary files /dev/null and b/ui/core_common/qrc/qm/qt_zh_CN.qm differ diff --git a/ui/core_common/qrc/qm/widgets.qm b/ui/core_common/qrc/qm/widgets.qm new file mode 100644 index 0000000..244bf0d Binary files /dev/null and b/ui/core_common/qrc/qm/widgets.qm differ diff --git a/ui/core_common/quihelper.cpp b/ui/core_common/quihelper.cpp new file mode 100644 index 0000000..2b3eabf --- /dev/null +++ b/ui/core_common/quihelper.cpp @@ -0,0 +1,420 @@ +#include "quihelper.h" + +int QUIHelper::getScreenIndex() +{ + //需要对多个屏幕进行处理 + int screenIndex = 0; +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + int screenCount = qApp->screens().count(); +#else + int screenCount = qApp->desktop()->screenCount(); +#endif + + if (screenCount > 1) { + //找到当前鼠标所在屏幕 + QPoint pos = QCursor::pos(); + for (int i = 0; i < screenCount; ++i) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + if (qApp->screens().at(i)->geometry().contains(pos)) { +#else + if (qApp->desktop()->screenGeometry(i).contains(pos)) { +#endif + screenIndex = i; + break; + } + } + } + return screenIndex; +} + +QRect QUIHelper::getScreenRect(bool available) +{ + QRect rect; + int screenIndex = QUIHelper::getScreenIndex(); + if (available) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + rect = qApp->screens().at(screenIndex)->availableGeometry(); +#else + rect = qApp->desktop()->availableGeometry(screenIndex); +#endif + } else { +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + rect = qApp->screens().at(screenIndex)->geometry(); +#else + rect = qApp->desktop()->screenGeometry(screenIndex); +#endif + } + return rect; +} + +int QUIHelper::deskWidth() +{ + return getScreenRect().width(); +} + +int QUIHelper::deskHeight() +{ + return getScreenRect().height(); +} + +QWidget *QUIHelper::centerBaseForm = 0; +void QUIHelper::setFormInCenter(QWidget *form) +{ + int formWidth = form->width(); + int formHeight = form->height(); + + //如果=0表示采用系统桌面屏幕为参照 + QRect rect; + if (centerBaseForm == 0) { + rect = getScreenRect(); + } else { + rect = centerBaseForm->geometry(); + } + + int deskWidth = rect.width(); + int deskHeight = rect.height(); + QPoint movePoint(deskWidth / 2 - formWidth / 2 + rect.x(), deskHeight / 2 - formHeight / 2 + rect.y()); + form->move(movePoint); +} + +QString QUIHelper::appName() +{ + //没有必要每次都获取,只有当变量为空时才去获取一次 + static QString name; + if (name.isEmpty()) { + name = qApp->applicationFilePath(); + //下面的方法主要为了过滤安卓的路径 lib程序名_armeabi-v7a + QStringList list = name.split("/"); + name = list.at(list.count() - 1).split(".").at(0); + } + + return name; +} + +QString QUIHelper::appPath() +{ +#ifdef Q_OS_ANDROID + //return QString("/sdcard/Android/%1").arg(appName()); + return QString("/storage/emulated/0/%1").arg(appName()); +#else + return qApp->applicationDirPath(); +#endif +} + +QString QUIHelper::getUuid() +{ + QString uuid = QUuid::createUuid().toString(); + uuid.replace("{", ""); + uuid.replace("}", ""); + return uuid; +} + +void QUIHelper::initRand() +{ + //初始化随机数种子 + QTime t = QTime::currentTime(); + srand(t.msec() + t.second() * 1000); +} + +void QUIHelper::newDir(const QString &dirName) +{ + QString strDir = dirName; + + //如果路径中包含斜杠字符则说明是绝对路径 + //linux系统路径字符带有 / windows系统 路径字符带有 :/ + if (!strDir.startsWith("/") && !strDir.contains(":/")) { + strDir = QString("%1/%2").arg(QUIHelper::appPath()).arg(strDir); + } + + QDir dir(strDir); + if (!dir.exists()) { + dir.mkpath(strDir); + } +} + +void QUIHelper::sleep(int msec) +{ + if (msec <= 0) { + return; + } + +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + QThread::msleep(msec); +#else + QTime endTime = QTime::currentTime().addMSecs(msec); + while (QTime::currentTime() < endTime) { + QCoreApplication::processEvents(QEventLoop::AllEvents, 100); + } +#endif +} + +void QUIHelper::setStyle() +{ + //打印下所有内置风格的名字 + qDebug() << "Qt内置的样式" << QStyleFactory::keys(); +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + qApp->setStyle(QStyleFactory::create("Fusion")); +#else + qApp->setStyle(QStyleFactory::create("Cleanlooks")); +#endif + //qApp->setPalette(QPalette("#FFFFFF")); +} + +void QUIHelper::setFont(int fontSize) +{ + QFont font; + font.setFamily("MicroSoft Yahei"); +#ifdef Q_OS_ANDROID + font.setPixelSize(15); +#elif __arm__ + font.setPixelSize(25); +#else + font.setPixelSize(fontSize); +#endif + +#ifndef rk3399 + qApp->setFont(font); +#endif +} + +void QUIHelper::setCode(bool utf8) +{ +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + //如果想要控制台打印信息中文正常就注释掉这个设置 + if (utf8) { + QTextCodec *codec = QTextCodec::codecForName("utf-8"); + QTextCodec::setCodecForLocale(codec); + } +#else +#if _MSC_VER + QTextCodec *codec = QTextCodec::codecForName("gbk"); +#else + QTextCodec *codec = QTextCodec::codecForName("utf-8"); +#endif + QTextCodec::setCodecForLocale(codec); + QTextCodec::setCodecForCStrings(codec); + QTextCodec::setCodecForTr(codec); +#endif +} + +void QUIHelper::setTranslator(const QString &qmFile) +{ + //过滤下不存在的就不用设置了 + if (!QFile(qmFile).exists()) { + return; + } + + QTranslator *translator = new QTranslator(qApp); + translator->load(qmFile); + qApp->installTranslator(translator); +} + +void QUIHelper::initAll() +{ + //初始化随机数种子 + QUIHelper::initRand(); + //设置样式风格 + QUIHelper::setStyle(); + //设置字体 + QUIHelper::setFont(13); + //设置编码 + QUIHelper::setCode(); + //设置翻译文件支持多个 + QUIHelper::setTranslator(":/qm/widgets.qm"); + QUIHelper::setTranslator(":/qm/qt_zh_CN.qm"); + QUIHelper::setTranslator(":/qm/designer_zh_CN.qm"); +} + +void QUIHelper::setFramelessForm(QWidget *widgetMain, bool tool, bool top, bool menu) +{ + widgetMain->setProperty("form", true); + widgetMain->setProperty("canMove", true); + + //根据设定逐个追加属性 +#ifdef __arm__ + widgetMain->setWindowFlags(Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint); +#else + widgetMain->setWindowFlags(Qt::FramelessWindowHint); +#endif + if (tool) { + widgetMain->setWindowFlags(widgetMain->windowFlags() | Qt::Tool); + } + if (top) { + widgetMain->setWindowFlags(widgetMain->windowFlags() | Qt::WindowStaysOnTopHint); + } + if (menu) { + //如果是其他系统比如neokylin会产生系统边框 +#ifdef Q_OS_WIN + widgetMain->setWindowFlags(widgetMain->windowFlags() | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint); +#endif + } +} + +int QUIHelper::showMessageBox(const QString &info, int type, int closeSec, bool exec) +{ + int result = 0; + if (type == 0) { + showMessageBoxInfo(info, closeSec, exec); + } else if (type == 1) { + showMessageBoxError(info, closeSec, exec); + } else if (type == 2) { + result = showMessageBoxQuestion(info); + } + + return result; +} + +void QUIHelper::showMessageBoxInfo(const QString &info, int closeSec, bool exec) +{ + QMessageBox box(QMessageBox::Information, "提示", info); + box.setStandardButtons(QMessageBox::Yes); + box.setButtonText(QMessageBox::Yes, QString("确 定")); + box.exec(); + //QMessageBox::information(0, "提示", info, QMessageBox::Yes); +} + +void QUIHelper::showMessageBoxError(const QString &info, int closeSec, bool exec) +{ + QMessageBox box(QMessageBox::Critical, "错误", info); + box.setStandardButtons(QMessageBox::Yes); + box.setButtonText(QMessageBox::Yes, QString("确 定")); + box.exec(); + //QMessageBox::critical(0, "错误", info, QMessageBox::Yes); +} + +int QUIHelper::showMessageBoxQuestion(const QString &info) +{ + QMessageBox box(QMessageBox::Question, "询问", info); + box.setStandardButtons(QMessageBox::Yes | QMessageBox::No); + box.setButtonText(QMessageBox::Yes, QString("确 定")); + box.setButtonText(QMessageBox::No, QString("取 消")); + return box.exec(); + //return QMessageBox::question(0, "询问", info, QMessageBox::Yes | QMessageBox::No); +} + +QString QUIHelper::getXorEncryptDecrypt(const QString &value, char key) +{ + //矫正范围外的数据 + if (key < 0 || key >= 127) { + key = 127; + } + + QString result = value; + int count = result.count(); + for (int i = 0; i < count; i++) { + result[i] = QChar(result.at(i).toLatin1() ^ key); + } + return result; +} + +uchar QUIHelper::getOrCode(const QByteArray &data) +{ + int len = data.length(); + uchar result = 0; + for (int i = 0; i < len; i++) { + result ^= data.at(i); + } + + return result; +} + +uchar QUIHelper::getCheckCode(const QByteArray &data) +{ + int len = data.length(); + uchar temp = 0; + for (uchar i = 0; i < len; i++) { + temp += data.at(i); + } + + return temp % 256; +} + +void QUIHelper::initTableView(QTableView *tableView, int rowHeight, bool headVisible, bool edit, bool stretchLast) +{ + //取消自动换行 + tableView->setWordWrap(false); + //超出文本不显示省略号 + tableView->setTextElideMode(Qt::ElideNone); + //奇数偶数行颜色交替 + tableView->setAlternatingRowColors(false); + //垂直表头是否可见 + tableView->verticalHeader()->setVisible(headVisible); + //选中一行表头是否加粗 + tableView->horizontalHeader()->setHighlightSections(false); + //最后一行拉伸填充 + tableView->horizontalHeader()->setStretchLastSection(stretchLast); + //行标题最小宽度尺寸 + tableView->horizontalHeader()->setMinimumSectionSize(0); + //行标题最小高度,等同于和默认行高一致 + tableView->horizontalHeader()->setFixedHeight(rowHeight); + //默认行高 + tableView->verticalHeader()->setDefaultSectionSize(rowHeight); + //选中时一行整体选中 + tableView->setSelectionBehavior(QAbstractItemView::SelectRows); + //只允许选择单个 + tableView->setSelectionMode(QAbstractItemView::SingleSelection); + + //表头不可单击 +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + tableView->horizontalHeader()->setSectionsClickable(false); +#else + tableView->horizontalHeader()->setClickable(false); +#endif + + //鼠标按下即进入编辑模式 + if (edit) { + tableView->setEditTriggers(QAbstractItemView::CurrentChanged | QAbstractItemView::DoubleClicked); + } else { + tableView->setEditTriggers(QAbstractItemView::NoEditTriggers); + } +} + +void QUIHelper::openFile(const QString &fileName, const QString &msg) +{ +#ifdef __arm__ + return; +#endif + if (fileName.isEmpty()) { + return; + } + if (QUIHelper::showMessageBoxQuestion(msg + "成功!确定现在就打开吗?") == QMessageBox::Yes) { + QString url = QString("file:///%1").arg(fileName); + QDesktopServices::openUrl(QUrl(url, QUrl::TolerantMode)); + } +} + +bool QUIHelper::checkIniFile(const QString &iniFile) +{ + //如果配置文件大小为0,则以初始值继续运行,并生成配置文件 + QFile file(iniFile); + if (file.size() == 0) { + return false; + } + + //如果配置文件不完整,则以初始值继续运行,并生成配置文件 + if (file.open(QFile::ReadOnly)) { + bool ok = true; + while (!file.atEnd()) { + QString line = file.readLine(); + line.replace("\r", ""); + line.replace("\n", ""); + QStringList list = line.split("="); + + if (list.count() == 2) { + if (list.at(1) == "") { + qDebug() << "ini node no value" << list.at(0); + ok = false; + break; + } + } + } + + if (!ok) { + return false; + } + } else { + return false; + } + + return true; +} diff --git a/ui/core_common/quihelper.h b/ui/core_common/quihelper.h new file mode 100644 index 0000000..dc40547 --- /dev/null +++ b/ui/core_common/quihelper.h @@ -0,0 +1,70 @@ +#ifndef QUIHELPER2_H +#define QUIHELPER2_H + +#include "head.h" + +class QUIHelper +{ +public: + //获取当前鼠标所在屏幕索引+尺寸 + static int getScreenIndex(); + static QRect getScreenRect(bool available = true); + + //获取桌面宽度高度+居中显示 + static int deskWidth(); + static int deskHeight(); + + //居中显示窗体 + //定义标志位指定是以桌面为参照还是主程序界面为参照 + static QWidget *centerBaseForm; + static void setFormInCenter(QWidget *form); + + //程序文件名称+当前所在路径 + static QString appName(); + static QString appPath(); + + //获取uuid+初始化随机数种子+新建目录+延时 + static QString getUuid(); + static void initRand(); + static void newDir(const QString &dirName); + static void sleep(int msec); + + //设置样式+字体+编码+居中+翻译 + static void setStyle(); + static void setFont(int fontSize = 12); + static void setCode(bool utf8 = true); + static void setTranslator(const QString &qmFile); + //一次性设置所有 + static void initAll(); + + //设置无边框 + static void setFramelessForm(QWidget *widgetMain, bool tool = false, bool top = false, bool menu = true); + + //弹出框 + static int showMessageBox(const QString &info, int type = 0, int closeSec = 0, bool exec = false); + //弹出消息框 + static void showMessageBoxInfo(const QString &info, int closeSec = 0, bool exec = false); + //弹出错误框 + static void showMessageBoxError(const QString &info, int closeSec = 0, bool exec = false); + //弹出询问框 + static int showMessageBoxQuestion(const QString &info); + + //异或加密-只支持字符,如果是中文需要将其转换base64编码 + static QString getXorEncryptDecrypt(const QString &value, char key); + //异或校验 + static uchar getOrCode(const QByteArray &data); + //计算校验码 + static uchar getCheckCode(const QByteArray &data); + + //初始化表格 + static void initTableView(QTableView *tableView, int rowHeight = 25, + bool headVisible = false, bool edit = false, + bool stretchLast = true); + //打开文件带提示框 + static void openFile(const QString &fileName, const QString &msg); + + //检查ini配置文件 + static bool checkIniFile(const QString &iniFile); +}; + +#endif // QUIHELPER2_H diff --git a/ui/core_qss/qss.qrc b/ui/core_qss/qss.qrc new file mode 100644 index 0000000..ef80ad9 --- /dev/null +++ b/ui/core_qss/qss.qrc @@ -0,0 +1,23 @@ + + + qss/psblack.css + qss/psblack/add_bottom.png + qss/psblack/add_left.png + qss/psblack/add_right.png + qss/psblack/add_top.png + qss/psblack/branch_close.png + qss/psblack/branch_open.png + qss/psblack/calendar_nextmonth.png + qss/psblack/calendar_prevmonth.png + qss/psblack/checkbox_checked.png + qss/psblack/checkbox_checked_disable.png + qss/psblack/checkbox_parcial.png + qss/psblack/checkbox_parcial_disable.png + qss/psblack/checkbox_unchecked.png + qss/psblack/checkbox_unchecked_disable.png + qss/psblack/radiobutton_checked.png + qss/psblack/radiobutton_checked_disable.png + qss/psblack/radiobutton_unchecked.png + qss/psblack/radiobutton_unchecked_disable.png + + diff --git a/ui/core_qss/qss/psblack.css b/ui/core_qss/qss/psblack.css new file mode 100644 index 0000000..084473d --- /dev/null +++ b/ui/core_qss/qss/psblack.css @@ -0,0 +1,675 @@ +QPalette{background:#444444;}*{outline:0px;color:#DCDCDC;} + +QWidget[form="true"],QLabel[frameShape="1"]{ +border:1px solid #242424; +border-radius:0px; +} + +QWidget[form="bottom"]{ +background:#484848; +} + +QWidget[form="bottom"] .QFrame{ +border:1px solid #DCDCDC; +} + +QWidget[form="bottom"] QLabel,QWidget[form="title"] QLabel{ +border-radius:0px; +color:#DCDCDC; +background:none; +border-style:none; +} + +QWidget[form="title"],QWidget[nav="left"],QWidget[nav="top"] QAbstractButton{ +border-style:none; +border-radius:0px; +padding:5px; +color:#DCDCDC; +background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #484848,stop:1 #383838); +} + +QWidget[nav="top"] QAbstractButton:hover,QWidget[nav="top"] QAbstractButton:pressed,QWidget[nav="top"] QAbstractButton:checked{ +border-style:solid; +border-width:0px 0px 2px 0px; +padding:4px 4px 2px 4px; +border-color:#AAAAAA; +background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #646464,stop:1 #525252); +} + +QWidget[nav="left"] QAbstractButton{ +border-radius:0px; +color:#DCDCDC; +background:none; +border-style:none; +} + +QWidget[nav="left"] QAbstractButton:hover{ +color:#FFFFFF; +background-color:#AAAAAA; +} + +QWidget[nav="left"] QAbstractButton:checked,QWidget[nav="left"] QAbstractButton:pressed{ +color:#DCDCDC; +border-style:solid; +border-width:0px 0px 0px 2px; +padding:4px 4px 4px 2px; +border-color:#AAAAAA; +background-color:#444444; +} + +QWidget[video="true"] QLabel{ +color:#DCDCDC; +border:1px solid #242424; +background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #484848,stop:1 #383838); +} + +QWidget[video="true"] QLabel:focus{ +border:1px solid #AAAAAA; +background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #646464,stop:1 #525252); +} + +QLineEdit:read-only{ +background-color:#484848; +} + +QLineEdit,QTextEdit,QPlainTextEdit,QSpinBox,QDoubleSpinBox,QComboBox,QDateEdit,QTimeEdit,QDateTimeEdit{ +border:1px solid #242424; +border-radius:3px; +padding:2px; +background:none; +selection-background-color:#AAAAAA; +selection-color:#FFFFFF; +} + +QLineEdit:focus,QTextEdit:focus,QPlainTextEdit:focus,QSpinBox:focus,QDoubleSpinBox:focus,QComboBox:focus,QDateEdit:focus,QTimeEdit:focus,QDateTimeEdit:focus,QLineEdit:hover,QTextEdit:hover,QPlainTextEdit:hover,QSpinBox:hover,QDoubleSpinBox:hover,QComboBox:hover,QDateEdit:hover,QTimeEdit:hover,QDateTimeEdit:hover{ +border:1px solid #242424; +} + +QLineEdit[echoMode="2"]{ +lineedit-password-character:9679; +} + +.QFrame{ +border:1px solid #242424; +border-radius:3px; +} + +.QGroupBox{ +border:1px solid #242424; +border-radius:5px; +margin-top:3ex; +} + +.QGroupBox::title{ +subcontrol-origin:margin; +position:relative; +left:10px; +} + +.QPushButton,.QToolButton{ +border-style:none; +border:1px solid #242424; +color:#DCDCDC; +padding:5px; +min-height:15px; +border-radius:5px; +background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #484848,stop:1 #383838); +} + +.QPushButton:hover,.QToolButton:hover{ +background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #646464,stop:1 #525252); +} + +.QPushButton:pressed,.QToolButton:pressed{ +background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #484848,stop:1 #383838); +} + +.QToolButton::menu-indicator{ +image:None; +} + +QToolButton#btnMenu,QPushButton#btnMenu_Min,QPushButton#btnMenu_Max,QPushButton#btnMenu_Close{ +border-radius:3px; +color:#DCDCDC; +padding:3px; +margin:0px; +background:none; +border-style:none; +} + +QToolButton#btnMenu:hover,QPushButton#btnMenu_Min:hover,QPushButton#btnMenu_Max:hover{ +color:#FFFFFF; +margin:1px 1px 2px 1px; +background-color:rgba(51,127,209,230); +} + +QPushButton#btnMenu_Close:hover{ +color:#FFFFFF; +margin:1px 1px 2px 1px; +background-color:rgba(238,0,0,128); +} + +QRadioButton::indicator{ +width:15px; +height:15px; +} + +QRadioButton::indicator::unchecked{ +image:url(:/qss/psblack/radiobutton_unchecked.png); +} + +QRadioButton::indicator::unchecked:disabled{ +image:url(:/qss/psblack/radiobutton_unchecked_disable.png); +} + +QRadioButton::indicator::checked{ +image:url(:/qss/psblack/radiobutton_checked.png); +} + +QRadioButton::indicator::checked:disabled{ +image:url(:/qss/psblack/radiobutton_checked_disable.png); +} + +QGroupBox::indicator,QTreeView::indicator,QListView::indicator,QTableView::indicator{ +padding:0px 0px 0px 0px; +} + +QCheckBox::indicator,QGroupBox::indicator,QTreeView::indicator,QListView::indicator,QTableView::indicator{ +width:13px; +height:13px; +} + +QCheckBox::indicator:unchecked,QGroupBox::indicator:unchecked,QTreeView::indicator:unchecked,QListView::indicator:unchecked,QTableView::indicator:unchecked{ +image:url(:/qss/psblack/checkbox_unchecked.png); +} + +QCheckBox::indicator:unchecked:disabled,QGroupBox::indicator:unchecked:disabled,QTreeView::indicator:unchecked:disabled,QListView::indicator:unchecked:disabled,QTableView::indicator:unchecked:disabled{ +image:url(:/qss/psblack/checkbox_unchecked_disable.png); +} + +QCheckBox::indicator:checked,QGroupBox::indicator:checked,QTreeView::indicator:checked,QListView::indicator:checked,QTableView::indicator:checked{ +image:url(:/qss/psblack/checkbox_checked.png); +} + +QCheckBox::indicator:checked:disabled,QGroupBox::indicator:checked:disabled,QTreeView::indicator:checked:disabled,QListView::indicator:checked:disabled,QTableView::indicator:checked:disabled{ +image:url(:/qss/psblack/checkbox_checked_disable.png); +} + +QCheckBox::indicator:indeterminate,QGroupBox::indicator:indeterminate,QTreeView::indicator:indeterminate,QListView::indicator:indeterminate,QTableView::indicator:indeterminate{ +image:url(:/qss/psblack/checkbox_parcial.png); +} + +QCheckBox::indicator:indeterminate:disabled,QGroupBox::indicator:indeterminate:disabled,QTreeView::indicator:indeterminate:disabled,QListView::indicator:indeterminate:disabled,QTableView::indicator:indeterminate:disabled{ +image:url(:/qss/psblack/checkbox_parcial_disable.png); +} + +QTimeEdit::up-button,QDateEdit::up-button,QDateTimeEdit::up-button,QDoubleSpinBox::up-button,QSpinBox::up-button{ +image:url(:/qss/psblack/add_top.png); +width:10px; +height:10px; +padding:2px 5px 0px 0px; +} + +QTimeEdit::down-button,QDateEdit::down-button,QDateTimeEdit::down-button,QDoubleSpinBox::down-button,QSpinBox::down-button{ +image:url(:/qss/psblack/add_bottom.png); +width:10px; +height:10px; +padding:0px 5px 2px 0px; +} + +QTimeEdit::up-button:pressed,QDateEdit::up-button:pressed,QDateTimeEdit::up-button:pressed,QDoubleSpinBox::up-button:pressed,QSpinBox::up-button:pressed{ +top:-2px; +} + +QTimeEdit::down-button:pressed,QDateEdit::down-button:pressed,QDateTimeEdit::down-button:pressed,QDoubleSpinBox::down-button:pressed,QSpinBox::down-button:pressed,QSpinBox::down-button:pressed{ +bottom:-2px; +} + +QComboBox::down-arrow,QDateEdit[calendarPopup="true"]::down-arrow,QTimeEdit[calendarPopup="true"]::down-arrow,QDateTimeEdit[calendarPopup="true"]::down-arrow{ +image:url(:/qss/psblack/add_bottom.png); +width:10px; +height:10px; +right:2px; +} + +QComboBox::drop-down,QDateEdit::drop-down,QTimeEdit::drop-down,QDateTimeEdit::drop-down{ +subcontrol-origin:padding; +subcontrol-position:top right; +width:15px; +border-left-width:0px; +border-left-style:solid; +border-top-right-radius:3px; +border-bottom-right-radius:3px; +border-left-color:#242424; +} + +QComboBox::drop-down:on{ +top:1px; +} + +QMenuBar::item{ +color:#DCDCDC; +background-color:#484848; +margin:0px; +padding:3px 10px; +} + +QMenu,QMenuBar,QMenu:disabled,QMenuBar:disabled{ +color:#DCDCDC; +background-color:#484848; +border:1px solid #242424; +margin:0px; +} + +QMenu::item{ +padding:3px 20px; +} + +QMenu::indicator{ +width:20px; +height:13px; +} + +QMenu::indicator::checked{ +image:url(:/qss/psblack/menu_checked.png); +} + +QMenu::right-arrow{ +image:url(:/qss/psblack/arrow_right.png); +width:13px; +height:13px; +padding:0px 3px 0px 0px; +} + +QMenu::item:selected,QMenuBar::item:selected{ +color:#DCDCDC; +border:0px solid #242424; +background:#646464; +} + +QMenu::separator{ +height:1px; +background:#242424; +} + +QProgressBar{ +min-height:10px; +background:#484848; +border-radius:5px; +text-align:center; +border:1px solid #484848; +} + +QProgressBar:chunk{ +border-radius:5px; +background-color:#242424; +} + +QSlider::groove:horizontal{ +background:#484848; +height:8px; +border-radius:4px; +} + +QSlider::add-page:horizontal{ +background:#484848; +height:8px; +border-radius:4px; +} + +QSlider::sub-page:horizontal{ +background:#242424; +height:8px; +border-radius:4px; +} + +QSlider::handle:horizontal{ +width:13px; +margin-top:-3px; +margin-bottom:-3px; +border-radius:6px; +background:qradialgradient(spread:pad,cx:0.5,cy:0.5,radius:0.5,fx:0.5,fy:0.5,stop:0.6 #444444,stop:0.8 #242424); +} + +QSlider::groove:vertical{ +width:8px; +border-radius:4px; +background:#484848; +} + +QSlider::add-page:vertical{ +width:8px; +border-radius:4px; +background:#484848; +} + +QSlider::sub-page:vertical{ +width:8px; +border-radius:4px; +background:#242424; +} + +QSlider::handle:vertical{ +height:14px; +margin-left:-3px; +margin-right:-3px; +border-radius:6px; +background:qradialgradient(spread:pad,cx:0.5,cy:0.5,radius:0.5,fx:0.5,fy:0.5,stop:0.6 #444444,stop:0.8 #242424); +} + +QScrollBar:horizontal{ +background:#484848; +padding:0px; +border-radius:6px; +max-height:12px; +} + +QScrollBar::handle:horizontal{ +background:#242424; +min-width:50px; +border-radius:6px; +} + +QScrollBar::handle:horizontal:hover{ +background:#AAAAAA; +} + +QScrollBar::handle:horizontal:pressed{ +background:#AAAAAA; +} + +QScrollBar::add-page:horizontal{ +background:none; +} + +QScrollBar::sub-page:horizontal{ +background:none; +} + +QScrollBar::add-line:horizontal{ +background:none; +} + +QScrollBar::sub-line:horizontal{ +background:none; +} + +QScrollBar:vertical{ +background:#484848; +padding:0px; +border-radius:6px; +max-width:12px; +} + +QScrollBar::handle:vertical{ +background:#242424; +min-height:50px; +border-radius:6px; +} + +QScrollBar::handle:vertical:hover{ +background:#AAAAAA; +} + +QScrollBar::handle:vertical:pressed{ +background:#AAAAAA; +} + +QScrollBar::add-page:vertical{ +background:none; +} + +QScrollBar::sub-page:vertical{ +background:none; +} + +QScrollBar::add-line:vertical{ +background:none; +} + +QScrollBar::sub-line:vertical{ +background:none; +} + +QScrollArea{ +border:0px; +} + +QTreeView,QListView,QTableView,QTabWidget::pane{ +border:1px solid #242424; +selection-background-color:#646464; +selection-color:#DCDCDC; +alternate-background-color:#525252; +gridline-color:#242424; +} + +QTreeView::branch:closed:has-children{ +margin:4px; +border-image:url(:/qss/psblack/branch_open.png); +} + +QTreeView::branch:open:has-children{ +margin:4px; +border-image:url(:/qss/psblack/branch_close.png); +} + +QTreeView,QListView,QTableView,QSplitter::handle,QTreeView::branch{ +background:#444444; +} + +QTableView::item:selected,QListView::item:selected,QTreeView::item:selected{ +color:#DCDCDC; +background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #484848,stop:1 #383838); +} + +QTableView::item:hover,QListView::item:hover,QTreeView::item:hover,QHeaderView{ +color:#DCDCDC; +background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #646464,stop:1 #525252); +} + +QTableView::item,QListView::item,QTreeView::item{ +padding:1px; +margin:0px; +} + +QHeaderView::section,QTableCornerButton:section{ +padding:3px; +margin:0px; +color:#DCDCDC; +border:1px solid #242424; +border-left-width:0px; +border-right-width:1px; +border-top-width:0px; +border-bottom-width:1px; +background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #646464,stop:1 #525252); +} + +QTabBar::tab{ +border:1px solid #242424; +color:#DCDCDC; +margin:0px; +background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #646464,stop:1 #525252); +} + +QTabBar::tab:selected,QTabBar::tab:hover{ +border-style:solid; +border-color:#AAAAAA; +background:#444444; +} + +QTabBar::tab:top,QTabBar::tab:bottom{ +padding:3px 8px 3px 8px; +} + +QTabBar::tab:left,QTabBar::tab:right{ +padding:8px 3px 8px 3px; +} + +QTabBar::tab:top:selected,QTabBar::tab:top:hover{ +border-width:2px 0px 0px 0px; +} + +QTabBar::tab:right:selected,QTabBar::tab:right:hover{ +border-width:0px 0px 0px 2px; +} + +QTabBar::tab:bottom:selected,QTabBar::tab:bottom:hover{ +border-width:0px 0px 2px 0px; +} + +QTabBar::tab:left:selected,QTabBar::tab:left:hover{ +border-width:0px 2px 0px 0px; +} + +QTabBar::tab:first:top:selected,QTabBar::tab:first:top:hover,QTabBar::tab:first:bottom:selected,QTabBar::tab:first:bottom:hover{ +border-left-width:1px; +border-left-color:#242424; +} + +QTabBar::tab:first:left:selected,QTabBar::tab:first:left:hover,QTabBar::tab:first:right:selected,QTabBar::tab:first:right:hover{ +border-top-width:1px; +border-top-color:#242424; +} + +QTabBar::tab:last:top:selected,QTabBar::tab:last:top:hover,QTabBar::tab:last:bottom:selected,QTabBar::tab:last:bottom:hover{ +border-right-width:1px; +border-right-color:#242424; +} + +QTabBar::tab:last:left:selected,QTabBar::tab:last:left:hover,QTabBar::tab:last:right:selected,QTabBar::tab:last:right:hover{ +border-bottom-width:1px; +border-bottom-color:#242424; +} + +QStatusBar::item{ +border:0px solid #484848; +border-radius:3px; +} + +QToolBox::tab,QGroupBox#gboxDevicePanel,QGroupBox#gboxDeviceTitle,QFrame#gboxDevicePanel,QFrame#gboxDeviceTitle{ +padding:3px; +border-radius:5px; +color:#DCDCDC; +background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #484848,stop:1 #383838); +} + +QToolTip{ +border:0px solid #DCDCDC; +padding:1px; +color:#DCDCDC; +background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #484848,stop:1 #383838); +} + +QToolBox::tab:selected{ +background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #646464,stop:1 #525252); +} + +QPrintPreviewDialog QToolButton{ +border:0px solid #DCDCDC; +border-radius:0px; +margin:0px; +padding:3px; +background:none; +} + +QColorDialog QPushButton,QFileDialog QPushButton{ +min-width:80px; +} + +QToolButton#qt_calendar_prevmonth{ +icon-size:0px; +min-width:20px; +image:url(:/qss/psblack/calendar_prevmonth.png); +} + +QToolButton#qt_calendar_nextmonth{ +icon-size:0px; +min-width:20px; +image:url(:/qss/psblack/calendar_nextmonth.png); +} + +QToolButton#qt_calendar_prevmonth,QToolButton#qt_calendar_nextmonth,QToolButton#qt_calendar_monthbutton,QToolButton#qt_calendar_yearbutton{ +border:0px solid #DCDCDC; +border-radius:3px; +margin:3px 3px 3px 3px; +padding:3px; +background:none; +} + +QToolButton#qt_calendar_prevmonth:hover,QToolButton#qt_calendar_nextmonth:hover,QToolButton#qt_calendar_monthbutton:hover,QToolButton#qt_calendar_yearbutton:hover,QToolButton#qt_calendar_prevmonth:pressed,QToolButton#qt_calendar_nextmonth:pressed,QToolButton#qt_calendar_monthbutton:pressed,QToolButton#qt_calendar_yearbutton:pressed{ +border:1px solid #242424; +} + +QCalendarWidget QSpinBox#qt_calendar_yearedit{ +margin:2px; +} + +QCalendarWidget QToolButton::menu-indicator{ +image:None; +} + +QCalendarWidget QTableView{ +border-width:0px; +} + +QCalendarWidget QWidget#qt_calendar_navigationbar{ +border:1px solid #242424; +border-width:1px 1px 0px 1px; +background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #484848,stop:1 #383838); +} + +QTableView[model="true"]::item{ +padding:0px; +margin:0px; +} + +QTableView QLineEdit,QTableView QComboBox,QTableView QSpinBox,QTableView QDoubleSpinBox,QTableView QDateEdit,QTableView QTimeEdit,QTableView QDateTimeEdit{ +border-width:0px; +border-radius:0px; +} + +QTableView QLineEdit:focus,QTableView QComboBox:focus,QTableView QSpinBox:focus,QTableView QDoubleSpinBox:focus,QTableView QDateEdit:focus,QTableView QTimeEdit:focus,QTableView QDateTimeEdit:focus{ +border-width:0px; +border-radius:0px; +} + +QLineEdit,QTextEdit,QPlainTextEdit,QSpinBox,QDoubleSpinBox,QComboBox,QDateEdit,QTimeEdit,QDateTimeEdit{ +background:#444444; +} + +QTabWidget::pane:top{top:-1px;} +QTabWidget::pane:bottom{bottom:-1px;} +QTabWidget::pane:left{right:-1px;} +QTabWidget::pane:right{left:-1px;} + +QDialog,QDial,#QUIWidgetMain{ +background-color:#444444; +color:#DCDCDC; +} + +QDialogButtonBox>QPushButton{ +min-width:50px; +} + +QListView[noboder="true"],QTreeView[noboder="true"],QTabWidget[noboder="true"]::pane{ +border-width:0px; +} + +QToolBar>*,QStatusBar>*{ +margin:2px; +} + +*:disabled,QMenu::item:disabled,QTabBar:tab:disabled,QHeaderView::section:disabled{ +background:#444444; +border-color:#484848; +color:#242424; +} + +/*TextColor:#DCDCDC*/ +/*PanelColor:#444444*/ +/*BorderColor:#242424*/ +/*NormalColorStart:#484848*/ +/*NormalColorEnd:#383838*/ +/*DarkColorStart:#646464*/ +/*DarkColorEnd:#525252*/ +/*HighColor:#AAAAAA*/ \ No newline at end of file diff --git a/styledemo/qrc/qss/psblack/add_bottom.png b/ui/core_qss/qss/psblack/add_bottom.png similarity index 100% rename from styledemo/qrc/qss/psblack/add_bottom.png rename to ui/core_qss/qss/psblack/add_bottom.png diff --git a/styledemo/qrc/qss/psblack/add_left.png b/ui/core_qss/qss/psblack/add_left.png similarity index 100% rename from styledemo/qrc/qss/psblack/add_left.png rename to ui/core_qss/qss/psblack/add_left.png diff --git a/styledemo/qrc/qss/psblack/add_right.png b/ui/core_qss/qss/psblack/add_right.png similarity index 100% rename from styledemo/qrc/qss/psblack/add_right.png rename to ui/core_qss/qss/psblack/add_right.png diff --git a/styledemo/qrc/qss/psblack/add_top.png b/ui/core_qss/qss/psblack/add_top.png similarity index 100% rename from styledemo/qrc/qss/psblack/add_top.png rename to ui/core_qss/qss/psblack/add_top.png diff --git a/styledemo/qrc/qss/psblack/arrow_bottom.png b/ui/core_qss/qss/psblack/arrow_bottom.png similarity index 100% rename from styledemo/qrc/qss/psblack/arrow_bottom.png rename to ui/core_qss/qss/psblack/arrow_bottom.png diff --git a/styledemo/qrc/qss/psblack/arrow_left.png b/ui/core_qss/qss/psblack/arrow_left.png similarity index 100% rename from styledemo/qrc/qss/psblack/arrow_left.png rename to ui/core_qss/qss/psblack/arrow_left.png diff --git a/styledemo/qrc/qss/psblack/arrow_right.png b/ui/core_qss/qss/psblack/arrow_right.png similarity index 100% rename from styledemo/qrc/qss/psblack/arrow_right.png rename to ui/core_qss/qss/psblack/arrow_right.png diff --git a/styledemo/qrc/qss/psblack/arrow_top.png b/ui/core_qss/qss/psblack/arrow_top.png similarity index 100% rename from styledemo/qrc/qss/psblack/arrow_top.png rename to ui/core_qss/qss/psblack/arrow_top.png diff --git a/styledemo/qrc/qss/psblack/branch_close.png b/ui/core_qss/qss/psblack/branch_close.png similarity index 100% rename from styledemo/qrc/qss/psblack/branch_close.png rename to ui/core_qss/qss/psblack/branch_close.png diff --git a/styledemo/qrc/qss/psblack/branch_open.png b/ui/core_qss/qss/psblack/branch_open.png similarity index 100% rename from styledemo/qrc/qss/psblack/branch_open.png rename to ui/core_qss/qss/psblack/branch_open.png diff --git a/styledemo/qrc/qss/psblack/calendar_nextmonth.png b/ui/core_qss/qss/psblack/calendar_nextmonth.png similarity index 100% rename from styledemo/qrc/qss/psblack/calendar_nextmonth.png rename to ui/core_qss/qss/psblack/calendar_nextmonth.png diff --git a/styledemo/qrc/qss/psblack/calendar_prevmonth.png b/ui/core_qss/qss/psblack/calendar_prevmonth.png similarity index 100% rename from styledemo/qrc/qss/psblack/calendar_prevmonth.png rename to ui/core_qss/qss/psblack/calendar_prevmonth.png diff --git a/styledemo/qrc/qss/psblack/checkbox_checked.png b/ui/core_qss/qss/psblack/checkbox_checked.png similarity index 100% rename from styledemo/qrc/qss/psblack/checkbox_checked.png rename to ui/core_qss/qss/psblack/checkbox_checked.png diff --git a/styledemo/qrc/qss/psblack/checkbox_checked_disable.png b/ui/core_qss/qss/psblack/checkbox_checked_disable.png similarity index 100% rename from styledemo/qrc/qss/psblack/checkbox_checked_disable.png rename to ui/core_qss/qss/psblack/checkbox_checked_disable.png diff --git a/styledemo/qrc/qss/psblack/checkbox_parcial.png b/ui/core_qss/qss/psblack/checkbox_parcial.png similarity index 100% rename from styledemo/qrc/qss/psblack/checkbox_parcial.png rename to ui/core_qss/qss/psblack/checkbox_parcial.png diff --git a/styledemo/qrc/qss/psblack/checkbox_parcial_disable.png b/ui/core_qss/qss/psblack/checkbox_parcial_disable.png similarity index 100% rename from styledemo/qrc/qss/psblack/checkbox_parcial_disable.png rename to ui/core_qss/qss/psblack/checkbox_parcial_disable.png diff --git a/styledemo/qrc/qss/psblack/checkbox_unchecked.png b/ui/core_qss/qss/psblack/checkbox_unchecked.png similarity index 100% rename from styledemo/qrc/qss/psblack/checkbox_unchecked.png rename to ui/core_qss/qss/psblack/checkbox_unchecked.png diff --git a/styledemo/qrc/qss/psblack/checkbox_unchecked_disable.png b/ui/core_qss/qss/psblack/checkbox_unchecked_disable.png similarity index 100% rename from styledemo/qrc/qss/psblack/checkbox_unchecked_disable.png rename to ui/core_qss/qss/psblack/checkbox_unchecked_disable.png diff --git a/styledemo/qrc/qss/psblack/menu_checked.png b/ui/core_qss/qss/psblack/menu_checked.png similarity index 100% rename from styledemo/qrc/qss/psblack/menu_checked.png rename to ui/core_qss/qss/psblack/menu_checked.png diff --git a/styledemo/qrc/qss/psblack/radiobutton_checked.png b/ui/core_qss/qss/psblack/radiobutton_checked.png similarity index 100% rename from styledemo/qrc/qss/psblack/radiobutton_checked.png rename to ui/core_qss/qss/psblack/radiobutton_checked.png diff --git a/styledemo/qrc/qss/psblack/radiobutton_checked_disable.png b/ui/core_qss/qss/psblack/radiobutton_checked_disable.png similarity index 100% rename from styledemo/qrc/qss/psblack/radiobutton_checked_disable.png rename to ui/core_qss/qss/psblack/radiobutton_checked_disable.png diff --git a/styledemo/qrc/qss/psblack/radiobutton_unchecked.png b/ui/core_qss/qss/psblack/radiobutton_unchecked.png similarity index 100% rename from styledemo/qrc/qss/psblack/radiobutton_unchecked.png rename to ui/core_qss/qss/psblack/radiobutton_unchecked.png diff --git a/styledemo/qrc/qss/psblack/radiobutton_unchecked_disable.png b/ui/core_qss/qss/psblack/radiobutton_unchecked_disable.png similarity index 100% rename from styledemo/qrc/qss/psblack/radiobutton_unchecked_disable.png rename to ui/core_qss/qss/psblack/radiobutton_unchecked_disable.png diff --git a/flatui/flatui.cpp b/ui/flatui/flatui.cpp similarity index 98% rename from flatui/flatui.cpp rename to ui/flatui/flatui.cpp index 3a8339d..923b3d4 100644 --- a/flatui/flatui.cpp +++ b/ui/flatui/flatui.cpp @@ -1,170 +1,170 @@ -#pragma execution_character_set("utf-8") - -#include "flatui.h" -#include "qpushbutton.h" -#include "qlineedit.h" -#include "qprogressbar.h" -#include "qslider.h" -#include "qradiobutton.h" -#include "qcheckbox.h" -#include "qscrollbar.h" -#include "qdebug.h" - -QString FlatUI::setPushButtonQss(QPushButton *btn, int radius, int padding, - const QString &normalColor, - const QString &normalTextColor, - const QString &hoverColor, - const QString &hoverTextColor, - const QString &pressedColor, - const QString &pressedTextColor) -{ - QStringList list; - list.append(QString("QPushButton{border-style:none;padding:%1px;border-radius:%2px;color:%3;background:%4;}") - .arg(padding).arg(radius).arg(normalTextColor).arg(normalColor)); - list.append(QString("QPushButton:hover{color:%1;background:%2;}") - .arg(hoverTextColor).arg(hoverColor)); - list.append(QString("QPushButton:pressed{color:%1;background:%2;}") - .arg(pressedTextColor).arg(pressedColor)); - - QString qss = list.join(""); - btn->setStyleSheet(qss); - return qss; -} - -QString FlatUI::setLineEditQss(QLineEdit *txt, int radius, int borderWidth, - const QString &normalColor, - const QString &focusColor) -{ - QStringList list; - list.append(QString("QLineEdit{border-style:none;padding:3px;border-radius:%1px;border:%2px solid %3;}") - .arg(radius).arg(borderWidth).arg(normalColor)); - list.append(QString("QLineEdit:focus{border:%1px solid %2;}") - .arg(borderWidth).arg(focusColor)); - - QString qss = list.join(""); - txt->setStyleSheet(qss); - return qss; -} - -QString FlatUI::setProgressQss(QProgressBar *bar, int barHeight, - int barRadius, int fontSize, - const QString &normalColor, - const QString &chunkColor) -{ - - QStringList list; - list.append(QString("QProgressBar{font:%1pt;background:%2;max-height:%3px;border-radius:%4px;text-align:center;border:1px solid %2;}") - .arg(fontSize).arg(normalColor).arg(barHeight).arg(barRadius)); - list.append(QString("QProgressBar:chunk{border-radius:%2px;background-color:%1;}") - .arg(chunkColor).arg(barRadius)); - - QString qss = list.join(""); - bar->setStyleSheet(qss); - return qss; -} - -QString FlatUI::setSliderQss(QSlider *slider, int sliderHeight, - const QString &normalColor, - const QString &grooveColor, - const QString &handleBorderColor, - const QString &handleColor) -{ - int sliderRadius = sliderHeight / 2; - int handleWidth = (sliderHeight * 3) / 2 + (sliderHeight / 5); - int handleRadius = handleWidth / 2; - int handleOffset = handleRadius / 2; - - QStringList list; - list.append(QString("QSlider::horizontal{min-height:%1px;}").arg(sliderHeight * 2)); - list.append(QString("QSlider::groove:horizontal{background:%1;height:%2px;border-radius:%3px;}") - .arg(normalColor).arg(sliderHeight).arg(sliderRadius)); - list.append(QString("QSlider::add-page:horizontal{background:%1;height:%2px;border-radius:%3px;}") - .arg(normalColor).arg(sliderHeight).arg(sliderRadius)); - list.append(QString("QSlider::sub-page:horizontal{background:%1;height:%2px;border-radius:%3px;}") - .arg(grooveColor).arg(sliderHeight).arg(sliderRadius)); - list.append(QString("QSlider::handle:horizontal{width:%3px;margin-top:-%4px;margin-bottom:-%4px;border-radius:%5px;" - "background:qradialgradient(spread:pad,cx:0.5,cy:0.5,radius:0.5,fx:0.5,fy:0.5,stop:0.6 %1,stop:0.8 %2);}") - .arg(handleColor).arg(handleBorderColor).arg(handleWidth).arg(handleOffset).arg(handleRadius)); - - //偏移一个像素 - handleWidth = handleWidth + 1; - list.append(QString("QSlider::vertical{min-width:%1px;}").arg(sliderHeight * 2)); - list.append(QString("QSlider::groove:vertical{background:%1;width:%2px;border-radius:%3px;}") - .arg(normalColor).arg(sliderHeight).arg(sliderRadius)); - list.append(QString("QSlider::add-page:vertical{background:%1;width:%2px;border-radius:%3px;}") - .arg(grooveColor).arg(sliderHeight).arg(sliderRadius)); - list.append(QString("QSlider::sub-page:vertical{background:%1;width:%2px;border-radius:%3px;}") - .arg(normalColor).arg(sliderHeight).arg(sliderRadius)); - list.append(QString("QSlider::handle:vertical{height:%3px;margin-left:-%4px;margin-right:-%4px;border-radius:%5px;" - "background:qradialgradient(spread:pad,cx:0.5,cy:0.5,radius:0.5,fx:0.5,fy:0.5,stop:0.6 %1,stop:0.8 %2);}") - .arg(handleColor).arg(handleBorderColor).arg(handleWidth).arg(handleOffset).arg(handleRadius)); - - QString qss = list.join(""); - slider->setStyleSheet(qss); - return qss; -} - -QString FlatUI::setRadioButtonQss(QRadioButton *rbtn, int indicatorRadius, - const QString &normalColor, - const QString &checkColor) -{ - int indicatorWidth = indicatorRadius * 2; - - QStringList list; - list.append(QString("QRadioButton::indicator{border-radius:%1px;width:%2px;height:%2px;}") - .arg(indicatorRadius).arg(indicatorWidth)); - list.append(QString("QRadioButton::indicator::unchecked{background:qradialgradient(spread:pad,cx:0.5,cy:0.5,radius:0.5,fx:0.5,fy:0.5," - "stop:0.6 #FFFFFF,stop:0.7 %1);}").arg(normalColor)); - list.append(QString("QRadioButton::indicator::checked{background:qradialgradient(spread:pad,cx:0.5,cy:0.5,radius:0.5,fx:0.5,fy:0.5," - "stop:0 %1,stop:0.3 %1,stop:0.4 #FFFFFF,stop:0.6 #FFFFFF,stop:0.7 %1);}").arg(checkColor)); - - QString qss = list.join(""); - rbtn->setStyleSheet(qss); - return qss; -} - -QString FlatUI::setScrollBarQss(QWidget *scroll, int radius, int min, int max, - const QString &bgColor, - const QString &handleNormalColor, - const QString &handleHoverColor, - const QString &handlePressedColor) -{ - //滚动条离背景间隔 - int padding = 0; - - QStringList list; - - //handle:指示器,滚动条拉动部分 add-page:滚动条拉动时增加的部分 sub-page:滚动条拉动时减少的部分 add-line:递增按钮 sub-line:递减按钮 - - //横向滚动条部分 - list.append(QString("QScrollBar:horizontal{background:%1;padding:%2px;border-radius:%3px;min-height:%4px;max-height:%4px;}") - .arg(bgColor).arg(padding).arg(radius).arg(max)); - list.append(QString("QScrollBar::handle:horizontal{background:%1;min-width:%2px;border-radius:%3px;}") - .arg(handleNormalColor).arg(min).arg(radius)); - list.append(QString("QScrollBar::handle:horizontal:hover{background:%1;}") - .arg(handleHoverColor)); - list.append(QString("QScrollBar::handle:horizontal:pressed{background:%1;}") - .arg(handlePressedColor)); - list.append(QString("QScrollBar::add-page:horizontal{background:none;}")); - list.append(QString("QScrollBar::sub-page:horizontal{background:none;}")); - list.append(QString("QScrollBar::add-line:horizontal{background:none;}")); - list.append(QString("QScrollBar::sub-line:horizontal{background:none;}")); - - //纵向滚动条部分 - list.append(QString("QScrollBar:vertical{background:%1;padding:%2px;border-radius:%3px;min-width:%4px;max-width:%4px;}") - .arg(bgColor).arg(padding).arg(radius).arg(max)); - list.append(QString("QScrollBar::handle:vertical{background:%1;min-height:%2px;border-radius:%3px;}") - .arg(handleNormalColor).arg(min).arg(radius)); - list.append(QString("QScrollBar::handle:vertical:hover{background:%1;}") - .arg(handleHoverColor)); - list.append(QString("QScrollBar::handle:vertical:pressed{background:%1;}") - .arg(handlePressedColor)); - list.append(QString("QScrollBar::add-page:vertical{background:none;}")); - list.append(QString("QScrollBar::sub-page:vertical{background:none;}")); - list.append(QString("QScrollBar::add-line:vertical{background:none;}")); - list.append(QString("QScrollBar::sub-line:vertical{background:none;}")); - - QString qss = list.join(""); - scroll->setStyleSheet(qss); - return qss; -} +#pragma execution_character_set("utf-8") + +#include "flatui.h" +#include "qpushbutton.h" +#include "qlineedit.h" +#include "qprogressbar.h" +#include "qslider.h" +#include "qradiobutton.h" +#include "qcheckbox.h" +#include "qscrollbar.h" +#include "qdebug.h" + +QString FlatUI::setPushButtonQss(QPushButton *btn, int radius, int padding, + const QString &normalColor, + const QString &normalTextColor, + const QString &hoverColor, + const QString &hoverTextColor, + const QString &pressedColor, + const QString &pressedTextColor) +{ + QStringList list; + list.append(QString("QPushButton{border-style:none;padding:%1px;border-radius:%2px;color:%3;background:%4;}") + .arg(padding).arg(radius).arg(normalTextColor).arg(normalColor)); + list.append(QString("QPushButton:hover{color:%1;background:%2;}") + .arg(hoverTextColor).arg(hoverColor)); + list.append(QString("QPushButton:pressed{color:%1;background:%2;}") + .arg(pressedTextColor).arg(pressedColor)); + + QString qss = list.join(""); + btn->setStyleSheet(qss); + return qss; +} + +QString FlatUI::setLineEditQss(QLineEdit *txt, int radius, int borderWidth, + const QString &normalColor, + const QString &focusColor) +{ + QStringList list; + list.append(QString("QLineEdit{border-style:none;padding:3px;border-radius:%1px;border:%2px solid %3;}") + .arg(radius).arg(borderWidth).arg(normalColor)); + list.append(QString("QLineEdit:focus{border:%1px solid %2;}") + .arg(borderWidth).arg(focusColor)); + + QString qss = list.join(""); + txt->setStyleSheet(qss); + return qss; +} + +QString FlatUI::setProgressQss(QProgressBar *bar, int barHeight, + int barRadius, int fontSize, + const QString &normalColor, + const QString &chunkColor) +{ + + QStringList list; + list.append(QString("QProgressBar{font:%1pt;background:%2;max-height:%3px;border-radius:%4px;text-align:center;border:1px solid %2;}") + .arg(fontSize).arg(normalColor).arg(barHeight).arg(barRadius)); + list.append(QString("QProgressBar:chunk{border-radius:%2px;background-color:%1;}") + .arg(chunkColor).arg(barRadius)); + + QString qss = list.join(""); + bar->setStyleSheet(qss); + return qss; +} + +QString FlatUI::setSliderQss(QSlider *slider, int sliderHeight, + const QString &normalColor, + const QString &grooveColor, + const QString &handleBorderColor, + const QString &handleColor) +{ + int sliderRadius = sliderHeight / 2; + int handleWidth = (sliderHeight * 3) / 2 + (sliderHeight / 5); + int handleRadius = handleWidth / 2; + int handleOffset = handleRadius / 2; + + QStringList list; + list.append(QString("QSlider::horizontal{min-height:%1px;}").arg(sliderHeight * 2)); + list.append(QString("QSlider::groove:horizontal{background:%1;height:%2px;border-radius:%3px;}") + .arg(normalColor).arg(sliderHeight).arg(sliderRadius)); + list.append(QString("QSlider::add-page:horizontal{background:%1;height:%2px;border-radius:%3px;}") + .arg(normalColor).arg(sliderHeight).arg(sliderRadius)); + list.append(QString("QSlider::sub-page:horizontal{background:%1;height:%2px;border-radius:%3px;}") + .arg(grooveColor).arg(sliderHeight).arg(sliderRadius)); + list.append(QString("QSlider::handle:horizontal{width:%3px;margin-top:-%4px;margin-bottom:-%4px;border-radius:%5px;" + "background:qradialgradient(spread:pad,cx:0.5,cy:0.5,radius:0.5,fx:0.5,fy:0.5,stop:0.6 %1,stop:0.8 %2);}") + .arg(handleColor).arg(handleBorderColor).arg(handleWidth).arg(handleOffset).arg(handleRadius)); + + //偏移一个像素 + handleWidth = handleWidth + 1; + list.append(QString("QSlider::vertical{min-width:%1px;}").arg(sliderHeight * 2)); + list.append(QString("QSlider::groove:vertical{background:%1;width:%2px;border-radius:%3px;}") + .arg(normalColor).arg(sliderHeight).arg(sliderRadius)); + list.append(QString("QSlider::add-page:vertical{background:%1;width:%2px;border-radius:%3px;}") + .arg(grooveColor).arg(sliderHeight).arg(sliderRadius)); + list.append(QString("QSlider::sub-page:vertical{background:%1;width:%2px;border-radius:%3px;}") + .arg(normalColor).arg(sliderHeight).arg(sliderRadius)); + list.append(QString("QSlider::handle:vertical{height:%3px;margin-left:-%4px;margin-right:-%4px;border-radius:%5px;" + "background:qradialgradient(spread:pad,cx:0.5,cy:0.5,radius:0.5,fx:0.5,fy:0.5,stop:0.6 %1,stop:0.8 %2);}") + .arg(handleColor).arg(handleBorderColor).arg(handleWidth).arg(handleOffset).arg(handleRadius)); + + QString qss = list.join(""); + slider->setStyleSheet(qss); + return qss; +} + +QString FlatUI::setRadioButtonQss(QRadioButton *rbtn, int indicatorRadius, + const QString &normalColor, + const QString &checkColor) +{ + int indicatorWidth = indicatorRadius * 2; + + QStringList list; + list.append(QString("QRadioButton::indicator{border-radius:%1px;width:%2px;height:%2px;}") + .arg(indicatorRadius).arg(indicatorWidth)); + list.append(QString("QRadioButton::indicator::unchecked{background:qradialgradient(spread:pad,cx:0.5,cy:0.5,radius:0.5,fx:0.5,fy:0.5," + "stop:0.6 #FFFFFF,stop:0.7 %1);}").arg(normalColor)); + list.append(QString("QRadioButton::indicator::checked{background:qradialgradient(spread:pad,cx:0.5,cy:0.5,radius:0.5,fx:0.5,fy:0.5," + "stop:0 %1,stop:0.3 %1,stop:0.4 #FFFFFF,stop:0.6 #FFFFFF,stop:0.7 %1);}").arg(checkColor)); + + QString qss = list.join(""); + rbtn->setStyleSheet(qss); + return qss; +} + +QString FlatUI::setScrollBarQss(QWidget *scroll, int radius, int min, int max, + const QString &bgColor, + const QString &handleNormalColor, + const QString &handleHoverColor, + const QString &handlePressedColor) +{ + //滚动条离背景间隔 + int padding = 0; + + QStringList list; + + //handle:指示器,滚动条拉动部分 add-page:滚动条拉动时增加的部分 sub-page:滚动条拉动时减少的部分 add-line:递增按钮 sub-line:递减按钮 + + //横向滚动条部分 + list.append(QString("QScrollBar:horizontal{background:%1;padding:%2px;border-radius:%3px;min-height:%4px;max-height:%4px;}") + .arg(bgColor).arg(padding).arg(radius).arg(max)); + list.append(QString("QScrollBar::handle:horizontal{background:%1;min-width:%2px;border-radius:%3px;}") + .arg(handleNormalColor).arg(min).arg(radius)); + list.append(QString("QScrollBar::handle:horizontal:hover{background:%1;}") + .arg(handleHoverColor)); + list.append(QString("QScrollBar::handle:horizontal:pressed{background:%1;}") + .arg(handlePressedColor)); + list.append(QString("QScrollBar::add-page:horizontal{background:none;}")); + list.append(QString("QScrollBar::sub-page:horizontal{background:none;}")); + list.append(QString("QScrollBar::add-line:horizontal{background:none;}")); + list.append(QString("QScrollBar::sub-line:horizontal{background:none;}")); + + //纵向滚动条部分 + list.append(QString("QScrollBar:vertical{background:%1;padding:%2px;border-radius:%3px;min-width:%4px;max-width:%4px;}") + .arg(bgColor).arg(padding).arg(radius).arg(max)); + list.append(QString("QScrollBar::handle:vertical{background:%1;min-height:%2px;border-radius:%3px;}") + .arg(handleNormalColor).arg(min).arg(radius)); + list.append(QString("QScrollBar::handle:vertical:hover{background:%1;}") + .arg(handleHoverColor)); + list.append(QString("QScrollBar::handle:vertical:pressed{background:%1;}") + .arg(handlePressedColor)); + list.append(QString("QScrollBar::add-page:vertical{background:none;}")); + list.append(QString("QScrollBar::sub-page:vertical{background:none;}")); + list.append(QString("QScrollBar::add-line:vertical{background:none;}")); + list.append(QString("QScrollBar::sub-line:vertical{background:none;}")); + + QString qss = list.join(""); + scroll->setStyleSheet(qss); + return qss; +} diff --git a/flatui/flatui.h b/ui/flatui/flatui.h similarity index 98% rename from flatui/flatui.h rename to ui/flatui/flatui.h index 9308b09..5c44910 100644 --- a/flatui/flatui.h +++ b/ui/flatui/flatui.h @@ -1,85 +1,85 @@ -#ifndef FLATUI_H -#define FLATUI_H - -/** - * FlatUI辅助类 作者:feiyangqingyun(QQ:517216493) 2016-12-16 - * 1. 按钮样式设置。 - * 2. 文本框样式设置。 - * 3. 进度条样式。 - * 4. 滑块条样式。 - * 5. 单选框样式。 - * 6. 滚动条样式。 - * 7. 可自由设置对象的高度宽度大小等。 - * 8. 自带默认参数值。 - */ - -#include - -class QPushButton; -class QLineEdit; -class QProgressBar; -class QSlider; -class QRadioButton; -class QCheckBox; -class QScrollBar; - -#ifdef quc -class Q_DECL_EXPORT FlatUI -#else -class FlatUI -#endif - -{ -public: - //设置按钮样式 - static QString setPushButtonQss(QPushButton *btn, //按钮对象 - int radius = 5, //圆角半径 - int padding = 8, //间距 - const QString &normalColor = "#34495E", //正常颜色 - const QString &normalTextColor = "#FFFFFF", //文字颜色 - const QString &hoverColor = "#4E6D8C", //悬停颜色 - const QString &hoverTextColor = "#F0F0F0", //悬停文字颜色 - const QString &pressedColor = "#2D3E50", //按下颜色 - const QString &pressedTextColor = "#B8C6D1"); //按下文字颜色 - - //设置文本框样式 - static QString setLineEditQss(QLineEdit *txt, //文本框对象 - int radius = 3, //圆角半径 - int borderWidth = 2, //边框大小 - const QString &normalColor = "#DCE4EC", //正常颜色 - const QString &focusColor = "#34495E"); //选中颜色 - - //设置进度条样式 - static QString setProgressQss(QProgressBar *bar, - int barHeight = 8, //进度条高度 - int barRadius = 5, //进度条半径 - int fontSize = 9, //文字字号 - const QString &normalColor = "#E8EDF2", //正常颜色 - const QString &chunkColor = "#E74C3C"); //进度颜色 - - //设置滑块条样式 - static QString setSliderQss(QSlider *slider, //滑动条对象 - int sliderHeight = 8, //滑动条高度 - const QString &normalColor = "#E8EDF2", //正常颜色 - const QString &grooveColor = "#1ABC9C", //滑块颜色 - const QString &handleBorderColor = "#1ABC9C", //指示器边框颜色 - const QString &handleColor = "#FFFFFF"); //指示器颜色 - - //设置单选框样式 - static QString setRadioButtonQss(QRadioButton *rbtn, //单选框对象 - int indicatorRadius = 8, //指示器圆角角度 - const QString &normalColor = "#D7DBDE", //正常颜色 - const QString &checkColor = "#34495E"); //选中颜色 - - //设置滚动条样式 - static QString setScrollBarQss(QWidget *scroll, //滚动条对象 - int radius = 6, //圆角角度 - int min = 120, //指示器最小长度 - int max = 12, //滚动条最大长度 - const QString &bgColor = "#606060", //背景色 - const QString &handleNormalColor = "#34495E", //指示器正常颜色 - const QString &handleHoverColor = "#1ABC9C", //指示器悬停颜色 - const QString &handlePressedColor = "#E74C3C"); //指示器按下颜色 -}; - -#endif // FLATUI_H +#ifndef FLATUI_H +#define FLATUI_H + +/** + * FlatUI辅助类 作者:feiyangqingyun(QQ:517216493) 2016-12-16 + * 1. 按钮样式设置。 + * 2. 文本框样式设置。 + * 3. 进度条样式。 + * 4. 滑块条样式。 + * 5. 单选框样式。 + * 6. 滚动条样式。 + * 7. 可自由设置对象的高度宽度大小等。 + * 8. 自带默认参数值。 + */ + +#include + +class QPushButton; +class QLineEdit; +class QProgressBar; +class QSlider; +class QRadioButton; +class QCheckBox; +class QScrollBar; + +#ifdef quc +class Q_DECL_EXPORT FlatUI +#else +class FlatUI +#endif + +{ +public: + //设置按钮样式 + static QString setPushButtonQss(QPushButton *btn, //按钮对象 + int radius = 5, //圆角半径 + int padding = 8, //间距 + const QString &normalColor = "#34495E", //正常颜色 + const QString &normalTextColor = "#FFFFFF", //文字颜色 + const QString &hoverColor = "#4E6D8C", //悬停颜色 + const QString &hoverTextColor = "#F0F0F0", //悬停文字颜色 + const QString &pressedColor = "#2D3E50", //按下颜色 + const QString &pressedTextColor = "#B8C6D1"); //按下文字颜色 + + //设置文本框样式 + static QString setLineEditQss(QLineEdit *txt, //文本框对象 + int radius = 3, //圆角半径 + int borderWidth = 2, //边框大小 + const QString &normalColor = "#DCE4EC", //正常颜色 + const QString &focusColor = "#34495E"); //选中颜色 + + //设置进度条样式 + static QString setProgressQss(QProgressBar *bar, + int barHeight = 8, //进度条高度 + int barRadius = 5, //进度条半径 + int fontSize = 9, //文字字号 + const QString &normalColor = "#E8EDF2", //正常颜色 + const QString &chunkColor = "#E74C3C"); //进度颜色 + + //设置滑块条样式 + static QString setSliderQss(QSlider *slider, //滑动条对象 + int sliderHeight = 8, //滑动条高度 + const QString &normalColor = "#E8EDF2", //正常颜色 + const QString &grooveColor = "#1ABC9C", //滑块颜色 + const QString &handleBorderColor = "#1ABC9C", //指示器边框颜色 + const QString &handleColor = "#FFFFFF"); //指示器颜色 + + //设置单选框样式 + static QString setRadioButtonQss(QRadioButton *rbtn, //单选框对象 + int indicatorRadius = 8, //指示器圆角角度 + const QString &normalColor = "#D7DBDE", //正常颜色 + const QString &checkColor = "#34495E"); //选中颜色 + + //设置滚动条样式 + static QString setScrollBarQss(QWidget *scroll, //滚动条对象 + int radius = 6, //圆角角度 + int min = 120, //指示器最小长度 + int max = 12, //滚动条最大长度 + const QString &bgColor = "#606060", //背景色 + const QString &handleNormalColor = "#34495E", //指示器正常颜色 + const QString &handleHoverColor = "#1ABC9C", //指示器悬停颜色 + const QString &handlePressedColor = "#E74C3C"); //指示器按下颜色 +}; + +#endif // FLATUI_H diff --git a/flatui/flatui.pro b/ui/flatui/flatui.pro similarity index 95% rename from flatui/flatui.pro rename to ui/flatui/flatui.pro index 41db326..7dc1b46 100644 --- a/flatui/flatui.pro +++ b/ui/flatui/flatui.pro @@ -1,17 +1,17 @@ -QT += core gui -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat - -TARGET = flatui -TEMPLATE = app -DESTDIR = $$PWD/../bin -CONFIG += warn_off - -SOURCES += main.cpp -SOURCES += frmflatui.cpp -SOURCES += flatui.cpp - -HEADERS += frmflatui.h -HEADERS += flatui.h - -FORMS += frmflatui.ui +QT += core gui +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat + +TARGET = flatui +TEMPLATE = app +DESTDIR = $$PWD/../bin +CONFIG += warn_off + +SOURCES += main.cpp +SOURCES += frmflatui.cpp +SOURCES += flatui.cpp + +HEADERS += frmflatui.h +HEADERS += flatui.h + +FORMS += frmflatui.ui diff --git a/flatui/frmflatui.cpp b/ui/flatui/frmflatui.cpp similarity index 97% rename from flatui/frmflatui.cpp rename to ui/flatui/frmflatui.cpp index 804ce06..87b210e 100644 --- a/flatui/frmflatui.cpp +++ b/ui/flatui/frmflatui.cpp @@ -1,96 +1,96 @@ -#pragma execution_character_set("utf-8") - -#include "frmflatui.h" -#include "ui_frmflatui.h" -#include "flatui.h" -#include "qdebug.h" -#include "qdatetime.h" - -frmFlatUI::frmFlatUI(QWidget *parent) : QWidget(parent), ui(new Ui::frmFlatUI) -{ - ui->setupUi(this); - this->initForm(); -} - -frmFlatUI::~frmFlatUI() -{ - delete ui; -} - -void frmFlatUI::initForm() -{ - ui->bar1->setRange(0, 100); - ui->bar2->setRange(0, 100); - ui->slider1->setRange(0, 100); - ui->slider2->setRange(0, 100); - - connect(ui->slider1, SIGNAL(valueChanged(int)), ui->bar1, SLOT(setValue(int))); - connect(ui->slider2, SIGNAL(valueChanged(int)), ui->bar2, SLOT(setValue(int))); - ui->slider1->setValue(30); - ui->slider2->setValue(30); - - this->setStyleSheet("*{outline:0px;}QWidget#frmFlatUI{background:#FFFFFF;}"); - - FlatUI::setPushButtonQss(ui->btn1); - FlatUI::setPushButtonQss(ui->btn2, 5, 8, "#1ABC9C", "#E6F8F5", "#2EE1C1", "#FFFFFF", "#16A086", "#A7EEE6"); - FlatUI::setPushButtonQss(ui->btn3, 5, 8, "#3498DB", "#FFFFFF", "#5DACE4", "#E5FEFF", "#2483C7", "#A0DAFB"); - FlatUI::setPushButtonQss(ui->btn4, 5, 8, "#E74C3C", "#FFFFFF", "#EC7064", "#FFF5E7", "#DC2D1A", "#F5A996"); - - FlatUI::setLineEditQss(ui->txt1); - FlatUI::setLineEditQss(ui->txt2, 5, 2, "#DCE4EC", "#1ABC9C"); - FlatUI::setLineEditQss(ui->txt3, 3, 1, "#DCE4EC", "#3498DB"); - FlatUI::setLineEditQss(ui->txt4, 3, 1, "#DCE4EC", "#E74C3C"); - - FlatUI::setProgressQss(ui->bar1); - FlatUI::setProgressQss(ui->bar2, 8, 5, 9, "#E8EDF2", "#1ABC9C"); - - FlatUI::setSliderQss(ui->slider1); - FlatUI::setSliderQss(ui->slider2, 10, "#E8EDF2", "#E74C3C", "#E74C3C"); - FlatUI::setSliderQss(ui->slider3, 10, "#E8EDF2", "#34495E", "#34495E"); - - FlatUI::setRadioButtonQss(ui->rbtn1); - FlatUI::setRadioButtonQss(ui->rbtn2, 8, "#D7DBDE", "#1ABC9C"); - FlatUI::setRadioButtonQss(ui->rbtn3, 8, "#D7DBDE", "#3498DB"); - FlatUI::setRadioButtonQss(ui->rbtn4, 8, "#D7DBDE", "#E74C3C"); - - FlatUI::setScrollBarQss(ui->horizontalScrollBar); - FlatUI::setScrollBarQss(ui->verticalScrollBar, 8, 120, 20, "#606060", "#34495E", "#1ABC9C", "#E74C3C"); - - //设置列数和列宽 - int width = 1920; - ui->tableWidget->setColumnCount(5); - ui->tableWidget->setColumnWidth(0, width * 0.06); - ui->tableWidget->setColumnWidth(1, width * 0.10); - ui->tableWidget->setColumnWidth(2, width * 0.06); - ui->tableWidget->setColumnWidth(3, width * 0.10); - ui->tableWidget->setColumnWidth(4, width * 0.20); - ui->tableWidget->verticalHeader()->setDefaultSectionSize(25); - - QStringList headText; - headText << "设备编号" << "设备名称" << "设备地址" << "告警内容" << "告警时间"; - ui->tableWidget->setHorizontalHeaderLabels(headText); - ui->tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows); - ui->tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers); - ui->tableWidget->setSelectionMode(QAbstractItemView::SingleSelection); - ui->tableWidget->setAlternatingRowColors(true); - ui->tableWidget->verticalHeader()->setVisible(false); - ui->tableWidget->horizontalHeader()->setStretchLastSection(true); - - //设置行高 - ui->tableWidget->setRowCount(300); - - for (int i = 0; i < 300; i++) { - ui->tableWidget->setRowHeight(i, 24); - QTableWidgetItem *itemDeviceID = new QTableWidgetItem(QString::number(i + 1)); - QTableWidgetItem *itemDeviceName = new QTableWidgetItem(QString("测试设备%1").arg(i + 1)); - QTableWidgetItem *itemDeviceAddr = new QTableWidgetItem(QString::number(i + 1)); - QTableWidgetItem *itemContent = new QTableWidgetItem("防区告警"); - QTableWidgetItem *itemTime = new QTableWidgetItem(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss")); - - ui->tableWidget->setItem(i, 0, itemDeviceID); - ui->tableWidget->setItem(i, 1, itemDeviceName); - ui->tableWidget->setItem(i, 2, itemDeviceAddr); - ui->tableWidget->setItem(i, 3, itemContent); - ui->tableWidget->setItem(i, 4, itemTime); - } -} +#pragma execution_character_set("utf-8") + +#include "frmflatui.h" +#include "ui_frmflatui.h" +#include "flatui.h" +#include "qdebug.h" +#include "qdatetime.h" + +frmFlatUI::frmFlatUI(QWidget *parent) : QWidget(parent), ui(new Ui::frmFlatUI) +{ + ui->setupUi(this); + this->initForm(); +} + +frmFlatUI::~frmFlatUI() +{ + delete ui; +} + +void frmFlatUI::initForm() +{ + ui->bar1->setRange(0, 100); + ui->bar2->setRange(0, 100); + ui->slider1->setRange(0, 100); + ui->slider2->setRange(0, 100); + + connect(ui->slider1, SIGNAL(valueChanged(int)), ui->bar1, SLOT(setValue(int))); + connect(ui->slider2, SIGNAL(valueChanged(int)), ui->bar2, SLOT(setValue(int))); + ui->slider1->setValue(30); + ui->slider2->setValue(30); + + this->setStyleSheet("*{outline:0px;}QWidget#frmFlatUI{background:#FFFFFF;}"); + + FlatUI::setPushButtonQss(ui->btn1); + FlatUI::setPushButtonQss(ui->btn2, 5, 8, "#1ABC9C", "#E6F8F5", "#2EE1C1", "#FFFFFF", "#16A086", "#A7EEE6"); + FlatUI::setPushButtonQss(ui->btn3, 5, 8, "#3498DB", "#FFFFFF", "#5DACE4", "#E5FEFF", "#2483C7", "#A0DAFB"); + FlatUI::setPushButtonQss(ui->btn4, 5, 8, "#E74C3C", "#FFFFFF", "#EC7064", "#FFF5E7", "#DC2D1A", "#F5A996"); + + FlatUI::setLineEditQss(ui->txt1); + FlatUI::setLineEditQss(ui->txt2, 5, 2, "#DCE4EC", "#1ABC9C"); + FlatUI::setLineEditQss(ui->txt3, 3, 1, "#DCE4EC", "#3498DB"); + FlatUI::setLineEditQss(ui->txt4, 3, 1, "#DCE4EC", "#E74C3C"); + + FlatUI::setProgressQss(ui->bar1); + FlatUI::setProgressQss(ui->bar2, 8, 5, 9, "#E8EDF2", "#1ABC9C"); + + FlatUI::setSliderQss(ui->slider1); + FlatUI::setSliderQss(ui->slider2, 10, "#E8EDF2", "#E74C3C", "#E74C3C"); + FlatUI::setSliderQss(ui->slider3, 10, "#E8EDF2", "#34495E", "#34495E"); + + FlatUI::setRadioButtonQss(ui->rbtn1); + FlatUI::setRadioButtonQss(ui->rbtn2, 8, "#D7DBDE", "#1ABC9C"); + FlatUI::setRadioButtonQss(ui->rbtn3, 8, "#D7DBDE", "#3498DB"); + FlatUI::setRadioButtonQss(ui->rbtn4, 8, "#D7DBDE", "#E74C3C"); + + FlatUI::setScrollBarQss(ui->horizontalScrollBar); + FlatUI::setScrollBarQss(ui->verticalScrollBar, 8, 120, 20, "#606060", "#34495E", "#1ABC9C", "#E74C3C"); + + //设置列数和列宽 + int width = 1920; + ui->tableWidget->setColumnCount(5); + ui->tableWidget->setColumnWidth(0, width * 0.06); + ui->tableWidget->setColumnWidth(1, width * 0.10); + ui->tableWidget->setColumnWidth(2, width * 0.06); + ui->tableWidget->setColumnWidth(3, width * 0.10); + ui->tableWidget->setColumnWidth(4, width * 0.20); + ui->tableWidget->verticalHeader()->setDefaultSectionSize(25); + + QStringList headText; + headText << "设备编号" << "设备名称" << "设备地址" << "告警内容" << "告警时间"; + ui->tableWidget->setHorizontalHeaderLabels(headText); + ui->tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows); + ui->tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers); + ui->tableWidget->setSelectionMode(QAbstractItemView::SingleSelection); + ui->tableWidget->setAlternatingRowColors(true); + ui->tableWidget->verticalHeader()->setVisible(false); + ui->tableWidget->horizontalHeader()->setStretchLastSection(true); + + //设置行高 + ui->tableWidget->setRowCount(300); + + for (int i = 0; i < 300; i++) { + ui->tableWidget->setRowHeight(i, 24); + QTableWidgetItem *itemDeviceID = new QTableWidgetItem(QString::number(i + 1)); + QTableWidgetItem *itemDeviceName = new QTableWidgetItem(QString("测试设备%1").arg(i + 1)); + QTableWidgetItem *itemDeviceAddr = new QTableWidgetItem(QString::number(i + 1)); + QTableWidgetItem *itemContent = new QTableWidgetItem("防区告警"); + QTableWidgetItem *itemTime = new QTableWidgetItem(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss")); + + ui->tableWidget->setItem(i, 0, itemDeviceID); + ui->tableWidget->setItem(i, 1, itemDeviceName); + ui->tableWidget->setItem(i, 2, itemDeviceAddr); + ui->tableWidget->setItem(i, 3, itemContent); + ui->tableWidget->setItem(i, 4, itemTime); + } +} diff --git a/flatui/frmflatui.h b/ui/flatui/frmflatui.h similarity index 92% rename from flatui/frmflatui.h rename to ui/flatui/frmflatui.h index 4b24005..8086a3f 100644 --- a/flatui/frmflatui.h +++ b/ui/flatui/frmflatui.h @@ -1,25 +1,25 @@ -#ifndef FRMFLATUI_H -#define FRMFLATUI_H - -#include - -namespace Ui { -class frmFlatUI; -} - -class frmFlatUI : public QWidget -{ - Q_OBJECT - -public: - explicit frmFlatUI(QWidget *parent = 0); - ~frmFlatUI(); - -private: - Ui::frmFlatUI *ui; - -private slots: - void initForm(); -}; - -#endif // FRMFLATUI_H +#ifndef FRMFLATUI_H +#define FRMFLATUI_H + +#include + +namespace Ui { +class frmFlatUI; +} + +class frmFlatUI : public QWidget +{ + Q_OBJECT + +public: + explicit frmFlatUI(QWidget *parent = 0); + ~frmFlatUI(); + +private: + Ui::frmFlatUI *ui; + +private slots: + void initForm(); +}; + +#endif // FRMFLATUI_H diff --git a/flatui/frmflatui.ui b/ui/flatui/frmflatui.ui similarity index 96% rename from flatui/frmflatui.ui rename to ui/flatui/frmflatui.ui index e67bf24..c95b752 100644 --- a/flatui/frmflatui.ui +++ b/ui/flatui/frmflatui.ui @@ -1,203 +1,203 @@ - - - frmFlatUI - - - - 0 - 0 - 800 - 600 - - - - Form - - - - - - - - - 语文 - - - true - - - - - - - - - - 测试按钮 - - - - - - - - - - - - - 测试按钮 - - - - - - - Qt::Vertical - - - false - - - QSlider::NoTicks - - - - - - - 英语 - - - - - - - - 0 - 16 - - - - 24 - - - - - - - - - - Qt::Horizontal - - - - - - - 历史 - - - - - - - 数学 - - - - - - - - - - 测试按钮 - - - - - - - - - - - - - - - - 测试按钮 - - - - - - - - - - - 0 - 16 - - - - 24 - - - - - - - Qt::Vertical - - - - - - - - 0 - 20 - - - - Qt::Horizontal - - - - - - - - 0 - 20 - - - - 255 - - - Qt::Horizontal - - - - - - - - - - Qt::DashDotLine - - - - - - - - - + + + frmFlatUI + + + + 0 + 0 + 800 + 600 + + + + Form + + + + + + + + + 语文 + + + true + + + + + + + + + + 测试按钮 + + + + + + + + + + + + + 测试按钮 + + + + + + + Qt::Vertical + + + false + + + QSlider::NoTicks + + + + + + + 英语 + + + + + + + + 0 + 16 + + + + 24 + + + + + + + + + + Qt::Horizontal + + + + + + + 历史 + + + + + + + 数学 + + + + + + + + + + 测试按钮 + + + + + + + + + + + + + + + + 测试按钮 + + + + + + + + + + + 0 + 16 + + + + 24 + + + + + + + Qt::Vertical + + + + + + + + 0 + 20 + + + + Qt::Horizontal + + + + + + + + 0 + 20 + + + + 255 + + + Qt::Horizontal + + + + + + + + + + Qt::DashDotLine + + + + + + + + + diff --git a/flatui/main.cpp b/ui/flatui/main.cpp similarity index 96% rename from flatui/main.cpp rename to ui/flatui/main.cpp index 765c0e1..68a270c 100644 --- a/flatui/main.cpp +++ b/ui/flatui/main.cpp @@ -1,31 +1,31 @@ -#pragma execution_character_set("utf-8") - -#include "frmflatui.h" -#include -#include - -int main(int argc, char *argv[]) -{ - QApplication a(argc, argv); - a.setFont(QFont("Microsoft Yahei", 9)); - -#if (QT_VERSION < QT_VERSION_CHECK(5,0,0)) -#if _MSC_VER - QTextCodec *codec = QTextCodec::codecForName("gbk"); -#else - QTextCodec *codec = QTextCodec::codecForName("utf-8"); -#endif - QTextCodec::setCodecForLocale(codec); - QTextCodec::setCodecForCStrings(codec); - QTextCodec::setCodecForTr(codec); -#else - QTextCodec *codec = QTextCodec::codecForName("utf-8"); - QTextCodec::setCodecForLocale(codec); -#endif - - frmFlatUI w; - w.setWindowTitle("FlatUI控件集合"); - w.show(); - - return a.exec(); -} +#pragma execution_character_set("utf-8") + +#include "frmflatui.h" +#include +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + a.setFont(QFont("Microsoft Yahei", 9)); + +#if (QT_VERSION < QT_VERSION_CHECK(5,0,0)) +#if _MSC_VER + QTextCodec *codec = QTextCodec::codecForName("gbk"); +#else + QTextCodec *codec = QTextCodec::codecForName("utf-8"); +#endif + QTextCodec::setCodecForLocale(codec); + QTextCodec::setCodecForCStrings(codec); + QTextCodec::setCodecForTr(codec); +#else + QTextCodec *codec = QTextCodec::codecForName("utf-8"); + QTextCodec::setCodecForLocale(codec); +#endif + + frmFlatUI w; + w.setWindowTitle("FlatUI控件集合"); + w.show(); + + return a.exec(); +} diff --git a/styledemo/frmmain.cpp b/ui/styledemo/frmmain.cpp similarity index 94% rename from styledemo/frmmain.cpp rename to ui/styledemo/frmmain.cpp index 7d6a2d4..958c2f6 100644 --- a/styledemo/frmmain.cpp +++ b/ui/styledemo/frmmain.cpp @@ -21,12 +21,12 @@ void frmMain::showEvent(QShowEvent *) void frmMain::initForm() { + this->initStyle(); + this->initTranslator(); this->initTableWidget(); this->initTreeWidget(); this->initListWidget(); this->initOther(); - this->initStyle(); - this->initTranslator(); ui->rbtn1->setChecked(true); ui->ck2->setChecked(true); @@ -34,6 +34,50 @@ void frmMain::initForm() ui->tabWidget->setCurrentIndex(0); } +void frmMain::initStyle() +{ + //加载样式表 + QString qss; + //QFile file(":/qss/psblack.css"); + //QFile file(":/qss/flatwhite.css"); + QFile file(":/qss/lightblue.css"); + if (file.open(QFile::ReadOnly)) { +#if 1 + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + qss = list.join("\n"); +#else + //用readAll读取默认支持的是ANSI格式,如果不小心用creator打开编辑过了很可能打不开 + qss = QLatin1String(file.readAll()); +#endif + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + qApp->setStyleSheet(qss); + file.close(); + } +} + +void frmMain::initTranslator() +{ + //加载鼠标右键菜单翻译文件 + QTranslator *translator1 = new QTranslator(qApp); + translator1->load(":/qm/qt_zh_CN.qm"); + qApp->installTranslator(translator1); + + //加载富文本框鼠标右键菜单翻译文件 + QTranslator *translator2 = new QTranslator(qApp); + translator2->load(":/qm/widgets.qm"); + qApp->installTranslator(translator2); +} + void frmMain::initTableWidget() { //设置列数和列宽 @@ -134,60 +178,7 @@ void frmMain::initListWidget() void frmMain::initOther() { ui->horizontalSlider->setValue(88); - ui->tab9->setStyleSheet("QPushButton{font:20pt;}"); - ui->widgetVideo->setStyleSheet("QLabel{font:20pt;}"); - ui->widgetLeft->setProperty("nav", "left"); ui->widgetBottom->setProperty("form", "bottom"); - ui->widgetTop->setProperty("nav", "top"); - ui->widgetVideo->setProperty("video", true); - - QList labChs = ui->widgetVideo->findChildren(); - foreach (QLabel *lab, labChs) { - lab->setFocusPolicy(Qt::StrongFocus); - } -} - -void frmMain::initStyle() -{ - //加载样式表 - QString qss; - //QFile file(":/qss/psblack.css"); - //QFile file(":/qss/flatwhite.css"); - QFile file(":/qss/lightblue.css"); - if (file.open(QFile::ReadOnly)) { -#if 1 - //用QTextStream读取样式文件不用区分文件编码 带bom也行 - QStringList list; - QTextStream in(&file); - //in.setCodec("utf-8"); - while (!in.atEnd()) { - QString line; - in >> line; - list << line; - } - - qss = list.join("\n"); -#else - //用readAll读取默认支持的是ANSI格式,如果不小心用creator打开编辑过了很可能打不开 - qss = QLatin1String(file.readAll()); -#endif - QString paletteColor = qss.mid(20, 7); - qApp->setPalette(QPalette(paletteColor)); - qApp->setStyleSheet(qss); - file.close(); - } -} - -void frmMain::initTranslator() -{ - //加载鼠标右键菜单翻译文件 - QTranslator *translator1 = new QTranslator(qApp); - translator1->load(":/qm/qt_zh_CN.qm"); - qApp->installTranslator(translator1); - - //加载富文本框鼠标右键菜单翻译文件 - QTranslator *translator2 = new QTranslator(qApp); - translator2->load(":/qm/widgets.qm"); - qApp->installTranslator(translator2); + ui->widgetTop->setProperty("nav", "top"); } diff --git a/styledemo/frmmain.h b/ui/styledemo/frmmain.h similarity index 100% rename from styledemo/frmmain.h rename to ui/styledemo/frmmain.h index 99922cb..3169458 100644 --- a/styledemo/frmmain.h +++ b/ui/styledemo/frmmain.h @@ -23,12 +23,12 @@ private: private slots: void initForm(); + void initStyle(); + void initTranslator(); void initTableWidget(); void initTreeWidget(); void initListWidget(); void initOther(); - void initStyle(); - void initTranslator(); }; #endif // FRMMAIN_H diff --git a/styledemo/frmmain.ui b/ui/styledemo/frmmain.ui similarity index 84% rename from styledemo/frmmain.ui rename to ui/styledemo/frmmain.ui index efa1696..efde1c3 100644 --- a/styledemo/frmmain.ui +++ b/ui/styledemo/frmmain.ui @@ -1003,215 +1003,6 @@ - - - 设备面板 - - - - 3 - - - 3 - - - 3 - - - 3 - - - - - - - - - 图形字体 - - - - 3 - - - 3 - - - 3 - - - 3 - - - - - - - - - 内置图标 - - - - 3 - - - 3 - - - 3 - - - 3 - - - - - - 3 - - - 3 - - - 3 - - - 3 - - - 3 - - - - - - - - - 视频监控 - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 通道1 - - - Qt::AlignCenter - - - - - - - 通道2 - - - Qt::AlignCenter - - - - - - - 通道3 - - - Qt::AlignCenter - - - - - - - 通道4 - - - Qt::AlignCenter - - - - - - - 通道5 - - - Qt::AlignCenter - - - - - - - 通道6 - - - Qt::AlignCenter - - - - - - - 通道7 - - - Qt::AlignCenter - - - - - - - 通道8 - - - Qt::AlignCenter - - - - - - - 通道9 - - - Qt::AlignCenter - - - - - - - 通道10 - - - Qt::AlignCenter - - - - - - - - diff --git a/styledemo/head.h b/ui/styledemo/head.h similarity index 100% rename from styledemo/head.h rename to ui/styledemo/head.h diff --git a/styledemo/main.cpp b/ui/styledemo/main.cpp similarity index 100% rename from styledemo/main.cpp rename to ui/styledemo/main.cpp diff --git a/styledemo/qrc/font.qrc b/ui/styledemo/qrc/font.qrc similarity index 100% rename from styledemo/qrc/font.qrc rename to ui/styledemo/qrc/font.qrc diff --git a/styledemo/qrc/font/Font Awesome Cheatsheet.png b/ui/styledemo/qrc/font/Font Awesome Cheatsheet.png similarity index 100% rename from styledemo/qrc/font/Font Awesome Cheatsheet.png rename to ui/styledemo/qrc/font/Font Awesome Cheatsheet.png diff --git a/styledemo/qrc/font/fontawesome-webfont.ttf b/ui/styledemo/qrc/font/fontawesome-webfont.ttf similarity index 100% rename from styledemo/qrc/font/fontawesome-webfont.ttf rename to ui/styledemo/qrc/font/fontawesome-webfont.ttf diff --git a/styledemo/qrc/image/btn_close.png b/ui/styledemo/qrc/image/btn_close.png similarity index 100% rename from styledemo/qrc/image/btn_close.png rename to ui/styledemo/qrc/image/btn_close.png diff --git a/styledemo/qrc/image/btn_ok.png b/ui/styledemo/qrc/image/btn_ok.png similarity index 100% rename from styledemo/qrc/image/btn_ok.png rename to ui/styledemo/qrc/image/btn_ok.png diff --git a/styledemo/qrc/image/msg_error.png b/ui/styledemo/qrc/image/msg_error.png similarity index 100% rename from styledemo/qrc/image/msg_error.png rename to ui/styledemo/qrc/image/msg_error.png diff --git a/styledemo/qrc/image/msg_info.png b/ui/styledemo/qrc/image/msg_info.png similarity index 100% rename from styledemo/qrc/image/msg_info.png rename to ui/styledemo/qrc/image/msg_info.png diff --git a/styledemo/qrc/image/msg_question.png b/ui/styledemo/qrc/image/msg_question.png similarity index 100% rename from styledemo/qrc/image/msg_question.png rename to ui/styledemo/qrc/image/msg_question.png diff --git a/styledemo/qrc/main.qrc b/ui/styledemo/qrc/main.qrc similarity index 100% rename from styledemo/qrc/main.qrc rename to ui/styledemo/qrc/main.qrc diff --git a/styledemo/qrc/qm.qrc b/ui/styledemo/qrc/qm.qrc similarity index 100% rename from styledemo/qrc/qm.qrc rename to ui/styledemo/qrc/qm.qrc diff --git a/ui/styledemo/qrc/qm/qt_zh_CN.qm b/ui/styledemo/qrc/qm/qt_zh_CN.qm new file mode 100644 index 0000000..623b8e3 Binary files /dev/null and b/ui/styledemo/qrc/qm/qt_zh_CN.qm differ diff --git a/ui/styledemo/qrc/qm/widgets.qm b/ui/styledemo/qrc/qm/widgets.qm new file mode 100644 index 0000000..244bf0d Binary files /dev/null and b/ui/styledemo/qrc/qm/widgets.qm differ diff --git a/styledemo/qrc/qss.qrc b/ui/styledemo/qrc/qss.qrc similarity index 100% rename from styledemo/qrc/qss.qrc rename to ui/styledemo/qrc/qss.qrc diff --git a/styledemo/qrc/qss/flatwhite.css b/ui/styledemo/qrc/qss/flatwhite.css similarity index 100% rename from styledemo/qrc/qss/flatwhite.css rename to ui/styledemo/qrc/qss/flatwhite.css diff --git a/styledemo/qrc/qss/flatwhite/add_bottom.png b/ui/styledemo/qrc/qss/flatwhite/add_bottom.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/add_bottom.png rename to ui/styledemo/qrc/qss/flatwhite/add_bottom.png diff --git a/styledemo/qrc/qss/flatwhite/add_left.png b/ui/styledemo/qrc/qss/flatwhite/add_left.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/add_left.png rename to ui/styledemo/qrc/qss/flatwhite/add_left.png diff --git a/styledemo/qrc/qss/flatwhite/add_right.png b/ui/styledemo/qrc/qss/flatwhite/add_right.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/add_right.png rename to ui/styledemo/qrc/qss/flatwhite/add_right.png diff --git a/styledemo/qrc/qss/flatwhite/add_top.png b/ui/styledemo/qrc/qss/flatwhite/add_top.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/add_top.png rename to ui/styledemo/qrc/qss/flatwhite/add_top.png diff --git a/styledemo/qrc/qss/flatwhite/arrow_bottom.png b/ui/styledemo/qrc/qss/flatwhite/arrow_bottom.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/arrow_bottom.png rename to ui/styledemo/qrc/qss/flatwhite/arrow_bottom.png diff --git a/styledemo/qrc/qss/flatwhite/arrow_left.png b/ui/styledemo/qrc/qss/flatwhite/arrow_left.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/arrow_left.png rename to ui/styledemo/qrc/qss/flatwhite/arrow_left.png diff --git a/styledemo/qrc/qss/flatwhite/arrow_right.png b/ui/styledemo/qrc/qss/flatwhite/arrow_right.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/arrow_right.png rename to ui/styledemo/qrc/qss/flatwhite/arrow_right.png diff --git a/styledemo/qrc/qss/flatwhite/arrow_top.png b/ui/styledemo/qrc/qss/flatwhite/arrow_top.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/arrow_top.png rename to ui/styledemo/qrc/qss/flatwhite/arrow_top.png diff --git a/styledemo/qrc/qss/flatwhite/branch_close.png b/ui/styledemo/qrc/qss/flatwhite/branch_close.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/branch_close.png rename to ui/styledemo/qrc/qss/flatwhite/branch_close.png diff --git a/styledemo/qrc/qss/flatwhite/branch_open.png b/ui/styledemo/qrc/qss/flatwhite/branch_open.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/branch_open.png rename to ui/styledemo/qrc/qss/flatwhite/branch_open.png diff --git a/styledemo/qrc/qss/flatwhite/calendar_nextmonth.png b/ui/styledemo/qrc/qss/flatwhite/calendar_nextmonth.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/calendar_nextmonth.png rename to ui/styledemo/qrc/qss/flatwhite/calendar_nextmonth.png diff --git a/styledemo/qrc/qss/flatwhite/calendar_prevmonth.png b/ui/styledemo/qrc/qss/flatwhite/calendar_prevmonth.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/calendar_prevmonth.png rename to ui/styledemo/qrc/qss/flatwhite/calendar_prevmonth.png diff --git a/styledemo/qrc/qss/flatwhite/checkbox_checked.png b/ui/styledemo/qrc/qss/flatwhite/checkbox_checked.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/checkbox_checked.png rename to ui/styledemo/qrc/qss/flatwhite/checkbox_checked.png diff --git a/styledemo/qrc/qss/flatwhite/checkbox_checked_disable.png b/ui/styledemo/qrc/qss/flatwhite/checkbox_checked_disable.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/checkbox_checked_disable.png rename to ui/styledemo/qrc/qss/flatwhite/checkbox_checked_disable.png diff --git a/styledemo/qrc/qss/flatwhite/checkbox_parcial.png b/ui/styledemo/qrc/qss/flatwhite/checkbox_parcial.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/checkbox_parcial.png rename to ui/styledemo/qrc/qss/flatwhite/checkbox_parcial.png diff --git a/styledemo/qrc/qss/flatwhite/checkbox_parcial_disable.png b/ui/styledemo/qrc/qss/flatwhite/checkbox_parcial_disable.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/checkbox_parcial_disable.png rename to ui/styledemo/qrc/qss/flatwhite/checkbox_parcial_disable.png diff --git a/styledemo/qrc/qss/flatwhite/checkbox_unchecked.png b/ui/styledemo/qrc/qss/flatwhite/checkbox_unchecked.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/checkbox_unchecked.png rename to ui/styledemo/qrc/qss/flatwhite/checkbox_unchecked.png diff --git a/styledemo/qrc/qss/flatwhite/checkbox_unchecked_disable.png b/ui/styledemo/qrc/qss/flatwhite/checkbox_unchecked_disable.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/checkbox_unchecked_disable.png rename to ui/styledemo/qrc/qss/flatwhite/checkbox_unchecked_disable.png diff --git a/styledemo/qrc/qss/flatwhite/menu_checked.png b/ui/styledemo/qrc/qss/flatwhite/menu_checked.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/menu_checked.png rename to ui/styledemo/qrc/qss/flatwhite/menu_checked.png diff --git a/styledemo/qrc/qss/flatwhite/radiobutton_checked.png b/ui/styledemo/qrc/qss/flatwhite/radiobutton_checked.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/radiobutton_checked.png rename to ui/styledemo/qrc/qss/flatwhite/radiobutton_checked.png diff --git a/styledemo/qrc/qss/flatwhite/radiobutton_checked_disable.png b/ui/styledemo/qrc/qss/flatwhite/radiobutton_checked_disable.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/radiobutton_checked_disable.png rename to ui/styledemo/qrc/qss/flatwhite/radiobutton_checked_disable.png diff --git a/styledemo/qrc/qss/flatwhite/radiobutton_unchecked.png b/ui/styledemo/qrc/qss/flatwhite/radiobutton_unchecked.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/radiobutton_unchecked.png rename to ui/styledemo/qrc/qss/flatwhite/radiobutton_unchecked.png diff --git a/styledemo/qrc/qss/flatwhite/radiobutton_unchecked_disable.png b/ui/styledemo/qrc/qss/flatwhite/radiobutton_unchecked_disable.png similarity index 100% rename from styledemo/qrc/qss/flatwhite/radiobutton_unchecked_disable.png rename to ui/styledemo/qrc/qss/flatwhite/radiobutton_unchecked_disable.png diff --git a/styledemo/qrc/qss/lightblue.css b/ui/styledemo/qrc/qss/lightblue.css similarity index 100% rename from styledemo/qrc/qss/lightblue.css rename to ui/styledemo/qrc/qss/lightblue.css diff --git a/styledemo/qrc/qss/lightblue/add_bottom.png b/ui/styledemo/qrc/qss/lightblue/add_bottom.png similarity index 100% rename from styledemo/qrc/qss/lightblue/add_bottom.png rename to ui/styledemo/qrc/qss/lightblue/add_bottom.png diff --git a/styledemo/qrc/qss/lightblue/add_left.png b/ui/styledemo/qrc/qss/lightblue/add_left.png similarity index 100% rename from styledemo/qrc/qss/lightblue/add_left.png rename to ui/styledemo/qrc/qss/lightblue/add_left.png diff --git a/styledemo/qrc/qss/lightblue/add_right.png b/ui/styledemo/qrc/qss/lightblue/add_right.png similarity index 100% rename from styledemo/qrc/qss/lightblue/add_right.png rename to ui/styledemo/qrc/qss/lightblue/add_right.png diff --git a/styledemo/qrc/qss/lightblue/add_top.png b/ui/styledemo/qrc/qss/lightblue/add_top.png similarity index 100% rename from styledemo/qrc/qss/lightblue/add_top.png rename to ui/styledemo/qrc/qss/lightblue/add_top.png diff --git a/styledemo/qrc/qss/lightblue/arrow_bottom.png b/ui/styledemo/qrc/qss/lightblue/arrow_bottom.png similarity index 100% rename from styledemo/qrc/qss/lightblue/arrow_bottom.png rename to ui/styledemo/qrc/qss/lightblue/arrow_bottom.png diff --git a/styledemo/qrc/qss/lightblue/arrow_left.png b/ui/styledemo/qrc/qss/lightblue/arrow_left.png similarity index 100% rename from styledemo/qrc/qss/lightblue/arrow_left.png rename to ui/styledemo/qrc/qss/lightblue/arrow_left.png diff --git a/styledemo/qrc/qss/lightblue/arrow_right.png b/ui/styledemo/qrc/qss/lightblue/arrow_right.png similarity index 100% rename from styledemo/qrc/qss/lightblue/arrow_right.png rename to ui/styledemo/qrc/qss/lightblue/arrow_right.png diff --git a/styledemo/qrc/qss/lightblue/arrow_top.png b/ui/styledemo/qrc/qss/lightblue/arrow_top.png similarity index 100% rename from styledemo/qrc/qss/lightblue/arrow_top.png rename to ui/styledemo/qrc/qss/lightblue/arrow_top.png diff --git a/styledemo/qrc/qss/lightblue/branch_close.png b/ui/styledemo/qrc/qss/lightblue/branch_close.png similarity index 100% rename from styledemo/qrc/qss/lightblue/branch_close.png rename to ui/styledemo/qrc/qss/lightblue/branch_close.png diff --git a/styledemo/qrc/qss/lightblue/branch_open.png b/ui/styledemo/qrc/qss/lightblue/branch_open.png similarity index 100% rename from styledemo/qrc/qss/lightblue/branch_open.png rename to ui/styledemo/qrc/qss/lightblue/branch_open.png diff --git a/styledemo/qrc/qss/lightblue/calendar_nextmonth.png b/ui/styledemo/qrc/qss/lightblue/calendar_nextmonth.png similarity index 100% rename from styledemo/qrc/qss/lightblue/calendar_nextmonth.png rename to ui/styledemo/qrc/qss/lightblue/calendar_nextmonth.png diff --git a/styledemo/qrc/qss/lightblue/calendar_prevmonth.png b/ui/styledemo/qrc/qss/lightblue/calendar_prevmonth.png similarity index 100% rename from styledemo/qrc/qss/lightblue/calendar_prevmonth.png rename to ui/styledemo/qrc/qss/lightblue/calendar_prevmonth.png diff --git a/styledemo/qrc/qss/lightblue/checkbox_checked.png b/ui/styledemo/qrc/qss/lightblue/checkbox_checked.png similarity index 100% rename from styledemo/qrc/qss/lightblue/checkbox_checked.png rename to ui/styledemo/qrc/qss/lightblue/checkbox_checked.png diff --git a/styledemo/qrc/qss/lightblue/checkbox_checked_disable.png b/ui/styledemo/qrc/qss/lightblue/checkbox_checked_disable.png similarity index 100% rename from styledemo/qrc/qss/lightblue/checkbox_checked_disable.png rename to ui/styledemo/qrc/qss/lightblue/checkbox_checked_disable.png diff --git a/styledemo/qrc/qss/lightblue/checkbox_parcial.png b/ui/styledemo/qrc/qss/lightblue/checkbox_parcial.png similarity index 100% rename from styledemo/qrc/qss/lightblue/checkbox_parcial.png rename to ui/styledemo/qrc/qss/lightblue/checkbox_parcial.png diff --git a/styledemo/qrc/qss/lightblue/checkbox_parcial_disable.png b/ui/styledemo/qrc/qss/lightblue/checkbox_parcial_disable.png similarity index 100% rename from styledemo/qrc/qss/lightblue/checkbox_parcial_disable.png rename to ui/styledemo/qrc/qss/lightblue/checkbox_parcial_disable.png diff --git a/styledemo/qrc/qss/lightblue/checkbox_unchecked.png b/ui/styledemo/qrc/qss/lightblue/checkbox_unchecked.png similarity index 100% rename from styledemo/qrc/qss/lightblue/checkbox_unchecked.png rename to ui/styledemo/qrc/qss/lightblue/checkbox_unchecked.png diff --git a/styledemo/qrc/qss/lightblue/checkbox_unchecked_disable.png b/ui/styledemo/qrc/qss/lightblue/checkbox_unchecked_disable.png similarity index 100% rename from styledemo/qrc/qss/lightblue/checkbox_unchecked_disable.png rename to ui/styledemo/qrc/qss/lightblue/checkbox_unchecked_disable.png diff --git a/styledemo/qrc/qss/lightblue/menu_checked.png b/ui/styledemo/qrc/qss/lightblue/menu_checked.png similarity index 100% rename from styledemo/qrc/qss/lightblue/menu_checked.png rename to ui/styledemo/qrc/qss/lightblue/menu_checked.png diff --git a/styledemo/qrc/qss/lightblue/radiobutton_checked.png b/ui/styledemo/qrc/qss/lightblue/radiobutton_checked.png similarity index 100% rename from styledemo/qrc/qss/lightblue/radiobutton_checked.png rename to ui/styledemo/qrc/qss/lightblue/radiobutton_checked.png diff --git a/styledemo/qrc/qss/lightblue/radiobutton_checked_disable.png b/ui/styledemo/qrc/qss/lightblue/radiobutton_checked_disable.png similarity index 100% rename from styledemo/qrc/qss/lightblue/radiobutton_checked_disable.png rename to ui/styledemo/qrc/qss/lightblue/radiobutton_checked_disable.png diff --git a/styledemo/qrc/qss/lightblue/radiobutton_unchecked.png b/ui/styledemo/qrc/qss/lightblue/radiobutton_unchecked.png similarity index 100% rename from styledemo/qrc/qss/lightblue/radiobutton_unchecked.png rename to ui/styledemo/qrc/qss/lightblue/radiobutton_unchecked.png diff --git a/styledemo/qrc/qss/lightblue/radiobutton_unchecked_disable.png b/ui/styledemo/qrc/qss/lightblue/radiobutton_unchecked_disable.png similarity index 100% rename from styledemo/qrc/qss/lightblue/radiobutton_unchecked_disable.png rename to ui/styledemo/qrc/qss/lightblue/radiobutton_unchecked_disable.png diff --git a/styledemo/qrc/qss/psblack.css b/ui/styledemo/qrc/qss/psblack.css similarity index 100% rename from styledemo/qrc/qss/psblack.css rename to ui/styledemo/qrc/qss/psblack.css diff --git a/ui/styledemo/qrc/qss/psblack/add_bottom.png b/ui/styledemo/qrc/qss/psblack/add_bottom.png new file mode 100644 index 0000000..b4a5f14 Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/add_bottom.png differ diff --git a/ui/styledemo/qrc/qss/psblack/add_left.png b/ui/styledemo/qrc/qss/psblack/add_left.png new file mode 100644 index 0000000..165ebd0 Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/add_left.png differ diff --git a/ui/styledemo/qrc/qss/psblack/add_right.png b/ui/styledemo/qrc/qss/psblack/add_right.png new file mode 100644 index 0000000..4c79925 Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/add_right.png differ diff --git a/ui/styledemo/qrc/qss/psblack/add_top.png b/ui/styledemo/qrc/qss/psblack/add_top.png new file mode 100644 index 0000000..f76300f Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/add_top.png differ diff --git a/ui/styledemo/qrc/qss/psblack/arrow_bottom.png b/ui/styledemo/qrc/qss/psblack/arrow_bottom.png new file mode 100644 index 0000000..39d7cbc Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/arrow_bottom.png differ diff --git a/ui/styledemo/qrc/qss/psblack/arrow_left.png b/ui/styledemo/qrc/qss/psblack/arrow_left.png new file mode 100644 index 0000000..1353cb8 Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/arrow_left.png differ diff --git a/ui/styledemo/qrc/qss/psblack/arrow_right.png b/ui/styledemo/qrc/qss/psblack/arrow_right.png new file mode 100644 index 0000000..0e50d47 Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/arrow_right.png differ diff --git a/ui/styledemo/qrc/qss/psblack/arrow_top.png b/ui/styledemo/qrc/qss/psblack/arrow_top.png new file mode 100644 index 0000000..d2c71e8 Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/arrow_top.png differ diff --git a/ui/styledemo/qrc/qss/psblack/branch_close.png b/ui/styledemo/qrc/qss/psblack/branch_close.png new file mode 100644 index 0000000..58a7d13 Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/branch_close.png differ diff --git a/ui/styledemo/qrc/qss/psblack/branch_open.png b/ui/styledemo/qrc/qss/psblack/branch_open.png new file mode 100644 index 0000000..a072d68 Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/branch_open.png differ diff --git a/ui/styledemo/qrc/qss/psblack/calendar_nextmonth.png b/ui/styledemo/qrc/qss/psblack/calendar_nextmonth.png new file mode 100644 index 0000000..b06ae31 Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/calendar_nextmonth.png differ diff --git a/ui/styledemo/qrc/qss/psblack/calendar_prevmonth.png b/ui/styledemo/qrc/qss/psblack/calendar_prevmonth.png new file mode 100644 index 0000000..46d4d62 Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/calendar_prevmonth.png differ diff --git a/ui/styledemo/qrc/qss/psblack/checkbox_checked.png b/ui/styledemo/qrc/qss/psblack/checkbox_checked.png new file mode 100644 index 0000000..b5ba6ef Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/checkbox_checked.png differ diff --git a/ui/styledemo/qrc/qss/psblack/checkbox_checked_disable.png b/ui/styledemo/qrc/qss/psblack/checkbox_checked_disable.png new file mode 100644 index 0000000..f6aab40 Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/checkbox_checked_disable.png differ diff --git a/ui/styledemo/qrc/qss/psblack/checkbox_parcial.png b/ui/styledemo/qrc/qss/psblack/checkbox_parcial.png new file mode 100644 index 0000000..cd1645f Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/checkbox_parcial.png differ diff --git a/ui/styledemo/qrc/qss/psblack/checkbox_parcial_disable.png b/ui/styledemo/qrc/qss/psblack/checkbox_parcial_disable.png new file mode 100644 index 0000000..dd0918f Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/checkbox_parcial_disable.png differ diff --git a/ui/styledemo/qrc/qss/psblack/checkbox_unchecked.png b/ui/styledemo/qrc/qss/psblack/checkbox_unchecked.png new file mode 100644 index 0000000..8a23968 Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/checkbox_unchecked.png differ diff --git a/ui/styledemo/qrc/qss/psblack/checkbox_unchecked_disable.png b/ui/styledemo/qrc/qss/psblack/checkbox_unchecked_disable.png new file mode 100644 index 0000000..e2a2262 Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/checkbox_unchecked_disable.png differ diff --git a/ui/styledemo/qrc/qss/psblack/menu_checked.png b/ui/styledemo/qrc/qss/psblack/menu_checked.png new file mode 100644 index 0000000..4fca11f Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/menu_checked.png differ diff --git a/ui/styledemo/qrc/qss/psblack/radiobutton_checked.png b/ui/styledemo/qrc/qss/psblack/radiobutton_checked.png new file mode 100644 index 0000000..69e499f Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/radiobutton_checked.png differ diff --git a/ui/styledemo/qrc/qss/psblack/radiobutton_checked_disable.png b/ui/styledemo/qrc/qss/psblack/radiobutton_checked_disable.png new file mode 100644 index 0000000..f098cc5 Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/radiobutton_checked_disable.png differ diff --git a/ui/styledemo/qrc/qss/psblack/radiobutton_unchecked.png b/ui/styledemo/qrc/qss/psblack/radiobutton_unchecked.png new file mode 100644 index 0000000..3f36472 Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/radiobutton_unchecked.png differ diff --git a/ui/styledemo/qrc/qss/psblack/radiobutton_unchecked_disable.png b/ui/styledemo/qrc/qss/psblack/radiobutton_unchecked_disable.png new file mode 100644 index 0000000..f729f17 Binary files /dev/null and b/ui/styledemo/qrc/qss/psblack/radiobutton_unchecked_disable.png differ diff --git a/styledemo/styledemo.pro b/ui/styledemo/styledemo.pro similarity index 100% rename from styledemo/styledemo.pro rename to ui/styledemo/styledemo.pro diff --git a/ui/ui.pro b/ui/ui.pro new file mode 100644 index 0000000..0560f74 --- /dev/null +++ b/ui/ui.pro @@ -0,0 +1,7 @@ +TEMPLATE = subdirs +SUBDIRS += flatui +SUBDIRS += styledemo +SUBDIRS += uidemo01 +SUBDIRS += uidemo08 +SUBDIRS += uidemo09 +SUBDIRS += uidemo10 diff --git a/ui/uidemo01/form/form.pri b/ui/uidemo01/form/form.pri new file mode 100644 index 0000000..c6126ba --- /dev/null +++ b/ui/uidemo01/form/form.pri @@ -0,0 +1,8 @@ +FORMS += \ + $$PWD/frmmain.ui + +HEADERS += \ + $$PWD/frmmain.h + +SOURCES += \ + $$PWD/frmmain.cpp diff --git a/ui/uidemo01/form/frmmain.cpp b/ui/uidemo01/form/frmmain.cpp new file mode 100644 index 0000000..d36ab06 --- /dev/null +++ b/ui/uidemo01/form/frmmain.cpp @@ -0,0 +1,136 @@ +#include "frmmain.h" +#include "ui_frmmain.h" +#include "iconhelper.h" +#include "quihelper.h" + +frmMain::frmMain(QWidget *parent) : QDialog(parent), ui(new Ui::frmMain) +{ + ui->setupUi(this); + this->initForm(); +} + +frmMain::~frmMain() +{ + delete ui; +} + +bool frmMain::eventFilter(QObject *watched, QEvent *event) +{ + if (event->type() == QEvent::MouseButtonDblClick) { + if (watched == ui->widgetTitle) { + on_btnMenu_Max_clicked(); + return true; + } + } + + return QWidget::eventFilter(watched, event); +} + +void frmMain::initForm() +{ + //设置无边框 + QUIHelper::setFramelessForm(this); + //设置图标 + IconHelper::setIcon(ui->labIco, 0xf099, 35); + IconHelper::setIcon(ui->btnMenu_Min, 0xf068); + IconHelper::setIcon(ui->btnMenu_Max, 0xf067); + IconHelper::setIcon(ui->btnMenu_Close, 0xf00d); + + //ui->widgetMenu->setVisible(false); + ui->widgetTitle->installEventFilter(this); + ui->widgetTitle->setProperty("form", "title"); + ui->widgetTop->setProperty("nav", "top"); + ui->labTitle->setText("智能访客管理平台"); + ui->labTitle->setFont(QFont("Microsoft Yahei", 20)); + this->setWindowTitle(ui->labTitle->text()); + + ui->stackedWidget->setStyleSheet("QLabel{font:60pt;}"); + + //单独设置指示器大小 + int addWidth = 20; + int addHeight = 10; + int rbtnWidth = 15; + int ckWidth = 13; + int scrWidth = 12; + int borderWidth = 3; + + QStringList qss; + qss.append(QString("QComboBox::drop-down,QDateEdit::drop-down,QTimeEdit::drop-down,QDateTimeEdit::drop-down{width:%1px;}").arg(addWidth)); + qss.append(QString("QComboBox::down-arrow,QDateEdit[calendarPopup=\"true\"]::down-arrow,QTimeEdit[calendarPopup=\"true\"]::down-arrow," + "QDateTimeEdit[calendarPopup=\"true\"]::down-arrow{width:%1px;height:%1px;right:2px;}").arg(addHeight)); + qss.append(QString("QRadioButton::indicator{width:%1px;height:%1px;}").arg(rbtnWidth)); + qss.append(QString("QCheckBox::indicator,QGroupBox::indicator,QTreeWidget::indicator,QListWidget::indicator{width:%1px;height:%1px;}").arg(ckWidth)); + qss.append(QString("QScrollBar:horizontal{min-height:%1px;border-radius:%2px;}QScrollBar::handle:horizontal{border-radius:%2px;}" + "QScrollBar:vertical{min-width:%1px;border-radius:%2px;}QScrollBar::handle:vertical{border-radius:%2px;}").arg(scrWidth).arg(scrWidth / 2)); + qss.append(QString("QWidget#widget_top>QToolButton:pressed,QWidget#widget_top>QToolButton:hover," + "QWidget#widget_top>QToolButton:checked,QWidget#widget_top>QLabel:hover{" + "border-width:0px 0px %1px 0px;}").arg(borderWidth)); + qss.append(QString("QWidget#widgetleft>QPushButton:checked,QWidget#widgetleft>QToolButton:checked," + "QWidget#widgetleft>QPushButton:pressed,QWidget#widgetleft>QToolButton:pressed{" + "border-width:0px 0px 0px %1px;}").arg(borderWidth)); + this->setStyleSheet(qss.join("")); + + + QSize icoSize(32, 32); + int icoWidth = 85; + + //设置顶部导航按钮 + QList tbtns = ui->widgetTop->findChildren(); + foreach (QToolButton *btn, tbtns) { + btn->setIconSize(icoSize); + btn->setMinimumWidth(icoWidth); + btn->setCheckable(true); + connect(btn, SIGNAL(clicked()), this, SLOT(buttonClick())); + } + + ui->btnMain->click(); +} + +void frmMain::buttonClick() +{ + QToolButton *b = (QToolButton *)sender(); + QString name = b->text(); + + QList tbtns = ui->widgetTop->findChildren(); + foreach (QToolButton *btn, tbtns) { + btn->setChecked(btn == b); + } + + if (name == "主界面") { + ui->stackedWidget->setCurrentIndex(0); + } else if (name == "系统设置") { + ui->stackedWidget->setCurrentIndex(1); + } else if (name == "警情查询") { + ui->stackedWidget->setCurrentIndex(2); + } else if (name == "调试帮助") { + ui->stackedWidget->setCurrentIndex(3); + } else if (name == "用户退出") { + exit(0); + } +} + +void frmMain::on_btnMenu_Min_clicked() +{ + showMinimized(); +} + +void frmMain::on_btnMenu_Max_clicked() +{ + static bool max = false; + static QRect location = this->geometry(); + + if (max) { + this->setGeometry(location); + } else { + location = this->geometry(); + this->setGeometry(QUIHelper::getScreenRect()); + } + + this->setProperty("canMove", max); + max = !max; +} + +void frmMain::on_btnMenu_Close_clicked() +{ + close(); +} diff --git a/ui/uidemo01/form/frmmain.h b/ui/uidemo01/form/frmmain.h new file mode 100644 index 0000000..3132c9f --- /dev/null +++ b/ui/uidemo01/form/frmmain.h @@ -0,0 +1,34 @@ +#ifndef FRMMAIN_H +#define FRMMAIN_H + +#include + +namespace Ui { +class frmMain; +} + +class frmMain : public QDialog +{ + Q_OBJECT + +public: + explicit frmMain(QWidget *parent = 0); + ~frmMain(); + +protected: + bool eventFilter(QObject *watched, QEvent *event); + +private: + Ui::frmMain *ui; + +private slots: + void initForm(); + void buttonClick(); + +private slots: + void on_btnMenu_Min_clicked(); + void on_btnMenu_Max_clicked(); + void on_btnMenu_Close_clicked(); +}; + +#endif // UIDEMO01_H diff --git a/ui/uidemo01/form/frmmain.ui b/ui/uidemo01/form/frmmain.ui new file mode 100644 index 0000000..e4ac272 --- /dev/null +++ b/ui/uidemo01/form/frmmain.ui @@ -0,0 +1,412 @@ + + + frmMain + + + + 0 + 0 + 800 + 600 + + + + Form + + + + 0 + + + 1 + + + 1 + + + 1 + + + 1 + + + + + + 0 + 0 + + + + + 10 + + + 10 + + + 0 + + + 0 + + + 0 + + + + + + + + Qt::AlignCenter + + + + + + + + + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + 主界面 + + + + :/image/main_main.png:/image/main_main.png + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + 系统设置 + + + + :/image/main_config.png:/image/main_config.png + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + 警情查询 + + + + :/image/main_data.png:/image/main_data.png + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + + + 调试帮助 + + + + :/image/main_person.png:/image/main_person.png + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + + + 用户退出 + + + + :/image/main_exit.png:/image/main_exit.png + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + 0 + + + + + 30 + 30 + + + + ArrowCursor + + + Qt::NoFocus + + + 最小化 + + + + + + + + + + + 0 + 0 + + + + + 30 + 30 + + + + ArrowCursor + + + Qt::NoFocus + + + 关闭 + + + + + + + + + + + 0 + 0 + + + + + 30 + 30 + + + + Qt::NoFocus + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + 主界面 + + + Qt::AlignCenter + + + + + + + + + + + 系统设置 + + + Qt::AlignCenter + + + + + + + + + + + 警情查询 + + + Qt::AlignCenter + + + + + + + + + + + 调试帮助 + + + Qt::AlignCenter + + + + + + + + + + + + + + diff --git a/netserver/head.h b/ui/uidemo01/head.h similarity index 83% rename from netserver/head.h rename to ui/uidemo01/head.h index c494cae..a8d5a79 100644 --- a/netserver/head.h +++ b/ui/uidemo01/head.h @@ -1,6 +1,5 @@ #include #include -#include #if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) #include @@ -11,4 +10,3 @@ #endif #pragma execution_character_set("utf-8") -#include "appconfig.h" diff --git a/ui/uidemo01/main.cpp b/ui/uidemo01/main.cpp new file mode 100644 index 0000000..160a960 --- /dev/null +++ b/ui/uidemo01/main.cpp @@ -0,0 +1,33 @@ +#include "frmmain.h" +#include "appinit.h" +#include "quihelper.h" + +int main(int argc, char *argv[]) +{ + //设置不应用操作系统设置比如字体 + QApplication::setDesktopSettingsAware(false); +#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) + QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Floor); +#endif + QApplication a(argc, argv); + AppInit::Instance()->start(); + + QUIHelper::setFont(); + QUIHelper::setCode(); + + //加载样式表 + QFile file(":/qss/psblack.css"); + if (file.open(QFile::ReadOnly)) { + QString qss = QLatin1String(file.readAll()); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(QColor(paletteColor))); + qApp->setStyleSheet(qss); + file.close(); + } + + frmMain w; + QUIHelper::setFormInCenter(&w); + w.show(); + + return a.exec(); +} diff --git a/ui/uidemo01/other/image/main_about.png b/ui/uidemo01/other/image/main_about.png new file mode 100644 index 0000000..7db8e7b Binary files /dev/null and b/ui/uidemo01/other/image/main_about.png differ diff --git a/ui/uidemo01/other/image/main_company.png b/ui/uidemo01/other/image/main_company.png new file mode 100644 index 0000000..87a52b3 Binary files /dev/null and b/ui/uidemo01/other/image/main_company.png differ diff --git a/ui/uidemo01/other/image/main_config.png b/ui/uidemo01/other/image/main_config.png new file mode 100644 index 0000000..d45b094 Binary files /dev/null and b/ui/uidemo01/other/image/main_config.png differ diff --git a/ui/uidemo01/other/image/main_data.png b/ui/uidemo01/other/image/main_data.png new file mode 100644 index 0000000..29b7250 Binary files /dev/null and b/ui/uidemo01/other/image/main_data.png differ diff --git a/ui/uidemo01/other/image/main_exit.png b/ui/uidemo01/other/image/main_exit.png new file mode 100644 index 0000000..d26ee30 Binary files /dev/null and b/ui/uidemo01/other/image/main_exit.png differ diff --git a/ui/uidemo01/other/image/main_help.png b/ui/uidemo01/other/image/main_help.png new file mode 100644 index 0000000..cb293d0 Binary files /dev/null and b/ui/uidemo01/other/image/main_help.png differ diff --git a/ui/uidemo01/other/image/main_main.png b/ui/uidemo01/other/image/main_main.png new file mode 100644 index 0000000..3273ada Binary files /dev/null and b/ui/uidemo01/other/image/main_main.png differ diff --git a/ui/uidemo01/other/image/main_person.png b/ui/uidemo01/other/image/main_person.png new file mode 100644 index 0000000..d68a5ee Binary files /dev/null and b/ui/uidemo01/other/image/main_person.png differ diff --git a/ui/uidemo01/other/main.qrc b/ui/uidemo01/other/main.qrc new file mode 100644 index 0000000..0b0bb1e --- /dev/null +++ b/ui/uidemo01/other/main.qrc @@ -0,0 +1,12 @@ + + + image/main_about.png + image/main_company.png + image/main_config.png + image/main_data.png + image/main_exit.png + image/main_help.png + image/main_main.png + image/main_person.png + + diff --git a/ui/uidemo01/uidemo01.pro b/ui/uidemo01/uidemo01.pro new file mode 100644 index 0000000..032f02a --- /dev/null +++ b/ui/uidemo01/uidemo01.pro @@ -0,0 +1,18 @@ +QT += core gui +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat + +TARGET = uidemo01 +TEMPLATE = app + +HEADERS += head.h +SOURCES += main.cpp +RESOURCES += other/main.qrc +RESOURCES += $$PWD/../core_qss/qss.qrc + +INCLUDEPATH += $$PWD +INCLUDEPATH += $$PWD/form +include ($$PWD/form/form.pri) + +INCLUDEPATH += $$PWD/../core_common +include ($$PWD/../core_common/core_common.pri) diff --git a/ui/uidemo08/form/form.pri b/ui/uidemo08/form/form.pri new file mode 100644 index 0000000..c6126ba --- /dev/null +++ b/ui/uidemo08/form/form.pri @@ -0,0 +1,8 @@ +FORMS += \ + $$PWD/frmmain.ui + +HEADERS += \ + $$PWD/frmmain.h + +SOURCES += \ + $$PWD/frmmain.cpp diff --git a/ui/uidemo08/form/frmmain.cpp b/ui/uidemo08/form/frmmain.cpp new file mode 100644 index 0000000..3e81a07 --- /dev/null +++ b/ui/uidemo08/form/frmmain.cpp @@ -0,0 +1,248 @@ +#pragma execution_character_set("utf-8") + +#include "frmmain.h" +#include "ui_frmmain.h" +#include "iconhelper.h" +#include "quihelper.h" + +frmMain::frmMain(QWidget *parent) : QWidget(parent), ui(new Ui::frmMain) +{ + ui->setupUi(this); + this->initForm(); + this->initStyle(); + this->initLeftMain(); + this->initLeftConfig(); +} + +frmMain::~frmMain() +{ + delete ui; +} + +bool frmMain::eventFilter(QObject *watched, QEvent *event) +{ + if (watched == ui->widgetTitle) { + if (event->type() == QEvent::MouseButtonDblClick) { + on_btnMenu_Max_clicked(); + } + } + return QWidget::eventFilter(watched, event); +} + +void frmMain::getQssColor(const QString &qss, const QString &flag, QString &color) +{ + int index = qss.indexOf(flag); + if (index >= 0) { + color = qss.mid(index + flag.length(), 7); + } + //qDebug() << TIMEMS << flag << color; +} + +void frmMain::getQssColor(const QString &qss, QString &textColor, QString &panelColor, + QString &borderColor, QString &normalColorStart, QString &normalColorEnd, + QString &darkColorStart, QString &darkColorEnd, QString &highColor) +{ + getQssColor(qss, "TextColor:", textColor); + getQssColor(qss, "PanelColor:", panelColor); + getQssColor(qss, "BorderColor:", borderColor); + getQssColor(qss, "NormalColorStart:", normalColorStart); + getQssColor(qss, "NormalColorEnd:", normalColorEnd); + getQssColor(qss, "DarkColorStart:", darkColorStart); + getQssColor(qss, "DarkColorEnd:", darkColorEnd); + getQssColor(qss, "HighColor:", highColor); +} + +void frmMain::initForm() +{ + //设置无边框 + QUIHelper::setFramelessForm(this); + //设置图标 + IconHelper::setIcon(ui->labIco, 0xf073, 30); + IconHelper::setIcon(ui->btnMenu_Min, 0xf068); + IconHelper::setIcon(ui->btnMenu_Max, 0xf067); + IconHelper::setIcon(ui->btnMenu_Close, 0xf00d); + + //ui->widgetMenu->setVisible(false); + ui->widgetTitle->setProperty("form", "title"); + //关联事件过滤器用于双击放大 + ui->widgetTitle->installEventFilter(this); + + ui->widgetTop->setProperty("nav", "top"); + ui->labTitle->setText("智能访客管理平台"); + ui->labTitle->setFont(QFont("Microsoft Yahei", 20)); + this->setWindowTitle(ui->labTitle->text()); + + ui->stackedWidget->setStyleSheet("QLabel{font:60pt;}"); + + QSize icoSize(32, 32); + int icoWidth = 85; + + //设置顶部导航按钮 + QList tbtns = ui->widgetTop->findChildren(); + foreach (QAbstractButton *btn, tbtns) { + btn->setIconSize(icoSize); + btn->setMinimumWidth(icoWidth); + btn->setCheckable(true); + connect(btn, SIGNAL(clicked()), this, SLOT(buttonClick())); + } + + ui->btnMain->click(); + + ui->widgetLeftMain->setProperty("flag", "left"); + ui->widgetLeftConfig->setProperty("flag", "left"); + ui->page1->setStyleSheet(QString("QWidget[flag=\"left\"] QAbstractButton{min-height:%1px;max-height:%1px;}").arg(60)); + ui->page2->setStyleSheet(QString("QWidget[flag=\"left\"] QAbstractButton{min-height:%1px;max-height:%1px;}").arg(25)); +} + +void frmMain::initStyle() +{ + //加载样式表 + QString qss; + QFile file(":/qss/psblack.css"); + if (file.open(QFile::ReadOnly)) { + qss = QLatin1String(file.readAll()); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + qApp->setStyleSheet(qss); + file.close(); + } + + //先从样式表中取出对应的颜色 + QString textColor, panelColor, borderColor, normalColorStart, normalColorEnd, darkColorStart, darkColorEnd, highColor; + getQssColor(qss, textColor, panelColor, borderColor, normalColorStart, normalColorEnd, darkColorStart, darkColorEnd, highColor); + + //将对应颜色设置到控件 + this->borderColor = highColor; + this->normalBgColor = normalColorStart; + this->darkBgColor = panelColor; + this->normalTextColor = textColor; + this->darkTextColor = normalTextColor; +} + +void frmMain::buttonClick() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + QString name = b->text(); + + QList tbtns = ui->widgetTop->findChildren(); + foreach (QAbstractButton *btn, tbtns) { + btn->setChecked(btn == b); + } + + if (name == "主界面") { + ui->stackedWidget->setCurrentIndex(0); + } else if (name == "系统设置") { + ui->stackedWidget->setCurrentIndex(1); + } else if (name == "警情查询") { + ui->stackedWidget->setCurrentIndex(2); + } else if (name == "调试帮助") { + ui->stackedWidget->setCurrentIndex(3); + } else if (name == "用户退出") { + exit(0); + } +} + +void frmMain::initLeftMain() +{ + iconsMain << 0xf030 << 0xf03e << 0xf247; + btnsMain << ui->tbtnMain1 << ui->tbtnMain2 << ui->tbtnMain3; + + int count = btnsMain.count(); + for (int i = 0; i < count; i++) { + QToolButton *btn = (QToolButton *)btnsMain.at(i); + btn->setCheckable(true); + btn->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); + connect(btn, SIGNAL(clicked(bool)), this, SLOT(leftMainClick())); + } + + IconHelper::StyleColor styleColor; + styleColor.position = "left"; + styleColor.iconSize = 18; + styleColor.iconWidth = 35; + styleColor.iconHeight = 25; + styleColor.borderWidth = 4; + styleColor.borderColor = borderColor; + styleColor.setColor(normalBgColor, normalTextColor, darkBgColor, darkTextColor); + IconHelper::setStyle(ui->widgetLeftMain, btnsMain, iconsMain, styleColor); + ui->tbtnMain1->click(); +} + +void frmMain::initLeftConfig() +{ + iconsConfig << 0xf031 << 0xf036 << 0xf249 << 0xf055 << 0xf05a << 0xf249; + btnsConfig << ui->tbtnConfig1 << ui->tbtnConfig2 << ui->tbtnConfig3 << ui->tbtnConfig4 << ui->tbtnConfig5 << ui->tbtnConfig6; + + int count = btnsConfig.count(); + for (int i = 0; i < count; i++) { + QToolButton *btn = (QToolButton *)btnsConfig.at(i); + btn->setCheckable(true); + btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + connect(btn, SIGNAL(clicked(bool)), this, SLOT(leftConfigClick())); + } + + IconHelper::StyleColor styleColor; + styleColor.position = "left"; + styleColor.iconSize = 16; + styleColor.iconWidth = 20; + styleColor.iconHeight = 20; + styleColor.borderWidth = 3; + styleColor.borderColor = borderColor; + styleColor.setColor(normalBgColor, normalTextColor, darkBgColor, darkTextColor); + IconHelper::setStyle(ui->widgetLeftConfig, btnsConfig, iconsConfig, styleColor); + ui->tbtnConfig1->click(); +} + +void frmMain::leftMainClick() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + QString name = b->text(); + + int count = btnsMain.count(); + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btnsMain.at(i); + btn->setChecked(btn == b); + } + + ui->lab1->setText(name); +} + +void frmMain::leftConfigClick() +{ + QToolButton *b = (QToolButton *)sender(); + QString name = b->text(); + + int count = btnsConfig.count(); + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btnsConfig.at(i); + btn->setChecked(btn == b); + } + + ui->lab2->setText(name); +} + +void frmMain::on_btnMenu_Min_clicked() +{ + showMinimized(); +} + +void frmMain::on_btnMenu_Max_clicked() +{ + static bool max = false; + static QRect location = this->geometry(); + + if (max) { + this->setGeometry(location); + } else { + location = this->geometry(); + this->setGeometry(QUIHelper::getScreenRect()); + } + + this->setProperty("canMove", max); + max = !max; +} + +void frmMain::on_btnMenu_Close_clicked() +{ + close(); +} + diff --git a/ui/uidemo08/form/frmmain.h b/ui/uidemo08/form/frmmain.h new file mode 100644 index 0000000..fc7b9ec --- /dev/null +++ b/ui/uidemo08/form/frmmain.h @@ -0,0 +1,62 @@ +#ifndef FRMMAIN_H +#define FRMMAIN_H + +#include + +class QAbstractButton; + +namespace Ui { +class frmMain; +} + +class frmMain : public QWidget +{ + Q_OBJECT + +public: + explicit frmMain(QWidget *parent = 0); + ~frmMain(); + +protected: + bool eventFilter(QObject *watched, QEvent *event); + +private: + Ui::frmMain *ui; + + QList iconsMain; + QList btnsMain; + + QList iconsConfig; + QList btnsConfig; + +private: + //根据QSS样式获取对应颜色值 + QString borderColor; + QString normalBgColor; + QString darkBgColor; + QString normalTextColor; + QString darkTextColor; + + void getQssColor(const QString &qss, const QString &flag, QString &color); + void getQssColor(const QString &qss, QString &textColor, + QString &panelColor, QString &borderColor, + QString &normalColorStart, QString &normalColorEnd, + QString &darkColorStart, QString &darkColorEnd, + QString &highColor); + +private slots: + void initForm(); + void initStyle(); + void buttonClick(); + void initLeftMain(); + void initLeftConfig(); + void leftMainClick(); + void leftConfigClick(); + +private slots: + void on_btnMenu_Min_clicked(); + void on_btnMenu_Max_clicked(); + void on_btnMenu_Close_clicked(); +}; + +#endif // FRMMAIN_H diff --git a/ui/uidemo08/form/frmmain.ui b/ui/uidemo08/form/frmmain.ui new file mode 100644 index 0000000..bfdce03 --- /dev/null +++ b/ui/uidemo08/form/frmmain.ui @@ -0,0 +1,645 @@ + + + frmMain + + + + 0 + 0 + 810 + 600 + + + + Dialog + + + false + + + + 0 + + + 1 + + + 1 + + + 1 + + + 1 + + + + + + 0 + 0 + + + + + 10 + + + 10 + + + 0 + + + 0 + + + 0 + + + + + + + + Qt::AlignCenter + + + + + + + + + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + 主界面 + + + + :/image/main_main.png:/image/main_main.png + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + 系统设置 + + + + :/image/main_config.png:/image/main_config.png + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + 警情查询 + + + + :/image/main_data.png:/image/main_data.png + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + + + 调试帮助 + + + + :/image/main_person.png:/image/main_person.png + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + + + 用户退出 + + + + :/image/main_exit.png:/image/main_exit.png + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + 0 + + + + ArrowCursor + + + Qt::NoFocus + + + 最小化 + + + + + + + + + + + 0 + 0 + + + + ArrowCursor + + + Qt::NoFocus + + + 关闭 + + + + + + + + + + + 0 + 0 + + + + Qt::NoFocus + + + + + + + + + + + + + + + + + + + 1 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 90 + 16777215 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + 视频监控 + + + + + + + + 0 + 0 + + + + 地图监控 + + + + + + + + 0 + 0 + + + + 设备监控 + + + + + + + Qt::Vertical + + + + 20 + 471 + + + + + + + + + + + + 0 + 0 + + + + + + + Qt::AlignCenter + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 110 + 16777215 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + 基本设置 + + + + + + + + 0 + 0 + + + + 转发设置 + + + + + + + + 0 + 0 + + + + 用户设置 + + + + + + + + 0 + 0 + + + + 防区设置 + + + + + + + + 0 + 0 + + + + 设备设置 + + + + + + + + 0 + 0 + + + + 其他设置 + + + + + + + Qt::Vertical + + + + 20 + 417 + + + + + + + + + + + + 0 + 0 + + + + 系统设置 + + + Qt::AlignCenter + + + + + + + + + + + 警情查询 + + + Qt::AlignCenter + + + + + + + + + + + 调试帮助 + + + Qt::AlignCenter + + + + + + + + + + + + + + diff --git a/comtool/head.h b/ui/uidemo08/head.h similarity index 77% rename from comtool/head.h rename to ui/uidemo08/head.h index 01a297f..a8d5a79 100644 --- a/comtool/head.h +++ b/ui/uidemo08/head.h @@ -1,6 +1,5 @@ #include #include -#include #if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) #include @@ -11,5 +10,3 @@ #endif #pragma execution_character_set("utf-8") -#include "appconfig.h" -#include "appdata.h" diff --git a/ui/uidemo08/main.cpp b/ui/uidemo08/main.cpp new file mode 100644 index 0000000..6f2c79d --- /dev/null +++ b/ui/uidemo08/main.cpp @@ -0,0 +1,23 @@ +#include "frmmain.h" +#include "appinit.h" +#include "quihelper.h" + +int main(int argc, char *argv[]) +{ + //设置不应用操作系统设置比如字体 + QApplication::setDesktopSettingsAware(false); +#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) + QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Floor); +#endif + QApplication a(argc, argv); + AppInit::Instance()->start(); + + QUIHelper::setFont(); + QUIHelper::setCode(); + + frmMain w; + QUIHelper::setFormInCenter(&w); + w.show(); + + return a.exec(); +} diff --git a/ui/uidemo08/other/image/main_about.png b/ui/uidemo08/other/image/main_about.png new file mode 100644 index 0000000..7db8e7b Binary files /dev/null and b/ui/uidemo08/other/image/main_about.png differ diff --git a/ui/uidemo08/other/image/main_company.png b/ui/uidemo08/other/image/main_company.png new file mode 100644 index 0000000..87a52b3 Binary files /dev/null and b/ui/uidemo08/other/image/main_company.png differ diff --git a/ui/uidemo08/other/image/main_config.png b/ui/uidemo08/other/image/main_config.png new file mode 100644 index 0000000..d45b094 Binary files /dev/null and b/ui/uidemo08/other/image/main_config.png differ diff --git a/ui/uidemo08/other/image/main_data.png b/ui/uidemo08/other/image/main_data.png new file mode 100644 index 0000000..29b7250 Binary files /dev/null and b/ui/uidemo08/other/image/main_data.png differ diff --git a/ui/uidemo08/other/image/main_exit.png b/ui/uidemo08/other/image/main_exit.png new file mode 100644 index 0000000..d26ee30 Binary files /dev/null and b/ui/uidemo08/other/image/main_exit.png differ diff --git a/ui/uidemo08/other/image/main_help.png b/ui/uidemo08/other/image/main_help.png new file mode 100644 index 0000000..cb293d0 Binary files /dev/null and b/ui/uidemo08/other/image/main_help.png differ diff --git a/ui/uidemo08/other/image/main_main.png b/ui/uidemo08/other/image/main_main.png new file mode 100644 index 0000000..3273ada Binary files /dev/null and b/ui/uidemo08/other/image/main_main.png differ diff --git a/ui/uidemo08/other/image/main_person.png b/ui/uidemo08/other/image/main_person.png new file mode 100644 index 0000000..d68a5ee Binary files /dev/null and b/ui/uidemo08/other/image/main_person.png differ diff --git a/ui/uidemo08/other/main.qrc b/ui/uidemo08/other/main.qrc new file mode 100644 index 0000000..0b0bb1e --- /dev/null +++ b/ui/uidemo08/other/main.qrc @@ -0,0 +1,12 @@ + + + image/main_about.png + image/main_company.png + image/main_config.png + image/main_data.png + image/main_exit.png + image/main_help.png + image/main_main.png + image/main_person.png + + diff --git a/ui/uidemo08/uidemo08.pro b/ui/uidemo08/uidemo08.pro new file mode 100644 index 0000000..7b360cb --- /dev/null +++ b/ui/uidemo08/uidemo08.pro @@ -0,0 +1,18 @@ +QT += core gui +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat + +TARGET = uidemo08 +TEMPLATE = app + +HEADERS += head.h +SOURCES += main.cpp +RESOURCES += other/main.qrc +RESOURCES += $$PWD/../core_qss/qss.qrc + +INCLUDEPATH += $$PWD +INCLUDEPATH += $$PWD/form +include ($$PWD/form/form.pri) + +INCLUDEPATH += $$PWD/../core_common +include ($$PWD/../core_common/core_common.pri) diff --git a/ui/uidemo09/form/form.pri b/ui/uidemo09/form/form.pri new file mode 100644 index 0000000..c6126ba --- /dev/null +++ b/ui/uidemo09/form/form.pri @@ -0,0 +1,8 @@ +FORMS += \ + $$PWD/frmmain.ui + +HEADERS += \ + $$PWD/frmmain.h + +SOURCES += \ + $$PWD/frmmain.cpp diff --git a/ui/uidemo09/form/frmmain.cpp b/ui/uidemo09/form/frmmain.cpp new file mode 100644 index 0000000..9d557f1 --- /dev/null +++ b/ui/uidemo09/form/frmmain.cpp @@ -0,0 +1,73 @@ +#pragma execution_character_set("utf-8") + +#include "frmmain.h" +#include "ui_frmmain.h" + +frmMain::frmMain(QWidget *parent) : QWidget(parent), ui(new Ui::frmMain) +{ + ui->setupUi(this); + this->initForm(); +} + +frmMain::~frmMain() +{ + delete ui; +} + +void frmMain::initForm() +{ + this->setWindowTitle("九宫格主界面"); + + bg = "main2.jpg"; + QList btns = this->findChildren(); + + foreach (QToolButton *btn, btns) { + connect(btn, SIGNAL(clicked()), this, SLOT(buttonClick())); + } +} + +void frmMain::buttonClick() +{ + QToolButton *btn = (QToolButton *)sender(); + QString objName = btn->objectName(); + + if (objName == "btnCOMTool") { + if (bg == "main1.jpg") { + bg = "main2.jpg"; + } else if (bg == "main2.jpg") { + bg = "main3.jpg"; + } else if (bg == "main3.jpg") { + bg = "main4.jpg"; + } else if (bg == "main4.jpg") { + bg = "main5.jpg"; + } else if (bg == "main5.jpg") { + bg = "main1.jpg"; + } + + QString qss = QString("QWidget#frm{background-image: url(:/image/%1);}").arg(bg); + qss += "QToolButton{color:#E7ECF0;background-color:rgba(0,0,0,0);border-style:none;}"; + this->setStyleSheet(qss); + } else if (objName == "btnAddressTool") { + + } else if (objName == "btnTCPTool") { + this->close(); + } else if (objName == "btnCOMTCPTool") { + + } else if (objName == "btnDefence") { + + } else if (objName == "btnHostTool") { + + } else if (objName == "btnLinkTool") { + + } else if (objName == "btnMaiChongTool") { + + } else if (objName == "btnPlot") { + + } else if (objName == "btnZhangLi4Tool") { + + } else if (objName == "btnZhangLi5Tool") { + + } else if (objName == "btnZhangLiTool") { + + } +} diff --git a/ui/uidemo09/form/frmmain.h b/ui/uidemo09/form/frmmain.h new file mode 100644 index 0000000..04e5e6d --- /dev/null +++ b/ui/uidemo09/form/frmmain.h @@ -0,0 +1,27 @@ +#ifndef FRMMAIN_H +#define FRMMAIN_H + +#include + +namespace Ui { +class frmMain; +} + +class frmMain : public QWidget +{ + Q_OBJECT + +public: + explicit frmMain(QWidget *parent = 0); + ~frmMain(); + +private: + Ui::frmMain *ui; + QString bg; + +private slots: + void initForm(); + void buttonClick(); +}; + +#endif // FRMMAIN_H diff --git a/ui/uidemo09/form/frmmain.ui b/ui/uidemo09/form/frmmain.ui new file mode 100644 index 0000000..d83a1a7 --- /dev/null +++ b/ui/uidemo09/form/frmmain.ui @@ -0,0 +1,382 @@ + + + frmMain + + + + 0 + 0 + 800 + 480 + + + + Dialog + + + QWidget#frm{ +background-image: url(:/image/main2.jpg); +} +QToolButton{ +font: 10pt "微软雅黑"; +color:#E7ECF0; +background-color:rgba(0,0,0,0); +border-style:none; +} + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 30 + + + 30 + + + 30 + + + 30 + + + 6 + + + + + + 0 + 0 + + + + 更换背景 + + + + :/image/PNG112.png:/image/PNG112.png + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + 退出系统 + + + + :/image/PNG100.png:/image/PNG100.png + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + 串口转网络工具 + + + + :/image/PNG99.png:/image/PNG99.png + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + 设备调试工具 + + + + :/image/PNG101.png:/image/PNG101.png + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + 张力批量配置工具 + + + + :/image/PNG103.png:/image/PNG103.png + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + 5道张力调试工具 + + + + :/image/PNG104.png:/image/PNG104.png + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + 脉冲主机调试工具 + + + + :/image/PNG105.png:/image/PNG105.png + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + 主机内部调试工具 + + + + :/image/PNG108.png:/image/PNG108.png + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + 联动模块调试工具 + + + + :/image/PNG109.png:/image/PNG109.png + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + 张力曲线图 + + + + :/image/PNG110.png:/image/PNG110.png + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + 防区管理 + + + + :/image/PNG111.png:/image/PNG111.png + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + 系统配置 + + + + :/image/PNG114.png:/image/PNG114.png + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + + diff --git a/ui/uidemo09/head.h b/ui/uidemo09/head.h new file mode 100644 index 0000000..e0e56a4 --- /dev/null +++ b/ui/uidemo09/head.h @@ -0,0 +1,13 @@ +#include +#include + +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) +#include +#endif + +#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0)) +#include +#endif + +#pragma execution_character_set("utf-8") + diff --git a/ui/uidemo09/main.cpp b/ui/uidemo09/main.cpp new file mode 100644 index 0000000..4b34994 --- /dev/null +++ b/ui/uidemo09/main.cpp @@ -0,0 +1,33 @@ +#include "frmmain.h" +#include "appinit.h" +#include "quihelper.h" + +int main(int argc, char *argv[]) +{ + //设置不应用操作系统设置比如字体 + QApplication::setDesktopSettingsAware(false); +#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) + QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Floor); +#endif + QApplication a(argc, argv); + AppInit::Instance()->start(); + + QUIHelper::setFont(); + QUIHelper::setCode(); + + //加载样式表 + QFile file(":/qss/psblack.css"); + if (file.open(QFile::ReadOnly)) { + QString qss = QLatin1String(file.readAll()); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + qApp->setStyleSheet(qss); + file.close(); + } + + frmMain w; + QUIHelper::setFormInCenter(&w); + w.show(); + + return a.exec(); +} diff --git a/ui/uidemo09/other/image/PNG100.png b/ui/uidemo09/other/image/PNG100.png new file mode 100644 index 0000000..b42907d Binary files /dev/null and b/ui/uidemo09/other/image/PNG100.png differ diff --git a/ui/uidemo09/other/image/PNG101.png b/ui/uidemo09/other/image/PNG101.png new file mode 100644 index 0000000..38c9663 Binary files /dev/null and b/ui/uidemo09/other/image/PNG101.png differ diff --git a/ui/uidemo09/other/image/PNG102.png b/ui/uidemo09/other/image/PNG102.png new file mode 100644 index 0000000..9ca638e Binary files /dev/null and b/ui/uidemo09/other/image/PNG102.png differ diff --git a/ui/uidemo09/other/image/PNG103.png b/ui/uidemo09/other/image/PNG103.png new file mode 100644 index 0000000..4fa8c15 Binary files /dev/null and b/ui/uidemo09/other/image/PNG103.png differ diff --git a/ui/uidemo09/other/image/PNG104.png b/ui/uidemo09/other/image/PNG104.png new file mode 100644 index 0000000..cb1141a Binary files /dev/null and b/ui/uidemo09/other/image/PNG104.png differ diff --git a/ui/uidemo09/other/image/PNG105.png b/ui/uidemo09/other/image/PNG105.png new file mode 100644 index 0000000..a3c4737 Binary files /dev/null and b/ui/uidemo09/other/image/PNG105.png differ diff --git a/ui/uidemo09/other/image/PNG106.png b/ui/uidemo09/other/image/PNG106.png new file mode 100644 index 0000000..e05374f Binary files /dev/null and b/ui/uidemo09/other/image/PNG106.png differ diff --git a/ui/uidemo09/other/image/PNG107.png b/ui/uidemo09/other/image/PNG107.png new file mode 100644 index 0000000..2d6ebb9 Binary files /dev/null and b/ui/uidemo09/other/image/PNG107.png differ diff --git a/ui/uidemo09/other/image/PNG108.png b/ui/uidemo09/other/image/PNG108.png new file mode 100644 index 0000000..4376893 Binary files /dev/null and b/ui/uidemo09/other/image/PNG108.png differ diff --git a/ui/uidemo09/other/image/PNG109.png b/ui/uidemo09/other/image/PNG109.png new file mode 100644 index 0000000..fc157d6 Binary files /dev/null and b/ui/uidemo09/other/image/PNG109.png differ diff --git a/ui/uidemo09/other/image/PNG110.png b/ui/uidemo09/other/image/PNG110.png new file mode 100644 index 0000000..c33d305 Binary files /dev/null and b/ui/uidemo09/other/image/PNG110.png differ diff --git a/ui/uidemo09/other/image/PNG111.png b/ui/uidemo09/other/image/PNG111.png new file mode 100644 index 0000000..b60ee54 Binary files /dev/null and b/ui/uidemo09/other/image/PNG111.png differ diff --git a/ui/uidemo09/other/image/PNG112.png b/ui/uidemo09/other/image/PNG112.png new file mode 100644 index 0000000..d7a7d2a Binary files /dev/null and b/ui/uidemo09/other/image/PNG112.png differ diff --git a/ui/uidemo09/other/image/PNG114.png b/ui/uidemo09/other/image/PNG114.png new file mode 100644 index 0000000..9b6b294 Binary files /dev/null and b/ui/uidemo09/other/image/PNG114.png differ diff --git a/ui/uidemo09/other/image/PNG99.png b/ui/uidemo09/other/image/PNG99.png new file mode 100644 index 0000000..6c6ae13 Binary files /dev/null and b/ui/uidemo09/other/image/PNG99.png differ diff --git a/ui/uidemo09/other/image/main1.jpg b/ui/uidemo09/other/image/main1.jpg new file mode 100644 index 0000000..efdd4f2 Binary files /dev/null and b/ui/uidemo09/other/image/main1.jpg differ diff --git a/ui/uidemo09/other/image/main2.jpg b/ui/uidemo09/other/image/main2.jpg new file mode 100644 index 0000000..c5c20dc Binary files /dev/null and b/ui/uidemo09/other/image/main2.jpg differ diff --git a/ui/uidemo09/other/image/main3.jpg b/ui/uidemo09/other/image/main3.jpg new file mode 100644 index 0000000..6b9521f Binary files /dev/null and b/ui/uidemo09/other/image/main3.jpg differ diff --git a/ui/uidemo09/other/image/main4.jpg b/ui/uidemo09/other/image/main4.jpg new file mode 100644 index 0000000..6cfdfe8 Binary files /dev/null and b/ui/uidemo09/other/image/main4.jpg differ diff --git a/ui/uidemo09/other/image/main5.jpg b/ui/uidemo09/other/image/main5.jpg new file mode 100644 index 0000000..730e810 Binary files /dev/null and b/ui/uidemo09/other/image/main5.jpg differ diff --git a/ui/uidemo09/other/main.qrc b/ui/uidemo09/other/main.qrc new file mode 100644 index 0000000..bb6cf4a --- /dev/null +++ b/ui/uidemo09/other/main.qrc @@ -0,0 +1,24 @@ + + + image/main1.jpg + image/main2.jpg + image/main3.jpg + image/main4.jpg + image/main5.jpg + image/PNG99.png + image/PNG100.png + image/PNG101.png + image/PNG102.png + image/PNG103.png + image/PNG104.png + image/PNG105.png + image/PNG106.png + image/PNG107.png + image/PNG108.png + image/PNG109.png + image/PNG110.png + image/PNG111.png + image/PNG112.png + image/PNG114.png + + diff --git a/ui/uidemo09/uidemo09.pro b/ui/uidemo09/uidemo09.pro new file mode 100644 index 0000000..7e68742 --- /dev/null +++ b/ui/uidemo09/uidemo09.pro @@ -0,0 +1,18 @@ +QT += core gui +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat + +TARGET = uidemo09 +TEMPLATE = app + +HEADERS += head.h +SOURCES += main.cpp +RESOURCES += other/main.qrc +RESOURCES += $$PWD/../core_qss/qss.qrc + +INCLUDEPATH += $$PWD +INCLUDEPATH += $$PWD/form +include ($$PWD/form/form.pri) + +INCLUDEPATH += $$PWD/../core_common +include ($$PWD/../core_common/core_common.pri) diff --git a/ui/uidemo10/form/form.pri b/ui/uidemo10/form/form.pri new file mode 100644 index 0000000..c6126ba --- /dev/null +++ b/ui/uidemo10/form/form.pri @@ -0,0 +1,8 @@ +FORMS += \ + $$PWD/frmmain.ui + +HEADERS += \ + $$PWD/frmmain.h + +SOURCES += \ + $$PWD/frmmain.cpp diff --git a/ui/uidemo10/form/frmmain.cpp b/ui/uidemo10/form/frmmain.cpp new file mode 100644 index 0000000..7d02eb6 --- /dev/null +++ b/ui/uidemo10/form/frmmain.cpp @@ -0,0 +1,61 @@ +#pragma execution_character_set("utf-8") + +#include "frmmain.h" +#include "ui_frmmain.h" +#include "iconhelper.h" + +frmMain::frmMain(QWidget *parent) : QWidget(parent), ui(new Ui::frmMain) +{ + ui->setupUi(this); + this->initForm(); +} + +frmMain::~frmMain() +{ + delete ui; +} + +void frmMain::initForm() +{ + this->setWindowTitle("metro风格主界面"); + + int iconSize = 50; + int iconWidth = 100; + int iconHeight = 80; + + QList listColorBg; + listColorBg << "#FF3739" << "#1A9FE0" << "#41BB1A" << "#1570A5" << "#FE781F" << "#9B59BB"; + QList listColorText; + listColorText << "#FEFEFE" << "#FEFEFE" << "#FEFEFE" << "#FEFEFE" << "#FEFEFE" << "#FEFEFE"; + + QList icons; + icons << 0xf2ba << 0xf002 << 0xf2c2 << 0xf02f << 0xf013 << 0xf021; + QList names; + names << "访客登记" << "记录查询" << "证件扫描" << "信息打印" << "系统设置" << "系统重启"; + + QList btns = this->findChildren(); + for (int i = 0; i < btns.count(); i++) { + QToolButton *btn = btns.at(i); + btn->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); + btn->setIconSize(QSize(iconWidth, iconHeight)); + + QPixmap pix = IconHelper::getPixmap(listColorText.at(i), icons.at(i), iconSize, iconWidth, iconHeight); + btn->setIcon(QIcon(pix)); + btn->setText(names.at(i)); + btn->setStyleSheet(QString("QToolButton{font:%1pt;color:%2;background-color:%3;border:none;border-radius:0px;}") + .arg(iconSize / 2).arg(listColorText.at(i)).arg(listColorBg.at(i))); + + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + } +} + +void frmMain::buttonClicked() +{ + QToolButton *btn = (QToolButton *)sender(); + QString text = btn->text(); + qDebug() << text; + + if (text == "系统重启") { + close(); + } +} diff --git a/ui/uidemo10/form/frmmain.h b/ui/uidemo10/form/frmmain.h new file mode 100644 index 0000000..0033b5f --- /dev/null +++ b/ui/uidemo10/form/frmmain.h @@ -0,0 +1,26 @@ +#ifndef FRMMAIN_H +#define FRMMAIN_H + +#include + +namespace Ui { +class frmMain; +} + +class frmMain : public QWidget +{ + Q_OBJECT + +public: + explicit frmMain(QWidget *parent = 0); + ~frmMain(); + +private: + Ui::frmMain *ui; + +private slots: + void initForm(); + void buttonClicked(); +}; + +#endif // FRMMAIN_H diff --git a/ui/uidemo10/form/frmmain.ui b/ui/uidemo10/form/frmmain.ui new file mode 100644 index 0000000..b9a879e --- /dev/null +++ b/ui/uidemo10/form/frmmain.ui @@ -0,0 +1,135 @@ + + + frmMain + + + + 0 + 0 + 644 + 342 + + + + Dialog + + + + + + + 0 + 0 + + + + + + + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + + + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + + + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + + + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + + + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + + + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + diff --git a/ui/uidemo10/head.h b/ui/uidemo10/head.h new file mode 100644 index 0000000..a8d5a79 --- /dev/null +++ b/ui/uidemo10/head.h @@ -0,0 +1,12 @@ +#include +#include + +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) +#include +#endif + +#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0)) +#include +#endif + +#pragma execution_character_set("utf-8") diff --git a/ui/uidemo10/main.cpp b/ui/uidemo10/main.cpp new file mode 100644 index 0000000..6f2c79d --- /dev/null +++ b/ui/uidemo10/main.cpp @@ -0,0 +1,23 @@ +#include "frmmain.h" +#include "appinit.h" +#include "quihelper.h" + +int main(int argc, char *argv[]) +{ + //设置不应用操作系统设置比如字体 + QApplication::setDesktopSettingsAware(false); +#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) + QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Floor); +#endif + QApplication a(argc, argv); + AppInit::Instance()->start(); + + QUIHelper::setFont(); + QUIHelper::setCode(); + + frmMain w; + QUIHelper::setFormInCenter(&w); + w.show(); + + return a.exec(); +} diff --git a/ui/uidemo10/uidemo10.pro b/ui/uidemo10/uidemo10.pro new file mode 100644 index 0000000..5b47610 --- /dev/null +++ b/ui/uidemo10/uidemo10.pro @@ -0,0 +1,16 @@ +QT += core gui +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat + +TARGET = uidemo10 +TEMPLATE = app + +HEADERS += head.h +SOURCES += main.cpp + +INCLUDEPATH += $$PWD +INCLUDEPATH += $$PWD/form +include ($$PWD/form/form.pri) + +INCLUDEPATH += $$PWD/../core_common +include ($$PWD/../core_common/core_common.pri) diff --git a/video/0snap/playffmpeg.jpg b/video/0snap/playffmpeg.jpg new file mode 100644 index 0000000..ea83bf7 Binary files /dev/null and b/video/0snap/playffmpeg.jpg differ diff --git a/video/0snap/plaympv.jpg b/video/0snap/plaympv.jpg new file mode 100644 index 0000000..87c7924 Binary files /dev/null and b/video/0snap/plaympv.jpg differ diff --git a/video/0snap/playvlc.jpg b/video/0snap/playvlc.jpg new file mode 100644 index 0000000..9f41db9 Binary files /dev/null and b/video/0snap/playvlc.jpg differ diff --git a/video/0snap/videobox.jpg b/video/0snap/videobox.jpg new file mode 100644 index 0000000..f7a7854 Binary files /dev/null and b/video/0snap/videobox.jpg differ diff --git a/video/0snap/videopanel.jpg b/video/0snap/videopanel.jpg new file mode 100644 index 0000000..f46c109 Binary files /dev/null and b/video/0snap/videopanel.jpg differ diff --git a/video/0snap/videowidget.jpg b/video/0snap/videowidget.jpg new file mode 100644 index 0000000..15ae550 Binary files /dev/null and b/video/0snap/videowidget.jpg differ diff --git a/ffmpegdemo/ffmpeg/ffmpeg.cpp b/video/playffmpeg/ffmpeg/ffmpeg.cpp similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg.cpp rename to video/playffmpeg/ffmpeg/ffmpeg.cpp diff --git a/ffmpegdemo/ffmpeg/ffmpeg.h b/video/playffmpeg/ffmpeg/ffmpeg.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg.h rename to video/playffmpeg/ffmpeg/ffmpeg.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg.pri b/video/playffmpeg/ffmpeg/ffmpeg.pri similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg.pri rename to video/playffmpeg/ffmpeg/ffmpeg.pri diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/avcodec.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/avcodec.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/avcodec.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/avcodec.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/avdct.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/avdct.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/avdct.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/avdct.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/avfft.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/avfft.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/avfft.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/avfft.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/d3d11va.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/d3d11va.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/d3d11va.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/d3d11va.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/dirac.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/dirac.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/dirac.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/dirac.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/dv_profile.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/dv_profile.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/dv_profile.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/dv_profile.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/dxva2.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/dxva2.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/dxva2.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/dxva2.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/jni.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/jni.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/jni.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/jni.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/mediacodec.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/mediacodec.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/mediacodec.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/mediacodec.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/qsv.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/qsv.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/qsv.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/qsv.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/vaapi.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/vaapi.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/vaapi.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/vaapi.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/vda.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/vda.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/vda.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/vda.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/vdpau.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/vdpau.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/vdpau.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/vdpau.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/version.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/version.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/videotoolbox.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/videotoolbox.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/videotoolbox.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/videotoolbox.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/vorbis_parser.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/vorbis_parser.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/vorbis_parser.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/vorbis_parser.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/xvmc.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/xvmc.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavcodec/xvmc.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavcodec/xvmc.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavdevice/avdevice.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavdevice/avdevice.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavdevice/avdevice.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavdevice/avdevice.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavdevice/version.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavdevice/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavdevice/version.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavdevice/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavfilter/avfilter.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavfilter/avfilter.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavfilter/avfilter.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavfilter/avfilter.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavfilter/avfiltergraph.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavfilter/avfiltergraph.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavfilter/avfiltergraph.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavfilter/avfiltergraph.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavfilter/buffersink.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavfilter/buffersink.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavfilter/buffersink.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavfilter/buffersink.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavfilter/buffersrc.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavfilter/buffersrc.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavfilter/buffersrc.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavfilter/buffersrc.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavfilter/version.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavfilter/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavfilter/version.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavfilter/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavformat/avformat.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavformat/avformat.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavformat/avformat.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavformat/avformat.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavformat/avio.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavformat/avio.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavformat/avio.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavformat/avio.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavformat/version.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavformat/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavformat/version.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavformat/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/adler32.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/adler32.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/adler32.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/adler32.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/aes.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/aes.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/aes.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/aes.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/aes_ctr.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/aes_ctr.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/aes_ctr.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/aes_ctr.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/attributes.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/attributes.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/attributes.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/attributes.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/audio_fifo.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/audio_fifo.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/audio_fifo.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/audio_fifo.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/avassert.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/avassert.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/avassert.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/avassert.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/avconfig.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/avconfig.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/avconfig.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/avconfig.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/avstring.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/avstring.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/avstring.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/avstring.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/avutil.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/avutil.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/avutil.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/avutil.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/base64.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/base64.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/base64.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/base64.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/blowfish.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/blowfish.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/blowfish.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/blowfish.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/bprint.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/bprint.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/bprint.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/bprint.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/bswap.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/bswap.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/bswap.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/bswap.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/buffer.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/buffer.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/buffer.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/buffer.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/camellia.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/camellia.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/camellia.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/camellia.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/cast5.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/cast5.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/cast5.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/cast5.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/channel_layout.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/channel_layout.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/channel_layout.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/channel_layout.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/common.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/common.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/common.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/common.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/cpu.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/cpu.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/cpu.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/cpu.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/crc.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/crc.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/crc.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/crc.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/des.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/des.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/des.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/des.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/dict.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/dict.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/dict.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/dict.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/display.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/display.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/display.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/display.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/downmix_info.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/downmix_info.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/downmix_info.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/downmix_info.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/error.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/error.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/error.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/error.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/eval.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/eval.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/eval.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/eval.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/ffversion.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/ffversion.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/ffversion.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/ffversion.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/fifo.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/fifo.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/fifo.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/fifo.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/file.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/file.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/file.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/file.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/frame.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/frame.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/frame.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/frame.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hash.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hash.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hash.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hash.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hmac.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hmac.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hmac.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hmac.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hwcontext.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hwcontext.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hwcontext.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hwcontext.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hwcontext_cuda.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hwcontext_cuda.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hwcontext_cuda.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hwcontext_cuda.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hwcontext_d3d11va.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hwcontext_d3d11va.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hwcontext_d3d11va.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hwcontext_d3d11va.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hwcontext_drm.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hwcontext_drm.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hwcontext_drm.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hwcontext_drm.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hwcontext_dxva2.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hwcontext_dxva2.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hwcontext_dxva2.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hwcontext_dxva2.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hwcontext_qsv.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hwcontext_qsv.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hwcontext_qsv.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hwcontext_qsv.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hwcontext_vaapi.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hwcontext_vaapi.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hwcontext_vaapi.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hwcontext_vaapi.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hwcontext_vdpau.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hwcontext_vdpau.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hwcontext_vdpau.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hwcontext_vdpau.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hwcontext_videotoolbox.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hwcontext_videotoolbox.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/hwcontext_videotoolbox.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/hwcontext_videotoolbox.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/imgutils.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/imgutils.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/imgutils.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/imgutils.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/intfloat.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/intfloat.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/intfloat.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/intfloat.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/intreadwrite.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/intreadwrite.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/intreadwrite.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/intreadwrite.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/lfg.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/lfg.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/lfg.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/lfg.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/log.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/log.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/log.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/log.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/lzo.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/lzo.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/lzo.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/lzo.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/macros.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/macros.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/macros.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/macros.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/mastering_display_metadata.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/mastering_display_metadata.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/mastering_display_metadata.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/mastering_display_metadata.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/mathematics.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/mathematics.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/mathematics.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/mathematics.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/md5.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/md5.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/md5.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/md5.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/mem.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/mem.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/mem.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/mem.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/motion_vector.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/motion_vector.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/motion_vector.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/motion_vector.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/murmur3.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/murmur3.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/murmur3.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/murmur3.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/opt.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/opt.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/opt.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/opt.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/parseutils.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/parseutils.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/parseutils.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/parseutils.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/pixdesc.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/pixdesc.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/pixdesc.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/pixdesc.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/pixelutils.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/pixelutils.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/pixelutils.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/pixelutils.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/pixfmt.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/pixfmt.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/pixfmt.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/pixfmt.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/random_seed.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/random_seed.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/random_seed.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/random_seed.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/rational.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/rational.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/rational.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/rational.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/rc4.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/rc4.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/rc4.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/rc4.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/replaygain.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/replaygain.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/replaygain.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/replaygain.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/ripemd.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/ripemd.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/ripemd.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/ripemd.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/samplefmt.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/samplefmt.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/samplefmt.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/samplefmt.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/sha.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/sha.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/sha.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/sha.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/sha512.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/sha512.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/sha512.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/sha512.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/spherical.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/spherical.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/spherical.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/spherical.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/stereo3d.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/stereo3d.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/stereo3d.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/stereo3d.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/tea.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/tea.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/tea.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/tea.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/threadmessage.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/threadmessage.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/threadmessage.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/threadmessage.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/time.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/time.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/time.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/time.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/timecode.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/timecode.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/timecode.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/timecode.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/timestamp.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/timestamp.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/timestamp.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/timestamp.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/tree.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/tree.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/tree.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/tree.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/twofish.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/twofish.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/twofish.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/twofish.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/version.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/version.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/xtea.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/xtea.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libavutil/xtea.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libavutil/xtea.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libpostproc/postprocess.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libpostproc/postprocess.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libpostproc/postprocess.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libpostproc/postprocess.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libpostproc/version.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libpostproc/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libpostproc/version.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libpostproc/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libswresample/swresample.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libswresample/swresample.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libswresample/swresample.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libswresample/swresample.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libswresample/version.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libswresample/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libswresample/version.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libswresample/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libswscale/swscale.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libswscale/swscale.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libswscale/swscale.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libswscale/swscale.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/libswscale/version.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/libswscale/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/libswscale/version.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/libswscale/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/mfx/mfxdefs.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/mfx/mfxdefs.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/mfx/mfxdefs.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/mfx/mfxdefs.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/mfx/mfxjpeg.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/mfx/mfxjpeg.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/mfx/mfxjpeg.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/mfx/mfxjpeg.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/mfx/mfxmvc.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/mfx/mfxmvc.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/mfx/mfxmvc.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/mfx/mfxmvc.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/mfx/mfxplugin++.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/mfx/mfxplugin++.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/mfx/mfxplugin++.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/mfx/mfxplugin++.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/mfx/mfxplugin.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/mfx/mfxplugin.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/mfx/mfxplugin.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/mfx/mfxplugin.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/mfx/mfxstructures.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/mfx/mfxstructures.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/mfx/mfxstructures.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/mfx/mfxstructures.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/mfx/mfxvideo++.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/mfx/mfxvideo++.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/mfx/mfxvideo++.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/mfx/mfxvideo++.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include/mfx/mfxvideo.h b/video/playffmpeg/ffmpeg/ffmpeg3/include/mfx/mfxvideo.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include/mfx/mfxvideo.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include/mfx/mfxvideo.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/avcodec.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/avcodec.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/avcodec.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/avcodec.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/avdct.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/avdct.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/avdct.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/avdct.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/avfft.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/avfft.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/avfft.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/avfft.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/d3d11va.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/d3d11va.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/d3d11va.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/d3d11va.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/dirac.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/dirac.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/dirac.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/dirac.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/dv_profile.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/dv_profile.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/dv_profile.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/dv_profile.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/dxva2.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/dxva2.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/dxva2.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/dxva2.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/jni.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/jni.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/jni.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/jni.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/mediacodec.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/mediacodec.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/mediacodec.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/mediacodec.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/qsv.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/qsv.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/qsv.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/qsv.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/vaapi.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/vaapi.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/vaapi.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/vaapi.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/vda.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/vda.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/vda.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/vda.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/vdpau.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/vdpau.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/vdpau.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/vdpau.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/version.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/version.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/videotoolbox.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/videotoolbox.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/videotoolbox.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/videotoolbox.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/vorbis_parser.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/vorbis_parser.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/vorbis_parser.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/vorbis_parser.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/xvmc.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/xvmc.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavcodec/xvmc.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavcodec/xvmc.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavdevice/avdevice.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavdevice/avdevice.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavdevice/avdevice.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavdevice/avdevice.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavdevice/version.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavdevice/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavdevice/version.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavdevice/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavfilter/avfilter.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavfilter/avfilter.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavfilter/avfilter.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavfilter/avfilter.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavfilter/avfiltergraph.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavfilter/avfiltergraph.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavfilter/avfiltergraph.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavfilter/avfiltergraph.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavfilter/buffersink.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavfilter/buffersink.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavfilter/buffersink.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavfilter/buffersink.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavfilter/buffersrc.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavfilter/buffersrc.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavfilter/buffersrc.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavfilter/buffersrc.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavfilter/version.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavfilter/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavfilter/version.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavfilter/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavformat/avformat.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavformat/avformat.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavformat/avformat.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavformat/avformat.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavformat/avio.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavformat/avio.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavformat/avio.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavformat/avio.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavformat/version.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavformat/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavformat/version.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavformat/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/adler32.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/adler32.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/adler32.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/adler32.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/aes.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/aes.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/aes.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/aes.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/aes_ctr.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/aes_ctr.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/aes_ctr.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/aes_ctr.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/attributes.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/attributes.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/attributes.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/attributes.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/audio_fifo.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/audio_fifo.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/audio_fifo.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/audio_fifo.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/avassert.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/avassert.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/avassert.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/avassert.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/avconfig.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/avconfig.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/avconfig.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/avconfig.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/avstring.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/avstring.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/avstring.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/avstring.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/avutil.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/avutil.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/avutil.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/avutil.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/base64.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/base64.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/base64.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/base64.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/blowfish.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/blowfish.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/blowfish.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/blowfish.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/bprint.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/bprint.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/bprint.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/bprint.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/bswap.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/bswap.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/bswap.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/bswap.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/buffer.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/buffer.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/buffer.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/buffer.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/camellia.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/camellia.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/camellia.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/camellia.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/cast5.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/cast5.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/cast5.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/cast5.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/channel_layout.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/channel_layout.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/channel_layout.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/channel_layout.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/common.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/common.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/common.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/common.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/cpu.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/cpu.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/cpu.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/cpu.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/crc.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/crc.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/crc.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/crc.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/des.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/des.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/des.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/des.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/dict.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/dict.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/dict.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/dict.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/display.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/display.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/display.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/display.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/downmix_info.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/downmix_info.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/downmix_info.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/downmix_info.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/error.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/error.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/error.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/error.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/eval.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/eval.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/eval.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/eval.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/ffversion.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/ffversion.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/ffversion.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/ffversion.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/fifo.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/fifo.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/fifo.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/fifo.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/file.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/file.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/file.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/file.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/frame.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/frame.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/frame.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/frame.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hash.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hash.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hash.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hash.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hmac.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hmac.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hmac.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hmac.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hwcontext.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hwcontext.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hwcontext.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hwcontext.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_cuda.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_cuda.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_cuda.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_cuda.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_d3d11va.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_d3d11va.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_d3d11va.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_d3d11va.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_drm.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_drm.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_drm.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_drm.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_dxva2.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_dxva2.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_dxva2.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_dxva2.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_qsv.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_qsv.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_qsv.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_qsv.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_vaapi.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_vaapi.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_vaapi.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_vaapi.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_vdpau.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_vdpau.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_vdpau.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_vdpau.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_videotoolbox.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_videotoolbox.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_videotoolbox.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/hwcontext_videotoolbox.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/imgutils.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/imgutils.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/imgutils.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/imgutils.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/intfloat.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/intfloat.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/intfloat.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/intfloat.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/intreadwrite.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/intreadwrite.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/intreadwrite.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/intreadwrite.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/lfg.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/lfg.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/lfg.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/lfg.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/log.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/log.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/log.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/log.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/lzo.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/lzo.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/lzo.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/lzo.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/macros.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/macros.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/macros.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/macros.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/mastering_display_metadata.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/mastering_display_metadata.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/mastering_display_metadata.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/mastering_display_metadata.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/mathematics.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/mathematics.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/mathematics.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/mathematics.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/md5.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/md5.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/md5.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/md5.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/mem.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/mem.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/mem.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/mem.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/motion_vector.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/motion_vector.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/motion_vector.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/motion_vector.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/murmur3.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/murmur3.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/murmur3.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/murmur3.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/opt.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/opt.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/opt.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/opt.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/parseutils.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/parseutils.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/parseutils.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/parseutils.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/pixdesc.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/pixdesc.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/pixdesc.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/pixdesc.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/pixelutils.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/pixelutils.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/pixelutils.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/pixelutils.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/pixfmt.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/pixfmt.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/pixfmt.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/pixfmt.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/random_seed.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/random_seed.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/random_seed.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/random_seed.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/rational.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/rational.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/rational.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/rational.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/rc4.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/rc4.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/rc4.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/rc4.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/replaygain.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/replaygain.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/replaygain.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/replaygain.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/ripemd.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/ripemd.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/ripemd.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/ripemd.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/samplefmt.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/samplefmt.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/samplefmt.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/samplefmt.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/sha.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/sha.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/sha.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/sha.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/sha512.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/sha512.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/sha512.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/sha512.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/spherical.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/spherical.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/spherical.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/spherical.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/stereo3d.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/stereo3d.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/stereo3d.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/stereo3d.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/tea.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/tea.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/tea.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/tea.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/threadmessage.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/threadmessage.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/threadmessage.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/threadmessage.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/time.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/time.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/time.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/time.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/timecode.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/timecode.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/timecode.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/timecode.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/timestamp.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/timestamp.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/timestamp.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/timestamp.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/tree.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/tree.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/tree.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/tree.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/twofish.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/twofish.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/twofish.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/twofish.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/version.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/version.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/xtea.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/xtea.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libavutil/xtea.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libavutil/xtea.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libpostproc/postprocess.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libpostproc/postprocess.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libpostproc/postprocess.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libpostproc/postprocess.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libpostproc/version.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libpostproc/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libpostproc/version.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libpostproc/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libswresample/swresample.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libswresample/swresample.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libswresample/swresample.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libswresample/swresample.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libswresample/version.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libswresample/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libswresample/version.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libswresample/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libswscale/swscale.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libswscale/swscale.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libswscale/swscale.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libswscale/swscale.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/libswscale/version.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/libswscale/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/libswscale/version.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/libswscale/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/mfx/mfxdefs.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/mfx/mfxdefs.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/mfx/mfxdefs.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/mfx/mfxdefs.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/mfx/mfxjpeg.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/mfx/mfxjpeg.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/mfx/mfxjpeg.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/mfx/mfxjpeg.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/mfx/mfxmvc.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/mfx/mfxmvc.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/mfx/mfxmvc.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/mfx/mfxmvc.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/mfx/mfxplugin++.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/mfx/mfxplugin++.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/mfx/mfxplugin++.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/mfx/mfxplugin++.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/mfx/mfxplugin.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/mfx/mfxplugin.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/mfx/mfxplugin.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/mfx/mfxplugin.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/mfx/mfxstructures.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/mfx/mfxstructures.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/mfx/mfxstructures.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/mfx/mfxstructures.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/mfx/mfxvideo++.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/mfx/mfxvideo++.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/mfx/mfxvideo++.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/mfx/mfxvideo++.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/include64/mfx/mfxvideo.h b/video/playffmpeg/ffmpeg/ffmpeg3/include64/mfx/mfxvideo.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/include64/mfx/mfxvideo.h rename to video/playffmpeg/ffmpeg/ffmpeg3/include64/mfx/mfxvideo.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/winlib/avcodec.lib b/video/playffmpeg/ffmpeg/ffmpeg3/winlib/avcodec.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/winlib/avcodec.lib rename to video/playffmpeg/ffmpeg/ffmpeg3/winlib/avcodec.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/winlib/avdevice.lib b/video/playffmpeg/ffmpeg/ffmpeg3/winlib/avdevice.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/winlib/avdevice.lib rename to video/playffmpeg/ffmpeg/ffmpeg3/winlib/avdevice.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/winlib/avfilter.lib b/video/playffmpeg/ffmpeg/ffmpeg3/winlib/avfilter.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/winlib/avfilter.lib rename to video/playffmpeg/ffmpeg/ffmpeg3/winlib/avfilter.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/winlib/avformat.lib b/video/playffmpeg/ffmpeg/ffmpeg3/winlib/avformat.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/winlib/avformat.lib rename to video/playffmpeg/ffmpeg/ffmpeg3/winlib/avformat.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/winlib/avutil.lib b/video/playffmpeg/ffmpeg/ffmpeg3/winlib/avutil.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/winlib/avutil.lib rename to video/playffmpeg/ffmpeg/ffmpeg3/winlib/avutil.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/winlib/postproc.lib b/video/playffmpeg/ffmpeg/ffmpeg3/winlib/postproc.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/winlib/postproc.lib rename to video/playffmpeg/ffmpeg/ffmpeg3/winlib/postproc.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/winlib/swresample.lib b/video/playffmpeg/ffmpeg/ffmpeg3/winlib/swresample.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/winlib/swresample.lib rename to video/playffmpeg/ffmpeg/ffmpeg3/winlib/swresample.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/winlib/swscale.lib b/video/playffmpeg/ffmpeg/ffmpeg3/winlib/swscale.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/winlib/swscale.lib rename to video/playffmpeg/ffmpeg/ffmpeg3/winlib/swscale.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/winlib64/avcodec.lib b/video/playffmpeg/ffmpeg/ffmpeg3/winlib64/avcodec.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/winlib64/avcodec.lib rename to video/playffmpeg/ffmpeg/ffmpeg3/winlib64/avcodec.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/winlib64/avdevice.lib b/video/playffmpeg/ffmpeg/ffmpeg3/winlib64/avdevice.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/winlib64/avdevice.lib rename to video/playffmpeg/ffmpeg/ffmpeg3/winlib64/avdevice.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/winlib64/avfilter.lib b/video/playffmpeg/ffmpeg/ffmpeg3/winlib64/avfilter.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/winlib64/avfilter.lib rename to video/playffmpeg/ffmpeg/ffmpeg3/winlib64/avfilter.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/winlib64/avformat.lib b/video/playffmpeg/ffmpeg/ffmpeg3/winlib64/avformat.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/winlib64/avformat.lib rename to video/playffmpeg/ffmpeg/ffmpeg3/winlib64/avformat.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/winlib64/avutil.lib b/video/playffmpeg/ffmpeg/ffmpeg3/winlib64/avutil.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/winlib64/avutil.lib rename to video/playffmpeg/ffmpeg/ffmpeg3/winlib64/avutil.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/winlib64/postproc.lib b/video/playffmpeg/ffmpeg/ffmpeg3/winlib64/postproc.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/winlib64/postproc.lib rename to video/playffmpeg/ffmpeg/ffmpeg3/winlib64/postproc.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/winlib64/swresample.lib b/video/playffmpeg/ffmpeg/ffmpeg3/winlib64/swresample.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/winlib64/swresample.lib rename to video/playffmpeg/ffmpeg/ffmpeg3/winlib64/swresample.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg3/winlib64/swscale.lib b/video/playffmpeg/ffmpeg/ffmpeg3/winlib64/swscale.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg3/winlib64/swscale.lib rename to video/playffmpeg/ffmpeg/ffmpeg3/winlib64/swscale.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/ac3_parser.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/ac3_parser.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/ac3_parser.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/ac3_parser.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/adts_parser.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/adts_parser.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/adts_parser.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/adts_parser.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/avcodec.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/avcodec.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/avcodec.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/avcodec.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/avdct.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/avdct.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/avdct.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/avdct.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/avfft.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/avfft.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/avfft.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/avfft.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/d3d11va.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/d3d11va.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/d3d11va.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/d3d11va.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/dirac.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/dirac.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/dirac.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/dirac.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/dv_profile.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/dv_profile.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/dv_profile.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/dv_profile.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/dxva2.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/dxva2.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/dxva2.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/dxva2.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/jni.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/jni.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/jni.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/jni.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/mediacodec.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/mediacodec.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/mediacodec.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/mediacodec.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/qsv.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/qsv.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/qsv.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/qsv.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/vaapi.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/vaapi.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/vaapi.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/vaapi.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/vdpau.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/vdpau.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/vdpau.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/vdpau.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/version.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/version.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/videotoolbox.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/videotoolbox.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/videotoolbox.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/videotoolbox.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/vorbis_parser.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/vorbis_parser.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/vorbis_parser.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/vorbis_parser.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/xvmc.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/xvmc.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavcodec/xvmc.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavcodec/xvmc.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavdevice/avdevice.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavdevice/avdevice.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavdevice/avdevice.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavdevice/avdevice.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavdevice/version.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavdevice/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavdevice/version.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavdevice/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavfilter/avfilter.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavfilter/avfilter.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavfilter/avfilter.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavfilter/avfilter.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavfilter/buffersink.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavfilter/buffersink.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavfilter/buffersink.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavfilter/buffersink.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavfilter/buffersrc.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavfilter/buffersrc.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavfilter/buffersrc.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavfilter/buffersrc.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavfilter/version.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavfilter/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavfilter/version.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavfilter/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavformat/avformat.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavformat/avformat.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavformat/avformat.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavformat/avformat.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavformat/avio.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavformat/avio.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavformat/avio.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavformat/avio.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavformat/version.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavformat/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavformat/version.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavformat/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/adler32.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/adler32.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/adler32.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/adler32.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/aes.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/aes.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/aes.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/aes.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/aes_ctr.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/aes_ctr.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/aes_ctr.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/aes_ctr.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/attributes.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/attributes.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/attributes.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/attributes.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/audio_fifo.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/audio_fifo.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/audio_fifo.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/audio_fifo.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/avassert.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/avassert.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/avassert.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/avassert.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/avconfig.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/avconfig.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/avconfig.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/avconfig.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/avstring.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/avstring.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/avstring.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/avstring.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/avutil.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/avutil.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/avutil.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/avutil.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/base64.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/base64.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/base64.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/base64.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/blowfish.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/blowfish.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/blowfish.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/blowfish.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/bprint.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/bprint.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/bprint.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/bprint.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/bswap.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/bswap.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/bswap.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/bswap.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/buffer.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/buffer.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/buffer.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/buffer.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/camellia.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/camellia.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/camellia.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/camellia.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/cast5.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/cast5.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/cast5.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/cast5.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/channel_layout.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/channel_layout.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/channel_layout.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/channel_layout.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/common.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/common.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/common.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/common.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/cpu.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/cpu.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/cpu.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/cpu.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/crc.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/crc.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/crc.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/crc.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/des.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/des.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/des.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/des.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/dict.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/dict.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/dict.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/dict.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/display.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/display.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/display.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/display.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/downmix_info.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/downmix_info.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/downmix_info.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/downmix_info.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/encryption_info.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/encryption_info.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/encryption_info.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/encryption_info.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/error.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/error.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/error.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/error.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/eval.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/eval.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/eval.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/eval.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/ffversion.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/ffversion.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/ffversion.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/ffversion.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/fifo.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/fifo.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/fifo.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/fifo.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/file.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/file.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/file.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/file.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/frame.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/frame.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/frame.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/frame.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hash.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hash.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hash.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hash.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hdr_dynamic_metadata.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hdr_dynamic_metadata.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hdr_dynamic_metadata.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hdr_dynamic_metadata.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hmac.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hmac.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hmac.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hmac.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hwcontext.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hwcontext.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hwcontext.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hwcontext.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hwcontext_cuda.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hwcontext_cuda.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hwcontext_cuda.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hwcontext_cuda.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hwcontext_d3d11va.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hwcontext_d3d11va.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hwcontext_d3d11va.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hwcontext_d3d11va.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hwcontext_drm.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hwcontext_drm.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hwcontext_drm.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hwcontext_drm.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hwcontext_dxva2.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hwcontext_dxva2.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hwcontext_dxva2.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hwcontext_dxva2.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hwcontext_mediacodec.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hwcontext_mediacodec.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hwcontext_mediacodec.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hwcontext_mediacodec.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hwcontext_qsv.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hwcontext_qsv.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hwcontext_qsv.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hwcontext_qsv.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hwcontext_vaapi.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hwcontext_vaapi.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hwcontext_vaapi.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hwcontext_vaapi.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hwcontext_vdpau.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hwcontext_vdpau.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hwcontext_vdpau.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hwcontext_vdpau.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hwcontext_videotoolbox.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hwcontext_videotoolbox.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/hwcontext_videotoolbox.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/hwcontext_videotoolbox.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/imgutils.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/imgutils.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/imgutils.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/imgutils.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/intfloat.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/intfloat.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/intfloat.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/intfloat.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/intreadwrite.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/intreadwrite.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/intreadwrite.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/intreadwrite.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/lfg.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/lfg.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/lfg.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/lfg.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/log.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/log.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/log.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/log.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/lzo.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/lzo.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/lzo.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/lzo.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/macros.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/macros.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/macros.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/macros.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/mastering_display_metadata.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/mastering_display_metadata.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/mastering_display_metadata.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/mastering_display_metadata.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/mathematics.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/mathematics.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/mathematics.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/mathematics.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/md5.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/md5.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/md5.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/md5.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/mem.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/mem.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/mem.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/mem.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/motion_vector.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/motion_vector.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/motion_vector.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/motion_vector.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/murmur3.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/murmur3.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/murmur3.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/murmur3.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/opt.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/opt.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/opt.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/opt.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/parseutils.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/parseutils.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/parseutils.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/parseutils.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/pixdesc.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/pixdesc.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/pixdesc.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/pixdesc.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/pixelutils.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/pixelutils.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/pixelutils.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/pixelutils.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/pixfmt.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/pixfmt.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/pixfmt.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/pixfmt.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/random_seed.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/random_seed.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/random_seed.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/random_seed.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/rational.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/rational.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/rational.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/rational.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/rc4.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/rc4.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/rc4.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/rc4.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/replaygain.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/replaygain.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/replaygain.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/replaygain.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/ripemd.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/ripemd.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/ripemd.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/ripemd.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/samplefmt.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/samplefmt.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/samplefmt.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/samplefmt.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/sha.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/sha.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/sha.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/sha.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/sha512.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/sha512.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/sha512.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/sha512.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/spherical.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/spherical.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/spherical.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/spherical.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/stereo3d.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/stereo3d.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/stereo3d.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/stereo3d.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/tea.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/tea.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/tea.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/tea.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/threadmessage.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/threadmessage.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/threadmessage.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/threadmessage.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/time.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/time.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/time.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/time.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/timecode.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/timecode.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/timecode.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/timecode.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/timestamp.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/timestamp.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/timestamp.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/timestamp.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/tree.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/tree.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/tree.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/tree.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/twofish.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/twofish.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/twofish.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/twofish.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/tx.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/tx.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/tx.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/tx.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/version.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/version.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/xtea.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/xtea.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libavutil/xtea.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libavutil/xtea.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libpostproc/postprocess.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libpostproc/postprocess.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libpostproc/postprocess.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libpostproc/postprocess.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libpostproc/version.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libpostproc/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libpostproc/version.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libpostproc/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libswresample/swresample.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libswresample/swresample.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libswresample/swresample.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libswresample/swresample.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libswresample/version.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libswresample/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libswresample/version.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libswresample/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libswscale/swscale.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libswscale/swscale.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libswscale/swscale.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libswscale/swscale.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/libswscale/version.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/libswscale/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/libswscale/version.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/libswscale/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/mfx/mfxdefs.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/mfx/mfxdefs.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/mfx/mfxdefs.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/mfx/mfxdefs.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/mfx/mfxjpeg.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/mfx/mfxjpeg.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/mfx/mfxjpeg.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/mfx/mfxjpeg.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/mfx/mfxmvc.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/mfx/mfxmvc.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/mfx/mfxmvc.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/mfx/mfxmvc.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/mfx/mfxplugin++.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/mfx/mfxplugin++.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/mfx/mfxplugin++.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/mfx/mfxplugin++.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/mfx/mfxplugin.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/mfx/mfxplugin.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/mfx/mfxplugin.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/mfx/mfxplugin.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/mfx/mfxstructures.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/mfx/mfxstructures.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/mfx/mfxstructures.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/mfx/mfxstructures.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/mfx/mfxvideo++.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/mfx/mfxvideo++.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/mfx/mfxvideo++.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/mfx/mfxvideo++.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include/mfx/mfxvideo.h b/video/playffmpeg/ffmpeg/ffmpeg4/include/mfx/mfxvideo.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include/mfx/mfxvideo.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include/mfx/mfxvideo.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/ac3_parser.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/ac3_parser.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/ac3_parser.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/ac3_parser.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/adts_parser.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/adts_parser.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/adts_parser.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/adts_parser.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/avcodec.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/avcodec.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/avcodec.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/avcodec.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/avdct.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/avdct.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/avdct.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/avdct.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/avfft.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/avfft.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/avfft.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/avfft.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/d3d11va.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/d3d11va.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/d3d11va.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/d3d11va.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/dirac.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/dirac.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/dirac.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/dirac.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/dv_profile.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/dv_profile.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/dv_profile.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/dv_profile.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/dxva2.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/dxva2.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/dxva2.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/dxva2.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/jni.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/jni.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/jni.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/jni.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/mediacodec.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/mediacodec.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/mediacodec.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/mediacodec.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/qsv.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/qsv.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/qsv.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/qsv.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/vaapi.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/vaapi.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/vaapi.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/vaapi.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/vdpau.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/vdpau.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/vdpau.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/vdpau.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/version.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/version.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/videotoolbox.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/videotoolbox.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/videotoolbox.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/videotoolbox.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/vorbis_parser.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/vorbis_parser.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/vorbis_parser.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/vorbis_parser.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/xvmc.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/xvmc.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavcodec/xvmc.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavcodec/xvmc.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavdevice/avdevice.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavdevice/avdevice.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavdevice/avdevice.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavdevice/avdevice.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavdevice/version.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavdevice/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavdevice/version.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavdevice/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavfilter/avfilter.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavfilter/avfilter.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavfilter/avfilter.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavfilter/avfilter.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavfilter/buffersink.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavfilter/buffersink.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavfilter/buffersink.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavfilter/buffersink.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavfilter/buffersrc.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavfilter/buffersrc.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavfilter/buffersrc.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavfilter/buffersrc.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavfilter/version.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavfilter/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavfilter/version.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavfilter/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavformat/avformat.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavformat/avformat.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavformat/avformat.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavformat/avformat.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavformat/avio.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavformat/avio.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavformat/avio.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavformat/avio.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavformat/version.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavformat/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavformat/version.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavformat/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/adler32.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/adler32.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/adler32.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/adler32.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/aes.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/aes.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/aes.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/aes.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/aes_ctr.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/aes_ctr.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/aes_ctr.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/aes_ctr.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/attributes.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/attributes.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/attributes.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/attributes.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/audio_fifo.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/audio_fifo.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/audio_fifo.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/audio_fifo.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/avassert.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/avassert.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/avassert.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/avassert.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/avconfig.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/avconfig.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/avconfig.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/avconfig.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/avstring.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/avstring.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/avstring.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/avstring.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/avutil.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/avutil.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/avutil.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/avutil.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/base64.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/base64.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/base64.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/base64.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/blowfish.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/blowfish.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/blowfish.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/blowfish.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/bprint.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/bprint.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/bprint.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/bprint.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/bswap.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/bswap.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/bswap.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/bswap.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/buffer.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/buffer.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/buffer.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/buffer.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/camellia.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/camellia.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/camellia.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/camellia.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/cast5.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/cast5.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/cast5.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/cast5.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/channel_layout.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/channel_layout.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/channel_layout.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/channel_layout.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/common.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/common.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/common.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/common.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/cpu.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/cpu.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/cpu.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/cpu.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/crc.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/crc.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/crc.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/crc.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/des.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/des.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/des.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/des.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/dict.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/dict.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/dict.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/dict.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/display.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/display.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/display.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/display.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/downmix_info.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/downmix_info.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/downmix_info.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/downmix_info.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/encryption_info.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/encryption_info.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/encryption_info.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/encryption_info.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/error.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/error.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/error.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/error.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/eval.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/eval.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/eval.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/eval.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/ffversion.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/ffversion.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/ffversion.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/ffversion.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/fifo.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/fifo.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/fifo.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/fifo.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/file.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/file.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/file.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/file.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/frame.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/frame.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/frame.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/frame.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hash.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hash.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hash.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hash.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hdr_dynamic_metadata.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hdr_dynamic_metadata.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hdr_dynamic_metadata.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hdr_dynamic_metadata.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hmac.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hmac.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hmac.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hmac.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hwcontext.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hwcontext.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hwcontext.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hwcontext.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_cuda.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_cuda.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_cuda.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_cuda.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_d3d11va.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_d3d11va.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_d3d11va.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_d3d11va.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_drm.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_drm.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_drm.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_drm.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_dxva2.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_dxva2.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_dxva2.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_dxva2.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_mediacodec.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_mediacodec.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_mediacodec.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_mediacodec.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_qsv.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_qsv.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_qsv.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_qsv.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_vaapi.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_vaapi.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_vaapi.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_vaapi.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_vdpau.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_vdpau.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_vdpau.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_vdpau.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_videotoolbox.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_videotoolbox.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_videotoolbox.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/hwcontext_videotoolbox.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/imgutils.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/imgutils.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/imgutils.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/imgutils.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/intfloat.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/intfloat.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/intfloat.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/intfloat.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/intreadwrite.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/intreadwrite.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/intreadwrite.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/intreadwrite.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/lfg.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/lfg.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/lfg.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/lfg.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/log.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/log.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/log.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/log.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/lzo.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/lzo.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/lzo.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/lzo.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/macros.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/macros.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/macros.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/macros.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/mastering_display_metadata.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/mastering_display_metadata.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/mastering_display_metadata.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/mastering_display_metadata.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/mathematics.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/mathematics.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/mathematics.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/mathematics.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/md5.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/md5.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/md5.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/md5.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/mem.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/mem.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/mem.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/mem.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/motion_vector.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/motion_vector.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/motion_vector.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/motion_vector.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/murmur3.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/murmur3.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/murmur3.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/murmur3.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/opt.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/opt.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/opt.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/opt.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/parseutils.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/parseutils.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/parseutils.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/parseutils.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/pixdesc.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/pixdesc.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/pixdesc.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/pixdesc.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/pixelutils.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/pixelutils.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/pixelutils.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/pixelutils.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/pixfmt.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/pixfmt.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/pixfmt.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/pixfmt.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/random_seed.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/random_seed.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/random_seed.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/random_seed.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/rational.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/rational.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/rational.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/rational.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/rc4.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/rc4.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/rc4.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/rc4.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/replaygain.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/replaygain.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/replaygain.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/replaygain.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/ripemd.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/ripemd.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/ripemd.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/ripemd.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/samplefmt.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/samplefmt.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/samplefmt.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/samplefmt.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/sha.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/sha.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/sha.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/sha.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/sha512.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/sha512.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/sha512.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/sha512.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/spherical.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/spherical.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/spherical.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/spherical.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/stereo3d.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/stereo3d.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/stereo3d.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/stereo3d.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/tea.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/tea.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/tea.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/tea.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/threadmessage.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/threadmessage.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/threadmessage.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/threadmessage.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/time.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/time.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/time.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/time.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/timecode.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/timecode.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/timecode.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/timecode.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/timestamp.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/timestamp.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/timestamp.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/timestamp.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/tree.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/tree.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/tree.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/tree.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/twofish.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/twofish.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/twofish.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/twofish.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/tx.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/tx.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/tx.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/tx.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/version.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/version.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/xtea.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/xtea.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libavutil/xtea.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libavutil/xtea.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libpostproc/postprocess.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libpostproc/postprocess.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libpostproc/postprocess.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libpostproc/postprocess.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libpostproc/version.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libpostproc/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libpostproc/version.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libpostproc/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libswresample/swresample.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libswresample/swresample.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libswresample/swresample.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libswresample/swresample.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libswresample/version.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libswresample/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libswresample/version.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libswresample/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libswscale/swscale.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libswscale/swscale.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libswscale/swscale.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libswscale/swscale.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/libswscale/version.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/libswscale/version.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/libswscale/version.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/libswscale/version.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/mfx/mfxdefs.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/mfx/mfxdefs.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/mfx/mfxdefs.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/mfx/mfxdefs.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/mfx/mfxjpeg.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/mfx/mfxjpeg.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/mfx/mfxjpeg.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/mfx/mfxjpeg.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/mfx/mfxmvc.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/mfx/mfxmvc.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/mfx/mfxmvc.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/mfx/mfxmvc.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/mfx/mfxplugin++.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/mfx/mfxplugin++.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/mfx/mfxplugin++.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/mfx/mfxplugin++.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/mfx/mfxplugin.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/mfx/mfxplugin.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/mfx/mfxplugin.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/mfx/mfxplugin.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/mfx/mfxstructures.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/mfx/mfxstructures.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/mfx/mfxstructures.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/mfx/mfxstructures.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/mfx/mfxvideo++.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/mfx/mfxvideo++.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/mfx/mfxvideo++.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/mfx/mfxvideo++.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/include64/mfx/mfxvideo.h b/video/playffmpeg/ffmpeg/ffmpeg4/include64/mfx/mfxvideo.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/include64/mfx/mfxvideo.h rename to video/playffmpeg/ffmpeg/ffmpeg4/include64/mfx/mfxvideo.h diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/winlib/avcodec.lib b/video/playffmpeg/ffmpeg/ffmpeg4/winlib/avcodec.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/winlib/avcodec.lib rename to video/playffmpeg/ffmpeg/ffmpeg4/winlib/avcodec.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/winlib/avdevice.lib b/video/playffmpeg/ffmpeg/ffmpeg4/winlib/avdevice.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/winlib/avdevice.lib rename to video/playffmpeg/ffmpeg/ffmpeg4/winlib/avdevice.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/winlib/avfilter.lib b/video/playffmpeg/ffmpeg/ffmpeg4/winlib/avfilter.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/winlib/avfilter.lib rename to video/playffmpeg/ffmpeg/ffmpeg4/winlib/avfilter.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/winlib/avformat.lib b/video/playffmpeg/ffmpeg/ffmpeg4/winlib/avformat.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/winlib/avformat.lib rename to video/playffmpeg/ffmpeg/ffmpeg4/winlib/avformat.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/winlib/avutil.lib b/video/playffmpeg/ffmpeg/ffmpeg4/winlib/avutil.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/winlib/avutil.lib rename to video/playffmpeg/ffmpeg/ffmpeg4/winlib/avutil.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/winlib/postproc.lib b/video/playffmpeg/ffmpeg/ffmpeg4/winlib/postproc.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/winlib/postproc.lib rename to video/playffmpeg/ffmpeg/ffmpeg4/winlib/postproc.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/winlib/swresample.lib b/video/playffmpeg/ffmpeg/ffmpeg4/winlib/swresample.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/winlib/swresample.lib rename to video/playffmpeg/ffmpeg/ffmpeg4/winlib/swresample.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/winlib/swscale.lib b/video/playffmpeg/ffmpeg/ffmpeg4/winlib/swscale.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/winlib/swscale.lib rename to video/playffmpeg/ffmpeg/ffmpeg4/winlib/swscale.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/winlib64/avcodec.lib b/video/playffmpeg/ffmpeg/ffmpeg4/winlib64/avcodec.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/winlib64/avcodec.lib rename to video/playffmpeg/ffmpeg/ffmpeg4/winlib64/avcodec.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/winlib64/avdevice.lib b/video/playffmpeg/ffmpeg/ffmpeg4/winlib64/avdevice.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/winlib64/avdevice.lib rename to video/playffmpeg/ffmpeg/ffmpeg4/winlib64/avdevice.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/winlib64/avfilter.lib b/video/playffmpeg/ffmpeg/ffmpeg4/winlib64/avfilter.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/winlib64/avfilter.lib rename to video/playffmpeg/ffmpeg/ffmpeg4/winlib64/avfilter.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/winlib64/avformat.lib b/video/playffmpeg/ffmpeg/ffmpeg4/winlib64/avformat.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/winlib64/avformat.lib rename to video/playffmpeg/ffmpeg/ffmpeg4/winlib64/avformat.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/winlib64/avutil.lib b/video/playffmpeg/ffmpeg/ffmpeg4/winlib64/avutil.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/winlib64/avutil.lib rename to video/playffmpeg/ffmpeg/ffmpeg4/winlib64/avutil.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/winlib64/postproc.lib b/video/playffmpeg/ffmpeg/ffmpeg4/winlib64/postproc.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/winlib64/postproc.lib rename to video/playffmpeg/ffmpeg/ffmpeg4/winlib64/postproc.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/winlib64/swresample.lib b/video/playffmpeg/ffmpeg/ffmpeg4/winlib64/swresample.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/winlib64/swresample.lib rename to video/playffmpeg/ffmpeg/ffmpeg4/winlib64/swresample.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeg4/winlib64/swscale.lib b/video/playffmpeg/ffmpeg/ffmpeg4/winlib64/swscale.lib similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeg4/winlib64/swscale.lib rename to video/playffmpeg/ffmpeg/ffmpeg4/winlib64/swscale.lib diff --git a/ffmpegdemo/ffmpeg/ffmpeghead.h b/video/playffmpeg/ffmpeg/ffmpeghead.h similarity index 100% rename from ffmpegdemo/ffmpeg/ffmpeghead.h rename to video/playffmpeg/ffmpeg/ffmpeghead.h diff --git a/ffmpegdemo/main.cpp b/video/playffmpeg/main.cpp similarity index 100% rename from ffmpegdemo/main.cpp rename to video/playffmpeg/main.cpp diff --git a/ffmpegdemo/ffmpegdemo.pro b/video/playffmpeg/playffmpeg.pro similarity index 75% rename from ffmpegdemo/ffmpegdemo.pro rename to video/playffmpeg/playffmpeg.pro index 6de5265..558bc65 100644 --- a/ffmpegdemo/ffmpegdemo.pro +++ b/video/playffmpeg/playffmpeg.pro @@ -3,12 +3,8 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat android {QT += androidextras} -TARGET = ffmpegdemo +TARGET = playffmpeg TEMPLATE = app -MOC_DIR = temp/moc -RCC_DIR = temp/rcc -UI_DIR = temp/ui -OBJECTS_DIR = temp/obj DESTDIR = $$PWD/../bin SOURCES += main.cpp widget.cpp diff --git a/ffmpegdemo/readme.md b/video/playffmpeg/readme.md similarity index 100% rename from ffmpegdemo/readme.md rename to video/playffmpeg/readme.md diff --git a/ffmpegdemo/widget.cpp b/video/playffmpeg/widget.cpp similarity index 89% rename from ffmpegdemo/widget.cpp rename to video/playffmpeg/widget.cpp index b75255f..7f0e1ef 100644 --- a/ffmpegdemo/widget.cpp +++ b/video/playffmpeg/widget.cpp @@ -7,6 +7,7 @@ Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget) ui->setupUi(this); QStringList urls; + urls << "https://hls01open.ys7.com/openlive/6e0b2be040a943489ef0b9bb344b96b8.hd.m3u8"; urls << "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov"; urls << "rtsp://admin:Admin123456@192.168.0.64:554/Streaming/Channels/102?transportmode=unicast&profile=Profile_2"; urls << "rtsp://192.168.1.108:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif"; @@ -15,7 +16,7 @@ Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget) urls << "rtsp://192.168.1.247:554/av0_0"; urls << "rtsp://192.168.1.247:554/av0_1"; ui->cboxUrl->addItems(urls); - ui->cboxUrl->setCurrentIndex(1); + ui->cboxUrl->setCurrentIndex(0); } Widget::~Widget() diff --git a/ffmpegdemo/widget.h b/video/playffmpeg/widget.h similarity index 100% rename from ffmpegdemo/widget.h rename to video/playffmpeg/widget.h diff --git a/ffmpegdemo/widget.ui b/video/playffmpeg/widget.ui similarity index 100% rename from ffmpegdemo/widget.ui rename to video/playffmpeg/widget.ui diff --git a/mpvdemo/main.cpp b/video/plaympv/main.cpp similarity index 100% rename from mpvdemo/main.cpp rename to video/plaympv/main.cpp diff --git a/mpvdemo/mpv/include/client.h b/video/plaympv/mpv/include/client.h similarity index 100% rename from mpvdemo/mpv/include/client.h rename to video/plaympv/mpv/include/client.h diff --git a/mpvdemo/mpv/include/opengl_cb.h b/video/plaympv/mpv/include/opengl_cb.h similarity index 100% rename from mpvdemo/mpv/include/opengl_cb.h rename to video/plaympv/mpv/include/opengl_cb.h diff --git a/mpvdemo/mpv/include/render.h b/video/plaympv/mpv/include/render.h similarity index 100% rename from mpvdemo/mpv/include/render.h rename to video/plaympv/mpv/include/render.h diff --git a/mpvdemo/mpv/include/render_gl.h b/video/plaympv/mpv/include/render_gl.h similarity index 100% rename from mpvdemo/mpv/include/render_gl.h rename to video/plaympv/mpv/include/render_gl.h diff --git a/mpvdemo/mpv/include/stream_cb.h b/video/plaympv/mpv/include/stream_cb.h similarity index 100% rename from mpvdemo/mpv/include/stream_cb.h rename to video/plaympv/mpv/include/stream_cb.h diff --git a/mpvdemo/mpv/include64/client.h b/video/plaympv/mpv/include64/client.h similarity index 100% rename from mpvdemo/mpv/include64/client.h rename to video/plaympv/mpv/include64/client.h diff --git a/mpvdemo/mpv/include64/opengl_cb.h b/video/plaympv/mpv/include64/opengl_cb.h similarity index 100% rename from mpvdemo/mpv/include64/opengl_cb.h rename to video/plaympv/mpv/include64/opengl_cb.h diff --git a/mpvdemo/mpv/include64/render.h b/video/plaympv/mpv/include64/render.h similarity index 100% rename from mpvdemo/mpv/include64/render.h rename to video/plaympv/mpv/include64/render.h diff --git a/mpvdemo/mpv/include64/render_gl.h b/video/plaympv/mpv/include64/render_gl.h similarity index 100% rename from mpvdemo/mpv/include64/render_gl.h rename to video/plaympv/mpv/include64/render_gl.h diff --git a/mpvdemo/mpv/include64/stream_cb.h b/video/plaympv/mpv/include64/stream_cb.h similarity index 100% rename from mpvdemo/mpv/include64/stream_cb.h rename to video/plaympv/mpv/include64/stream_cb.h diff --git a/mpvdemo/mpv/mpv.cpp b/video/plaympv/mpv/mpv.cpp similarity index 100% rename from mpvdemo/mpv/mpv.cpp rename to video/plaympv/mpv/mpv.cpp diff --git a/mpvdemo/mpv/mpv.h b/video/plaympv/mpv/mpv.h similarity index 100% rename from mpvdemo/mpv/mpv.h rename to video/plaympv/mpv/mpv.h diff --git a/mpvdemo/mpv/mpv.pri b/video/plaympv/mpv/mpv.pri similarity index 100% rename from mpvdemo/mpv/mpv.pri rename to video/plaympv/mpv/mpv.pri diff --git a/mpvdemo/mpv/mpvhead.h b/video/plaympv/mpv/mpvhead.h similarity index 100% rename from mpvdemo/mpv/mpvhead.h rename to video/plaympv/mpv/mpvhead.h diff --git a/mpvdemo/mpv/mpvtool.h b/video/plaympv/mpv/mpvtool.h similarity index 100% rename from mpvdemo/mpv/mpvtool.h rename to video/plaympv/mpv/mpvtool.h diff --git a/mpvdemo/mpv/winlib/libmpv.lib b/video/plaympv/mpv/winlib/libmpv.lib similarity index 100% rename from mpvdemo/mpv/winlib/libmpv.lib rename to video/plaympv/mpv/winlib/libmpv.lib diff --git a/mpvdemo/mpv/winlib64/libmpv.lib b/video/plaympv/mpv/winlib64/libmpv.lib similarity index 100% rename from mpvdemo/mpv/winlib64/libmpv.lib rename to video/plaympv/mpv/winlib64/libmpv.lib diff --git a/mpvdemo/mpvdemo.pro b/video/plaympv/plaympv.pro similarity index 74% rename from mpvdemo/mpvdemo.pro rename to video/plaympv/plaympv.pro index 527f3f5..f4540bb 100644 --- a/mpvdemo/mpvdemo.pro +++ b/video/plaympv/plaympv.pro @@ -2,12 +2,8 @@ QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat -TARGET = mpvdemo +TARGET = plaympv TEMPLATE = app -MOC_DIR = temp/moc -RCC_DIR = temp/rcc -UI_DIR = temp/ui -OBJECTS_DIR = temp/obj DESTDIR = $$PWD/../bin SOURCES += main.cpp widget.cpp diff --git a/mpvdemo/readme.md b/video/plaympv/readme.md similarity index 100% rename from mpvdemo/readme.md rename to video/plaympv/readme.md diff --git a/mpvdemo/widget.cpp b/video/plaympv/widget.cpp similarity index 89% rename from mpvdemo/widget.cpp rename to video/plaympv/widget.cpp index de3dd74..7d31ed7 100644 --- a/mpvdemo/widget.cpp +++ b/video/plaympv/widget.cpp @@ -7,6 +7,7 @@ Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget) ui->setupUi(this); QStringList urls; + urls << "https://hls01open.ys7.com/openlive/6e0b2be040a943489ef0b9bb344b96b8.hd.m3u8"; urls << "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov"; urls << "rtsp://admin:Admin123456@192.168.1.64:554/Streaming/Channels/102?transportmode=unicast&profile=Profile_2"; urls << "rtsp://192.168.1.108:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif"; @@ -15,7 +16,7 @@ Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget) urls << "rtsp://192.168.1.247:554/av0_0"; urls << "rtsp://192.168.1.247:554/av0_1"; ui->cboxUrl->addItems(urls); - ui->cboxUrl->setCurrentIndex(5); + ui->cboxUrl->setCurrentIndex(0); } Widget::~Widget() diff --git a/mpvdemo/widget.h b/video/plaympv/widget.h similarity index 100% rename from mpvdemo/widget.h rename to video/plaympv/widget.h diff --git a/mpvdemo/widget.ui b/video/plaympv/widget.ui similarity index 100% rename from mpvdemo/widget.ui rename to video/plaympv/widget.ui diff --git a/vlcdemo/main.cpp b/video/playvlc/main.cpp similarity index 100% rename from vlcdemo/main.cpp rename to video/playvlc/main.cpp diff --git a/vlcdemo/vlcdemo.pro b/video/playvlc/playvlc.pro similarity index 74% rename from vlcdemo/vlcdemo.pro rename to video/playvlc/playvlc.pro index bab6540..ac470e4 100644 --- a/vlcdemo/vlcdemo.pro +++ b/video/playvlc/playvlc.pro @@ -2,12 +2,8 @@ QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat -TARGET = vlcdemo +TARGET = playvlc TEMPLATE = app -MOC_DIR = temp/moc -RCC_DIR = temp/rcc -UI_DIR = temp/ui -OBJECTS_DIR = temp/obj DESTDIR = $$PWD/../bin SOURCES += main.cpp widget.cpp diff --git a/vlcdemo/readme.md b/video/playvlc/readme.md similarity index 100% rename from vlcdemo/readme.md rename to video/playvlc/readme.md diff --git a/vlcdemo/vlc/vlc.cpp b/video/playvlc/vlc/vlc.cpp similarity index 100% rename from vlcdemo/vlc/vlc.cpp rename to video/playvlc/vlc/vlc.cpp diff --git a/vlcdemo/vlc/vlc.h b/video/playvlc/vlc/vlc.h similarity index 100% rename from vlcdemo/vlc/vlc.h rename to video/playvlc/vlc/vlc.h diff --git a/vlcdemo/vlc/vlc.pri b/video/playvlc/vlc/vlc.pri similarity index 100% rename from vlcdemo/vlc/vlc.pri rename to video/playvlc/vlc/vlc.pri diff --git a/vlcdemo/vlc/vlc2/include/deprecated.h b/video/playvlc/vlc/vlc2/include/deprecated.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/deprecated.h rename to video/playvlc/vlc/vlc2/include/deprecated.h diff --git a/vlcdemo/vlc/vlc2/include/libvlc.h b/video/playvlc/vlc/vlc2/include/libvlc.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/libvlc.h rename to video/playvlc/vlc/vlc2/include/libvlc.h diff --git a/vlcdemo/vlc/vlc2/include/libvlc_events.h b/video/playvlc/vlc/vlc2/include/libvlc_events.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/libvlc_events.h rename to video/playvlc/vlc/vlc2/include/libvlc_events.h diff --git a/vlcdemo/vlc/vlc2/include/libvlc_media.h b/video/playvlc/vlc/vlc2/include/libvlc_media.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/libvlc_media.h rename to video/playvlc/vlc/vlc2/include/libvlc_media.h diff --git a/vlcdemo/vlc/vlc2/include/libvlc_media_discoverer.h b/video/playvlc/vlc/vlc2/include/libvlc_media_discoverer.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/libvlc_media_discoverer.h rename to video/playvlc/vlc/vlc2/include/libvlc_media_discoverer.h diff --git a/vlcdemo/vlc/vlc2/include/libvlc_media_library.h b/video/playvlc/vlc/vlc2/include/libvlc_media_library.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/libvlc_media_library.h rename to video/playvlc/vlc/vlc2/include/libvlc_media_library.h diff --git a/vlcdemo/vlc/vlc2/include/libvlc_media_list.h b/video/playvlc/vlc/vlc2/include/libvlc_media_list.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/libvlc_media_list.h rename to video/playvlc/vlc/vlc2/include/libvlc_media_list.h diff --git a/vlcdemo/vlc/vlc2/include/libvlc_media_list_player.h b/video/playvlc/vlc/vlc2/include/libvlc_media_list_player.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/libvlc_media_list_player.h rename to video/playvlc/vlc/vlc2/include/libvlc_media_list_player.h diff --git a/vlcdemo/vlc/vlc2/include/libvlc_media_player.h b/video/playvlc/vlc/vlc2/include/libvlc_media_player.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/libvlc_media_player.h rename to video/playvlc/vlc/vlc2/include/libvlc_media_player.h diff --git a/vlcdemo/vlc/vlc2/include/libvlc_structures.h b/video/playvlc/vlc/vlc2/include/libvlc_structures.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/libvlc_structures.h rename to video/playvlc/vlc/vlc2/include/libvlc_structures.h diff --git a/vlcdemo/vlc/vlc2/include/libvlc_version.h b/video/playvlc/vlc/vlc2/include/libvlc_version.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/libvlc_version.h rename to video/playvlc/vlc/vlc2/include/libvlc_version.h diff --git a/vlcdemo/vlc/vlc2/include/libvlc_vlm.h b/video/playvlc/vlc/vlc2/include/libvlc_vlm.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/libvlc_vlm.h rename to video/playvlc/vlc/vlc2/include/libvlc_vlm.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_about.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_about.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_about.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_about.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_access.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_access.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_access.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_access.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_addons.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_addons.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_addons.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_addons.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_aout.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_aout.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_aout.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_aout.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_aout_volume.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_aout_volume.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_aout_volume.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_aout_volume.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_arrays.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_arrays.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_arrays.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_arrays.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_atomic.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_atomic.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_atomic.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_atomic.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_avcodec.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_avcodec.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_avcodec.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_avcodec.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_bits.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_bits.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_bits.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_bits.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_block.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_block.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_block.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_block.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_block_helper.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_block_helper.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_block_helper.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_block_helper.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_charset.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_charset.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_charset.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_charset.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_codec.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_codec.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_codec.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_codec.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_common.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_common.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_common.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_common.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_config.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_config.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_config.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_config.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_config_cat.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_config_cat.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_config_cat.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_config_cat.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_configuration.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_configuration.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_configuration.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_configuration.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_cpu.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_cpu.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_cpu.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_cpu.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_demux.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_demux.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_demux.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_demux.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_dialog.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_dialog.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_dialog.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_dialog.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_epg.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_epg.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_epg.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_epg.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_es.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_es.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_es.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_es.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_es_out.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_es_out.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_es_out.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_es_out.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_events.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_events.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_events.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_events.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_filter.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_filter.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_filter.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_filter.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_fingerprinter.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_fingerprinter.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_fingerprinter.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_fingerprinter.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_fourcc.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_fourcc.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_fourcc.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_fourcc.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_fs.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_fs.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_fs.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_fs.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_gcrypt.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_gcrypt.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_gcrypt.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_gcrypt.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_http.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_http.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_http.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_http.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_httpd.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_httpd.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_httpd.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_httpd.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_image.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_image.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_image.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_image.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_inhibit.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_inhibit.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_inhibit.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_inhibit.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_input.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_input.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_input.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_input.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_input_item.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_input_item.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_input_item.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_input_item.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_keys.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_keys.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_keys.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_keys.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_main.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_main.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_main.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_main.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_md5.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_md5.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_md5.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_md5.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_media_library.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_media_library.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_media_library.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_media_library.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_messages.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_messages.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_messages.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_messages.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_meta.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_meta.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_meta.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_meta.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_meta_fetcher.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_meta_fetcher.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_meta_fetcher.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_meta_fetcher.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_mime.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_mime.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_mime.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_mime.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_modules.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_modules.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_modules.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_modules.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_mouse.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_mouse.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_mouse.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_mouse.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_mtime.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_mtime.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_mtime.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_mtime.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_network.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_network.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_network.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_network.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_objects.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_objects.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_objects.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_objects.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_opengl.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_opengl.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_opengl.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_opengl.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_picture.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_picture.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_picture.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_picture.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_picture_fifo.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_picture_fifo.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_picture_fifo.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_picture_fifo.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_picture_pool.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_picture_pool.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_picture_pool.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_picture_pool.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_playlist.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_playlist.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_playlist.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_playlist.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_plugin.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_plugin.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_plugin.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_plugin.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_probe.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_probe.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_probe.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_probe.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_rand.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_rand.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_rand.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_rand.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_services_discovery.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_services_discovery.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_services_discovery.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_services_discovery.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_sout.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_sout.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_sout.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_sout.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_spu.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_spu.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_spu.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_spu.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_stream.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_stream.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_stream.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_stream.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_strings.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_strings.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_strings.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_strings.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_subpicture.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_subpicture.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_subpicture.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_subpicture.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_text_style.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_text_style.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_text_style.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_text_style.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_threads.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_threads.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_threads.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_threads.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_tls.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_tls.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_tls.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_tls.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_url.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_url.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_url.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_url.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_variables.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_variables.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_variables.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_variables.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_video_splitter.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_video_splitter.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_video_splitter.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_video_splitter.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_vlm.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_vlm.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_vlm.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_vlm.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_vout.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_vout.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_vout.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_vout.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_vout_display.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_vout_display.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_vout_display.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_vout_display.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_vout_osd.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_vout_osd.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_vout_osd.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_vout_osd.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_vout_window.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_vout_window.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_vout_window.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_vout_window.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_xlib.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_xlib.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_xlib.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_xlib.h diff --git a/vlcdemo/vlc/vlc2/include/plugins/vlc_xml.h b/video/playvlc/vlc/vlc2/include/plugins/vlc_xml.h similarity index 100% rename from vlcdemo/vlc/vlc2/include/plugins/vlc_xml.h rename to video/playvlc/vlc/vlc2/include/plugins/vlc_xml.h diff --git a/vlcdemo/vlc/vlc2/include64/deprecated.h b/video/playvlc/vlc/vlc2/include64/deprecated.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/deprecated.h rename to video/playvlc/vlc/vlc2/include64/deprecated.h diff --git a/vlcdemo/vlc/vlc2/include64/libvlc.h b/video/playvlc/vlc/vlc2/include64/libvlc.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/libvlc.h rename to video/playvlc/vlc/vlc2/include64/libvlc.h diff --git a/vlcdemo/vlc/vlc2/include64/libvlc_events.h b/video/playvlc/vlc/vlc2/include64/libvlc_events.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/libvlc_events.h rename to video/playvlc/vlc/vlc2/include64/libvlc_events.h diff --git a/vlcdemo/vlc/vlc2/include64/libvlc_media.h b/video/playvlc/vlc/vlc2/include64/libvlc_media.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/libvlc_media.h rename to video/playvlc/vlc/vlc2/include64/libvlc_media.h diff --git a/vlcdemo/vlc/vlc2/include64/libvlc_media_discoverer.h b/video/playvlc/vlc/vlc2/include64/libvlc_media_discoverer.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/libvlc_media_discoverer.h rename to video/playvlc/vlc/vlc2/include64/libvlc_media_discoverer.h diff --git a/vlcdemo/vlc/vlc2/include64/libvlc_media_library.h b/video/playvlc/vlc/vlc2/include64/libvlc_media_library.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/libvlc_media_library.h rename to video/playvlc/vlc/vlc2/include64/libvlc_media_library.h diff --git a/vlcdemo/vlc/vlc2/include64/libvlc_media_list.h b/video/playvlc/vlc/vlc2/include64/libvlc_media_list.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/libvlc_media_list.h rename to video/playvlc/vlc/vlc2/include64/libvlc_media_list.h diff --git a/vlcdemo/vlc/vlc2/include64/libvlc_media_list_player.h b/video/playvlc/vlc/vlc2/include64/libvlc_media_list_player.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/libvlc_media_list_player.h rename to video/playvlc/vlc/vlc2/include64/libvlc_media_list_player.h diff --git a/vlcdemo/vlc/vlc2/include64/libvlc_media_player.h b/video/playvlc/vlc/vlc2/include64/libvlc_media_player.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/libvlc_media_player.h rename to video/playvlc/vlc/vlc2/include64/libvlc_media_player.h diff --git a/vlcdemo/vlc/vlc2/include64/libvlc_structures.h b/video/playvlc/vlc/vlc2/include64/libvlc_structures.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/libvlc_structures.h rename to video/playvlc/vlc/vlc2/include64/libvlc_structures.h diff --git a/vlcdemo/vlc/vlc2/include64/libvlc_version.h b/video/playvlc/vlc/vlc2/include64/libvlc_version.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/libvlc_version.h rename to video/playvlc/vlc/vlc2/include64/libvlc_version.h diff --git a/vlcdemo/vlc/vlc2/include64/libvlc_vlm.h b/video/playvlc/vlc/vlc2/include64/libvlc_vlm.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/libvlc_vlm.h rename to video/playvlc/vlc/vlc2/include64/libvlc_vlm.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_about.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_about.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_about.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_about.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_access.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_access.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_access.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_access.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_addons.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_addons.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_addons.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_addons.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_aout.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_aout.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_aout.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_aout.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_aout_volume.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_aout_volume.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_aout_volume.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_aout_volume.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_arrays.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_arrays.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_arrays.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_arrays.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_atomic.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_atomic.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_atomic.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_atomic.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_avcodec.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_avcodec.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_avcodec.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_avcodec.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_bits.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_bits.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_bits.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_bits.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_block.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_block.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_block.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_block.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_block_helper.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_block_helper.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_block_helper.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_block_helper.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_charset.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_charset.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_charset.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_charset.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_codec.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_codec.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_codec.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_codec.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_common.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_common.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_common.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_common.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_config.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_config.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_config.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_config.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_config_cat.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_config_cat.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_config_cat.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_config_cat.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_configuration.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_configuration.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_configuration.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_configuration.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_cpu.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_cpu.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_cpu.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_cpu.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_demux.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_demux.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_demux.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_demux.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_dialog.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_dialog.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_dialog.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_dialog.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_epg.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_epg.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_epg.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_epg.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_es.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_es.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_es.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_es.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_es_out.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_es_out.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_es_out.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_es_out.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_events.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_events.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_events.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_events.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_filter.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_filter.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_filter.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_filter.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_fingerprinter.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_fingerprinter.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_fingerprinter.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_fingerprinter.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_fourcc.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_fourcc.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_fourcc.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_fourcc.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_fs.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_fs.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_fs.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_fs.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_gcrypt.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_gcrypt.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_gcrypt.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_gcrypt.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_http.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_http.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_http.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_http.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_httpd.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_httpd.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_httpd.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_httpd.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_image.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_image.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_image.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_image.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_inhibit.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_inhibit.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_inhibit.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_inhibit.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_input.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_input.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_input.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_input.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_input_item.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_input_item.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_input_item.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_input_item.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_keys.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_keys.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_keys.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_keys.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_main.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_main.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_main.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_main.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_md5.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_md5.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_md5.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_md5.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_media_library.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_media_library.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_media_library.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_media_library.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_messages.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_messages.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_messages.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_messages.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_meta.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_meta.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_meta.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_meta.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_meta_fetcher.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_meta_fetcher.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_meta_fetcher.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_meta_fetcher.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_mime.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_mime.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_mime.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_mime.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_modules.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_modules.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_modules.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_modules.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_mouse.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_mouse.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_mouse.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_mouse.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_mtime.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_mtime.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_mtime.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_mtime.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_network.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_network.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_network.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_network.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_objects.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_objects.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_objects.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_objects.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_opengl.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_opengl.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_opengl.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_opengl.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_picture.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_picture.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_picture.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_picture.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_picture_fifo.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_picture_fifo.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_picture_fifo.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_picture_fifo.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_picture_pool.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_picture_pool.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_picture_pool.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_picture_pool.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_playlist.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_playlist.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_playlist.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_playlist.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_plugin.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_plugin.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_plugin.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_plugin.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_probe.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_probe.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_probe.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_probe.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_rand.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_rand.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_rand.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_rand.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_services_discovery.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_services_discovery.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_services_discovery.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_services_discovery.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_sout.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_sout.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_sout.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_sout.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_spu.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_spu.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_spu.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_spu.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_stream.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_stream.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_stream.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_stream.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_strings.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_strings.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_strings.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_strings.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_subpicture.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_subpicture.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_subpicture.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_subpicture.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_text_style.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_text_style.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_text_style.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_text_style.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_threads.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_threads.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_threads.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_threads.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_tls.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_tls.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_tls.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_tls.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_url.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_url.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_url.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_url.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_variables.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_variables.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_variables.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_variables.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_video_splitter.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_video_splitter.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_video_splitter.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_video_splitter.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_vlm.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_vlm.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_vlm.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_vlm.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_vout.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_vout.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_vout.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_vout.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_vout_display.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_vout_display.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_vout_display.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_vout_display.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_vout_osd.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_vout_osd.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_vout_osd.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_vout_osd.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_vout_window.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_vout_window.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_vout_window.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_vout_window.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_xlib.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_xlib.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_xlib.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_xlib.h diff --git a/vlcdemo/vlc/vlc2/include64/plugins/vlc_xml.h b/video/playvlc/vlc/vlc2/include64/plugins/vlc_xml.h similarity index 100% rename from vlcdemo/vlc/vlc2/include64/plugins/vlc_xml.h rename to video/playvlc/vlc/vlc2/include64/plugins/vlc_xml.h diff --git a/vlcdemo/vlc/vlc2/winlib/libvlc.lib b/video/playvlc/vlc/vlc2/winlib/libvlc.lib similarity index 100% rename from vlcdemo/vlc/vlc2/winlib/libvlc.lib rename to video/playvlc/vlc/vlc2/winlib/libvlc.lib diff --git a/vlcdemo/vlc/vlc2/winlib/libvlccore.lib b/video/playvlc/vlc/vlc2/winlib/libvlccore.lib similarity index 100% rename from vlcdemo/vlc/vlc2/winlib/libvlccore.lib rename to video/playvlc/vlc/vlc2/winlib/libvlccore.lib diff --git a/vlcdemo/vlc/vlc2/winlib64/libvlc.lib b/video/playvlc/vlc/vlc2/winlib64/libvlc.lib similarity index 100% rename from vlcdemo/vlc/vlc2/winlib64/libvlc.lib rename to video/playvlc/vlc/vlc2/winlib64/libvlc.lib diff --git a/vlcdemo/vlc/vlc2/winlib64/libvlccore.lib b/video/playvlc/vlc/vlc2/winlib64/libvlccore.lib similarity index 100% rename from vlcdemo/vlc/vlc2/winlib64/libvlccore.lib rename to video/playvlc/vlc/vlc2/winlib64/libvlccore.lib diff --git a/vlcdemo/vlc/vlc3/include/deprecated.h b/video/playvlc/vlc/vlc3/include/deprecated.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/deprecated.h rename to video/playvlc/vlc/vlc3/include/deprecated.h diff --git a/vlcdemo/vlc/vlc3/include/libvlc.h b/video/playvlc/vlc/vlc3/include/libvlc.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/libvlc.h rename to video/playvlc/vlc/vlc3/include/libvlc.h diff --git a/vlcdemo/vlc/vlc3/include/libvlc_dialog.h b/video/playvlc/vlc/vlc3/include/libvlc_dialog.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/libvlc_dialog.h rename to video/playvlc/vlc/vlc3/include/libvlc_dialog.h diff --git a/vlcdemo/vlc/vlc3/include/libvlc_events.h b/video/playvlc/vlc/vlc3/include/libvlc_events.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/libvlc_events.h rename to video/playvlc/vlc/vlc3/include/libvlc_events.h diff --git a/vlcdemo/vlc/vlc3/include/libvlc_media.h b/video/playvlc/vlc/vlc3/include/libvlc_media.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/libvlc_media.h rename to video/playvlc/vlc/vlc3/include/libvlc_media.h diff --git a/vlcdemo/vlc/vlc3/include/libvlc_media_discoverer.h b/video/playvlc/vlc/vlc3/include/libvlc_media_discoverer.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/libvlc_media_discoverer.h rename to video/playvlc/vlc/vlc3/include/libvlc_media_discoverer.h diff --git a/vlcdemo/vlc/vlc3/include/libvlc_media_library.h b/video/playvlc/vlc/vlc3/include/libvlc_media_library.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/libvlc_media_library.h rename to video/playvlc/vlc/vlc3/include/libvlc_media_library.h diff --git a/vlcdemo/vlc/vlc3/include/libvlc_media_list.h b/video/playvlc/vlc/vlc3/include/libvlc_media_list.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/libvlc_media_list.h rename to video/playvlc/vlc/vlc3/include/libvlc_media_list.h diff --git a/vlcdemo/vlc/vlc3/include/libvlc_media_list_player.h b/video/playvlc/vlc/vlc3/include/libvlc_media_list_player.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/libvlc_media_list_player.h rename to video/playvlc/vlc/vlc3/include/libvlc_media_list_player.h diff --git a/vlcdemo/vlc/vlc3/include/libvlc_media_player.h b/video/playvlc/vlc/vlc3/include/libvlc_media_player.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/libvlc_media_player.h rename to video/playvlc/vlc/vlc3/include/libvlc_media_player.h diff --git a/vlcdemo/vlc/vlc3/include/libvlc_renderer_discoverer.h b/video/playvlc/vlc/vlc3/include/libvlc_renderer_discoverer.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/libvlc_renderer_discoverer.h rename to video/playvlc/vlc/vlc3/include/libvlc_renderer_discoverer.h diff --git a/vlcdemo/vlc/vlc3/include/libvlc_version.h b/video/playvlc/vlc/vlc3/include/libvlc_version.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/libvlc_version.h rename to video/playvlc/vlc/vlc3/include/libvlc_version.h diff --git a/vlcdemo/vlc/vlc3/include/libvlc_vlm.h b/video/playvlc/vlc/vlc3/include/libvlc_vlm.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/libvlc_vlm.h rename to video/playvlc/vlc/vlc3/include/libvlc_vlm.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_about.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_about.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_about.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_about.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_access.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_access.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_access.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_access.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_actions.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_actions.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_actions.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_actions.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_addons.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_addons.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_addons.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_addons.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_aout.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_aout.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_aout.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_aout.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_aout_volume.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_aout_volume.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_aout_volume.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_aout_volume.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_arrays.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_arrays.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_arrays.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_arrays.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_atomic.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_atomic.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_atomic.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_atomic.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_avcodec.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_avcodec.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_avcodec.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_avcodec.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_bits.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_bits.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_bits.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_bits.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_block.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_block.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_block.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_block.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_block_helper.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_block_helper.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_block_helper.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_block_helper.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_boxes.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_boxes.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_boxes.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_boxes.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_charset.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_charset.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_charset.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_charset.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_codec.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_codec.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_codec.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_codec.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_common.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_common.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_common.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_common.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_config.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_config.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_config.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_config.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_config_cat.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_config_cat.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_config_cat.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_config_cat.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_configuration.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_configuration.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_configuration.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_configuration.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_cpu.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_cpu.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_cpu.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_cpu.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_demux.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_demux.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_demux.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_demux.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_dialog.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_dialog.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_dialog.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_dialog.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_epg.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_epg.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_epg.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_epg.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_es.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_es.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_es.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_es.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_es_out.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_es_out.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_es_out.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_es_out.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_events.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_events.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_events.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_events.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_filter.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_filter.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_filter.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_filter.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_fingerprinter.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_fingerprinter.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_fingerprinter.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_fingerprinter.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_fourcc.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_fourcc.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_fourcc.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_fourcc.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_fs.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_fs.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_fs.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_fs.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_gcrypt.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_gcrypt.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_gcrypt.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_gcrypt.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_http.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_http.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_http.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_http.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_httpd.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_httpd.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_httpd.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_httpd.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_image.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_image.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_image.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_image.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_inhibit.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_inhibit.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_inhibit.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_inhibit.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_input.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_input.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_input.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_input.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_input_item.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_input_item.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_input_item.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_input_item.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_interface.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_interface.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_interface.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_interface.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_interrupt.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_interrupt.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_interrupt.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_interrupt.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_keystore.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_keystore.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_keystore.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_keystore.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_main.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_main.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_main.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_main.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_md5.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_md5.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_md5.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_md5.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_media_library.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_media_library.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_media_library.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_media_library.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_memstream.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_memstream.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_memstream.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_memstream.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_messages.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_messages.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_messages.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_messages.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_meta.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_meta.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_meta.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_meta.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_meta_fetcher.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_meta_fetcher.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_meta_fetcher.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_meta_fetcher.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_mime.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_mime.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_mime.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_mime.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_modules.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_modules.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_modules.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_modules.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_mouse.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_mouse.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_mouse.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_mouse.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_mtime.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_mtime.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_mtime.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_mtime.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_network.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_network.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_network.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_network.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_objects.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_objects.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_objects.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_objects.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_opengl.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_opengl.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_opengl.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_opengl.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_picture.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_picture.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_picture.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_picture.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_picture_fifo.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_picture_fifo.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_picture_fifo.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_picture_fifo.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_picture_pool.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_picture_pool.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_picture_pool.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_picture_pool.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_playlist.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_playlist.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_playlist.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_playlist.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_plugin.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_plugin.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_plugin.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_plugin.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_probe.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_probe.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_probe.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_probe.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_rand.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_rand.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_rand.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_rand.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_renderer_discovery.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_renderer_discovery.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_renderer_discovery.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_renderer_discovery.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_services_discovery.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_services_discovery.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_services_discovery.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_services_discovery.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_sout.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_sout.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_sout.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_sout.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_spu.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_spu.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_spu.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_spu.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_stream.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_stream.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_stream.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_stream.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_stream_extractor.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_stream_extractor.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_stream_extractor.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_stream_extractor.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_strings.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_strings.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_strings.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_strings.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_subpicture.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_subpicture.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_subpicture.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_subpicture.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_text_style.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_text_style.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_text_style.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_text_style.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_threads.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_threads.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_threads.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_threads.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_timestamp_helper.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_timestamp_helper.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_timestamp_helper.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_timestamp_helper.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_tls.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_tls.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_tls.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_tls.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_url.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_url.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_url.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_url.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_variables.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_variables.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_variables.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_variables.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_video_splitter.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_video_splitter.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_video_splitter.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_video_splitter.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_viewpoint.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_viewpoint.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_viewpoint.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_viewpoint.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_vlm.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_vlm.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_vlm.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_vlm.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_vout.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_vout.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_vout.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_vout.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_vout_display.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_vout_display.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_vout_display.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_vout_display.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_vout_osd.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_vout_osd.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_vout_osd.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_vout_osd.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_vout_window.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_vout_window.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_vout_window.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_vout_window.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_xlib.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_xlib.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_xlib.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_xlib.h diff --git a/vlcdemo/vlc/vlc3/include/plugins/vlc_xml.h b/video/playvlc/vlc/vlc3/include/plugins/vlc_xml.h similarity index 100% rename from vlcdemo/vlc/vlc3/include/plugins/vlc_xml.h rename to video/playvlc/vlc/vlc3/include/plugins/vlc_xml.h diff --git a/vlcdemo/vlc/vlc3/include64/deprecated.h b/video/playvlc/vlc/vlc3/include64/deprecated.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/deprecated.h rename to video/playvlc/vlc/vlc3/include64/deprecated.h diff --git a/vlcdemo/vlc/vlc3/include64/libvlc.h b/video/playvlc/vlc/vlc3/include64/libvlc.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/libvlc.h rename to video/playvlc/vlc/vlc3/include64/libvlc.h diff --git a/vlcdemo/vlc/vlc3/include64/libvlc_dialog.h b/video/playvlc/vlc/vlc3/include64/libvlc_dialog.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/libvlc_dialog.h rename to video/playvlc/vlc/vlc3/include64/libvlc_dialog.h diff --git a/vlcdemo/vlc/vlc3/include64/libvlc_events.h b/video/playvlc/vlc/vlc3/include64/libvlc_events.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/libvlc_events.h rename to video/playvlc/vlc/vlc3/include64/libvlc_events.h diff --git a/vlcdemo/vlc/vlc3/include64/libvlc_media.h b/video/playvlc/vlc/vlc3/include64/libvlc_media.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/libvlc_media.h rename to video/playvlc/vlc/vlc3/include64/libvlc_media.h diff --git a/vlcdemo/vlc/vlc3/include64/libvlc_media_discoverer.h b/video/playvlc/vlc/vlc3/include64/libvlc_media_discoverer.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/libvlc_media_discoverer.h rename to video/playvlc/vlc/vlc3/include64/libvlc_media_discoverer.h diff --git a/vlcdemo/vlc/vlc3/include64/libvlc_media_library.h b/video/playvlc/vlc/vlc3/include64/libvlc_media_library.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/libvlc_media_library.h rename to video/playvlc/vlc/vlc3/include64/libvlc_media_library.h diff --git a/vlcdemo/vlc/vlc3/include64/libvlc_media_list.h b/video/playvlc/vlc/vlc3/include64/libvlc_media_list.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/libvlc_media_list.h rename to video/playvlc/vlc/vlc3/include64/libvlc_media_list.h diff --git a/vlcdemo/vlc/vlc3/include64/libvlc_media_list_player.h b/video/playvlc/vlc/vlc3/include64/libvlc_media_list_player.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/libvlc_media_list_player.h rename to video/playvlc/vlc/vlc3/include64/libvlc_media_list_player.h diff --git a/vlcdemo/vlc/vlc3/include64/libvlc_media_player.h b/video/playvlc/vlc/vlc3/include64/libvlc_media_player.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/libvlc_media_player.h rename to video/playvlc/vlc/vlc3/include64/libvlc_media_player.h diff --git a/vlcdemo/vlc/vlc3/include64/libvlc_renderer_discoverer.h b/video/playvlc/vlc/vlc3/include64/libvlc_renderer_discoverer.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/libvlc_renderer_discoverer.h rename to video/playvlc/vlc/vlc3/include64/libvlc_renderer_discoverer.h diff --git a/vlcdemo/vlc/vlc3/include64/libvlc_version.h b/video/playvlc/vlc/vlc3/include64/libvlc_version.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/libvlc_version.h rename to video/playvlc/vlc/vlc3/include64/libvlc_version.h diff --git a/vlcdemo/vlc/vlc3/include64/libvlc_vlm.h b/video/playvlc/vlc/vlc3/include64/libvlc_vlm.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/libvlc_vlm.h rename to video/playvlc/vlc/vlc3/include64/libvlc_vlm.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_about.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_about.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_about.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_about.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_access.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_access.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_access.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_access.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_actions.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_actions.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_actions.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_actions.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_addons.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_addons.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_addons.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_addons.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_aout.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_aout.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_aout.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_aout.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_aout_volume.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_aout_volume.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_aout_volume.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_aout_volume.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_arrays.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_arrays.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_arrays.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_arrays.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_atomic.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_atomic.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_atomic.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_atomic.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_avcodec.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_avcodec.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_avcodec.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_avcodec.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_bits.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_bits.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_bits.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_bits.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_block.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_block.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_block.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_block.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_block_helper.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_block_helper.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_block_helper.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_block_helper.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_boxes.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_boxes.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_boxes.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_boxes.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_charset.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_charset.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_charset.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_charset.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_codec.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_codec.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_codec.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_codec.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_common.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_common.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_common.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_common.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_config.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_config.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_config.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_config.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_config_cat.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_config_cat.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_config_cat.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_config_cat.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_configuration.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_configuration.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_configuration.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_configuration.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_cpu.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_cpu.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_cpu.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_cpu.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_demux.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_demux.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_demux.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_demux.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_dialog.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_dialog.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_dialog.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_dialog.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_epg.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_epg.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_epg.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_epg.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_es.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_es.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_es.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_es.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_es_out.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_es_out.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_es_out.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_es_out.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_events.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_events.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_events.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_events.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_filter.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_filter.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_filter.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_filter.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_fingerprinter.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_fingerprinter.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_fingerprinter.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_fingerprinter.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_fourcc.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_fourcc.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_fourcc.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_fourcc.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_fs.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_fs.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_fs.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_fs.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_gcrypt.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_gcrypt.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_gcrypt.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_gcrypt.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_http.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_http.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_http.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_http.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_httpd.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_httpd.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_httpd.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_httpd.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_image.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_image.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_image.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_image.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_inhibit.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_inhibit.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_inhibit.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_inhibit.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_input.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_input.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_input.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_input.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_input_item.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_input_item.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_input_item.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_input_item.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_interface.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_interface.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_interface.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_interface.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_interrupt.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_interrupt.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_interrupt.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_interrupt.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_keystore.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_keystore.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_keystore.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_keystore.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_main.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_main.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_main.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_main.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_md5.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_md5.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_md5.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_md5.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_media_library.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_media_library.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_media_library.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_media_library.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_memstream.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_memstream.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_memstream.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_memstream.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_messages.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_messages.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_messages.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_messages.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_meta.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_meta.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_meta.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_meta.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_meta_fetcher.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_meta_fetcher.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_meta_fetcher.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_meta_fetcher.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_mime.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_mime.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_mime.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_mime.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_modules.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_modules.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_modules.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_modules.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_mouse.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_mouse.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_mouse.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_mouse.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_mtime.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_mtime.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_mtime.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_mtime.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_network.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_network.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_network.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_network.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_objects.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_objects.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_objects.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_objects.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_opengl.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_opengl.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_opengl.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_opengl.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_picture.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_picture.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_picture.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_picture.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_picture_fifo.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_picture_fifo.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_picture_fifo.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_picture_fifo.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_picture_pool.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_picture_pool.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_picture_pool.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_picture_pool.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_playlist.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_playlist.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_playlist.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_playlist.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_plugin.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_plugin.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_plugin.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_plugin.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_probe.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_probe.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_probe.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_probe.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_rand.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_rand.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_rand.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_rand.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_renderer_discovery.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_renderer_discovery.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_renderer_discovery.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_renderer_discovery.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_services_discovery.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_services_discovery.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_services_discovery.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_services_discovery.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_sout.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_sout.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_sout.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_sout.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_spu.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_spu.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_spu.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_spu.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_stream.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_stream.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_stream.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_stream.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_stream_extractor.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_stream_extractor.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_stream_extractor.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_stream_extractor.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_strings.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_strings.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_strings.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_strings.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_subpicture.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_subpicture.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_subpicture.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_subpicture.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_text_style.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_text_style.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_text_style.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_text_style.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_threads.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_threads.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_threads.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_threads.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_timestamp_helper.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_timestamp_helper.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_timestamp_helper.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_timestamp_helper.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_tls.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_tls.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_tls.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_tls.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_url.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_url.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_url.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_url.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_variables.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_variables.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_variables.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_variables.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_video_splitter.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_video_splitter.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_video_splitter.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_video_splitter.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_viewpoint.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_viewpoint.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_viewpoint.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_viewpoint.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_vlm.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_vlm.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_vlm.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_vlm.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_vout.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_vout.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_vout.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_vout.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_vout_display.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_vout_display.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_vout_display.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_vout_display.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_vout_osd.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_vout_osd.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_vout_osd.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_vout_osd.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_vout_window.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_vout_window.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_vout_window.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_vout_window.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_xlib.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_xlib.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_xlib.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_xlib.h diff --git a/vlcdemo/vlc/vlc3/include64/plugins/vlc_xml.h b/video/playvlc/vlc/vlc3/include64/plugins/vlc_xml.h similarity index 100% rename from vlcdemo/vlc/vlc3/include64/plugins/vlc_xml.h rename to video/playvlc/vlc/vlc3/include64/plugins/vlc_xml.h diff --git a/vlcdemo/vlc/vlc3/winlib/libvlc.lib b/video/playvlc/vlc/vlc3/winlib/libvlc.lib similarity index 100% rename from vlcdemo/vlc/vlc3/winlib/libvlc.lib rename to video/playvlc/vlc/vlc3/winlib/libvlc.lib diff --git a/vlcdemo/vlc/vlc3/winlib/libvlccore.lib b/video/playvlc/vlc/vlc3/winlib/libvlccore.lib similarity index 100% rename from vlcdemo/vlc/vlc3/winlib/libvlccore.lib rename to video/playvlc/vlc/vlc3/winlib/libvlccore.lib diff --git a/vlcdemo/vlc/vlc3/winlib64/libvlc.lib b/video/playvlc/vlc/vlc3/winlib64/libvlc.lib similarity index 100% rename from vlcdemo/vlc/vlc3/winlib64/libvlc.lib rename to video/playvlc/vlc/vlc3/winlib64/libvlc.lib diff --git a/vlcdemo/vlc/vlc3/winlib64/libvlccore.lib b/video/playvlc/vlc/vlc3/winlib64/libvlccore.lib similarity index 100% rename from vlcdemo/vlc/vlc3/winlib64/libvlccore.lib rename to video/playvlc/vlc/vlc3/winlib64/libvlccore.lib diff --git a/vlcdemo/vlc/vlchead.h b/video/playvlc/vlc/vlchead.h similarity index 100% rename from vlcdemo/vlc/vlchead.h rename to video/playvlc/vlc/vlchead.h diff --git a/vlcdemo/widget.cpp b/video/playvlc/widget.cpp similarity index 89% rename from vlcdemo/widget.cpp rename to video/playvlc/widget.cpp index de3dd74..7d31ed7 100644 --- a/vlcdemo/widget.cpp +++ b/video/playvlc/widget.cpp @@ -7,6 +7,7 @@ Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget) ui->setupUi(this); QStringList urls; + urls << "https://hls01open.ys7.com/openlive/6e0b2be040a943489ef0b9bb344b96b8.hd.m3u8"; urls << "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov"; urls << "rtsp://admin:Admin123456@192.168.1.64:554/Streaming/Channels/102?transportmode=unicast&profile=Profile_2"; urls << "rtsp://192.168.1.108:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif"; @@ -15,7 +16,7 @@ Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget) urls << "rtsp://192.168.1.247:554/av0_0"; urls << "rtsp://192.168.1.247:554/av0_1"; ui->cboxUrl->addItems(urls); - ui->cboxUrl->setCurrentIndex(5); + ui->cboxUrl->setCurrentIndex(0); } Widget::~Widget() diff --git a/vlcdemo/widget.h b/video/playvlc/widget.h similarity index 100% rename from vlcdemo/widget.h rename to video/playvlc/widget.h diff --git a/vlcdemo/widget.ui b/video/playvlc/widget.ui similarity index 100% rename from vlcdemo/widget.ui rename to video/playvlc/widget.ui diff --git a/video/video.pro b/video/video.pro new file mode 100644 index 0000000..6a23bc8 --- /dev/null +++ b/video/video.pro @@ -0,0 +1,10 @@ +TEMPLATE = subdirs +SUBDIRS += videobox +SUBDIRS += videopanel +SUBDIRS += videowidget + +win32 { +SUBDIRS += playffmpeg +SUBDIRS += playvlc +SUBDIRS += plaympv +} diff --git a/videobox/frmvideobox.cpp b/video/videobox/frmvideobox.cpp similarity index 100% rename from videobox/frmvideobox.cpp rename to video/videobox/frmvideobox.cpp diff --git a/videobox/frmvideobox.h b/video/videobox/frmvideobox.h similarity index 100% rename from videobox/frmvideobox.h rename to video/videobox/frmvideobox.h diff --git a/videobox/frmvideobox.ui b/video/videobox/frmvideobox.ui similarity index 100% rename from videobox/frmvideobox.ui rename to video/videobox/frmvideobox.ui diff --git a/videobox/main.cpp b/video/videobox/main.cpp similarity index 100% rename from videobox/main.cpp rename to video/videobox/main.cpp diff --git a/videobox/videobox.cpp b/video/videobox/videobox.cpp similarity index 100% rename from videobox/videobox.cpp rename to video/videobox/videobox.cpp diff --git a/videobox/videobox.h b/video/videobox/videobox.h similarity index 100% rename from videobox/videobox.h rename to video/videobox/videobox.h diff --git a/videobox/videobox.pro b/video/videobox/videobox.pro similarity index 100% rename from videobox/videobox.pro rename to video/videobox/videobox.pro diff --git a/videopanel/frmvideopanel.cpp b/video/videopanel/frmvideopanel.cpp similarity index 100% rename from videopanel/frmvideopanel.cpp rename to video/videopanel/frmvideopanel.cpp diff --git a/videopanel/frmvideopanel.h b/video/videopanel/frmvideopanel.h similarity index 100% rename from videopanel/frmvideopanel.h rename to video/videopanel/frmvideopanel.h diff --git a/videopanel/frmvideopanel.ui b/video/videopanel/frmvideopanel.ui similarity index 100% rename from videopanel/frmvideopanel.ui rename to video/videopanel/frmvideopanel.ui diff --git a/videopanel/main.cpp b/video/videopanel/main.cpp similarity index 100% rename from videopanel/main.cpp rename to video/videopanel/main.cpp diff --git a/videopanel/videobox.cpp b/video/videopanel/videobox.cpp similarity index 100% rename from videopanel/videobox.cpp rename to video/videopanel/videobox.cpp diff --git a/videopanel/videobox.h b/video/videopanel/videobox.h similarity index 100% rename from videopanel/videobox.h rename to video/videopanel/videobox.h diff --git a/videopanel/videopanel.cpp b/video/videopanel/videopanel.cpp similarity index 100% rename from videopanel/videopanel.cpp rename to video/videopanel/videopanel.cpp diff --git a/videopanel/videopanel.h b/video/videopanel/videopanel.h similarity index 100% rename from videopanel/videopanel.h rename to video/videopanel/videopanel.h diff --git a/videopanel/videopanel.pro b/video/videopanel/videopanel.pro similarity index 100% rename from videopanel/videopanel.pro rename to video/videopanel/videopanel.pro diff --git a/videowidget/font/iconfont.ttf b/video/videowidget/font/iconfont.ttf similarity index 100% rename from videowidget/font/iconfont.ttf rename to video/videowidget/font/iconfont.ttf diff --git a/videowidget/frmvideowidget.cpp b/video/videowidget/frmvideowidget.cpp similarity index 100% rename from videowidget/frmvideowidget.cpp rename to video/videowidget/frmvideowidget.cpp diff --git a/videowidget/frmvideowidget.h b/video/videowidget/frmvideowidget.h similarity index 100% rename from videowidget/frmvideowidget.h rename to video/videowidget/frmvideowidget.h diff --git a/videowidget/frmvideowidget.ui b/video/videowidget/frmvideowidget.ui similarity index 100% rename from videowidget/frmvideowidget.ui rename to video/videowidget/frmvideowidget.ui diff --git a/videowidget/main.cpp b/video/videowidget/main.cpp similarity index 100% rename from videowidget/main.cpp rename to video/videowidget/main.cpp diff --git a/videowidget/main.qrc b/video/videowidget/main.qrc similarity index 100% rename from videowidget/main.qrc rename to video/videowidget/main.qrc diff --git a/videowidget/videowidget.cpp b/video/videowidget/videowidget.cpp similarity index 100% rename from videowidget/videowidget.cpp rename to video/videowidget/videowidget.cpp diff --git a/videowidget/videowidget.h b/video/videowidget/videowidget.h similarity index 100% rename from videowidget/videowidget.h rename to video/videowidget/videowidget.h diff --git a/videowidget/videowidget.pro b/video/videowidget/videowidget.pro similarity index 100% rename from videowidget/videowidget.pro rename to video/videowidget/videowidget.pro diff --git a/widget/0snap/colorwidget.jpg b/widget/0snap/colorwidget.jpg new file mode 100644 index 0000000..eb79f43 Binary files /dev/null and b/widget/0snap/colorwidget.jpg differ diff --git a/widget/0snap/framelesswidget.jpg b/widget/0snap/framelesswidget.jpg new file mode 100644 index 0000000..0fc185f Binary files /dev/null and b/widget/0snap/framelesswidget.jpg differ diff --git a/widget/0snap/gifwidget.jpg b/widget/0snap/gifwidget.jpg new file mode 100644 index 0000000..4fe6ca8 Binary files /dev/null and b/widget/0snap/gifwidget.jpg differ diff --git a/widget/0snap/lunarcalendarwidget.jpg b/widget/0snap/lunarcalendarwidget.jpg new file mode 100644 index 0000000..ed5bfdf Binary files /dev/null and b/widget/0snap/lunarcalendarwidget.jpg differ diff --git a/widget/0snap/maskwidget.jpg b/widget/0snap/maskwidget.jpg new file mode 100644 index 0000000..10615a6 Binary files /dev/null and b/widget/0snap/maskwidget.jpg differ diff --git a/widget/0snap/movewidget.jpg b/widget/0snap/movewidget.jpg new file mode 100644 index 0000000..79668b7 Binary files /dev/null and b/widget/0snap/movewidget.jpg differ diff --git a/widget/0snap/screenwidget.jpg b/widget/0snap/screenwidget.jpg new file mode 100644 index 0000000..087ebc3 Binary files /dev/null and b/widget/0snap/screenwidget.jpg differ diff --git a/colorwidget/colorwidget.cpp b/widget/colorwidget/colorwidget.cpp similarity index 100% rename from colorwidget/colorwidget.cpp rename to widget/colorwidget/colorwidget.cpp diff --git a/colorwidget/colorwidget.h b/widget/colorwidget/colorwidget.h similarity index 100% rename from colorwidget/colorwidget.h rename to widget/colorwidget/colorwidget.h diff --git a/colorwidget/colorwidget.pro b/widget/colorwidget/colorwidget.pro similarity index 100% rename from colorwidget/colorwidget.pro rename to widget/colorwidget/colorwidget.pro diff --git a/colorwidget/frmcolorwidget.cpp b/widget/colorwidget/frmcolorwidget.cpp similarity index 100% rename from colorwidget/frmcolorwidget.cpp rename to widget/colorwidget/frmcolorwidget.cpp diff --git a/colorwidget/frmcolorwidget.h b/widget/colorwidget/frmcolorwidget.h similarity index 100% rename from colorwidget/frmcolorwidget.h rename to widget/colorwidget/frmcolorwidget.h diff --git a/colorwidget/frmcolorwidget.ui b/widget/colorwidget/frmcolorwidget.ui similarity index 100% rename from colorwidget/frmcolorwidget.ui rename to widget/colorwidget/frmcolorwidget.ui diff --git a/colorwidget/main.cpp b/widget/colorwidget/main.cpp similarity index 100% rename from colorwidget/main.cpp rename to widget/colorwidget/main.cpp diff --git a/framelesswidget/framelesscore/framelesscore.pri b/widget/framelesswidget/framelesscore/framelesscore.pri similarity index 100% rename from framelesswidget/framelesscore/framelesscore.pri rename to widget/framelesswidget/framelesscore/framelesscore.pri diff --git a/framelesswidget/framelesscore/framelessdialog.cpp b/widget/framelesswidget/framelesscore/framelessdialog.cpp similarity index 100% rename from framelesswidget/framelesscore/framelessdialog.cpp rename to widget/framelesswidget/framelesscore/framelessdialog.cpp diff --git a/framelesswidget/framelesscore/framelessdialog.h b/widget/framelesswidget/framelesscore/framelessdialog.h similarity index 100% rename from framelesswidget/framelesscore/framelessdialog.h rename to widget/framelesswidget/framelesscore/framelessdialog.h diff --git a/framelesswidget/framelesscore/framelessmainwindow.cpp b/widget/framelesswidget/framelesscore/framelessmainwindow.cpp similarity index 100% rename from framelesswidget/framelesscore/framelessmainwindow.cpp rename to widget/framelesswidget/framelesscore/framelessmainwindow.cpp diff --git a/framelesswidget/framelesscore/framelessmainwindow.h b/widget/framelesswidget/framelesscore/framelessmainwindow.h similarity index 100% rename from framelesswidget/framelesscore/framelessmainwindow.h rename to widget/framelesswidget/framelesscore/framelessmainwindow.h diff --git a/framelesswidget/framelesscore/framelesswidget.cpp b/widget/framelesswidget/framelesscore/framelesswidget.cpp similarity index 100% rename from framelesswidget/framelesscore/framelesswidget.cpp rename to widget/framelesswidget/framelesscore/framelesswidget.cpp diff --git a/framelesswidget/framelesscore/framelesswidget.h b/widget/framelesswidget/framelesscore/framelesswidget.h similarity index 100% rename from framelesswidget/framelesscore/framelesswidget.h rename to widget/framelesswidget/framelesscore/framelesswidget.h diff --git a/framelesswidget/framelessform/dialog.cpp b/widget/framelesswidget/framelessform/dialog.cpp similarity index 100% rename from framelesswidget/framelessform/dialog.cpp rename to widget/framelesswidget/framelessform/dialog.cpp diff --git a/framelesswidget/framelessform/dialog.h b/widget/framelesswidget/framelessform/dialog.h similarity index 100% rename from framelesswidget/framelessform/dialog.h rename to widget/framelesswidget/framelessform/dialog.h diff --git a/framelesswidget/framelessform/dialog.ui b/widget/framelesswidget/framelessform/dialog.ui similarity index 100% rename from framelesswidget/framelessform/dialog.ui rename to widget/framelesswidget/framelessform/dialog.ui diff --git a/framelesswidget/framelessform/framelessform.pri b/widget/framelesswidget/framelessform/framelessform.pri similarity index 100% rename from framelesswidget/framelessform/framelessform.pri rename to widget/framelesswidget/framelessform/framelessform.pri diff --git a/framelesswidget/framelessform/mainwindow.cpp b/widget/framelesswidget/framelessform/mainwindow.cpp similarity index 100% rename from framelesswidget/framelessform/mainwindow.cpp rename to widget/framelesswidget/framelessform/mainwindow.cpp diff --git a/framelesswidget/framelessform/mainwindow.h b/widget/framelesswidget/framelessform/mainwindow.h similarity index 100% rename from framelesswidget/framelessform/mainwindow.h rename to widget/framelesswidget/framelessform/mainwindow.h diff --git a/framelesswidget/framelessform/mainwindow.ui b/widget/framelesswidget/framelessform/mainwindow.ui similarity index 100% rename from framelesswidget/framelessform/mainwindow.ui rename to widget/framelesswidget/framelessform/mainwindow.ui diff --git a/framelesswidget/framelessform/widget.cpp b/widget/framelesswidget/framelessform/widget.cpp similarity index 100% rename from framelesswidget/framelessform/widget.cpp rename to widget/framelesswidget/framelessform/widget.cpp diff --git a/framelesswidget/framelessform/widget.h b/widget/framelesswidget/framelessform/widget.h similarity index 100% rename from framelesswidget/framelessform/widget.h rename to widget/framelesswidget/framelessform/widget.h diff --git a/framelesswidget/framelessform/widget.ui b/widget/framelesswidget/framelessform/widget.ui similarity index 100% rename from framelesswidget/framelessform/widget.ui rename to widget/framelesswidget/framelessform/widget.ui diff --git a/framelesswidget/framelesswidget.pro b/widget/framelesswidget/framelesswidget.pro similarity index 100% rename from framelesswidget/framelesswidget.pro rename to widget/framelesswidget/framelesswidget.pro diff --git a/framelesswidget/framelesswidget2.cpp b/widget/framelesswidget/framelesswidget2.cpp similarity index 100% rename from framelesswidget/framelesswidget2.cpp rename to widget/framelesswidget/framelesswidget2.cpp diff --git a/framelesswidget/framelesswidget2.h b/widget/framelesswidget/framelesswidget2.h similarity index 100% rename from framelesswidget/framelesswidget2.h rename to widget/framelesswidget/framelesswidget2.h diff --git a/framelesswidget/frmframelesswidget.cpp b/widget/framelesswidget/frmframelesswidget.cpp similarity index 100% rename from framelesswidget/frmframelesswidget.cpp rename to widget/framelesswidget/frmframelesswidget.cpp diff --git a/framelesswidget/frmframelesswidget.h b/widget/framelesswidget/frmframelesswidget.h similarity index 100% rename from framelesswidget/frmframelesswidget.h rename to widget/framelesswidget/frmframelesswidget.h diff --git a/framelesswidget/frmframelesswidget.ui b/widget/framelesswidget/frmframelesswidget.ui similarity index 100% rename from framelesswidget/frmframelesswidget.ui rename to widget/framelesswidget/frmframelesswidget.ui diff --git a/framelesswidget/main.cpp b/widget/framelesswidget/main.cpp similarity index 100% rename from framelesswidget/main.cpp rename to widget/framelesswidget/main.cpp diff --git a/gifwidget/frmgifwidget.cpp b/widget/gifwidget/frmgifwidget.cpp similarity index 100% rename from gifwidget/frmgifwidget.cpp rename to widget/gifwidget/frmgifwidget.cpp diff --git a/gifwidget/frmgifwidget.h b/widget/gifwidget/frmgifwidget.h similarity index 100% rename from gifwidget/frmgifwidget.h rename to widget/gifwidget/frmgifwidget.h diff --git a/gifwidget/frmgifwidget.ui b/widget/gifwidget/frmgifwidget.ui similarity index 100% rename from gifwidget/frmgifwidget.ui rename to widget/gifwidget/frmgifwidget.ui diff --git a/gifwidget/gif.h b/widget/gifwidget/gif.h similarity index 100% rename from gifwidget/gif.h rename to widget/gifwidget/gif.h diff --git a/gifwidget/gifwidget.cpp b/widget/gifwidget/gifwidget.cpp similarity index 96% rename from gifwidget/gifwidget.cpp rename to widget/gifwidget/gifwidget.cpp index 9217551..36bfd39 100644 --- a/gifwidget/gifwidget.cpp +++ b/widget/gifwidget/gifwidget.cpp @@ -1,382 +1,382 @@ -#pragma execution_character_set("utf-8") - -#include "gifwidget.h" -#include "qmutex.h" -#include "qlabel.h" -#include "qlineedit.h" -#include "qpushbutton.h" -#include "qlayout.h" -#include "qpainter.h" -#include "qevent.h" -#include "qstyle.h" -#include "qpixmap.h" -#include "qtimer.h" -#include "qdatetime.h" -#include "qapplication.h" -#include "qdesktopservices.h" -#include "qfiledialog.h" -#include "qurl.h" -#include "qtextcodec.h" -#include "qdebug.h" - -#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) -#include "qscreen.h" -#define deskGeometry qApp->primaryScreen()->geometry() -#define deskGeometry2 qApp->primaryScreen()->availableGeometry() -#else -#include "qdesktopwidget.h" -#define deskGeometry qApp->desktop()->geometry() -#define deskGeometry2 qApp->desktop()->availableGeometry() -#endif - -QScopedPointer GifWidget::self; -GifWidget *GifWidget::Instance() -{ - if (self.isNull()) { - static QMutex mutex; - QMutexLocker locker(&mutex); - if (self.isNull()) { - self.reset(new GifWidget); - } - } - - return self.data(); -} - -GifWidget::GifWidget(QWidget *parent) : QDialog(parent) -{ - this->initControl(); - this->initForm(); -} - -bool GifWidget::eventFilter(QObject *watched, QEvent *event) -{ - static QPoint mousePoint; - static bool mousePressed = false; - - QMouseEvent *mouseEvent = static_cast(event); - if (mouseEvent->type() == QEvent::MouseButtonPress) { - if (mouseEvent->button() == Qt::LeftButton) { - mousePressed = true; - mousePoint = mouseEvent->globalPos() - this->pos(); - return true; - } - } else if (mouseEvent->type() == QEvent::MouseButtonRelease) { - mousePressed = false; - return true; - } else if (mouseEvent->type() == QEvent::MouseMove) { - if (mousePressed) { - this->move(mouseEvent->globalPos() - mousePoint); - return true; - } - } - - return QWidget::eventFilter(watched, event); -} - -void GifWidget::resizeEvent(QResizeEvent *e) -{ - //拉动右下角改变大小自动赋值 - txtWidth->setText(QString::number(widgetMain->width())); - txtHeight->setText(QString::number(widgetMain->height())); - QDialog::resizeEvent(e); -} - -void GifWidget::paintEvent(QPaintEvent *) -{ - int width = txtWidth->text().toInt(); - int height = txtHeight->text().toInt(); - rectGif = QRect(borderWidth, widgetTop->height(), width - (borderWidth * 2), height); - - QPainter painter(this); - painter.setPen(Qt::NoPen); - painter.setBrush(bgColor); - painter.drawRoundedRect(this->rect(), 5, 5); - painter.setCompositionMode(QPainter::CompositionMode_Clear); - painter.fillRect(rectGif, Qt::SolidPattern); -} - -int GifWidget::getBorderWidth() const -{ - return this->borderWidth; -} - -QColor GifWidget::getBgColor() const -{ - return this->bgColor; -} - -void GifWidget::initControl() -{ - this->setObjectName("GifWidget"); - this->resize(800, 600); - this->setSizeGripEnabled(true); - QVBoxLayout *verticalLayout = new QVBoxLayout(this); - verticalLayout->setSpacing(0); - verticalLayout->setContentsMargins(11, 11, 11, 11); - verticalLayout->setObjectName("verticalLayout"); - verticalLayout->setContentsMargins(0, 0, 0, 0); - - widgetTop = new QWidget(this); - widgetTop->setObjectName("widgetTop"); - widgetTop->setMinimumSize(QSize(0, 35)); - widgetTop->setMaximumSize(QSize(16777215, 35)); - - QHBoxLayout *layoutTop = new QHBoxLayout(widgetTop); - layoutTop->setSpacing(0); - layoutTop->setContentsMargins(11, 11, 11, 11); - layoutTop->setObjectName("layoutTop"); - layoutTop->setContentsMargins(0, 0, 0, 0); - - QPushButton *btnIcon = new QPushButton(widgetTop); - btnIcon->setObjectName("btnIcon"); - QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding); - sizePolicy.setHorizontalStretch(0); - sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(btnIcon->sizePolicy().hasHeightForWidth()); - btnIcon->setSizePolicy(sizePolicy); - btnIcon->setMinimumSize(QSize(35, 0)); - btnIcon->setFlat(true); - layoutTop->addWidget(btnIcon); - - QLabel *labTitle = new QLabel(widgetTop); - labTitle->setObjectName("labTitle"); - layoutTop->addWidget(labTitle); - - QSpacerItem *horizontalSpacer = new QSpacerItem(87, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - layoutTop->addItem(horizontalSpacer); - - QPushButton *btnClose = new QPushButton(widgetTop); - btnClose->setObjectName("btnClose"); - sizePolicy.setHeightForWidth(btnClose->sizePolicy().hasHeightForWidth()); - btnClose->setSizePolicy(sizePolicy); - btnClose->setMinimumSize(QSize(35, 0)); - btnClose->setFocusPolicy(Qt::NoFocus); - btnClose->setFlat(true); - layoutTop->addWidget(btnClose); - verticalLayout->addWidget(widgetTop); - - widgetMain = new QWidget(this); - widgetMain->setObjectName("widgetMain"); - QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Expanding); - sizePolicy1.setHorizontalStretch(0); - sizePolicy1.setVerticalStretch(0); - sizePolicy1.setHeightForWidth(widgetMain->sizePolicy().hasHeightForWidth()); - widgetMain->setSizePolicy(sizePolicy1); - verticalLayout->addWidget(widgetMain); - - widgetBottom = new QWidget(this); - widgetBottom->setObjectName("widgetBottom"); - widgetBottom->setMinimumSize(QSize(0, 45)); - widgetBottom->setMaximumSize(QSize(16777215, 45)); - - QHBoxLayout *layoutBottom = new QHBoxLayout(widgetBottom); - layoutBottom->setSpacing(6); - layoutBottom->setContentsMargins(11, 11, 11, 11); - layoutBottom->setObjectName("layoutBottom"); - layoutBottom->setContentsMargins(9, 9, -1, -1); - - QLabel *labFps = new QLabel(widgetBottom); - labFps->setObjectName("labFps"); - layoutBottom->addWidget(labFps); - - txtFps = new QLineEdit(widgetBottom); - txtFps->setObjectName("txtFps"); - txtFps->setMaximumSize(QSize(50, 16777215)); - txtFps->setAlignment(Qt::AlignCenter); - layoutBottom->addWidget(txtFps); - - QLabel *labWidth = new QLabel(widgetBottom); - labWidth->setObjectName("labWidth"); - layoutBottom->addWidget(labWidth); - - txtWidth = new QLineEdit(widgetBottom); - txtWidth->setObjectName("txtWidth"); - txtWidth->setEnabled(true); - txtWidth->setMaximumSize(QSize(50, 16777215)); - txtWidth->setAlignment(Qt::AlignCenter); - layoutBottom->addWidget(txtWidth); - - QLabel *labHeight = new QLabel(widgetBottom); - labHeight->setObjectName("labHeight"); - layoutBottom->addWidget(labHeight); - - txtHeight = new QLineEdit(widgetBottom); - txtHeight->setObjectName("txtHeight"); - txtHeight->setEnabled(true); - txtHeight->setMaximumSize(QSize(50, 16777215)); - txtHeight->setAlignment(Qt::AlignCenter); - layoutBottom->addWidget(txtHeight); - - labStatus = new QLabel(widgetBottom); - labStatus->setObjectName("labStatus"); - QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Preferred); - sizePolicy2.setHorizontalStretch(0); - sizePolicy2.setVerticalStretch(0); - sizePolicy2.setHeightForWidth(labStatus->sizePolicy().hasHeightForWidth()); - labStatus->setSizePolicy(sizePolicy2); - labStatus->setAlignment(Qt::AlignCenter); - layoutBottom->addWidget(labStatus); - - btnStart = new QPushButton(widgetBottom); - btnStart->setObjectName("btnStart"); - sizePolicy.setHeightForWidth(btnStart->sizePolicy().hasHeightForWidth()); - btnStart->setSizePolicy(sizePolicy); - layoutBottom->addWidget(btnStart); - verticalLayout->addWidget(widgetBottom); - - labTitle->setText("GIF录屏工具(QQ:517216493)"); - labFps->setText("帧率"); - labWidth->setText("宽度"); - labHeight->setText("高度"); - btnStart->setText("开始"); - this->setWindowTitle(labTitle->text()); - - btnIcon->setIcon(style()->standardIcon(QStyle::SP_ComputerIcon)); - btnClose->setIcon(style()->standardIcon(QStyle::SP_TitleBarCloseButton)); - - connect(btnClose, SIGNAL(clicked(bool)), this, SLOT(closeAll())); - connect(btnStart, SIGNAL(clicked(bool)), this, SLOT(record())); - connect(txtWidth, SIGNAL(editingFinished()), this, SLOT(resizeForm())); - connect(txtHeight, SIGNAL(editingFinished()), this, SLOT(resizeForm())); -} - -void GifWidget::initForm() -{ - borderWidth = 3; - bgColor = QColor(34, 163, 169); - - fps = 10; - txtFps->setText(QString::number(fps)); - gifWriter = 0; - - timer = new QTimer(this); - timer->setInterval(100); - connect(timer, SIGNAL(timeout()), this, SLOT(saveImage())); - - this->setAttribute(Qt::WA_TranslucentBackground); - this->setWindowFlags(Qt::FramelessWindowHint); - this->installEventFilter(this); - - QStringList qss; - qss.append("QLabel{color:#ffffff;}"); - qss.append("#btnClose,#btnIcon{border:none;border-radius:0px;}"); - qss.append("#btnClose:hover{background-color:#ff0000;}"); - qss.append("#btnClose{border-top-right-radius:5px;}"); - qss.append("#labTitle{font:bold 16px;}"); - qss.append("#labStatus{font:15px;}"); - this->setStyleSheet(qss.join("")); -} - -void GifWidget::saveImage() -{ - if (!gifWriter) { - return; - } - -#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) - QScreen *screen = QApplication::primaryScreen(); - QPixmap pix = screen->grabWindow(0, x() + rectGif.x(), y() + rectGif.y(), rectGif.width(), rectGif.height()); - QImage image = pix.toImage().convertToFormat(QImage::Format_RGBA8888); -#else - //由于qt4没有RGBA8888,采用最接近RGBA8888的是ARGB32,颜色会有点偏差 - QPixmap pix = QPixmap::grabWindow(0, x() + rectGif.x(), y() + rectGif.y(), rectGif.width(), rectGif.height()); - QImage image = pix.toImage().convertToFormat(QImage::Format_ARGB32); -#endif - - gif.GifWriteFrame(gifWriter, image.bits(), rectGif.width(), rectGif.height(), fps); - count++; - labStatus->setText(QString("正在录制 第 %1 帧").arg(count)); -} - -void GifWidget::record() -{ - if (btnStart->text() == "开始") { - if (0 != gifWriter) { - delete gifWriter; - gifWriter = 0; - } - - //先弹出文件保存对话框 - //fileName = qApp->applicationDirPath() + "/" + QDateTime::currentDateTime().toString("yyyy-MM-dd-hh-mm-ss.gif"); - fileName = QFileDialog::getSaveFileName(this, "选择保存位置", qApp->applicationDirPath() + "/", "gif图片(*.gif)"); - if (fileName.isEmpty()) { - return; - } - - int width = txtWidth->text().toInt(); - int height = txtHeight->text().toInt(); - fps = txtFps->text().toInt(); - -#ifdef Q_OS_WIN - //windows上需要先转码 -#if defined(_MSC_VER) && (_MSC_VER >= 1400) - QTextCodec *code = QTextCodec::codecForName("utf-8"); -#else - QTextCodec *code = QTextCodec::codecForName("gbk"); -#endif - const char *name = code->fromUnicode(fileName).constData(); -#else - const char *name = fileName.toUtf8().constData(); -#endif - - gifWriter = new Gif::GifWriter; - bool ok = gif.GifBegin(gifWriter, name, width, height, fps); - if (!ok) { - delete gifWriter; - gifWriter = 0; - return; - } - - count = 0; - labStatus->setText("开始录制..."); - btnStart->setText("停止"); - //延时启动 - timer->setInterval(1000 / fps); - QTimer::singleShot(1000, timer, SLOT(start())); - //saveImage(); - } else { - timer->stop(); - gif.GifEnd(gifWriter); - - delete gifWriter; - gifWriter = 0; - - labStatus->setText(QString("录制完成 共 %1 帧").arg(count)); - btnStart->setText("开始"); - QDesktopServices::openUrl(QUrl::fromLocalFile(fileName)); - } -} - -void GifWidget::closeAll() -{ - if (0 != gifWriter) { - delete gifWriter; - gifWriter = 0; - } - - this->close(); -} - -void GifWidget::resizeForm() -{ - int width = txtWidth->text().toInt(); - int height = txtHeight->text().toInt(); - this->resize(width, height + widgetTop->height() + widgetBottom->height()); -} - -void GifWidget::setBorderWidth(int borderWidth) -{ - if (this->borderWidth != borderWidth) { - this->borderWidth = borderWidth; - this->update(); - } -} - -void GifWidget::setBgColor(const QColor &bgColor) -{ - if (this->bgColor != bgColor) { - this->bgColor = bgColor; - this->update(); - } -} +#pragma execution_character_set("utf-8") + +#include "gifwidget.h" +#include "qmutex.h" +#include "qlabel.h" +#include "qlineedit.h" +#include "qpushbutton.h" +#include "qlayout.h" +#include "qpainter.h" +#include "qevent.h" +#include "qstyle.h" +#include "qpixmap.h" +#include "qtimer.h" +#include "qdatetime.h" +#include "qapplication.h" +#include "qdesktopservices.h" +#include "qfiledialog.h" +#include "qurl.h" +#include "qtextcodec.h" +#include "qdebug.h" + +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) +#include "qscreen.h" +#define deskGeometry qApp->primaryScreen()->geometry() +#define deskGeometry2 qApp->primaryScreen()->availableGeometry() +#else +#include "qdesktopwidget.h" +#define deskGeometry qApp->desktop()->geometry() +#define deskGeometry2 qApp->desktop()->availableGeometry() +#endif + +QScopedPointer GifWidget::self; +GifWidget *GifWidget::Instance() +{ + if (self.isNull()) { + static QMutex mutex; + QMutexLocker locker(&mutex); + if (self.isNull()) { + self.reset(new GifWidget); + } + } + + return self.data(); +} + +GifWidget::GifWidget(QWidget *parent) : QDialog(parent) +{ + this->initControl(); + this->initForm(); +} + +bool GifWidget::eventFilter(QObject *watched, QEvent *event) +{ + static QPoint mousePoint; + static bool mousePressed = false; + + QMouseEvent *mouseEvent = static_cast(event); + if (mouseEvent->type() == QEvent::MouseButtonPress) { + if (mouseEvent->button() == Qt::LeftButton) { + mousePressed = true; + mousePoint = mouseEvent->globalPos() - this->pos(); + return true; + } + } else if (mouseEvent->type() == QEvent::MouseButtonRelease) { + mousePressed = false; + return true; + } else if (mouseEvent->type() == QEvent::MouseMove) { + if (mousePressed) { + this->move(mouseEvent->globalPos() - mousePoint); + return true; + } + } + + return QWidget::eventFilter(watched, event); +} + +void GifWidget::resizeEvent(QResizeEvent *e) +{ + //拉动右下角改变大小自动赋值 + txtWidth->setText(QString::number(widgetMain->width())); + txtHeight->setText(QString::number(widgetMain->height())); + QDialog::resizeEvent(e); +} + +void GifWidget::paintEvent(QPaintEvent *) +{ + int width = txtWidth->text().toInt(); + int height = txtHeight->text().toInt(); + rectGif = QRect(borderWidth, widgetTop->height(), width - (borderWidth * 2), height); + + QPainter painter(this); + painter.setPen(Qt::NoPen); + painter.setBrush(bgColor); + painter.drawRoundedRect(this->rect(), 5, 5); + painter.setCompositionMode(QPainter::CompositionMode_Clear); + painter.fillRect(rectGif, Qt::SolidPattern); +} + +int GifWidget::getBorderWidth() const +{ + return this->borderWidth; +} + +QColor GifWidget::getBgColor() const +{ + return this->bgColor; +} + +void GifWidget::initControl() +{ + this->setObjectName("GifWidget"); + this->resize(800, 600); + this->setSizeGripEnabled(true); + QVBoxLayout *verticalLayout = new QVBoxLayout(this); + verticalLayout->setSpacing(0); + verticalLayout->setContentsMargins(11, 11, 11, 11); + verticalLayout->setObjectName("verticalLayout"); + verticalLayout->setContentsMargins(0, 0, 0, 0); + + widgetTop = new QWidget(this); + widgetTop->setObjectName("widgetTop"); + widgetTop->setMinimumSize(QSize(0, 35)); + widgetTop->setMaximumSize(QSize(16777215, 35)); + + QHBoxLayout *layoutTop = new QHBoxLayout(widgetTop); + layoutTop->setSpacing(0); + layoutTop->setContentsMargins(11, 11, 11, 11); + layoutTop->setObjectName("layoutTop"); + layoutTop->setContentsMargins(0, 0, 0, 0); + + QPushButton *btnIcon = new QPushButton(widgetTop); + btnIcon->setObjectName("btnIcon"); + QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(btnIcon->sizePolicy().hasHeightForWidth()); + btnIcon->setSizePolicy(sizePolicy); + btnIcon->setMinimumSize(QSize(35, 0)); + btnIcon->setFlat(true); + layoutTop->addWidget(btnIcon); + + QLabel *labTitle = new QLabel(widgetTop); + labTitle->setObjectName("labTitle"); + layoutTop->addWidget(labTitle); + + QSpacerItem *horizontalSpacer = new QSpacerItem(87, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + layoutTop->addItem(horizontalSpacer); + + QPushButton *btnClose = new QPushButton(widgetTop); + btnClose->setObjectName("btnClose"); + sizePolicy.setHeightForWidth(btnClose->sizePolicy().hasHeightForWidth()); + btnClose->setSizePolicy(sizePolicy); + btnClose->setMinimumSize(QSize(35, 0)); + btnClose->setFocusPolicy(Qt::NoFocus); + btnClose->setFlat(true); + layoutTop->addWidget(btnClose); + verticalLayout->addWidget(widgetTop); + + widgetMain = new QWidget(this); + widgetMain->setObjectName("widgetMain"); + QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Expanding); + sizePolicy1.setHorizontalStretch(0); + sizePolicy1.setVerticalStretch(0); + sizePolicy1.setHeightForWidth(widgetMain->sizePolicy().hasHeightForWidth()); + widgetMain->setSizePolicy(sizePolicy1); + verticalLayout->addWidget(widgetMain); + + widgetBottom = new QWidget(this); + widgetBottom->setObjectName("widgetBottom"); + widgetBottom->setMinimumSize(QSize(0, 45)); + widgetBottom->setMaximumSize(QSize(16777215, 45)); + + QHBoxLayout *layoutBottom = new QHBoxLayout(widgetBottom); + layoutBottom->setSpacing(6); + layoutBottom->setContentsMargins(11, 11, 11, 11); + layoutBottom->setObjectName("layoutBottom"); + layoutBottom->setContentsMargins(9, 9, -1, -1); + + QLabel *labFps = new QLabel(widgetBottom); + labFps->setObjectName("labFps"); + layoutBottom->addWidget(labFps); + + txtFps = new QLineEdit(widgetBottom); + txtFps->setObjectName("txtFps"); + txtFps->setMaximumSize(QSize(50, 16777215)); + txtFps->setAlignment(Qt::AlignCenter); + layoutBottom->addWidget(txtFps); + + QLabel *labWidth = new QLabel(widgetBottom); + labWidth->setObjectName("labWidth"); + layoutBottom->addWidget(labWidth); + + txtWidth = new QLineEdit(widgetBottom); + txtWidth->setObjectName("txtWidth"); + txtWidth->setEnabled(true); + txtWidth->setMaximumSize(QSize(50, 16777215)); + txtWidth->setAlignment(Qt::AlignCenter); + layoutBottom->addWidget(txtWidth); + + QLabel *labHeight = new QLabel(widgetBottom); + labHeight->setObjectName("labHeight"); + layoutBottom->addWidget(labHeight); + + txtHeight = new QLineEdit(widgetBottom); + txtHeight->setObjectName("txtHeight"); + txtHeight->setEnabled(true); + txtHeight->setMaximumSize(QSize(50, 16777215)); + txtHeight->setAlignment(Qt::AlignCenter); + layoutBottom->addWidget(txtHeight); + + labStatus = new QLabel(widgetBottom); + labStatus->setObjectName("labStatus"); + QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Preferred); + sizePolicy2.setHorizontalStretch(0); + sizePolicy2.setVerticalStretch(0); + sizePolicy2.setHeightForWidth(labStatus->sizePolicy().hasHeightForWidth()); + labStatus->setSizePolicy(sizePolicy2); + labStatus->setAlignment(Qt::AlignCenter); + layoutBottom->addWidget(labStatus); + + btnStart = new QPushButton(widgetBottom); + btnStart->setObjectName("btnStart"); + sizePolicy.setHeightForWidth(btnStart->sizePolicy().hasHeightForWidth()); + btnStart->setSizePolicy(sizePolicy); + layoutBottom->addWidget(btnStart); + verticalLayout->addWidget(widgetBottom); + + labTitle->setText("GIF录屏工具(QQ:517216493)"); + labFps->setText("帧率"); + labWidth->setText("宽度"); + labHeight->setText("高度"); + btnStart->setText("开始"); + this->setWindowTitle(labTitle->text()); + + btnIcon->setIcon(style()->standardIcon(QStyle::SP_ComputerIcon)); + btnClose->setIcon(style()->standardIcon(QStyle::SP_TitleBarCloseButton)); + + connect(btnClose, SIGNAL(clicked(bool)), this, SLOT(closeAll())); + connect(btnStart, SIGNAL(clicked(bool)), this, SLOT(record())); + connect(txtWidth, SIGNAL(editingFinished()), this, SLOT(resizeForm())); + connect(txtHeight, SIGNAL(editingFinished()), this, SLOT(resizeForm())); +} + +void GifWidget::initForm() +{ + borderWidth = 3; + bgColor = QColor(34, 163, 169); + + fps = 10; + txtFps->setText(QString::number(fps)); + gifWriter = 0; + + timer = new QTimer(this); + timer->setInterval(100); + connect(timer, SIGNAL(timeout()), this, SLOT(saveImage())); + + this->setAttribute(Qt::WA_TranslucentBackground); + this->setWindowFlags(Qt::FramelessWindowHint); + this->installEventFilter(this); + + QStringList qss; + qss.append("QLabel{color:#ffffff;}"); + qss.append("#btnClose,#btnIcon{border:none;border-radius:0px;}"); + qss.append("#btnClose:hover{background-color:#ff0000;}"); + qss.append("#btnClose{border-top-right-radius:5px;}"); + qss.append("#labTitle{font:bold 16px;}"); + qss.append("#labStatus{font:15px;}"); + this->setStyleSheet(qss.join("")); +} + +void GifWidget::saveImage() +{ + if (!gifWriter) { + return; + } + +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + QScreen *screen = QApplication::primaryScreen(); + QPixmap pix = screen->grabWindow(0, x() + rectGif.x(), y() + rectGif.y(), rectGif.width(), rectGif.height()); + QImage image = pix.toImage().convertToFormat(QImage::Format_RGBA8888); +#else + //由于qt4没有RGBA8888,采用最接近RGBA8888的是ARGB32,颜色会有点偏差 + QPixmap pix = QPixmap::grabWindow(0, x() + rectGif.x(), y() + rectGif.y(), rectGif.width(), rectGif.height()); + QImage image = pix.toImage().convertToFormat(QImage::Format_ARGB32); +#endif + + gif.GifWriteFrame(gifWriter, image.bits(), rectGif.width(), rectGif.height(), fps); + count++; + labStatus->setText(QString("正在录制 第 %1 帧").arg(count)); +} + +void GifWidget::record() +{ + if (btnStart->text() == "开始") { + if (0 != gifWriter) { + delete gifWriter; + gifWriter = 0; + } + + //先弹出文件保存对话框 + //fileName = qApp->applicationDirPath() + "/" + QDateTime::currentDateTime().toString("yyyy-MM-dd-hh-mm-ss.gif"); + fileName = QFileDialog::getSaveFileName(this, "选择保存位置", qApp->applicationDirPath() + "/", "gif图片(*.gif)"); + if (fileName.isEmpty()) { + return; + } + + int width = txtWidth->text().toInt(); + int height = txtHeight->text().toInt(); + fps = txtFps->text().toInt(); + +#ifdef Q_OS_WIN + //windows上需要先转码 +#if defined(_MSC_VER) && (_MSC_VER >= 1400) + QTextCodec *code = QTextCodec::codecForName("utf-8"); +#else + QTextCodec *code = QTextCodec::codecForName("gbk"); +#endif + const char *name = code->fromUnicode(fileName).constData(); +#else + const char *name = fileName.toUtf8().constData(); +#endif + + gifWriter = new Gif::GifWriter; + bool ok = gif.GifBegin(gifWriter, name, width, height, fps); + if (!ok) { + delete gifWriter; + gifWriter = 0; + return; + } + + count = 0; + labStatus->setText("开始录制..."); + btnStart->setText("停止"); + //延时启动 + timer->setInterval(1000 / fps); + QTimer::singleShot(1000, timer, SLOT(start())); + //saveImage(); + } else { + timer->stop(); + gif.GifEnd(gifWriter); + + delete gifWriter; + gifWriter = 0; + + labStatus->setText(QString("录制完成 共 %1 帧").arg(count)); + btnStart->setText("开始"); + QDesktopServices::openUrl(QUrl::fromLocalFile(fileName)); + } +} + +void GifWidget::closeAll() +{ + if (0 != gifWriter) { + delete gifWriter; + gifWriter = 0; + } + + this->close(); +} + +void GifWidget::resizeForm() +{ + int width = txtWidth->text().toInt(); + int height = txtHeight->text().toInt(); + this->resize(width, height + widgetTop->height() + widgetBottom->height()); +} + +void GifWidget::setBorderWidth(int borderWidth) +{ + if (this->borderWidth != borderWidth) { + this->borderWidth = borderWidth; + this->update(); + } +} + +void GifWidget::setBgColor(const QColor &bgColor) +{ + if (this->bgColor != bgColor) { + this->bgColor = bgColor; + this->update(); + } +} diff --git a/gifwidget/gifwidget.h b/widget/gifwidget/gifwidget.h similarity index 96% rename from gifwidget/gifwidget.h rename to widget/gifwidget/gifwidget.h index 329621a..b057d17 100644 --- a/gifwidget/gifwidget.h +++ b/widget/gifwidget/gifwidget.h @@ -1,80 +1,80 @@ -#ifndef GIFWIDGET_H -#define GIFWIDGET_H - -/** - * GIF录屏控件 作者:feiyangqingyun(QQ:517216493) 2019-04-03 - * 1. 可设置要录制屏幕的宽高,支持右下角直接拉动改变。 - * 2. 可设置变宽的宽度。 - * 3. 可设置录屏控件的背景颜色。 - * 4. 可设置录制的帧数。 - * 5. 录制区域可自由拖动选择。 - */ - -#include -#include "gif.h" - -class QLineEdit; -class QLabel; - -#ifdef quc -class Q_DECL_EXPORT GifWidget : public QDialog -#else -class GifWidget : public QDialog -#endif - -{ - Q_OBJECT - - Q_PROPERTY(int borderWidth READ getBorderWidth WRITE setBorderWidth) - Q_PROPERTY(QColor bgColor READ getBgColor WRITE setBgColor) - -public: - static GifWidget *Instance(); - explicit GifWidget(QWidget *parent = 0); - -protected: - bool eventFilter(QObject *watched, QEvent *event); - void resizeEvent(QResizeEvent *); - void paintEvent(QPaintEvent *); - -private: - static QScopedPointer self; - QWidget *widgetTop; //标题栏 - QWidget *widgetMain; //中间部分 - QWidget *widgetBottom; //底部栏 - QLineEdit *txtFps; //帧率输入框 - QLineEdit *txtWidth; //宽度输入框 - QLineEdit *txtHeight; //高度输入框 - QPushButton *btnStart; //开始按钮 - QLabel *labStatus; //显示状态信息 - - int fps; //帧数 100为1s - int borderWidth; //边框宽度 - QColor bgColor; //背景颜色 - - int count; //帧数计数 - QString fileName; //保存文件名称 - QRect rectGif; //截屏区域 - QTimer *timer; //截屏定时器 - - Gif gif; //gif类对象 - Gif::GifWriter *gifWriter; //gif写入对象 - -public: - int getBorderWidth() const; - QColor getBgColor() const; - -private slots: - void initControl(); - void initForm(); - void saveImage(); - void record(); - void closeAll(); - void resizeForm(); - -public Q_SLOTS: - void setBorderWidth(int borderWidth); - void setBgColor(const QColor &bgColor); -}; - -#endif // GIFWIDGET_H +#ifndef GIFWIDGET_H +#define GIFWIDGET_H + +/** + * GIF录屏控件 作者:feiyangqingyun(QQ:517216493) 2019-04-03 + * 1. 可设置要录制屏幕的宽高,支持右下角直接拉动改变。 + * 2. 可设置变宽的宽度。 + * 3. 可设置录屏控件的背景颜色。 + * 4. 可设置录制的帧数。 + * 5. 录制区域可自由拖动选择。 + */ + +#include +#include "gif.h" + +class QLineEdit; +class QLabel; + +#ifdef quc +class Q_DECL_EXPORT GifWidget : public QDialog +#else +class GifWidget : public QDialog +#endif + +{ + Q_OBJECT + + Q_PROPERTY(int borderWidth READ getBorderWidth WRITE setBorderWidth) + Q_PROPERTY(QColor bgColor READ getBgColor WRITE setBgColor) + +public: + static GifWidget *Instance(); + explicit GifWidget(QWidget *parent = 0); + +protected: + bool eventFilter(QObject *watched, QEvent *event); + void resizeEvent(QResizeEvent *); + void paintEvent(QPaintEvent *); + +private: + static QScopedPointer self; + QWidget *widgetTop; //标题栏 + QWidget *widgetMain; //中间部分 + QWidget *widgetBottom; //底部栏 + QLineEdit *txtFps; //帧率输入框 + QLineEdit *txtWidth; //宽度输入框 + QLineEdit *txtHeight; //高度输入框 + QPushButton *btnStart; //开始按钮 + QLabel *labStatus; //显示状态信息 + + int fps; //帧数 100为1s + int borderWidth; //边框宽度 + QColor bgColor; //背景颜色 + + int count; //帧数计数 + QString fileName; //保存文件名称 + QRect rectGif; //截屏区域 + QTimer *timer; //截屏定时器 + + Gif gif; //gif类对象 + Gif::GifWriter *gifWriter; //gif写入对象 + +public: + int getBorderWidth() const; + QColor getBgColor() const; + +private slots: + void initControl(); + void initForm(); + void saveImage(); + void record(); + void closeAll(); + void resizeForm(); + +public Q_SLOTS: + void setBorderWidth(int borderWidth); + void setBgColor(const QColor &bgColor); +}; + +#endif // GIFWIDGET_H diff --git a/gifwidget/gifwidget.pro b/widget/gifwidget/gifwidget.pro similarity index 95% rename from gifwidget/gifwidget.pro rename to widget/gifwidget/gifwidget.pro index a41fd5d..fa8a9ee 100644 --- a/gifwidget/gifwidget.pro +++ b/widget/gifwidget/gifwidget.pro @@ -1,19 +1,19 @@ -QT += core gui -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat - -TARGET = gifwidget -TEMPLATE = app -DESTDIR = $$PWD/../bin -CONFIG += warn_off - -SOURCES += main.cpp -SOURCES += frmgifwidget.cpp -SOURCES += gifwidget.cpp - -HEADERS += gifwidget.h -HEADERS += frmgifwidget.h -HEADERS += gif.h - -FORMS += frmgifwidget.ui -RESOURCES += main.qrc +QT += core gui +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat + +TARGET = gifwidget +TEMPLATE = app +DESTDIR = $$PWD/../bin +CONFIG += warn_off + +SOURCES += main.cpp +SOURCES += frmgifwidget.cpp +SOURCES += gifwidget.cpp + +HEADERS += gifwidget.h +HEADERS += frmgifwidget.h +HEADERS += gif.h + +FORMS += frmgifwidget.ui +RESOURCES += main.qrc diff --git a/gifwidget/image/gifwidget.ico b/widget/gifwidget/image/gifwidget.ico similarity index 100% rename from gifwidget/image/gifwidget.ico rename to widget/gifwidget/image/gifwidget.ico diff --git a/gifwidget/image/gifwidget.png b/widget/gifwidget/image/gifwidget.png similarity index 100% rename from gifwidget/image/gifwidget.png rename to widget/gifwidget/image/gifwidget.png diff --git a/gifwidget/main.cpp b/widget/gifwidget/main.cpp similarity index 96% rename from gifwidget/main.cpp rename to widget/gifwidget/main.cpp index 8ac5946..816f86a 100644 --- a/gifwidget/main.cpp +++ b/widget/gifwidget/main.cpp @@ -1,37 +1,37 @@ -#pragma execution_character_set("utf-8") - -#include "frmgifwidget.h" -#include -#include -#include -#include - -int main(int argc, char *argv[]) -{ -#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0)) - QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Floor); -#endif - QApplication a(argc, argv); - a.setFont(QFont("Microsoft Yahei", 9)); - a.setWindowIcon(QIcon(":/image/gifwidget.ico")); - -#if (QT_VERSION < QT_VERSION_CHECK(5,0,0)) -#if _MSC_VER - QTextCodec *codec = QTextCodec::codecForName("gbk"); -#else - QTextCodec *codec = QTextCodec::codecForName("utf-8"); -#endif - QTextCodec::setCodecForLocale(codec); - QTextCodec::setCodecForCStrings(codec); - QTextCodec::setCodecForTr(codec); -#else - QTextCodec *codec = QTextCodec::codecForName("utf-8"); - QTextCodec::setCodecForLocale(codec); -#endif - - frmGifWidget w; - w.setWindowTitle("GIF录屏"); - w.show(); - - return a.exec(); -} +#pragma execution_character_set("utf-8") + +#include "frmgifwidget.h" +#include +#include +#include +#include + +int main(int argc, char *argv[]) +{ +#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0)) + QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Floor); +#endif + QApplication a(argc, argv); + a.setFont(QFont("Microsoft Yahei", 9)); + a.setWindowIcon(QIcon(":/image/gifwidget.ico")); + +#if (QT_VERSION < QT_VERSION_CHECK(5,0,0)) +#if _MSC_VER + QTextCodec *codec = QTextCodec::codecForName("gbk"); +#else + QTextCodec *codec = QTextCodec::codecForName("utf-8"); +#endif + QTextCodec::setCodecForLocale(codec); + QTextCodec::setCodecForCStrings(codec); + QTextCodec::setCodecForTr(codec); +#else + QTextCodec *codec = QTextCodec::codecForName("utf-8"); + QTextCodec::setCodecForLocale(codec); +#endif + + frmGifWidget w; + w.setWindowTitle("GIF录屏"); + w.show(); + + return a.exec(); +} diff --git a/gifwidget/main.qrc b/widget/gifwidget/main.qrc similarity index 95% rename from gifwidget/main.qrc rename to widget/gifwidget/main.qrc index 72740d5..a71d67b 100644 --- a/gifwidget/main.qrc +++ b/widget/gifwidget/main.qrc @@ -1,5 +1,5 @@ - - - image/gifwidget.ico - - + + + image/gifwidget.ico + + diff --git a/navbutton/font/fontawesome-webfont.ttf b/widget/lunarcalendarwidget/font/fontawesome-webfont.ttf similarity index 100% rename from navbutton/font/fontawesome-webfont.ttf rename to widget/lunarcalendarwidget/font/fontawesome-webfont.ttf diff --git a/lunarcalendarwidget/frmlunarcalendarwidget.cpp b/widget/lunarcalendarwidget/frmlunarcalendarwidget.cpp similarity index 100% rename from lunarcalendarwidget/frmlunarcalendarwidget.cpp rename to widget/lunarcalendarwidget/frmlunarcalendarwidget.cpp diff --git a/lunarcalendarwidget/frmlunarcalendarwidget.h b/widget/lunarcalendarwidget/frmlunarcalendarwidget.h similarity index 100% rename from lunarcalendarwidget/frmlunarcalendarwidget.h rename to widget/lunarcalendarwidget/frmlunarcalendarwidget.h diff --git a/lunarcalendarwidget/frmlunarcalendarwidget.ui b/widget/lunarcalendarwidget/frmlunarcalendarwidget.ui similarity index 100% rename from lunarcalendarwidget/frmlunarcalendarwidget.ui rename to widget/lunarcalendarwidget/frmlunarcalendarwidget.ui diff --git a/lunarcalendarwidget/image/bg_calendar.png b/widget/lunarcalendarwidget/image/bg_calendar.png similarity index 100% rename from lunarcalendarwidget/image/bg_calendar.png rename to widget/lunarcalendarwidget/image/bg_calendar.png diff --git a/lunarcalendarwidget/lunarcalendarinfo.cpp b/widget/lunarcalendarwidget/lunarcalendarinfo.cpp similarity index 100% rename from lunarcalendarwidget/lunarcalendarinfo.cpp rename to widget/lunarcalendarwidget/lunarcalendarinfo.cpp diff --git a/lunarcalendarwidget/lunarcalendarinfo.h b/widget/lunarcalendarwidget/lunarcalendarinfo.h similarity index 100% rename from lunarcalendarwidget/lunarcalendarinfo.h rename to widget/lunarcalendarwidget/lunarcalendarinfo.h diff --git a/lunarcalendarwidget/lunarcalendaritem.cpp b/widget/lunarcalendarwidget/lunarcalendaritem.cpp similarity index 100% rename from lunarcalendarwidget/lunarcalendaritem.cpp rename to widget/lunarcalendarwidget/lunarcalendaritem.cpp diff --git a/lunarcalendarwidget/lunarcalendaritem.h b/widget/lunarcalendarwidget/lunarcalendaritem.h similarity index 100% rename from lunarcalendarwidget/lunarcalendaritem.h rename to widget/lunarcalendarwidget/lunarcalendaritem.h diff --git a/lunarcalendarwidget/lunarcalendarwidget.cpp b/widget/lunarcalendarwidget/lunarcalendarwidget.cpp similarity index 100% rename from lunarcalendarwidget/lunarcalendarwidget.cpp rename to widget/lunarcalendarwidget/lunarcalendarwidget.cpp diff --git a/lunarcalendarwidget/lunarcalendarwidget.h b/widget/lunarcalendarwidget/lunarcalendarwidget.h similarity index 100% rename from lunarcalendarwidget/lunarcalendarwidget.h rename to widget/lunarcalendarwidget/lunarcalendarwidget.h diff --git a/lunarcalendarwidget/lunarcalendarwidget.pro b/widget/lunarcalendarwidget/lunarcalendarwidget.pro similarity index 100% rename from lunarcalendarwidget/lunarcalendarwidget.pro rename to widget/lunarcalendarwidget/lunarcalendarwidget.pro diff --git a/lunarcalendarwidget/main.cpp b/widget/lunarcalendarwidget/main.cpp similarity index 100% rename from lunarcalendarwidget/main.cpp rename to widget/lunarcalendarwidget/main.cpp diff --git a/lunarcalendarwidget/main.qrc b/widget/lunarcalendarwidget/main.qrc similarity index 100% rename from lunarcalendarwidget/main.qrc rename to widget/lunarcalendarwidget/main.qrc diff --git a/maskwidget/frmmaskwidget.cpp b/widget/maskwidget/frmmaskwidget.cpp similarity index 100% rename from maskwidget/frmmaskwidget.cpp rename to widget/maskwidget/frmmaskwidget.cpp diff --git a/maskwidget/frmmaskwidget.h b/widget/maskwidget/frmmaskwidget.h similarity index 100% rename from maskwidget/frmmaskwidget.h rename to widget/maskwidget/frmmaskwidget.h diff --git a/maskwidget/frmmaskwidget.ui b/widget/maskwidget/frmmaskwidget.ui similarity index 100% rename from maskwidget/frmmaskwidget.ui rename to widget/maskwidget/frmmaskwidget.ui diff --git a/maskwidget/main.cpp b/widget/maskwidget/main.cpp similarity index 100% rename from maskwidget/main.cpp rename to widget/maskwidget/main.cpp diff --git a/maskwidget/maskwidget.cpp b/widget/maskwidget/maskwidget.cpp similarity index 100% rename from maskwidget/maskwidget.cpp rename to widget/maskwidget/maskwidget.cpp diff --git a/maskwidget/maskwidget.h b/widget/maskwidget/maskwidget.h similarity index 100% rename from maskwidget/maskwidget.h rename to widget/maskwidget/maskwidget.h diff --git a/maskwidget/maskwidget.pro b/widget/maskwidget/maskwidget.pro similarity index 100% rename from maskwidget/maskwidget.pro rename to widget/maskwidget/maskwidget.pro diff --git a/movewidget/frmmovewidget.cpp b/widget/movewidget/frmmovewidget.cpp similarity index 96% rename from movewidget/frmmovewidget.cpp rename to widget/movewidget/frmmovewidget.cpp index 066ea71..6cc5cc4 100644 --- a/movewidget/frmmovewidget.cpp +++ b/widget/movewidget/frmmovewidget.cpp @@ -1,41 +1,41 @@ -#pragma execution_character_set("utf-8") - -#include "frmmovewidget.h" -#include "ui_frmmovewidget.h" -#include "qpushbutton.h" -#include "qprogressbar.h" -#include "movewidget.h" - -frmMoveWidget::frmMoveWidget(QWidget *parent) : QWidget(parent), ui(new Ui::frmMoveWidget) -{ - ui->setupUi(this); - this->initForm(); -} - -frmMoveWidget::~frmMoveWidget() -{ - delete ui; -} - -void frmMoveWidget::initForm() -{ - QPushButton *btn1 = new QPushButton(this); - btn1->setGeometry(10, 10, 250, 25); - btn1->setText("按住我拖动(仅限左键拖动)"); - MoveWidget *moveWidget1 = new MoveWidget(this); - moveWidget1->setWidget(btn1); - - QPushButton *btn2 = new QPushButton(this); - btn2->setGeometry(10, 40, 250, 25); - btn2->setText("按住我拖动(支持右键拖动)"); - MoveWidget *moveWidget2 = new MoveWidget(this); - moveWidget2->setWidget(btn2); - moveWidget2->setLeftButton(false); - - QProgressBar *bar = new QProgressBar(this); - bar->setGeometry(10, 70, 250, 25); - bar->setRange(0, 0); - bar->setTextVisible(false); - MoveWidget *moveWidget3 = new MoveWidget(this); - moveWidget3->setWidget(bar); +#pragma execution_character_set("utf-8") + +#include "frmmovewidget.h" +#include "ui_frmmovewidget.h" +#include "qpushbutton.h" +#include "qprogressbar.h" +#include "movewidget.h" + +frmMoveWidget::frmMoveWidget(QWidget *parent) : QWidget(parent), ui(new Ui::frmMoveWidget) +{ + ui->setupUi(this); + this->initForm(); +} + +frmMoveWidget::~frmMoveWidget() +{ + delete ui; +} + +void frmMoveWidget::initForm() +{ + QPushButton *btn1 = new QPushButton(this); + btn1->setGeometry(10, 10, 250, 25); + btn1->setText("按住我拖动(仅限左键拖动)"); + MoveWidget *moveWidget1 = new MoveWidget(this); + moveWidget1->setWidget(btn1); + + QPushButton *btn2 = new QPushButton(this); + btn2->setGeometry(10, 40, 250, 25); + btn2->setText("按住我拖动(支持右键拖动)"); + MoveWidget *moveWidget2 = new MoveWidget(this); + moveWidget2->setWidget(btn2); + moveWidget2->setLeftButton(false); + + QProgressBar *bar = new QProgressBar(this); + bar->setGeometry(10, 70, 250, 25); + bar->setRange(0, 0); + bar->setTextVisible(false); + MoveWidget *moveWidget3 = new MoveWidget(this); + moveWidget3->setWidget(bar); } \ No newline at end of file diff --git a/movewidget/frmmovewidget.h b/widget/movewidget/frmmovewidget.h similarity index 93% rename from movewidget/frmmovewidget.h rename to widget/movewidget/frmmovewidget.h index 463cf32..fa66160 100644 --- a/movewidget/frmmovewidget.h +++ b/widget/movewidget/frmmovewidget.h @@ -1,25 +1,25 @@ -#ifndef FRMMOVEWIDGET_H -#define FRMMOVEWIDGET_H - -#include - -namespace Ui { -class frmMoveWidget; -} - -class frmMoveWidget : public QWidget -{ - Q_OBJECT - -public: - explicit frmMoveWidget(QWidget *parent = 0); - ~frmMoveWidget(); - -private: - Ui::frmMoveWidget *ui; - -private slots: - void initForm(); -}; - -#endif // FRMMOVEWIDGET_H +#ifndef FRMMOVEWIDGET_H +#define FRMMOVEWIDGET_H + +#include + +namespace Ui { +class frmMoveWidget; +} + +class frmMoveWidget : public QWidget +{ + Q_OBJECT + +public: + explicit frmMoveWidget(QWidget *parent = 0); + ~frmMoveWidget(); + +private: + Ui::frmMoveWidget *ui; + +private slots: + void initForm(); +}; + +#endif // FRMMOVEWIDGET_H diff --git a/movewidget/frmmovewidget.ui b/widget/movewidget/frmmovewidget.ui similarity index 95% rename from movewidget/frmmovewidget.ui rename to widget/movewidget/frmmovewidget.ui index bc9265e..ef95599 100644 --- a/movewidget/frmmovewidget.ui +++ b/widget/movewidget/frmmovewidget.ui @@ -1,19 +1,19 @@ - - - frmMoveWidget - - - - 0 - 0 - 800 - 600 - - - - Form - - - - - + + + frmMoveWidget + + + + 0 + 0 + 800 + 600 + + + + Form + + + + + diff --git a/movewidget/main.cpp b/widget/movewidget/main.cpp similarity index 96% rename from movewidget/main.cpp rename to widget/movewidget/main.cpp index 66fc9cd..a4e326f 100644 --- a/movewidget/main.cpp +++ b/widget/movewidget/main.cpp @@ -1,31 +1,31 @@ -#pragma execution_character_set("utf-8") - -#include "frmmovewidget.h" -#include -#include - -int main(int argc, char *argv[]) -{ - QApplication a(argc, argv); - a.setFont(QFont("Microsoft Yahei", 9)); - -#if (QT_VERSION < QT_VERSION_CHECK(5,0,0)) -#if _MSC_VER - QTextCodec *codec = QTextCodec::codecForName("gbk"); -#else - QTextCodec *codec = QTextCodec::codecForName("utf-8"); -#endif - QTextCodec::setCodecForLocale(codec); - QTextCodec::setCodecForCStrings(codec); - QTextCodec::setCodecForTr(codec); -#else - QTextCodec *codec = QTextCodec::codecForName("utf-8"); - QTextCodec::setCodecForLocale(codec); -#endif - - frmMoveWidget w; - w.setWindowTitle("通用移动类"); - w.show(); - - return a.exec(); -} +#pragma execution_character_set("utf-8") + +#include "frmmovewidget.h" +#include +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + a.setFont(QFont("Microsoft Yahei", 9)); + +#if (QT_VERSION < QT_VERSION_CHECK(5,0,0)) +#if _MSC_VER + QTextCodec *codec = QTextCodec::codecForName("gbk"); +#else + QTextCodec *codec = QTextCodec::codecForName("utf-8"); +#endif + QTextCodec::setCodecForLocale(codec); + QTextCodec::setCodecForCStrings(codec); + QTextCodec::setCodecForTr(codec); +#else + QTextCodec *codec = QTextCodec::codecForName("utf-8"); + QTextCodec::setCodecForLocale(codec); +#endif + + frmMoveWidget w; + w.setWindowTitle("通用移动类"); + w.show(); + + return a.exec(); +} diff --git a/movewidget/movewidget.cpp b/widget/movewidget/movewidget.cpp similarity index 96% rename from movewidget/movewidget.cpp rename to widget/movewidget/movewidget.cpp index 6e9315d..a7eeb8f 100644 --- a/movewidget/movewidget.cpp +++ b/widget/movewidget/movewidget.cpp @@ -1,74 +1,74 @@ -#include "movewidget.h" -#include "qevent.h" -#include "qdebug.h" - -MoveWidget::MoveWidget(QObject *parent) : QObject(parent) -{ - lastPoint = QPoint(0, 0); - pressed = false; - leftButton = true; - inControl = true; - widget = 0; -} - -bool MoveWidget::eventFilter(QObject *watched, QEvent *event) -{ - if (widget != 0 && watched == widget) { - QMouseEvent *mouseEvent = (QMouseEvent *)event; - if (mouseEvent->type() == QEvent::MouseButtonPress) { - //如果限定了只能鼠标左键拖动则判断当前是否是鼠标左键 - if (leftButton && mouseEvent->button() != Qt::LeftButton) { - return false; - } - - //判断控件的区域是否包含了当前鼠标的坐标 - if (widget->rect().contains(mouseEvent->pos())) { - lastPoint = mouseEvent->pos(); - pressed = true; - } - } else if (mouseEvent->type() == QEvent::MouseMove && pressed) { - //计算坐标偏移值,调用move函数移动过去 - int offsetX = mouseEvent->pos().x() - lastPoint.x(); - int offsetY = mouseEvent->pos().y() - lastPoint.y(); - int x = widget->x() + offsetX; - int y = widget->y() + offsetY; - if (inControl) { - //可以自行调整限定在容器中的范围,这里默认保留20个像素在里面 - int offset = 20; - bool xyOut = (x + widget->width() < offset || y + widget->height() < offset); - bool whOut = false; - QWidget *w = (QWidget *)widget->parent(); - if (w != 0) { - whOut = (w->width() - x < offset || w->height() - y < offset); - } - if (xyOut || whOut) { - return false; - } - } - - widget->move(x, y); - } else if (mouseEvent->type() == QEvent::MouseButtonRelease && pressed) { - pressed = false; - } - } - - return QObject::eventFilter(watched, event); -} - -void MoveWidget::setLeftButton(bool leftButton) -{ - this->leftButton = leftButton; -} - -void MoveWidget::setInControl(bool inControl) -{ - this->inControl = inControl; -} - -void MoveWidget::setWidget(QWidget *widget) -{ - if (this->widget == 0) { - this->widget = widget; - this->widget->installEventFilter(this); - } +#include "movewidget.h" +#include "qevent.h" +#include "qdebug.h" + +MoveWidget::MoveWidget(QObject *parent) : QObject(parent) +{ + lastPoint = QPoint(0, 0); + pressed = false; + leftButton = true; + inControl = true; + widget = 0; +} + +bool MoveWidget::eventFilter(QObject *watched, QEvent *event) +{ + if (widget != 0 && watched == widget) { + QMouseEvent *mouseEvent = (QMouseEvent *)event; + if (mouseEvent->type() == QEvent::MouseButtonPress) { + //如果限定了只能鼠标左键拖动则判断当前是否是鼠标左键 + if (leftButton && mouseEvent->button() != Qt::LeftButton) { + return false; + } + + //判断控件的区域是否包含了当前鼠标的坐标 + if (widget->rect().contains(mouseEvent->pos())) { + lastPoint = mouseEvent->pos(); + pressed = true; + } + } else if (mouseEvent->type() == QEvent::MouseMove && pressed) { + //计算坐标偏移值,调用move函数移动过去 + int offsetX = mouseEvent->pos().x() - lastPoint.x(); + int offsetY = mouseEvent->pos().y() - lastPoint.y(); + int x = widget->x() + offsetX; + int y = widget->y() + offsetY; + if (inControl) { + //可以自行调整限定在容器中的范围,这里默认保留20个像素在里面 + int offset = 20; + bool xyOut = (x + widget->width() < offset || y + widget->height() < offset); + bool whOut = false; + QWidget *w = (QWidget *)widget->parent(); + if (w != 0) { + whOut = (w->width() - x < offset || w->height() - y < offset); + } + if (xyOut || whOut) { + return false; + } + } + + widget->move(x, y); + } else if (mouseEvent->type() == QEvent::MouseButtonRelease && pressed) { + pressed = false; + } + } + + return QObject::eventFilter(watched, event); +} + +void MoveWidget::setLeftButton(bool leftButton) +{ + this->leftButton = leftButton; +} + +void MoveWidget::setInControl(bool inControl) +{ + this->inControl = inControl; +} + +void MoveWidget::setWidget(QWidget *widget) +{ + if (this->widget == 0) { + this->widget = widget; + this->widget->installEventFilter(this); + } } \ No newline at end of file diff --git a/movewidget/movewidget.h b/widget/movewidget/movewidget.h similarity index 95% rename from movewidget/movewidget.h rename to widget/movewidget/movewidget.h index e19ef0d..481270e 100644 --- a/movewidget/movewidget.h +++ b/widget/movewidget/movewidget.h @@ -1,43 +1,43 @@ -#ifndef MOVEWIDGET_H -#define MOVEWIDGET_H - -/** - * 通用控件移动类 作者:feiyangqingyun(QQ:517216493) 2019-09-28 - * 1. 可以指定需要移动的widget。 - * 2. 可设置是否限定鼠标左键拖动。 - * 3. 支持任意widget控件。 - */ - -#include - -#ifdef quc -class Q_DECL_EXPORT MoveWidget : public QObject -#else -class MoveWidget : public QObject -#endif - -{ - Q_OBJECT -public: - explicit MoveWidget(QObject *parent = 0); - -protected: - bool eventFilter(QObject *watched, QEvent *event); - -private: - QPoint lastPoint; //最后按下的坐标 - bool pressed; //鼠标是否按下 - bool leftButton; //限定鼠标左键 - bool inControl; //限定在容器内 - QWidget *widget; //移动的控件 - -public Q_SLOTS: - //设置是否限定鼠标左键 - void setLeftButton(bool leftButton); - //设置是否限定不能移出容器外面 - void setInControl(bool inControl); - //设置要移动的控件 - void setWidget(QWidget *widget); -}; - -#endif // MOVEWIDGET_H +#ifndef MOVEWIDGET_H +#define MOVEWIDGET_H + +/** + * 通用控件移动类 作者:feiyangqingyun(QQ:517216493) 2019-09-28 + * 1. 可以指定需要移动的widget。 + * 2. 可设置是否限定鼠标左键拖动。 + * 3. 支持任意widget控件。 + */ + +#include + +#ifdef quc +class Q_DECL_EXPORT MoveWidget : public QObject +#else +class MoveWidget : public QObject +#endif + +{ + Q_OBJECT +public: + explicit MoveWidget(QObject *parent = 0); + +protected: + bool eventFilter(QObject *watched, QEvent *event); + +private: + QPoint lastPoint; //最后按下的坐标 + bool pressed; //鼠标是否按下 + bool leftButton; //限定鼠标左键 + bool inControl; //限定在容器内 + QWidget *widget; //移动的控件 + +public Q_SLOTS: + //设置是否限定鼠标左键 + void setLeftButton(bool leftButton); + //设置是否限定不能移出容器外面 + void setInControl(bool inControl); + //设置要移动的控件 + void setWidget(QWidget *widget); +}; + +#endif // MOVEWIDGET_H diff --git a/movewidget/movewidget.pro b/widget/movewidget/movewidget.pro similarity index 95% rename from movewidget/movewidget.pro rename to widget/movewidget/movewidget.pro index 4631947..23fd04a 100644 --- a/movewidget/movewidget.pro +++ b/widget/movewidget/movewidget.pro @@ -1,17 +1,17 @@ -QT += core gui -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat - -TARGET = movewidget -TEMPLATE = app -DESTDIR = $$PWD/../bin -CONFIG += warn_off - -SOURCES += main.cpp -SOURCES += frmmovewidget.cpp -SOURCES += movewidget.cpp - -HEADERS += frmmovewidget.h -HEADERS += movewidget.h - -FORMS += frmmovewidget.ui +QT += core gui +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat + +TARGET = movewidget +TEMPLATE = app +DESTDIR = $$PWD/../bin +CONFIG += warn_off + +SOURCES += main.cpp +SOURCES += frmmovewidget.cpp +SOURCES += movewidget.cpp + +HEADERS += frmmovewidget.h +HEADERS += movewidget.h + +FORMS += frmmovewidget.ui diff --git a/screenwidget/frmscreenwidget.cpp b/widget/screenwidget/frmscreenwidget.cpp similarity index 100% rename from screenwidget/frmscreenwidget.cpp rename to widget/screenwidget/frmscreenwidget.cpp diff --git a/screenwidget/frmscreenwidget.h b/widget/screenwidget/frmscreenwidget.h similarity index 100% rename from screenwidget/frmscreenwidget.h rename to widget/screenwidget/frmscreenwidget.h diff --git a/screenwidget/frmscreenwidget.ui b/widget/screenwidget/frmscreenwidget.ui similarity index 100% rename from screenwidget/frmscreenwidget.ui rename to widget/screenwidget/frmscreenwidget.ui diff --git a/screenwidget/main.cpp b/widget/screenwidget/main.cpp similarity index 100% rename from screenwidget/main.cpp rename to widget/screenwidget/main.cpp diff --git a/screenwidget/screenwidget.cpp b/widget/screenwidget/screenwidget.cpp similarity index 100% rename from screenwidget/screenwidget.cpp rename to widget/screenwidget/screenwidget.cpp diff --git a/screenwidget/screenwidget.h b/widget/screenwidget/screenwidget.h similarity index 100% rename from screenwidget/screenwidget.h rename to widget/screenwidget/screenwidget.h diff --git a/screenwidget/screenwidget.pro b/widget/screenwidget/screenwidget.pro similarity index 100% rename from screenwidget/screenwidget.pro rename to widget/screenwidget/screenwidget.pro diff --git a/widget/widget.pro b/widget/widget.pro new file mode 100644 index 0000000..8920bc2 --- /dev/null +++ b/widget/widget.pro @@ -0,0 +1,8 @@ +TEMPLATE = subdirs +SUBDIRS += colorwidget +SUBDIRS += framelesswidget +SUBDIRS += gifwidget +SUBDIRS += lunarcalendarwidget +SUBDIRS += maskwidget +SUBDIRS += movewidget +SUBDIRS += screenwidget