Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
improve gps detection
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12759 c8812cc2-4d05-0410-92ff-de0c093fc19c
- Loading branch information
Showing
with
345 additions
and 364 deletions.
- +1 −1 src/app/CMakeLists.txt
- +35 −43 src/app/gps/qgsgpsinformationwidget.cpp
- +4 −2 src/app/gps/qgsgpsinformationwidget.h
- +2 −1 src/core/CMakeLists.txt
- +4 −0 src/core/gps/qextserialport/posix_qextserialport.cpp
- +6 −39 src/core/gps/qextserialport/qextserialport.h
- +43 −0 src/core/gps/qextserialport/qwineventnotifier.h
- +1 −1 src/core/gps/qextserialport/win_qextserialport.cpp
- +3 −158 src/core/gps/qgsgpsconnection.cpp
- +1 −22 src/core/gps/qgsgpsconnection.h
- +179 −0 src/core/gps/qgsgpsdetector.cpp
- +58 −0 src/core/gps/qgsgpsdetector.h
- +0 −53 src/core/gps/qgsgpstrackerthread.cpp
- +0 −28 src/core/gps/qgsgpstrackerthread.h
- +3 −11 src/core/gps/qgsnmeaconnection.cpp
- +1 −2 src/core/gps/qgsnmeaconnection.h
- +2 −1 src/plugins/gps_importer/CMakeLists.txt
- +2 −2 src/plugins/gps_importer/qgsgpsplugingui.cpp
@@ -0,0 +1,43 @@ | ||
#ifndef QWINEVENTNOTIFIER_H | ||
#define QWINEVENTNOTIFIER_H | ||
#include <QObject> | ||
|
||
#include <windows.h> | ||
|
||
// Ugly: copied private Qt header file | ||
QT_BEGIN_NAMESPACE | ||
|
||
class Q_CORE_EXPORT QWinEventNotifier : public QObject | ||
{ | ||
Q_OBJECT | ||
Q_DECLARE_PRIVATE(QObject) | ||
|
||
public: | ||
explicit QWinEventNotifier(QObject *parent = 0); | ||
explicit QWinEventNotifier(HANDLE hEvent, QObject *parent = 0); | ||
~QWinEventNotifier(); | ||
|
||
void setHandle(HANDLE hEvent); | ||
HANDLE handle() const; | ||
|
||
bool isEnabled() const; | ||
|
||
public Q_SLOTS: | ||
void setEnabled(bool enable); | ||
|
||
Q_SIGNALS: | ||
void activated(HANDLE hEvent); | ||
|
||
protected: | ||
bool event(QEvent *e); | ||
|
||
private: | ||
Q_DISABLE_COPY(QWinEventNotifier) | ||
|
||
HANDLE handleToEvent; | ||
bool enabled; | ||
}; | ||
|
||
QT_END_NAMESPACE | ||
|
||
#endif // QWINEVENTNOTIFIER_H |
Oops, something went wrong.