Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
onlyoffice_core
Commits
cfc38567
Commit
cfc38567
authored
Mar 28, 2016
by
Sergey Luzyanin
Committed by
Alexander Trofimov
May 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Presentation Editor
parent
f6ea5628
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
669 additions
and
0 deletions
+669
-0
DesktopEditor/Qt_build/presentation_editor/project/NativeControl.cpp
...or/Qt_build/presentation_editor/project/NativeControl.cpp
+271
-0
DesktopEditor/Qt_build/presentation_editor/project/NativeControl.h
...itor/Qt_build/presentation_editor/project/NativeControl.h
+53
-0
DesktopEditor/Qt_build/presentation_editor/project/presentation_editor.pro
...build/presentation_editor/project/presentation_editor.pro
+77
-0
DesktopEditor/Qt_build/test_presentation/control/main.cpp
DesktopEditor/Qt_build/test_presentation/control/main.cpp
+11
-0
DesktopEditor/Qt_build/test_presentation/control/mainwindow.cpp
...pEditor/Qt_build/test_presentation/control/mainwindow.cpp
+51
-0
DesktopEditor/Qt_build/test_presentation/control/mainwindow.h
...topEditor/Qt_build/test_presentation/control/mainwindow.h
+34
-0
DesktopEditor/Qt_build/test_presentation/control/mainwindow.ui
...opEditor/Qt_build/test_presentation/control/mainwindow.ui
+68
-0
DesktopEditor/Qt_build/test_presentation/control/nativecontrol.h
...Editor/Qt_build/test_presentation/control/nativecontrol.h
+37
-0
DesktopEditor/Qt_build/test_presentation/control/test_presentation.pro
.../Qt_build/test_presentation/control/test_presentation.pro
+67
-0
No files found.
DesktopEditor/Qt_build/presentation_editor/project/NativeControl.cpp
0 → 100644
View file @
cfc38567
#include "NativeControl.h"
#include "../../../DesktopEditor/presentation_editor/Control.h"
#include "../../../Word_Api/Editor_Api.h"
#include "../../../fontengine/ApplicationFontsWorker.h"
#include <QtOpenGL/QGLContext>
#include <QThread>
class
CEditorCtrlWrapper
:
public
CEditorCtrl
{
public:
CNativeCtrl
*
m_pCtrl
;
public:
CEditorCtrlWrapper
()
:
CEditorCtrl
()
{
m_pCtrl
=
NULL
;
}
virtual
~
CEditorCtrlWrapper
()
{
m_pCtrl
=
NULL
;
}
virtual
void
InvalidateRectNative
(
int
x
,
int
y
,
int
w
,
int
h
)
{
if
(
m_pCtrl
!=
NULL
)
m_pCtrl
->
InvalidateRectNative
(
x
,
y
,
w
,
h
);
}
int
GetCountThreadsUse
()
{
return
3
;
}
};
void
CNativeCtrl
::
slot_threadRepaint
()
{
repaint
();
}
CNativeCtrl
::
CNativeCtrl
(
QWidget
*
parent
,
const
char
*
name
)
:
QGLWidget
(
parent
)
{
connect
(
this
,
SIGNAL
(
signal_threadRepaint
()),
SLOT
(
slot_threadRepaint
()),
Qt
::
QueuedConnection
);
setAttribute
(
Qt
::
WA_NoBackground
);
setAttribute
(
Qt
::
WA_NoSystemBackground
);
setSizePolicy
(
QSizePolicy
::
Minimum
,
QSizePolicy
::
Minimum
);
setMouseTracking
(
true
);
grabKeyboard
();
m_pWrapper
=
new
CEditorCtrlWrapper
();
m_pWrapper
->
m_pCtrl
=
this
;
m_pWrapper
->
m_strFontsDirectory
=
L""
;
}
CNativeCtrl
::~
CNativeCtrl
()
{
}
void
CNativeCtrl
::
InitSDK
(
const
std
::
wstring
&
sFontsPath
,
const
std
::
wstring
&
sSdkPath
,
CApplicationFontsWorker
*
pWorker
)
{
m_pWrapper
->
SetFontsDirectory
(
sFontsPath
);
unsigned
char
*
pDataDst
=
NULL
;
unsigned
int
nLenDst
=
0
;
std
::
vector
<
std
::
wstring
>
arrNames
=
pWorker
->
CheckApplication
(
true
,
NULL
,
0
,
pDataDst
,
nLenDst
);
int
nLenAllFonts
=
0
;
memcpy
(
&
nLenAllFonts
,
pDataDst
,
sizeof
(
int
));
m_pWrapper
->
SetAllFontsJSData
((
char
*
)(
pDataDst
+
4
),
nLenAllFonts
);
std
::
wstring
sScriptPath
=
sSdkPath
;
m_pWrapper
->
m_oWorkJS
.
m_oThreadJS
.
StartFromScript
(
sScriptPath
);
}
void
CNativeCtrl
::
OpenFile
(
const
std
::
wstring
&
sFilePath
)
{
m_pWrapper
->
InternalOpenFile
(
sFilePath
);
}
void
CNativeCtrl
::
SetZoom
(
double
dZoom
)
{
m_pWrapper
->
SetZoom
(
dZoom
);
}
void
CNativeCtrl
::
initializeGL
()
{
m_pWrapper
->
m_bIsRetina
=
false
;
m_pWrapper
->
m_oDevicePainter
.
m_oFrameControls
.
m_oFrame
.
Init
(
m_pWrapper
->
GetCountThreadsUse
());
m_pWrapper
->
InternalInit
();
m_pWrapper
->
Resize
(
600
,
600
);
m_pWrapper
->
m_oWorkJS
.
m_oThreadJS
.
SetMainCtrl
((
CEditorCtrl
*
)
m_pWrapper
);
}
void
CNativeCtrl
::
paintGL
()
{
CVideoFrameControls
*
pVRAM_Worker
=
&
m_pWrapper
->
m_oDevicePainter
.
m_oFrameControls
;
pVRAM_Worker
->
m_oFrame
.
SetCurrentCtx
();
DWORD
dwTime1
=
NSTimers
::
GetTickCount
();
CRgbColor3
*
pBackgroundColor
=
&
(
m_pWrapper
->
m_pSkin
->
BackgroundColor
);
glClearColor
(
pBackgroundColor
->
R
/
255.0
,
pBackgroundColor
->
G
/
255.0
,
pBackgroundColor
->
B
/
255.0
,
1
);
glClear
(
GL_COLOR_BUFFER_BIT
);
GLfloat
_width
=
this
->
width
()
*
this
->
devicePixelRatio
();
GLfloat
_height
=
this
->
height
()
*
this
->
devicePixelRatio
();
glMatrixMode
(
GL_PROJECTION
);
glPushMatrix
();
glLoadIdentity
();
glOrtho
(
0.0
,
_width
,
0.0
,
_height
,
-
1.0
,
1.0
);
glEnable
(
GL_BLEND
);
glColor3f
(
1
,
1
,
1
);
glViewport
(
0
,
0
,
_width
,
_height
);
pVRAM_Worker
->
m_oFrame
.
UnSetCurrentCtx
();
pVRAM_Worker
->
m_oFrame
.
SetSizes
((
int
)
_width
,
(
int
)
_height
);
m_pWrapper
->
m_oSlideDrawer
.
DrawGL
();
m_pWrapper
->
m_oDevicePainter
.
LockPaint
();
// buttons
pVRAM_Worker
->
m_oFrame
.
DrawTexture
(
pVRAM_Worker
->
m_pButtonNextPage
,
m_pWrapper
->
m_oNext
.
X
,
m_pWrapper
->
m_oNext
.
Y
,
true
);
pVRAM_Worker
->
m_oFrame
.
DrawTexture
(
pVRAM_Worker
->
m_pButtonPrevPage
,
m_pWrapper
->
m_oPrev
.
X
,
m_pWrapper
->
m_oPrev
.
Y
,
true
);
// scrolls
pVRAM_Worker
->
m_oFrame
.
DrawTexture
(
pVRAM_Worker
->
m_pVerScroll
,
m_pWrapper
->
m_oVerScroll
.
X
,
m_pWrapper
->
m_oVerScroll
.
Y
,
true
);
if
(
m_pWrapper
->
m_oHorScroll
.
IsDisplay
)
{
pVRAM_Worker
->
m_oFrame
.
DrawTexture
(
pVRAM_Worker
->
m_pHorScroll
,
m_pWrapper
->
m_oHorScroll
.
X
,
m_pWrapper
->
m_oHorScroll
.
Y
,
true
);
}
pVRAM_Worker
->
m_oFrame
.
SetCurrentCtx
();
glDisable
(
GL_BLEND
);
glPopMatrix
();
glFlush
();
pVRAM_Worker
->
m_oFrame
.
UnSetCurrentCtx
();
m_pWrapper
->
m_oDevicePainter
.
LeavePaint
();
}
void
CNativeCtrl
::
resizeGL
(
int
width
,
int
height
)
{
int
nDevicePixelRatio
=
this
->
devicePixelRatio
();
m_pWrapper
->
Resize
(
this
->
width
()
*
nDevicePixelRatio
,
this
->
height
()
*
nDevicePixelRatio
);
}
void
CNativeCtrl
::
closeEvent
(
QCloseEvent
*
e
)
{
}
void
CNativeCtrl
::
mousePressEvent
(
QMouseEvent
*
e
)
{
m_pWrapper
->
m_oMouseController
.
X
=
e
->
pos
().
x
()
*
this
->
devicePixelRatio
();
m_pWrapper
->
m_oMouseController
.
Y
=
e
->
pos
().
y
()
*
this
->
devicePixelRatio
();
Qt
::
MouseButton
button
=
e
->
button
();
if
(
button
==
Qt
::
LeftButton
)
m_pWrapper
->
m_oMouseController
.
Button
=
CMouseController
::
mbtLeft
;
else
if
(
button
==
Qt
::
RightButton
)
m_pWrapper
->
m_oMouseController
.
Button
=
CMouseController
::
mbtRight
;
else
m_pWrapper
->
m_oMouseController
.
Button
=
CMouseController
::
mbtCenter
;
Qt
::
KeyboardModifiers
mods
=
e
->
modifiers
();
m_pWrapper
->
m_oKeyboardController
.
ShiftKey
=
(
0
!=
(
mods
&
Qt
::
ShiftModifier
))
?
true
:
false
;
m_pWrapper
->
m_oKeyboardController
.
CtrlKey
=
(
0
!=
(
mods
&
Qt
::
ControlModifier
))
?
true
:
false
;
m_pWrapper
->
m_oKeyboardController
.
AltKey
=
(
0
!=
(
mods
&
Qt
::
AltModifier
))
?
true
:
false
;
m_pWrapper
->
m_oMouseController
.
CheckDownCallback
(
true
);
m_pWrapper
->
InternalOnMouseDown
();
}
void
CNativeCtrl
::
mouseMoveEvent
(
QMouseEvent
*
e
)
{
m_pWrapper
->
m_oMouseController
.
X
=
e
->
pos
().
x
()
*
this
->
devicePixelRatio
();
m_pWrapper
->
m_oMouseController
.
Y
=
e
->
pos
().
y
()
*
this
->
devicePixelRatio
();
Qt
::
KeyboardModifiers
mods
=
e
->
modifiers
();
m_pWrapper
->
m_oKeyboardController
.
ShiftKey
=
(
0
!=
(
mods
&
Qt
::
ShiftModifier
))
?
true
:
false
;
m_pWrapper
->
m_oKeyboardController
.
CtrlKey
=
(
0
!=
(
mods
&
Qt
::
ControlModifier
))
?
true
:
false
;
m_pWrapper
->
m_oKeyboardController
.
AltKey
=
(
0
!=
(
mods
&
Qt
::
AltModifier
))
?
true
:
false
;
m_pWrapper
->
m_oMouseController
.
CheckMoveCallback
();
m_pWrapper
->
InternalOnMouseMove
();
}
void
CNativeCtrl
::
mouseReleaseEvent
(
QMouseEvent
*
e
)
{
m_pWrapper
->
m_oMouseController
.
X
=
e
->
pos
().
x
()
*
this
->
devicePixelRatio
();
m_pWrapper
->
m_oMouseController
.
Y
=
e
->
pos
().
y
()
*
this
->
devicePixelRatio
();
Qt
::
MouseButton
button
=
e
->
button
();
if
(
button
==
Qt
::
LeftButton
)
m_pWrapper
->
m_oMouseController
.
Button
=
CMouseController
::
mbtLeft
;
else
if
(
button
==
Qt
::
RightButton
)
m_pWrapper
->
m_oMouseController
.
Button
=
CMouseController
::
mbtRight
;
else
m_pWrapper
->
m_oMouseController
.
Button
=
CMouseController
::
mbtCenter
;
Qt
::
KeyboardModifiers
mods
=
e
->
modifiers
();
m_pWrapper
->
m_oKeyboardController
.
ShiftKey
=
(
0
!=
(
mods
&
Qt
::
ShiftModifier
))
?
true
:
false
;
m_pWrapper
->
m_oKeyboardController
.
CtrlKey
=
(
0
!=
(
mods
&
Qt
::
ControlModifier
))
?
true
:
false
;
m_pWrapper
->
m_oKeyboardController
.
AltKey
=
(
0
!=
(
mods
&
Qt
::
AltModifier
))
?
true
:
false
;
m_pWrapper
->
InternalOnMouseUp
();
}
void
CNativeCtrl
::
wheelEvent
(
QWheelEvent
*
event
)
{
}
void
CNativeCtrl
::
keyPressEvent
(
QKeyEvent
*
e
)
{
if
(
e
->
key
()
==
Qt
::
Key_Left
)
{
if
(
m_pWrapper
->
m_lCurSlide
>
0
)
{
m_pWrapper
->
GoToPage
(
m_pWrapper
->
m_lCurSlide
-
1
);
}
}
else
if
(
e
->
key
()
==
Qt
::
Key_Right
)
{
if
(
m_pWrapper
->
m_lCurSlide
<
m_pWrapper
->
m_lSlidesCount
-
1
)
{
m_pWrapper
->
GoToPage
(
m_pWrapper
->
m_lCurSlide
+
1
);
}
}
}
void
CNativeCtrl
::
keyReleaseEvent
(
QKeyEvent
*
e
)
{
}
void
CNativeCtrl
::
InvalidateRectNative
(
int
x
,
int
y
,
int
w
,
int
h
)
{
emit
signal_threadRepaint
();
}
DesktopEditor/Qt_build/presentation_editor/project/NativeControl.h
0 → 100644
View file @
cfc38567
#ifndef NATIVECONTROLL_H
#define NATIVECONTROLL_H
#include <QWidget>
#include <QMouseEvent>
#include <QWheelEvent>
#include <QKeyEvent>
#include <QPaintEvent>
#include <QtOpenGL/QGLWidget>
class
CEditorCtrlWrapper
;
class
CApplicationFontsWorker
;
class
CNativeCtrl
:
public
QGLWidget
{
Q_OBJECT
signals:
void
signal_threadRepaint
();
protected
slots
:
void
slot_threadRepaint
();
public:
CNativeCtrl
(
QWidget
*
parent
=
0
,
const
char
*
name
=
NULL
);
virtual
~
CNativeCtrl
();
public:
virtual
void
initializeGL
();
virtual
void
paintGL
();
virtual
void
resizeGL
(
int
width
,
int
height
);
virtual
void
closeEvent
(
QCloseEvent
*
e
);
virtual
void
mousePressEvent
(
QMouseEvent
*
e
);
virtual
void
mouseMoveEvent
(
QMouseEvent
*
e
);
virtual
void
mouseReleaseEvent
(
QMouseEvent
*
e
);
virtual
void
wheelEvent
(
QWheelEvent
*
event
);
virtual
void
keyPressEvent
(
QKeyEvent
*
e
);
virtual
void
keyReleaseEvent
(
QKeyEvent
*
e
);
virtual
void
InvalidateRectNative
(
int
x
,
int
y
,
int
w
,
int
h
);
public:
void
InitSDK
(
const
std
::
wstring
&
sFontsPath
,
const
std
::
wstring
&
sSdkPath
,
CApplicationFontsWorker
*
pWorker
);
void
OpenFile
(
const
std
::
wstring
&
sFilePath
);
void
SetZoom
(
double
dZoom
);
private:
CEditorCtrlWrapper
*
m_pWrapper
;
};
#endif // NATIVECONTROLL_H
DesktopEditor/Qt_build/presentation_editor/project/presentation_editor.pro
0 → 100644
View file @
cfc38567
#-------------------------------------------------
#
#
Project
created
by
QtCreator
2016
-
01
-
19
T14
:
56
:
40
#
#-------------------------------------------------
QT
+=
core
gui
QT
+=
widgets
opengl
TARGET
=
presentation_editor
TEMPLATE
=
lib
CONFIG
+=
staticlib
CONFIG
(
debug
,
debug
|
release
)
{
DESTDIR
=
$$
PWD
/../
Debug
}
else
{
DESTDIR
=
$$
PWD
/../
Release
}
INCLUDEPATH
+=
\
..
/../../
agg
-
2.4
/
include
\
..
/../../
freetype
-
2.5
.
2
/
include
\
..
/../../
doctrenderer
/
v8_windows
/
v8
/
\
..
/../../
doctrenderer
/
v8_windows
/
v8
/
include
\
..
/../../
doctrenderer
/
v8_windows
/
v8
/
include
/
libplatform
DEFINES
+=
\
_QT
DEFINES
+=
\
WIN32
SOURCES
+=
NativeControl
.
cpp
\
..
/../../
presentation_editor
/
Control
.
cpp
\
..
/../../
presentation_editor
/
DrawingDocument
.
cpp
\
..
/../../
presentation_editor
/
Overlay
.
cpp
\
..
/../../
presentation_editor
/
Viewer
.
cpp
\
..
/../../
presentation_editor
/
v8_core
/
HitControl
.
cpp
\
..
/../../
presentation_editor
/
v8_core
/
JSEngine2
.
cpp
\
..
/../../
presentation_editor
/
v8_core
/
TextMeasurer2
.
cpp
\
..
/../../
presentation_editor
/
v8_core
/
v8_jscore
.
cpp
\
..
/../../
editor
/
DibPainter
.
cpp
\
..
/../../
editor
/
OverlayBase
.
cpp
\
..
/../../
editor
/
JSEngine
.
cpp
\
..
/../../
presentation_editor
/
v8_core
/
DrawingDocumentWrapper
.
cpp
\
..
/../../
presentation_editor
/
v8_core
/
PageDrawer
.
cpp
\
..
/../../
presentation_editor
/
v8_core
/
OverlayTracker
.
cpp
\
..
/../../
editor
/
TextMeasurer
.
cpp
\
..
/../../
editor
/
Rulers
.
cpp
\
..
/../../
fontengine
/
ApplicationFonts
.
cpp
\
..
/../../
fontengine
/
ApplicationFontsWorker
.
cpp
\
..
/../../
fontengine
/
FontFile
.
cpp
\
..
/../../
fontengine
/
FontManager
.
cpp
\
..
/../../
fontengine
/
FontPath
.
cpp
\
..
/../../
fontengine
/
GlyphString
.
cpp
HEADERS
+=
\
NativeControl
.
h
\
..
/../../
presentation_editor
/
Control
.
h
\
..
/../../
presentation_editor
/
DrawingDocument
.
h
\
..
/../../
presentation_editor
/
EditorCtrlWrapper
.
h
\
..
/../../
presentation_editor
/
Overlay
.
h
\
..
/../../
presentation_editor
/
VideoFrameBuffer
.
h
\
..
/../../
presentation_editor
/
Viewer
.
h
\
..
/../../
presentation_editor
/
v8_core
/
v8_jscore
.
h
\
..
/../../
editor
/
v8_classes
.
h
\
..
/../../
editor
/
DibPainter
.
h
\
..
/../../
editor
/
PageDrawer
.
h
\
..
/../../
presentation_editor
/
thumbnails
.
h
\
..
/../../
presentation_editor
/
notes
.
h
\
..
/../../
fontengine
/
FontManager
.
h
unix
{
target
.
path
=
/
usr
/
lib
INSTALLS
+=
target
}
DesktopEditor/Qt_build/test_presentation/control/main.cpp
0 → 100644
View file @
cfc38567
#include "mainwindow.h"
#include <QApplication>
int
main
(
int
argc
,
char
*
argv
[])
{
QApplication
a
(
argc
,
argv
);
MainWindow
w
;
w
.
show
();
return
a
.
exec
();
}
DesktopEditor/Qt_build/test_presentation/control/mainwindow.cpp
0 → 100644
View file @
cfc38567
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow
::
MainWindow
(
QWidget
*
parent
)
:
QMainWindow
(
parent
),
ui
(
new
Ui
::
MainWindow
)
{
ui
->
setupUi
(
this
);
}
MainWindow
::~
MainWindow
()
{
delete
ui
;
}
void
MainWindow
::
resizeEvent
(
QResizeEvent
*
e
)
{
ui
->
widget
->
setGeometry
(
0
,
0
,
this
->
width
(),
this
->
height
()
-
50
);
}
void
MainWindow
::
closeEvent
(
QCloseEvent
*
e
)
{
ui
->
widget
->
closeEvent
(
e
);
}
void
MainWindow
::
keyPressEvent
(
QKeyEvent
*
e
)
{
ui
->
widget
->
keyPressEvent
(
e
);
}
void
MainWindow
::
mousePressEvent
(
QMouseEvent
*
e
)
{
ui
->
widget
->
mousePressEvent
(
e
);
}
void
MainWindow
::
mouseReleaseEvent
(
QMouseEvent
*
e
)
{
ui
->
widget
->
mouseReleaseEvent
(
e
);
}
void
MainWindow
::
mouseMoveEvent
(
QMouseEvent
*
e
)
{
ui
->
widget
->
mouseMoveEvent
(
e
);
}
/*void MainWindow::on_horizontalSlider_valueChanged(int value)
{
ui->widget->SetZoom((double)value / 100.0);
}
void MainWindow::on_pushButton_clicked()
{
}*/
DesktopEditor/Qt_build/test_presentation/control/mainwindow.h
0 → 100644
View file @
cfc38567
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
namespace
Ui
{
class
MainWindow
;
}
class
MainWindow
:
public
QMainWindow
{
Q_OBJECT
public:
explicit
MainWindow
(
QWidget
*
parent
=
0
);
~
MainWindow
();
private:
Ui
::
MainWindow
*
ui
;
protected:
virtual
void
resizeEvent
(
QResizeEvent
*
e
);
virtual
void
closeEvent
(
QCloseEvent
*
e
);
virtual
void
keyPressEvent
(
QKeyEvent
*
event
);
virtual
void
mousePressEvent
(
QMouseEvent
*
);
virtual
void
mouseReleaseEvent
(
QMouseEvent
*
);
virtual
void
mouseMoveEvent
(
QMouseEvent
*
);
/*private slots:
void on_horizontalSlider_valueChanged(int value);
void on_pushButton_clicked();*/
};
#endif // MAINWINDOW_H
DesktopEditor/Qt_build/test_presentation/control/mainwindow.ui
0 → 100644
View file @
cfc38567
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
MainWindow
</class>
<widget
class=
"QMainWindow"
name=
"MainWindow"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
922
</width>
<height>
494
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
MainWindow
</string>
</property>
<widget
class=
"QWidget"
name=
"centralWidget"
>
<widget
class=
"CNativeControl"
name=
"widget"
native=
"true"
>
<property
name=
"enabled"
>
<bool>
true
</bool>
</property>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
921
</width>
<height>
441
</height>
</rect>
</property>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Minimum"
vsizetype=
"Minimum"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
</widget>
</widget>
<widget
class=
"QMenuBar"
name=
"menuBar"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
922
</width>
<height>
21
</height>
</rect>
</property>
</widget>
<widget
class=
"QToolBar"
name=
"mainToolBar"
>
<attribute
name=
"toolBarArea"
>
<enum>
TopToolBarArea
</enum>
</attribute>
<attribute
name=
"toolBarBreak"
>
<bool>
false
</bool>
</attribute>
</widget>
<widget
class=
"QStatusBar"
name=
"statusBar"
/>
</widget>
<layoutdefault
spacing=
"6"
margin=
"11"
/>
<customwidgets>
<customwidget>
<class>
CNativeControl
</class>
<extends>
QWidget
</extends>
<header
location=
"global"
>
nativecontrol.h
</header>
<container>
1
</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
DesktopEditor/Qt_build/test_presentation/control/nativecontrol.h
0 → 100644
View file @
cfc38567
#ifndef NATIVECONTROL
#define NATIVECONTROL
#include "../../presentation_editor/project/NativeControl.h"
#include "../../../fontengine/ApplicationFontsWorker.h"
class
CNativeControl
:
public
CNativeCtrl
{
public:
CNativeControl
(
QWidget
*
parent
=
0
,
const
char
*
name
=
NULL
)
:
CNativeCtrl
(
parent
,
name
)
{
}
virtual
~
CNativeControl
()
{
}
public:
virtual
void
initializeGL
()
{
CNativeCtrl
::
initializeGL
();
QString
qsBasePath
=
QApplication
::
applicationDirPath
();
QString
qsFontsPath
=
qsBasePath
+
"/../../../../fonts/owner"
;
QString
qsSDKPath
=
qsBasePath
+
"/../../../../test_mobile/script.bin"
;
QString
qsFilePath
=
qsBasePath
+
"/../../../../test_mobile/Editor2.bin"
;
CApplicationFontsWorker
*
pWorker
=
new
CApplicationFontsWorker
();
QString
sqFreeFontsPath
=
qsBasePath
+
"/../../../../fonts/free"
;
QString
sqOwnerFontsPath
=
qsBasePath
+
"/../../../../fonts/owner"
;
pWorker
->
m_arAdditionalFolders
.
push_back
(
sqFreeFontsPath
.
toStdWString
());
pWorker
->
m_arAdditionalFolders
.
push_back
(
sqOwnerFontsPath
.
toStdWString
());
InitSDK
(
qsFontsPath
.
toStdWString
(),
qsSDKPath
.
toStdWString
(),
pWorker
);
OpenFile
(
qsFilePath
.
toStdWString
());
}
};
#endif // NATIVECONTROL
DesktopEditor/Qt_build/test_presentation/control/test_presentation.pro
0 → 100644
View file @
cfc38567
#-------------------------------------------------
#
#
Project
created
by
QtCreator
2016
-
01
-
20
T11
:
11
:
24
#
#-------------------------------------------------
QT
+=
core
gui
opengl
TARGET
=
test_presentation
TEMPLATE
=
app
DEFINES
+=
\
WIN32
DEFINES
-=
UNICODE
DEFINES
+=
_NOT_DRAW_VISUAL_CONTROLS_GL_
LIBS
+=
-
lwinmm
LIBS
+=
-
ladvapi32
LIBS
+=
-
lopengl32
LIBS
+=
-
lgdi32
LIBS
+=
-
luser32
CONFIG
(
debug
,
debug
|
release
)
{
DESTDIR
=
$$
PWD
/../
Debug
}
else
{
DESTDIR
=
$$
PWD
/../
Release
}
CONFIG
(
debug
,
debug
|
release
)
{
LIBS
+=
-
L
..
/../../../
build
/
lib
/
win_64
/
DEBUG
-
lv8_base
LIBS
+=
-
L
..
/../../../
build
/
lib
/
win_64
/
DEBUG
-
lv8_libbase
LIBS
+=
-
L
..
/../../../
build
/
lib
/
win_64
/
DEBUG
-
lv8_libplatform
LIBS
+=
-
L
..
/../../../
build
/
lib
/
win_64
/
DEBUG
-
lv8_nosnapshot
LIBS
+=
-
L
..
/../../../
build
/
lib
/
win_64
/
DEBUG
-
lv8_snapshot
LIBS
+=
-
L
..
/../../../
build
/
lib
/
win_64
/
DEBUG
-
licui18n
LIBS
+=
-
L
..
/../../../
build
/
lib
/
win_64
/
DEBUG
-
licuuc
LIBS
+=
-
L
..
/../../../
build
/
lib
/
win_64
/
DEBUG
-
lgraphics
LIBS
+=
-
L
..
/../../../
build
/
lib
/
win_64
/
DEBUG
-
lOfficeUtils
LIBS
+=
-
L
..
/../
presentation_editor
/
Debug
-
lpresentation_editor
message
(
"debug"
)
}
else
{
LIBS
+=
-
L
..
/../../../
build
/
lib
/
win_64
-
lv8_base
LIBS
+=
-
L
..
/../../../
build
/
lib
/
win_64
-
lv8_libbase
LIBS
+=
-
L
..
/../../../
build
/
lib
/
win_64
-
lv8_libplatform
LIBS
+=
-
L
..
/../../../
build
/
lib
/
win_64
-
lv8_nosnapshot
LIBS
+=
-
L
..
/../../../
build
/
lib
/
win_64
-
lv8_snapshot
LIBS
+=
-
L
..
/../../../
build
/
lib
/
win_64
-
licui18n
LIBS
+=
-
L
..
/../../../
build
/
lib
/
win_64
-
licuuc
LIBS
+=
-
L
..
/../../../
build
/
lib
/
win_64
-
lgraphics
LIBS
+=
-
L
..
/../../../
build
/
lib
/
win_64
-
lOfficeUtils
LIBS
+=
-
L
..
/../
presentation_editor
/
Release
-
lpresentation_editor
message
(
"release"
)
}
SOURCES
+=
main
.
cpp
\
mainwindow
.
cpp
HEADERS
+=
mainwindow
.
h
\
nativecontrol
.
h
FORMS
+=
mainwindow
.
ui
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment