可以使用VS2017 64编译,还未测试32位
This commit is contained in:
+5
-8
@@ -38,11 +38,6 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
|||||||
|
|
||||||
CONFIG += c++11
|
CONFIG += c++11
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
main.cpp \
|
main.cpp \
|
||||||
mainwindow.cpp
|
mainwindow.cpp
|
||||||
@@ -51,9 +46,9 @@ HEADERS += \
|
|||||||
mainwindow.h
|
mainwindow.h
|
||||||
|
|
||||||
# Default rules for deployment.
|
# Default rules for deployment.
|
||||||
#qnx: target.path = /tmp/$${TARGET}/bin
|
qnx: target.path = /tmp/$${TARGET}/bin
|
||||||
#else: unix:!android: target.path = /opt/$${TARGET}/bin
|
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||||
#!isEmpty(target.path): INSTALLS += target
|
!isEmpty(target.path): INSTALLS += target
|
||||||
|
|
||||||
|
|
||||||
#添加程序运行的第三方库
|
#添加程序运行的第三方库
|
||||||
@@ -66,6 +61,8 @@ LIBS += -L$$PWD/../thirdpart/lib -lClientLink
|
|||||||
LIBS += -L$$PWD/../thirdpart/lib -lqNavigation
|
LIBS += -L$$PWD/../thirdpart/lib -lqNavigation
|
||||||
LIBS += -L$$PWD/../thirdpart/lib -lCockpit
|
LIBS += -L$$PWD/../thirdpart/lib -lCockpit
|
||||||
LIBS += -L$$PWD/../thirdpart/lib -lMavLinkNode
|
LIBS += -L$$PWD/../thirdpart/lib -lMavLinkNode
|
||||||
|
LIBS += -L$$PWD/../thirdpart/lib -lcore
|
||||||
|
LIBS += -L$$PWD/../thirdpart/lib -linternals
|
||||||
LIBS += -L$$PWD/../thirdpart/lib -lopmapwidget
|
LIBS += -L$$PWD/../thirdpart/lib -lopmapwidget
|
||||||
|
|
||||||
#temp file
|
#temp file
|
||||||
|
|||||||
+31
-1
@@ -11,7 +11,7 @@
|
|||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include <QTextCodec>
|
||||||
|
|
||||||
//#include <windows.h>
|
//#include <windows.h>
|
||||||
//#include <winver.h>
|
//#include <winver.h>
|
||||||
@@ -72,6 +72,36 @@ int main(int argc, char *argv[])
|
|||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
MainWindow w;
|
MainWindow w;
|
||||||
|
|
||||||
|
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF8"));
|
||||||
|
//QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF8"));
|
||||||
|
//QTextCodec::se(QTextCodec::codecForName("UTF8"));
|
||||||
|
|
||||||
|
|
||||||
|
QTranslator * qtTranslator = new QTranslator{};
|
||||||
|
QString lang = "qt_" + QLocale::system().name();
|
||||||
|
if (qtTranslator->load(lang, QLibraryInfo::location(QLibraryInfo::TranslationsPath))
|
||||||
|
&& a.installTranslator(qtTranslator))
|
||||||
|
{
|
||||||
|
qDebug() << "Success to load translator " <<lang << " from " << QLibraryInfo::location(QLibraryInfo::TranslationsPath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
qWarning() << "Fail to load translator " <<lang << " from " << QLibraryInfo::location(QLibraryInfo::TranslationsPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
QTranslator * myappTranslator = new QTranslator{};
|
||||||
|
lang = "SimpleGroundStation_" + QLocale::system().name();
|
||||||
|
if (myappTranslator->load(lang, QCoreApplication::applicationDirPath())
|
||||||
|
&& a.installTranslator(myappTranslator))
|
||||||
|
{
|
||||||
|
qDebug() << "Success to load translator " <<lang << " from " << QCoreApplication::applicationDirPath();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
qWarning() << "Fail to load translator " <<lang << " from " << QCoreApplication::applicationDirPath();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
w.setWindowTitle(QStringLiteral("GCS New Frame @ %1"));//with version
|
w.setWindowTitle(QStringLiteral("GCS New Frame @ %1"));//with version
|
||||||
// 主要是控制HDMI输出,如果是LCD显示,此行无关紧要
|
// 主要是控制HDMI输出,如果是LCD显示,此行无关紧要
|
||||||
|
|||||||
+9
-9
@@ -25,15 +25,15 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
|
|
||||||
|
|
||||||
nav->setRowHeight(50);
|
nav->setRowHeight(50);
|
||||||
nav->addItem("设备");
|
nav->addItem(tr("设备"));
|
||||||
nav->addItem("地图");
|
nav->addItem(tr("地图"));
|
||||||
nav->addItem("指令");
|
nav->addItem(tr("指令"));
|
||||||
nav->addItem("检查");
|
nav->addItem(tr("检查"));
|
||||||
nav->addItem("航线");
|
nav->addItem(tr("航线"));
|
||||||
nav->addItem("任务");
|
nav->addItem(tr("任务"));
|
||||||
nav->addItem("数据");
|
nav->addItem(tr("数据"));
|
||||||
nav->addItem("回放");
|
nav->addItem(tr("回放"));
|
||||||
nav->addItem("关于");
|
nav->addItem(tr("关于"));
|
||||||
|
|
||||||
node = new MavLinkNode();
|
node = new MavLinkNode();
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,9 @@
|
|||||||
|
|
||||||
#include "mavlinknode.h"
|
#include "mavlinknode.h"
|
||||||
|
|
||||||
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
|
|
||||||
class MainWindow : public QMainWindow
|
class MainWindow : public QMainWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ SUBDIRS += ClientLinkDialog
|
|||||||
SUBDIRS += Skin
|
SUBDIRS += Skin
|
||||||
SUBDIRS += qnavigationwidget
|
SUBDIRS += qnavigationwidget
|
||||||
SUBDIRS += Cockpit
|
SUBDIRS += Cockpit
|
||||||
|
|
||||||
SUBDIRS += opmap
|
SUBDIRS += opmap
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -19,8 +19,8 @@ OBJECTS_DIR = $$PWD/../../build
|
|||||||
|
|
||||||
QT += network
|
QT += network
|
||||||
QT += sql
|
QT += sql
|
||||||
#CONFIG += staticlib\
|
CONFIG += staticlib\
|
||||||
# plugin
|
plugin
|
||||||
|
|
||||||
SOURCES += opmaps.cpp \
|
SOURCES += opmaps.cpp \
|
||||||
pureimagecache.cpp \
|
pureimagecache.cpp \
|
||||||
|
|||||||
@@ -32,12 +32,12 @@
|
|||||||
|
|
||||||
namespace core {
|
namespace core {
|
||||||
|
|
||||||
#ifdef QtOpmapCore
|
//#ifdef QtOpmapCore
|
||||||
#include <coreglobal.h>
|
//#include <coreglobal.h>
|
||||||
class OPMAPCORESHARED_EXPORT MapType : public QObject {
|
//class OPMAPCORESHARED_EXPORT MapType : public QObject {
|
||||||
#else
|
//#else
|
||||||
class MapType : public QObject {
|
class MapType : public QObject {
|
||||||
#endif
|
//#endif
|
||||||
Q_OBJECT Q_ENUMS(Types)
|
Q_OBJECT Q_ENUMS(Types)
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -41,7 +41,7 @@
|
|||||||
#include "urlfactory.h"
|
#include "urlfactory.h"
|
||||||
#include "diagnostics.h"
|
#include "diagnostics.h"
|
||||||
|
|
||||||
// #include "point.h"
|
#include "point.h"
|
||||||
|
|
||||||
|
|
||||||
namespace core {
|
namespace core {
|
||||||
|
|||||||
+11
-9
@@ -32,20 +32,22 @@
|
|||||||
|
|
||||||
namespace core {
|
namespace core {
|
||||||
|
|
||||||
#ifdef QtOpmapCore
|
|
||||||
#include <coreglobal.h>
|
|
||||||
struct OPMAPCORESHARED_EXPORT Size;
|
|
||||||
struct OPMAPCORESHARED_EXPORT Point {
|
|
||||||
#else
|
|
||||||
struct Size;
|
struct Size;
|
||||||
struct Point {
|
struct Point {
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
friend uint qHash(Point const & point);
|
|
||||||
friend bool operator==(Point const & lhs, Point const & rhs);
|
friend uint qHash(Point const & point);
|
||||||
friend bool operator!=(Point const & lhs, Point const & rhs);
|
friend bool operator==(Point const & lhs, Point const & rhs);
|
||||||
|
friend bool operator!=(Point const & lhs, Point const & rhs);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Point();
|
Point();
|
||||||
|
|||||||
@@ -82,8 +82,18 @@ class Core : public QObject, public QRunnable {
|
|||||||
|
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef QtOpmapInternals
|
||||||
|
#include <internalglobal.h>
|
||||||
|
friend class OPMAPINTERNALSHARED_EXPORT mapcontrol::OPMapControl;
|
||||||
|
friend class OPMAPINTERNALSHARED_EXPORT mapcontrol::MapGraphicItem;
|
||||||
|
#else
|
||||||
friend class mapcontrol::OPMapControl;
|
friend class mapcontrol::OPMapControl;
|
||||||
friend class mapcontrol::MapGraphicItem;
|
friend class mapcontrol::MapGraphicItem;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Core();
|
Core();
|
||||||
~Core();
|
~Core();
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ OBJECTS_DIR = $$PWD/../../build
|
|||||||
|
|
||||||
QT += network
|
QT += network
|
||||||
QT += sql
|
QT += sql
|
||||||
#CONFIG += staticlib\
|
CONFIG += staticlib\
|
||||||
# plugin
|
plugin
|
||||||
|
|
||||||
HEADERS += core.h \
|
HEADERS += core.h \
|
||||||
internalglobal.h \
|
internalglobal.h \
|
||||||
@@ -56,7 +56,6 @@ SOURCES += ./projections/lks94projection.cpp \
|
|||||||
./projections/platecarreeprojectionpergo.cpp
|
./projections/platecarreeprojectionpergo.cpp
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../../thirdpart/include
|
INCLUDEPATH += $$PWD/../../thirdpart/include
|
||||||
|
|
||||||
LIBS += -L$$PWD/../../thirdpart/lib -lcore
|
LIBS += -L$$PWD/../../thirdpart/lib -lcore
|
||||||
|
|
||||||
win32|win64 {
|
win32|win64 {
|
||||||
|
|||||||
@@ -33,15 +33,10 @@
|
|||||||
#include <QMetaEnum>
|
#include <QMetaEnum>
|
||||||
namespace internals {
|
namespace internals {
|
||||||
|
|
||||||
#ifdef QtOpmapInternals
|
|
||||||
#include <internalglobal.h>
|
|
||||||
class OPMAPINTERNALSHARED_EXPORT MouseWheelZoomType : public QObject {
|
|
||||||
#else
|
|
||||||
class MouseWheelZoomType : public QObject {
|
class MouseWheelZoomType : public QObject {
|
||||||
#endif
|
|
||||||
|
|
||||||
|
Q_OBJECT Q_ENUMS(Types)
|
||||||
Q_OBJECT Q_ENUMS(Types)
|
|
||||||
public:
|
public:
|
||||||
enum Types {
|
enum Types {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -89,5 +84,5 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Q_DECLARE_METATYPE(internals::MouseWheelZoomType::Types)
|
Q_DECLARE_METATYPE(internals::MouseWheelZoomType::Types)
|
||||||
#endif // MOUSEWHEELZOOMTYPE_H
|
#endif // MOUSEWHEELZOOMTYPE_H
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
|
|
||||||
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
#ifdef QNavigation
|
#ifdef QNavigation
|
||||||
#include <qnavigantionglobal.h>
|
#include <qnavigantionglobal.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user