可以使用VS2017 64编译,还未测试32位
This commit is contained in:
+5
-8
@@ -38,11 +38,6 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
mainwindow.cpp
|
||||
@@ -51,9 +46,9 @@ HEADERS += \
|
||||
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
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
!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 -lCockpit
|
||||
LIBS += -L$$PWD/../thirdpart/lib -lMavLinkNode
|
||||
LIBS += -L$$PWD/../thirdpart/lib -lcore
|
||||
LIBS += -L$$PWD/../thirdpart/lib -linternals
|
||||
LIBS += -L$$PWD/../thirdpart/lib -lopmapwidget
|
||||
|
||||
#temp file
|
||||
|
||||
+31
-1
@@ -11,7 +11,7 @@
|
||||
#include <QDir>
|
||||
#include <QTranslator>
|
||||
#include <QDebug>
|
||||
|
||||
#include <QTextCodec>
|
||||
|
||||
//#include <windows.h>
|
||||
//#include <winver.h>
|
||||
@@ -72,6 +72,36 @@ int main(int argc, char *argv[])
|
||||
QApplication a(argc, argv);
|
||||
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
|
||||
// 主要是控制HDMI输出,如果是LCD显示,此行无关紧要
|
||||
|
||||
+9
-9
@@ -25,15 +25,15 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
|
||||
|
||||
nav->setRowHeight(50);
|
||||
nav->addItem("设备");
|
||||
nav->addItem("地图");
|
||||
nav->addItem("指令");
|
||||
nav->addItem("检查");
|
||||
nav->addItem("航线");
|
||||
nav->addItem("任务");
|
||||
nav->addItem("数据");
|
||||
nav->addItem("回放");
|
||||
nav->addItem("关于");
|
||||
nav->addItem(tr("设备"));
|
||||
nav->addItem(tr("地图"));
|
||||
nav->addItem(tr("指令"));
|
||||
nav->addItem(tr("检查"));
|
||||
nav->addItem(tr("航线"));
|
||||
nav->addItem(tr("任务"));
|
||||
nav->addItem(tr("数据"));
|
||||
nav->addItem(tr("回放"));
|
||||
nav->addItem(tr("关于"));
|
||||
|
||||
node = new MavLinkNode();
|
||||
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
#include "mavlinknode.h"
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -12,7 +12,6 @@ SUBDIRS += ClientLinkDialog
|
||||
SUBDIRS += Skin
|
||||
SUBDIRS += qnavigationwidget
|
||||
SUBDIRS += Cockpit
|
||||
|
||||
SUBDIRS += opmap
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -19,8 +19,8 @@ OBJECTS_DIR = $$PWD/../../build
|
||||
|
||||
QT += network
|
||||
QT += sql
|
||||
#CONFIG += staticlib\
|
||||
# plugin
|
||||
CONFIG += staticlib\
|
||||
plugin
|
||||
|
||||
SOURCES += opmaps.cpp \
|
||||
pureimagecache.cpp \
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
|
||||
namespace core {
|
||||
|
||||
#ifdef QtOpmapCore
|
||||
#include <coreglobal.h>
|
||||
class OPMAPCORESHARED_EXPORT MapType : public QObject {
|
||||
#else
|
||||
//#ifdef QtOpmapCore
|
||||
//#include <coreglobal.h>
|
||||
//class OPMAPCORESHARED_EXPORT MapType : public QObject {
|
||||
//#else
|
||||
class MapType : public QObject {
|
||||
#endif
|
||||
//#endif
|
||||
Q_OBJECT Q_ENUMS(Types)
|
||||
public:
|
||||
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@
|
||||
#include "urlfactory.h"
|
||||
#include "diagnostics.h"
|
||||
|
||||
// #include "point.h"
|
||||
#include "point.h"
|
||||
|
||||
|
||||
namespace core {
|
||||
|
||||
+11
-9
@@ -32,20 +32,22 @@
|
||||
|
||||
namespace core {
|
||||
|
||||
#ifdef QtOpmapCore
|
||||
#include <coreglobal.h>
|
||||
struct OPMAPCORESHARED_EXPORT Size;
|
||||
struct OPMAPCORESHARED_EXPORT Point {
|
||||
#else
|
||||
|
||||
|
||||
struct Size;
|
||||
struct Point {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
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 uint qHash(Point const & point);
|
||||
friend bool operator==(Point const & lhs, Point const & rhs);
|
||||
friend bool operator!=(Point const & lhs, Point const & rhs);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
Point();
|
||||
|
||||
@@ -82,8 +82,18 @@ class Core : public QObject, public QRunnable {
|
||||
|
||||
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::MapGraphicItem;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
public:
|
||||
Core();
|
||||
~Core();
|
||||
|
||||
@@ -17,8 +17,8 @@ OBJECTS_DIR = $$PWD/../../build
|
||||
|
||||
QT += network
|
||||
QT += sql
|
||||
#CONFIG += staticlib\
|
||||
# plugin
|
||||
CONFIG += staticlib\
|
||||
plugin
|
||||
|
||||
HEADERS += core.h \
|
||||
internalglobal.h \
|
||||
@@ -56,7 +56,6 @@ SOURCES += ./projections/lks94projection.cpp \
|
||||
./projections/platecarreeprojectionpergo.cpp
|
||||
|
||||
INCLUDEPATH += $$PWD/../../thirdpart/include
|
||||
|
||||
LIBS += -L$$PWD/../../thirdpart/lib -lcore
|
||||
|
||||
win32|win64 {
|
||||
|
||||
@@ -33,15 +33,10 @@
|
||||
#include <QMetaEnum>
|
||||
namespace internals {
|
||||
|
||||
#ifdef QtOpmapInternals
|
||||
#include <internalglobal.h>
|
||||
class OPMAPINTERNALSHARED_EXPORT MouseWheelZoomType : public QObject {
|
||||
#else
|
||||
|
||||
class MouseWheelZoomType : public QObject {
|
||||
#endif
|
||||
|
||||
|
||||
Q_OBJECT Q_ENUMS(Types)
|
||||
Q_OBJECT Q_ENUMS(Types)
|
||||
public:
|
||||
enum Types {
|
||||
/// <summary>
|
||||
@@ -89,5 +84,5 @@ public:
|
||||
}
|
||||
};
|
||||
}
|
||||
Q_DECLARE_METATYPE(internals::MouseWheelZoomType::Types)
|
||||
Q_DECLARE_METATYPE(internals::MouseWheelZoomType::Types)
|
||||
#endif // MOUSEWHEELZOOMTYPE_H
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <QWidget>
|
||||
#include <QMouseEvent>
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
#ifdef QNavigation
|
||||
#include <qnavigantionglobal.h>
|
||||
|
||||
Reference in New Issue
Block a user