|
|
@ -59,7 +59,6 @@ UBWebController::UBWebController(UBMainWindow* mainWindow) |
|
|
|
, mBrowserWidget(0) |
|
|
|
, mBrowserWidget(0) |
|
|
|
, mTrapFlashController(0) |
|
|
|
, mTrapFlashController(0) |
|
|
|
, mToolsCurrentPalette(0) |
|
|
|
, mToolsCurrentPalette(0) |
|
|
|
// , mKeyboardCurrentPalette(0)
|
|
|
|
|
|
|
|
, mToolsPalettePositionned(false) |
|
|
|
, mToolsPalettePositionned(false) |
|
|
|
, mDownloadViewIsVisible(false) |
|
|
|
, mDownloadViewIsVisible(false) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -117,7 +116,6 @@ void UBWebController::webBrowserInstance() |
|
|
|
{ |
|
|
|
{ |
|
|
|
mCurrentWebBrowser = &mWebBrowserList[WebBrowser]; |
|
|
|
mCurrentWebBrowser = &mWebBrowserList[WebBrowser]; |
|
|
|
mToolsCurrentPalette = &mToolsPaletteList[WebBrowser]; |
|
|
|
mToolsCurrentPalette = &mToolsPaletteList[WebBrowser]; |
|
|
|
// mKeyboardCurrentPalette = &mKeyboardPaletteList[WebBrowser];
|
|
|
|
|
|
|
|
mToolsPalettePositionned = mToolsPalettePositionnedList[WebBrowser]; |
|
|
|
mToolsPalettePositionned = mToolsPalettePositionnedList[WebBrowser]; |
|
|
|
if (!(*mCurrentWebBrowser)) |
|
|
|
if (!(*mCurrentWebBrowser)) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -196,8 +194,6 @@ void UBWebController::tutorialWebInstance() |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
mCurrentWebBrowser = &mWebBrowserList[Tutorial]; |
|
|
|
mCurrentWebBrowser = &mWebBrowserList[Tutorial]; |
|
|
|
// mToolsCurrentPalette = &mToolsPaletteList[Tutorial];
|
|
|
|
|
|
|
|
// mKeyboardCurrentPalette = &mKeyboardPaletteList[Tutorial];
|
|
|
|
|
|
|
|
mToolsPalettePositionned = &mToolsPalettePositionnedList[Tutorial]; |
|
|
|
mToolsPalettePositionned = &mToolsPalettePositionnedList[Tutorial]; |
|
|
|
if (!(*mCurrentWebBrowser)) |
|
|
|
if (!(*mCurrentWebBrowser)) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -255,7 +251,6 @@ void UBWebController::paraschoolWebInstance() |
|
|
|
else { |
|
|
|
else { |
|
|
|
mCurrentWebBrowser = &mWebBrowserList[Paraschool]; |
|
|
|
mCurrentWebBrowser = &mWebBrowserList[Paraschool]; |
|
|
|
mToolsCurrentPalette = &mToolsPaletteList[Paraschool]; |
|
|
|
mToolsCurrentPalette = &mToolsPaletteList[Paraschool]; |
|
|
|
// mKeyboardCurrentPalette = &mKeyboardPaletteList[Paraschool];
|
|
|
|
|
|
|
|
mToolsPalettePositionned = &mToolsPalettePositionnedList[Paraschool]; |
|
|
|
mToolsPalettePositionned = &mToolsPalettePositionnedList[Paraschool]; |
|
|
|
if (!(*mCurrentWebBrowser)){ |
|
|
|
if (!(*mCurrentWebBrowser)){ |
|
|
|
(*mCurrentWebBrowser) = new WBBrowserWindow(mMainWindow->centralWidget(), mMainWindow, true); |
|
|
|
(*mCurrentWebBrowser) = new WBBrowserWindow(mMainWindow->centralWidget(), mMainWindow, true); |
|
|
@ -434,7 +429,6 @@ void UBWebController::setupPalettes() |
|
|
|
{ |
|
|
|
{ |
|
|
|
(*mToolsCurrentPalette) = new UBWebToolsPalette((*mCurrentWebBrowser),false); |
|
|
|
(*mToolsCurrentPalette) = new UBWebToolsPalette((*mCurrentWebBrowser),false); |
|
|
|
|
|
|
|
|
|
|
|
// (*mKeyboardCurrentPalette) = UBKeyboardPalette::create(*mCurrentWebBrowser);
|
|
|
|
|
|
|
|
#ifndef Q_WS_WIN |
|
|
|
#ifndef Q_WS_WIN |
|
|
|
if (UBPlatformUtils::hasVirtualKeyboard() && UBApplication::boardController->paletteManager()->mKeyboardPalette) |
|
|
|
if (UBPlatformUtils::hasVirtualKeyboard() && UBApplication::boardController->paletteManager()->mKeyboardPalette) |
|
|
|
connect(UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(closed()), |
|
|
|
connect(UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(closed()), |
|
|
@ -449,14 +443,10 @@ void UBWebController::setupPalettes() |
|
|
|
|
|
|
|
|
|
|
|
connect(mMainWindow->actionWebShowHideOnDisplay, SIGNAL(toggled(bool)), this, SLOT(toogleMirroring(bool))); |
|
|
|
connect(mMainWindow->actionWebShowHideOnDisplay, SIGNAL(toggled(bool)), this, SLOT(toogleMirroring(bool))); |
|
|
|
connect(mMainWindow->actionWebTrap, SIGNAL(toggled(bool)), this, SLOT(toggleWebTrap(bool))); |
|
|
|
connect(mMainWindow->actionWebTrap, SIGNAL(toggled(bool)), this, SLOT(toggleWebTrap(bool))); |
|
|
|
#ifndef Q_WS_MACX |
|
|
|
|
|
|
|
connect(mMainWindow->actionVirtualKeyboard, SIGNAL(toggled(bool)), this, SLOT(showKeyboard(bool))); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
(*mToolsCurrentPalette)->hide(); |
|
|
|
(*mToolsCurrentPalette)->hide(); |
|
|
|
(*mToolsCurrentPalette)->adjustSizeAndPosition(); |
|
|
|
(*mToolsCurrentPalette)->adjustSizeAndPosition(); |
|
|
|
|
|
|
|
|
|
|
|
// (*mKeyboardCurrentPalette)->adjustSizeAndPosition();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (controlView()){ |
|
|
|
if (controlView()){ |
|
|
|
int left = controlView()->width() - 20 - (*mToolsCurrentPalette)->width(); |
|
|
|
int left = controlView()->width() - 20 - (*mToolsCurrentPalette)->width(); |
|
|
|
int top = (controlView()->height() - (*mToolsCurrentPalette)->height()) / 2; |
|
|
|
int top = (controlView()->height() - (*mToolsCurrentPalette)->height()) / 2; |
|
|
@ -479,15 +469,6 @@ void UBWebController::toggleWebTrap(bool checked) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// void UBWebController::showKeyboard(bool checked)
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// if (mKeyboardCurrentPalette
|
|
|
|
|
|
|
|
// && (*mKeyboardCurrentPalette))
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// (*mKeyboardCurrentPalette)->setVisible(checked);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UBWebController::toggleWebToolsPalette(bool checked) |
|
|
|
void UBWebController::toggleWebToolsPalette(bool checked) |
|
|
|
{ |
|
|
|
{ |
|
|
|
(*mToolsCurrentPalette)->setVisible(checked); |
|
|
|
(*mToolsCurrentPalette)->setVisible(checked); |
|
|
@ -662,8 +643,6 @@ void UBWebController::captureEduMedia() |
|
|
|
{ |
|
|
|
{ |
|
|
|
QWebElementCollection objects = webView->page()->currentFrame()->findAllElements("object"); |
|
|
|
QWebElementCollection objects = webView->page()->currentFrame()->findAllElements("object"); |
|
|
|
|
|
|
|
|
|
|
|
bool found = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach(QWebElement object, objects) |
|
|
|
foreach(QWebElement object, objects) |
|
|
|
{ |
|
|
|
{ |
|
|
|
foreach(QWebElement param, object.findAll("param")) |
|
|
|
foreach(QWebElement param, object.findAll("param")) |
|
|
@ -675,8 +654,6 @@ void UBWebController::captureEduMedia() |
|
|
|
QString langValue; |
|
|
|
QString langValue; |
|
|
|
QString hostValue; |
|
|
|
QString hostValue; |
|
|
|
|
|
|
|
|
|
|
|
found = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QStringList flashVars = value.split("&"); |
|
|
|
QStringList flashVars = value.split("&"); |
|
|
|
|
|
|
|
|
|
|
|
foreach(QString flashVar, flashVars) |
|
|
|
foreach(QString flashVar, flashVars) |
|
|
|