Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
4bf8dc16
Commit
4bf8dc16
authored
Jun 17, 2011
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Virtual keyboard: removed from Document perspective, added to web
parent
98094ee7
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
25 deletions
+60
-25
Sankore_3.1.pro
Sankore_3.1.pro
+1
-1
UBImportDocument.cpp
src/adaptors/UBImportDocument.cpp
+2
-3
UBApplication.cpp
src/core/UBApplication.cpp
+5
-2
UBDocumentToolsPalette.cpp
src/gui/UBDocumentToolsPalette.cpp
+3
-8
UBKeyboardPalette.cpp
src/gui/UBKeyboardPalette.cpp
+3
-0
UBWebController.cpp
src/web/UBWebController.cpp
+40
-11
UBWebController.h
src/web/UBWebController.h
+6
-0
No files found.
Sankore_3.1.pro
View file @
4bf8dc16
...
...
@@ -113,7 +113,7 @@ win32 {
UB_I18N.path = $$DESTDIR/i18n
UB_ETC.path = $$DESTDIR
UB_THIRDPARTY_INTERACTIVE.path = $$DESTDIR/library
system(md $$replace(BUILD_DIR, /, \))
system(md $$replace(BUILD_DIR, /, \
\
))
system(echo "$$VERSION" > $$BUILD_DIR/version)
system(echo "$$LONG_VERSION" > $$BUILD_DIR/longversion)
system(echo "$$SVN_VERSION" > $$BUILD_DIR/svnversion)
...
...
src/adaptors/UBImportDocument.cpp
View file @
4bf8dc16
...
...
@@ -39,7 +39,7 @@ QStringList UBImportDocument::supportedExtentions()
QString
UBImportDocument
::
importFileFilter
()
{
return
tr
(
"
Uniboard
(*.ubz)"
);
return
tr
(
"
Sankore 3.1
(*.ubz)"
);
}
...
...
@@ -77,9 +77,8 @@ QString UBImportDocument::expandFileToDir(const QFile& pZipFile, const QString&
}
if
(
createNewDocument
)
{
documentRootFolder
=
UBPersistenceManager
::
persistenceManager
()
->
generateUniqueDocumentPath
();
}
QFile
out
;
char
c
;
...
...
src/core/UBApplication.cpp
View file @
4bf8dc16
...
...
@@ -199,6 +199,7 @@ int UBApplication::exec(const QString& pFileToImport)
QWebSettings
*
gs
=
QWebSettings
::
globalSettings
();
gs
->
setAttribute
(
QWebSettings
::
PluginsEnabled
,
true
);
gs
->
setAttribute
(
QWebSettings
::
JavaEnabled
,
true
);
gs
->
setAttribute
(
QWebSettings
::
LocalStorageDatabaseEnabled
,
true
);
gs
->
setAttribute
(
QWebSettings
::
OfflineWebApplicationCacheEnabled
,
true
);
gs
->
setAttribute
(
QWebSettings
::
OfflineStorageDatabaseEnabled
,
true
);
...
...
@@ -435,10 +436,12 @@ void UBApplication::decorateActionMenu(QAction* action)
// SANKORE-48: Hide the check update action if the setting
// EnableAutomaticSoftwareUpdates is false in Uniboard.config
if
(
UBSettings
::
settings
()
->
appEnableAutomaticSoftwareUpdates
->
get
().
toBool
())
{
if
(
UBSettings
::
settings
()
->
appEnableAutomaticSoftwareUpdates
->
get
().
toBool
()){
menu
->
addAction
(
mainWindow
->
actionCheckUpdate
);
}
else
{
mainWindow
->
actionCheckUpdate
->
setEnabled
(
false
);
}
#ifndef Q_WS_X11 // No Podcast on Linux yet
menu
->
addAction
(
mainWindow
->
actionPodcast
);
...
...
src/gui/UBDocumentToolsPalette.cpp
View file @
4bf8dc16
...
...
@@ -14,15 +14,10 @@ UBDocumentToolsPalette::UBDocumentToolsPalette(QWidget *parent)
{
QList
<
QAction
*>
actions
;
if
(
UBPlatformUtils
::
hasVirtualKeyboard
())
{
actions
<<
UBApplication
::
mainWindow
->
actionVirtualKeyboard
;
}
setActions
(
actions
);
setButtonIconSize
(
QSize
(
42
,
42
));
setActions
(
actions
);
setButtonIconSize
(
QSize
(
42
,
42
));
adjustSizeAndPosition
();
adjustSizeAndPosition
();
}
...
...
src/gui/UBKeyboardPalette.cpp
View file @
4bf8dc16
...
...
@@ -49,6 +49,9 @@ UBKeyboardPalette::UBKeyboardPalette(QWidget *parent)
QList
<
UBKeyboardPalette
*>
UBKeyboardPalette
::
instances
;
UBKeyboardPalette
*
UBKeyboardPalette
::
create
(
QWidget
*
parent
)
{
if
(
!
UBPlatformUtils
::
hasVirtualKeyboard
())
return
NULL
;
UBKeyboardPalette
*
instance
=
new
UBKeyboardPalette
(
parent
);
instances
.
append
(
instance
);
...
...
src/web/UBWebController.cpp
View file @
4bf8dc16
...
...
@@ -24,6 +24,7 @@
#include "gui/UBScreenMirror.h"
#include "gui/UBMainWindow.h"
#include "gui/UBWebToolsPalette.h"
#include "gui/UBKeyboardPalette.h"
#include "core/UBSettings.h"
#include "core/UBSetting.h"
...
...
@@ -46,6 +47,7 @@ UBWebController::UBWebController(UBMainWindow* mainWindow)
,
mBrowserWidget
(
0
)
,
mTrapFlashController
(
0
)
,
mToolsCurrentPalette
(
0
)
,
mKeyboardCurrentPalette
(
0
)
,
mToolsPalettePositionned
(
false
)
,
mDownloadViewIsVisible
(
false
)
...
...
@@ -81,6 +83,7 @@ void UBWebController::webBrowserInstance()
{
mCurrentWebBrowser
=
&
mWebBrowserList
[
WebBrowser
];
mToolsCurrentPalette
=
&
mToolsPaletteList
[
WebBrowser
];
mKeyboardCurrentPalette
=
&
mKeyboardPaletteList
[
WebBrowser
];
mToolsPalettePositionned
=
mToolsPalettePositionnedList
[
WebBrowser
];
if
(
!
(
*
mCurrentWebBrowser
))
{
...
...
@@ -137,9 +140,9 @@ void UBWebController::tutorialWebInstance()
{
QLocale
locale
=
QLocale
();
QString
language
=
"_"
+
locale
.
name
().
left
(
2
);
qDebug
()
<<
language
;
QString
tutorialHtmlIndexFile
=
0
;
QString
tutorialPath
=
"/etc/
Paraschool/Tutorial/site
"
+
language
+
"/index.html"
;
QString
tutorialPath
=
"/etc/
Tutorial/tutorial
"
+
language
+
"/index.html"
;
#if defined(Q_WS_MAC)
tutorialHtmlIndexFile
=
QApplication
::
applicationDirPath
()
+
"/../Resources"
+
tutorialPath
;
#elif defined(Q_WS_WIN)
...
...
@@ -158,6 +161,7 @@ void UBWebController::tutorialWebInstance()
{
mCurrentWebBrowser
=
&
mWebBrowserList
[
Tutorial
];
mToolsCurrentPalette
=
&
mToolsPaletteList
[
Tutorial
];
mKeyboardCurrentPalette
=
&
mKeyboardPaletteList
[
Tutorial
];
mToolsPalettePositionned
=
&
mToolsPalettePositionnedList
[
Tutorial
];
if
(
!
(
*
mCurrentWebBrowser
))
{
...
...
@@ -195,19 +199,29 @@ void UBWebController::tutorialWebInstance()
void
UBWebController
::
paraschoolWebInstance
()
{
QUrl
currentUrl
(
"http://host9.paraschool.net/editor/#home"
);
if
(
UBSettings
::
settings
()
->
webUseExternalBrowser
->
get
().
toBool
())
{
QLocale
locale
=
QLocale
();
QString
language
=
"_"
+
locale
.
name
().
left
(
2
);
QString
editorPath
=
"/etc/SankoreEditor/editor"
+
language
+
"/index.html"
;
QString
editorHtmlIndexFile
;
#if defined(Q_WS_MAC)
editorHtmlIndexFile
=
QApplication
::
applicationDirPath
()
+
"/../Resources"
+
editorPath
;
#elif defined(Q_WS_WIN)
editorHtmlIndexFile
=
QApplication
::
applicationDirPath
()
+
editorPath
;
#else
editorHtmlIndexFile
=
QApplication
::
applicationDirPath
()
+
editorPath
;
#endif
QUrl
currentUrl
=
QUrl
::
fromLocalFile
(
editorHtmlIndexFile
);
if
(
UBSettings
::
settings
()
->
webUseExternalBrowser
->
get
().
toBool
()){
QDesktopServices
::
openUrl
(
currentUrl
);
}
else
{
else
{
mCurrentWebBrowser
=
&
mWebBrowserList
[
Paraschool
];
mToolsCurrentPalette
=
&
mToolsPaletteList
[
Paraschool
];
mKeyboardCurrentPalette
=
&
mKeyboardPaletteList
[
Paraschool
];
mToolsPalettePositionned
=
&
mToolsPalettePositionnedList
[
Paraschool
];
if
(
!
(
*
mCurrentWebBrowser
))
{
if
(
!
(
*
mCurrentWebBrowser
)){
(
*
mCurrentWebBrowser
)
=
new
WBBrowserWindow
(
mMainWindow
->
centralWidget
(),
mMainWindow
,
true
);
connect
((
*
mCurrentWebBrowser
),
SIGNAL
(
activeViewChange
(
QWidget
*
)),
this
,
SLOT
(
setSourceWidget
(
QWidget
*
)));
...
...
@@ -343,9 +357,12 @@ QPixmap UBWebController::captureCurrentPage()
void
UBWebController
::
setupPalettes
()
{
if
(
!
(
*
mToolsCurrentPalette
)){
if
(
!
(
*
mToolsCurrentPalette
))
{
(
*
mToolsCurrentPalette
)
=
new
UBWebToolsPalette
((
*
mCurrentWebBrowser
),
false
);
(
*
mKeyboardCurrentPalette
)
=
UBKeyboardPalette
::
create
(
*
mCurrentWebBrowser
);
connect
(
mMainWindow
->
actionWebTrapFlash
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
trapFlash
()));
connect
(
mMainWindow
->
actionWebCustomCapture
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
customCapture
()));
connect
(
mMainWindow
->
actionWebWindowCapture
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
captureWindow
()));
...
...
@@ -355,9 +372,12 @@ void UBWebController::setupPalettes()
connect
(
mMainWindow
->
actionWebShowHideOnDisplay
,
SIGNAL
(
toggled
(
bool
)),
this
,
SLOT
(
toogleMirroring
(
bool
)));
connect
(
mMainWindow
->
actionWebTrap
,
SIGNAL
(
toggled
(
bool
)),
this
,
SLOT
(
toggleWebTrap
(
bool
)));
connect
(
mMainWindow
->
actionVirtualKeyboard
,
SIGNAL
(
toggled
(
bool
)),
this
,
SLOT
(
showKeyboard
(
bool
)));
(
*
mToolsCurrentPalette
)
->
hide
();
(
*
mToolsCurrentPalette
)
->
adjustSizeAndPosition
();
(
*
mKeyboardCurrentPalette
)
->
adjustSizeAndPosition
();
if
(
controlView
()){
int
left
=
controlView
()
->
width
()
-
20
-
(
*
mToolsCurrentPalette
)
->
width
();
...
...
@@ -381,6 +401,15 @@ void UBWebController::toggleWebTrap(bool checked)
}
}
void
UBWebController
::
showKeyboard
(
bool
checked
)
{
if
(
mKeyboardCurrentPalette
&&
(
*
mKeyboardCurrentPalette
))
{
(
*
mKeyboardCurrentPalette
)
->
setVisible
(
checked
);
}
}
void
UBWebController
::
toggleWebToolsPalette
(
bool
checked
)
{
...
...
src/web/UBWebController.h
View file @
4bf8dc16
...
...
@@ -20,6 +20,7 @@ class UBMainWindow;
class
UBWebToolsPalette
;
class
WBWebView
;
class
UBServerXMLHttpRequest
;
class
UBKeyboardPalette
;
class
UBWebController
:
public
QObject
...
...
@@ -92,6 +93,8 @@ class UBWebController : public QObject
UBTrapFlashController
*
mTrapFlashController
;
UBWebToolsPalette
**
mToolsCurrentPalette
;
UBWebToolsPalette
*
mToolsPaletteList
[
TotalNumberOfWebInstances
];
UBKeyboardPalette
**
mKeyboardCurrentPalette
;
UBKeyboardPalette
*
mKeyboardPaletteList
[
TotalNumberOfWebInstances
];
bool
mToolsPalettePositionned
;
bool
mToolsPalettePositionnedList
[
TotalNumberOfWebInstances
];
...
...
@@ -115,6 +118,9 @@ class UBWebController : public QObject
void
toggleWebTrap
(
bool
checked
);
void
showKeyboard
(
bool
checked
);
void
getOEmbedProviderListResponse
(
bool
success
,
const
QByteArray
&
payload
);
signals
:
...
...
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