mirror of
https://gitee.com/drabel/LibQQt.git
synced 2025-01-04 10:18:44 +08:00
update qqt support Android
This commit is contained in:
parent
2128bd77f5
commit
fbdc8a247c
@ -14,13 +14,38 @@ macx {
|
||||
CONFIG += app_bundle
|
||||
}
|
||||
|
||||
OBJECTS_DIR = obj
|
||||
MOC_DIR = obj/moc.cpp
|
||||
UI_DIR = obj/ui.h
|
||||
RCC_DIR = qrc
|
||||
#user directory
|
||||
DESTDIR = bin
|
||||
#DESTDIR = ../../../Product/install/Application
|
||||
QT_KIT = $$(QKIT)
|
||||
message($${QT_KIT} Defined in qqtframe)
|
||||
equals(QT_KIT, MIPS32) {
|
||||
QT += multimedia
|
||||
DEFINES += __MIPS_LINUX__
|
||||
} else:equals(QT_KIT, LINUX) {
|
||||
DEFINES += __LINUX__
|
||||
} else:equals(QT_KIT, LINUX64) {
|
||||
DEFINES += __LINUX64__
|
||||
} else:equals(QT_KIT, WIN) {
|
||||
DEFINES += __WIN__
|
||||
} else:equals(QT_KIT, WIN64) {
|
||||
DEFINES += __WIN64__
|
||||
} else:equals(QT_KIT, macOS) {
|
||||
DEFINES += __DARWIN__
|
||||
} else:equals(QT_KIT, Android) {
|
||||
DEFINES += __ANDROID__
|
||||
}
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
} else {
|
||||
DEFINES -= QT_NO_DEBUG_OUTPUT
|
||||
}
|
||||
|
||||
equals(QT_KIT, Android) {
|
||||
CONFIG += mobility
|
||||
MOBILITY =
|
||||
#DISTFILES += \
|
||||
# android/AndroidManifest.xml
|
||||
|
||||
#ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
|
||||
}
|
||||
|
||||
INCLUDEPATH += $$PWD \
|
||||
$$PWD/../../src \
|
||||
@ -41,42 +66,25 @@ macx {
|
||||
LIBS += -F/Users/abel/Develop/c0-buildstation/a0-qqtfoundation/MacOS/Release/src/bin
|
||||
LIBS += -framework QQt
|
||||
}
|
||||
|
||||
QT_KIT = $$(QKIT)
|
||||
|
||||
message($${QT_KIT} Defined in qqtframe)
|
||||
|
||||
DEFINES += _TTY_POSIX_
|
||||
|
||||
equals(QT_KIT, MIPS32) {
|
||||
QT += multimedia
|
||||
DEFINES += __MIPS_LINUX__
|
||||
} else:equals(QT_KIT, LINUX) {
|
||||
DEFINES += __LINUX__
|
||||
} else:equals(QT_KIT, LINUX64) {
|
||||
DEFINES += __LINUX64__
|
||||
} else:equals(QT_KIT, WIN) {
|
||||
DEFINES += __WIN__
|
||||
} else:equals(QT_KIT, WIN64) {
|
||||
DEFINES += __WIN64__
|
||||
} else:equals(QT_KIT, macOS) {
|
||||
DEFINES += __DARWIN__
|
||||
equals(QT_KIT, Android) {
|
||||
LIBS += -L/Users/abel/Develop/c0-buildstation/a0-qqtfoundation/Android-arm/Release/src/bin
|
||||
LIBS += -lQQt
|
||||
}
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
} else {
|
||||
DEFINES -= QT_NO_DEBUG_OUTPUT
|
||||
}
|
||||
|
||||
|
||||
OBJECTS_DIR = obj
|
||||
MOC_DIR = obj/moc.cpp
|
||||
UI_DIR = obj/ui.h
|
||||
RCC_DIR = qrc
|
||||
#user directory
|
||||
DESTDIR = bin
|
||||
equals(QT_KIT, MIPS32) {
|
||||
target.path = /Application
|
||||
INSTALLS += target
|
||||
target.path = /Application
|
||||
INSTALLS += target
|
||||
} else: unix {
|
||||
macx{
|
||||
target.path = /Users/abel/Develop/b1-Product/a0-qqtbased/Application
|
||||
INSTALLS += target
|
||||
}
|
||||
macx{
|
||||
target.path = /Users/abel/Develop/b1-Product
|
||||
INSTALLS += target
|
||||
}
|
||||
}
|
||||
|
||||
INCLUDEPATH += $$PWD
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <QDebug>
|
||||
#include <QSqlDatabase>
|
||||
#include <QSqlError>
|
||||
#include <QSslError>
|
||||
#include <qqt-local.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -10,6 +10,10 @@ QQTWord::QQTWord(QObject *parent) :
|
||||
fmt(0), mainFmt(0),headerFmt(0),titleFmt(0), title2Fmt(0)
|
||||
{
|
||||
//setup printer
|
||||
/**
|
||||
MIPS bug: you must use QQTPrinter(QPrinter::HighResolution)
|
||||
Other constructer won't work well
|
||||
*/
|
||||
pr= new QQTPrinter(QPrinter::HighResolution);
|
||||
pr->setFullPage(true);
|
||||
pr->setColorMode(QPrinter::Color);
|
||||
@ -298,7 +302,7 @@ void QQTWord::exportPdf(const QString &pdf)
|
||||
pr->setOutputFileName(pdf);
|
||||
|
||||
// print pdf
|
||||
QPainter p(pr);
|
||||
QPainter p(pr);
|
||||
|
||||
QQTGraphicsScene* pageScene = 0;
|
||||
foreach (pageScene, pageSceneVector) {
|
||||
|
@ -82,4 +82,8 @@
|
||||
#include <QEventTransition>
|
||||
#include <QTimeLine>
|
||||
|
||||
#include <QSslError>
|
||||
#include <QSslKey>
|
||||
#include <QSslSocket>
|
||||
|
||||
#endif // QQTGUIQT_H
|
||||
|
52
src/qqt.pri
52
src/qqt.pri
@ -4,21 +4,6 @@
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
############
|
||||
##install and build
|
||||
############
|
||||
OBJECTS_DIR = obj
|
||||
MOC_DIR = obj/moc.cpp
|
||||
UI_DIR = obj/ui.h
|
||||
RCC_DIR = qrc
|
||||
#user directory
|
||||
DESTDIR = bin
|
||||
macx {
|
||||
###if install product to same path,use this.
|
||||
target.path = /Users/abel/Develop/b1-Product/a0-qqtbased/Application
|
||||
INSTALLS += target
|
||||
}
|
||||
|
||||
#############
|
||||
##project version
|
||||
#############
|
||||
@ -35,11 +20,13 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport serialport
|
||||
QT_KIT = $$(QKIT)
|
||||
message($${QT_KIT} Defined in qqtfoundation)
|
||||
#MIPS __MIPS_LINUX__
|
||||
#ARM __ARM_LINUX__
|
||||
#LINUX __LINUX__
|
||||
#LINUX64 __LINUX64__
|
||||
#WIN __WIN__
|
||||
#WIN64 __WIN64__
|
||||
#macOS __DARWIN__
|
||||
#Android __ANDROID__
|
||||
#处理文件内平台小差异
|
||||
equals(QT_KIT, MIPS32) {
|
||||
QT += multimedia
|
||||
@ -54,6 +41,9 @@ equals(QT_KIT, MIPS32) {
|
||||
DEFINES += __WIN64__
|
||||
} else:equals(QT_KIT, macOS) {
|
||||
DEFINES += __DARWIN__
|
||||
} else:equals(QT_KIT, Android) {
|
||||
DEFINES += __ANDROID__
|
||||
#TODO:no customplot word printer
|
||||
}
|
||||
CONFIG(debug, debug|release) {
|
||||
} else {
|
||||
@ -64,7 +54,6 @@ win32 {
|
||||
QMAKE_CXXFLAGS += /wd"4819" /wd"4244" /wd"4100"
|
||||
}
|
||||
|
||||
|
||||
#############
|
||||
##libraries
|
||||
#############
|
||||
@ -85,6 +74,21 @@ win32 {
|
||||
}
|
||||
}
|
||||
|
||||
############
|
||||
##install and build
|
||||
############
|
||||
OBJECTS_DIR = obj
|
||||
MOC_DIR = obj/moc.cpp
|
||||
UI_DIR = obj/ui.h
|
||||
RCC_DIR = qrc
|
||||
#user directory
|
||||
DESTDIR = bin
|
||||
macx {
|
||||
###if install product to same path,use this.
|
||||
target.path = /Users/abel/Develop/b1-Product
|
||||
INSTALLS += target
|
||||
}
|
||||
|
||||
###########################
|
||||
##include directories
|
||||
###########################
|
||||
@ -157,7 +161,12 @@ SOURCES += $$PWD/customplot/qcpdocumentobject.cpp \
|
||||
$$PWD/customplot/qcustomplot.cpp
|
||||
HEADERS += $$PWD/customplot/qcpdocumentobject.h \
|
||||
$$PWD/customplot/qcustomplot.h
|
||||
|
||||
equals(QT_KIT, Android) {
|
||||
SOURCES -= $$PWD/customplot/qcpdocumentobject.cpp \
|
||||
$$PWD/customplot/qcustomplot.cpp
|
||||
HEADERS -= $$PWD/customplot/qcpdocumentobject.h \
|
||||
$$PWD/customplot/qcustomplot.h
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -202,6 +211,10 @@ FORMS += \
|
||||
$$PWD/frame/qqtdialog.ui \
|
||||
$$PWD/frame/qqtinput.ui \
|
||||
$$PWD/frame/qqtmsgbox.ui
|
||||
equals(QT_KIT, Android) {
|
||||
SOURCES -= $$PWD/frame/qqtword.cpp
|
||||
HEADERS -= $$PWD/frame/qqtword.h
|
||||
}
|
||||
|
||||
|
||||
#gui
|
||||
@ -280,7 +293,10 @@ HEADERS += $$PWD/pluginwatcher/qqtpluginwatcher.h \
|
||||
#printsupport
|
||||
SOURCES += $$PWD/printsupport/qqtprinter.cpp
|
||||
HEADERS += $$PWD/printsupport/qqtprinter.h
|
||||
|
||||
equals(QT_KIT, Android) {
|
||||
SOURCES -= $$PWD/printsupport/qqtprinter.cpp
|
||||
HEADERS -= $$PWD/printsupport/qqtprinter.h
|
||||
}
|
||||
|
||||
#sql
|
||||
SOURCES += $$PWD/sql/qqtsql.cpp
|
||||
|
@ -5,14 +5,13 @@
|
||||
#-------------------------------------------------
|
||||
TARGET = QQt
|
||||
TEMPLATE = lib
|
||||
|
||||
CONFIG += dll
|
||||
macx {
|
||||
CONFIG += lib_bundle
|
||||
}
|
||||
|
||||
#QQT LIBRARY (DLL)
|
||||
#DEFINES += QQT_LIBRARY
|
||||
|
||||
DEFINES += QQT_LIBRARY
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user