• 大小: 39KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-16
  • 语言: 其他
  • 标签: Qt  检测U盘  

资源简介

Qt-detect-Udisk老外写的qt检测U盘,没有使用hal或udisks,而是使用的tcpsocket和内核的netlink通信。可以在windows和linux上运行,据作者说正在测试wince平台。真牛啊。详见老外的资料链接:http://developer.qt.nokia.com/forums/viewthread/9605/

资源截图

代码片段和文件信息

/******************************************************************************
QDeviceChangeEvent: Device change event
Copyright (C) 2011 Wang Bin 

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License or
(at your option) any later version.

This program is distributed in the hope that it will be useful
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not write to the Free Software Foundation Inc.
51 Franklin Street Fifth Floor Boston MA 02110-1301 USA.
******************************************************************************/

#include “qdevicechangeevent.h“

//const QEvent::Type  QDeviceChangeEvent::EventType = static_cast(QEvent::registerEventType());
QDeviceChangeEvent::QDeviceChangeEvent(Action action const QString &device) :
QEvent(registeredType())
{
m_action = action;
m_device = device;
}


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\
     文件         109  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\.gitignore
     文件         326  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\QDeviceWatcher.pro
     文件        7375  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\QDeviceWatcher.sln
     文件         196  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\README
     文件       14595  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\TODO.txt
     文件        4396  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\common.pri
     目录           0  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\src\
     文件       31279  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\src\QDeviceWatcher.vcproj
     文件        3627  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\src\libQDeviceWatcher.pri
     文件         471  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\src\libQDeviceWatcher.pro
     文件        1236  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\src\qdevicechangeevent.cpp
     文件        1614  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\src\qdevicechangeevent.h
     文件        2560  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\src\qdevicewatcher.cpp
     文件        1597  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\src\qdevicewatcher.h
     文件        1246  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\src\qdevicewatcher_global.h
     文件        7889  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\src\qdevicewatcher_linux.cpp
     文件        3040  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\src\qdevicewatcher_p.h
     文件       12763  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\src\qdevicewatcher_win32.cpp
     文件        3866  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\src\qdevicewatcher_wince.cpp
     目录           0  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\test\
     文件        3031  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\test\hotplugwatcher.h
     文件         396  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\test\hotplugwatcher.pro
     文件       24930  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\test\hotplugwatcher.vcproj
     文件        3893  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\test\hotplugwatcher_gui.cpp
     文件        1736  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\test\hotplugwatcher_gui.h
     文件         386  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\test\hotplugwatcher_gui.pro
     文件       26926  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\test\hotplugwatcher_gui.vcproj
     文件        1181  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\test\main.cpp
     文件        1423  2012-03-10 00:01  wang-bin-qdevicewatcher-d8785a2\test\main_gui.cpp

评论

共有 条评论