Commit 77623e51 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov
parent 3580ac09
#pragma once
#include <QFile> #include <QFile>
#include <QScreen> #include <QScreen>
#include <QDir> #include <QDir>
......
...@@ -3,6 +3,8 @@ QT += core gui widgets printsupport ...@@ -3,6 +3,8 @@ QT += core gui widgets printsupport
TEMPLATE = app TEMPLATE = app
CONFIG += app_bundle CONFIG += app_bundle
CONFIG += c++11
CONFIG -= debug_and_release debug_and_release_target CONFIG -= debug_and_release debug_and_release_target
CONFIG(debug, debug|release) { CONFIG(debug, debug|release) {
...@@ -19,6 +21,14 @@ win32:!contains(QMAKE_TARGET.arch, x86_64):{ ...@@ -19,6 +21,14 @@ win32:!contains(QMAKE_TARGET.arch, x86_64):{
PLATFORM_BUILD = win32 PLATFORM_BUILD = win32
message(windows32) message(windows32)
} }
linux-g++:contains(QMAKE_HOST.arch, x86_64):{
PLATFORM_BUILD = linux64
message(linux64)
}
linux-g++:!contains(QMAKE_HOST.arch, x86_64):{
PLATFORM_BUILD = linux32
message(linux32)
}
CONFIG(debug, debug|release) { CONFIG(debug, debug|release) {
PLATFORM_BUILD2 = $$PLATFORM_BUILD/debug PLATFORM_BUILD2 = $$PLATFORM_BUILD/debug
...@@ -30,7 +40,12 @@ CONFIG(debug, debug|release) { ...@@ -30,7 +40,12 @@ CONFIG(debug, debug|release) {
include($$PWD/AscDocumentEditor.pri) include($$PWD/AscDocumentEditor.pri)
SOURCES += \ SOURCES += \
$$PWD/main.cpp $$PWD/main_cp.cpp
win32 {
LIBS += -L$$PWD/../../cefbuilds/$$PLATFORM_BUILD -llibcef
} else {
LIBS += -L$$PWD/../../cefbuilds/$$PLATFORM_BUILD -lcef
}
LIBS += -L$$PWD/../../cefbuilds/$$PLATFORM_BUILD -llibcef
LIBS += -L$$PWD/../../corebuilds/$$PLATFORM_BUILD2 -lascdocumentscore LIBS += -L$$PWD/../../corebuilds/$$PLATFORM_BUILD2 -lascdocumentscore
...@@ -50,3 +50,15 @@ LIBS += -lwininet \ ...@@ -50,3 +50,15 @@ LIBS += -lwininet \
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS,5.02 QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS,5.02
} }
linux-g++ {
DEFINES += \
LINUX \
_LINUX \
_LINUX_QT
CONFIG += link_pkgconfig
PKGCONFIG += glib-2.0 gdk-2.0 gtkglext-1.0 atk cairo gtk+-unix-print-2.0
LIBS += -lz
}
#ifndef QASCAPPLICATIONMANAGER #ifndef QASCAPPLICATIONMANAGER
#define QASCAPPLICATIONMANAGER #define QASCAPPLICATIONMANAGER
#include "../../../lib/include/cefapplication.h"
#include "../../../lib/include/applicationmanager.h"
#include <shlwapi.h>
#include <shlobj.h>
#include <QFileDialog>
#include "QAscMainPanel.h" #include "QAscMainPanel.h"
class QAscApplicationManager : public CAscApplicationManager class QAscApplicationManager : public CAscApplicationManager
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include <QDir> #include <QDir>
#include "QAscApplicationManager.h" #include "QAscApplicationManager.h"
#include "QAscMainPanel.h"
#ifdef WIN32 #ifdef WIN32
#include <shlwapi.h> #include <shlwapi.h>
...@@ -13,6 +12,7 @@ ...@@ -13,6 +12,7 @@
#endif #endif
#include <QStandardPaths> #include <QStandardPaths>
#include <QApplication>
static std::wstring GetAppDataPath() static std::wstring GetAppDataPath()
{ {
...@@ -129,9 +129,6 @@ static int AscEditor_Main( int argc, char *argv[] ) ...@@ -129,9 +129,6 @@ static int AscEditor_Main( int argc, char *argv[] )
mainFont.setStyleStrategy( QFont::PreferAntialias ); mainFont.setStyleStrategy( QFont::PreferAntialias );
a.setFont( mainFont ); a.setFont( mainFont );
// Background color
HBRUSH windowBackground = CreateSolidBrush( RGB( 49, 52, 55 ) );
// Create window // Create window
QAscMainWindow w(NULL, pApplicationManager); QAscMainWindow w(NULL, pApplicationManager);
w.show(); w.show();
......
#include <windows.h>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QGridLayout> #include <QtWidgets/QGridLayout>
#include <QtWidgets/QPushButton> #include <QtWidgets/QPushButton>
#include <QScrollArea> #include <QScrollArea>
#include <QFileDialog> #include <QFileDialog>
#include "QAscMainPanel.h"
#include "QAscTabWidget.h" #include "QAscTabWidget.h"
#include <QStandardPaths> #include <QStandardPaths>
#include "QAscMainPanel.h"
#include "../../../lib/include/qascprinter.h" #include "../../../lib/include/qascprinter.h"
QAscMainPanel::QAscMainPanel( QWidget* parent, CAscApplicationManager* pManager, bool bIsCustomWindow ) : QWidget( parent ) QAscMainPanel::QAscMainPanel( QWidget* parent, CAscApplicationManager* pManager, bool bIsCustomWindow ) : QWidget( parent )
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include <QStylePainter> #include <QStylePainter>
#include <QStyleOption> #include <QStyleOption>
#include "../../../lib/include/applicationmanager.h"
#include "../../../lib/qcefview/qcefview.h" #include "../../../lib/qcefview/qcefview.h"
class QPushButtonWrapper : public QPushButton class QPushButtonWrapper : public QPushButton
...@@ -371,7 +370,7 @@ public slots: ...@@ -371,7 +370,7 @@ public slots:
#if 1 #if 1
std::string sId = std::to_string(nId);sId += "\n"; std::string sId = std::to_string(nId);sId += "\n";
OutputDebugStringA(sId.c_str()); //OutputDebugStringA(sId.c_str());
#endif #endif
NSEditorApi::CAscMenuEvent* pEvent = new NSEditorApi::CAscMenuEvent(); NSEditorApi::CAscMenuEvent* pEvent = new NSEditorApi::CAscMenuEvent();
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#define APPLICATION_MANAGER_EVENTS_H #define APPLICATION_MANAGER_EVENTS_H
#include "../../../Word_Api/Editor_Api.h" #include "../../../Word_Api/Editor_Api.h"
#include "base.h"
#define ASC_MENU_EVENT_TYPE_CEF_CREATETAB 1001 #define ASC_MENU_EVENT_TYPE_CEF_CREATETAB 1001
#define ASC_MENU_EVENT_TYPE_CEF_TABEDITORTYPE 1002 #define ASC_MENU_EVENT_TYPE_CEF_TABEDITORTYPE 1002
...@@ -302,7 +301,7 @@ namespace NSEditorApi ...@@ -302,7 +301,7 @@ namespace NSEditorApi
virtual void GetLogicalDPI(int& nDpiX, int& nDpiY) = 0; virtual void GetLogicalDPI(int& nDpiX, int& nDpiY) = 0;
virtual void GetPhysicalRect(int& nX, int& nY, int& nW, int& nH) = 0; virtual void GetPhysicalRect(int& nX, int& nY, int& nW, int& nH) = 0;
virtual void GetPrintAreaSize(int& nW, int& nH) = 0; virtual void GetPrintAreaSize(int& nW, int& nH) = 0;
virtual void BitBlt(BYTE* pBGRA, const int& nRasterX, const int& nRasterY, const int& nRasterW, const int& nRasterH, virtual void BitBlt(unsigned char* pBGRA, const int& nRasterX, const int& nRasterY, const int& nRasterW, const int& nRasterH,
const double& x, const double& y, const double& w, const double& h, const double& dAngle) = 0; const double& x, const double& y, const double& w, const double& h, const double& dAngle) = 0;
}; };
......
...@@ -13,8 +13,9 @@ ...@@ -13,8 +13,9 @@
#if defined(_LINUX) && !defined(_MAC) #if defined(_LINUX) && !defined(_MAC)
#include <X11/X.h> //#include <X11/X.h>
#define WindowHandleId XID //typedef unsigned long XID;
#define WindowHandleId unsigned long
#endif #endif
......
#ifndef CEFCLIENT_CEFWEBVIEW_H #ifndef CEFCLIENT_CEFWEBVIEW_H
#define CEFCLIENT_CEFWEBVIEW_H #define CEFCLIENT_CEFWEBVIEW_H
#include "base.h" #include "./base.h"
#include "./applicationmanager_events.h" #include "./applicationmanager_events.h"
enum CefViewWrapperType enum CefViewWrapperType
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
#include <QtPrintSupport/QPrintDialog> #include <QtPrintSupport/QPrintDialog>
#include <QPainter> #include <QPainter>
#include <QPaintEngine> #include <QPaintEngine>
#include <qmath.h>
#include "./applicationmanager_events.h" #include "./applicationmanager_events.h"
#include <qmath.h>
class QAscPrinterContext : public NSEditorApi::CAscPrinterContextBase class QAscPrinterContext : public NSEditorApi::CAscPrinterContextBase
{ {
......
#ifndef CEFCLIENT_QCEFWEBVIEW_H #ifndef CEFCLIENT_QCEFWEBVIEW_H
#define CEFCLIENT_QCEFWEBVIEW_H #define CEFCLIENT_QCEFWEBVIEW_H
#include "./../include/cefview.h"
#include "./../include/applicationmanager.h"
#include <QWidget> #include <QWidget>
#include <QStyleOption> #include <QStyleOption>
#include "./../include/cefview.h"
#include "./../include/applicationmanager.h"
class QCefView : public QWidget, public CCefViewWidgetImpl class QCefView : public QWidget, public CCefViewWidgetImpl
{ {
Q_OBJECT Q_OBJECT
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment