git conflict fixes

preferencesAboutTextFull
Ivan Ilin 13 years ago
commit 21e57fbc83
  1. 7
      resources/i18n/sankore_fr.ts
  2. 17
      src/api/UBWidgetUniboardAPI.cpp
  3. 13
      src/api/UBWidgetUniboardAPI.h
  4. 2
      src/board/UBBoardController.cpp
  5. 91
      src/board/UBBoardView.cpp
  6. 1
      src/board/UBBoardView.h
  7. 6
      src/core/main.cpp
  8. 10
      src/domain/UBAbstractWidget.cpp
  9. 3
      src/domain/UBAppleWidget.cpp
  10. 1
      src/domain/UBGraphicsProxyWidget.h
  11. 17
      src/domain/UBGraphicsScene.cpp
  12. 2
      src/domain/UBGraphicsScene.h
  13. 2
      src/domain/UBGraphicsWidgetItem.cpp
  14. 1
      src/gui/UBLibWebView.cpp
  15. 1
      src/web/UBRoutedMouseEventWebView.cpp
  16. 2
      src/web/UBRoutedMouseEventWebView.h
  17. 25
      src/web/UBWebController.cpp
  18. 2
      src/web/UBWebController.h

@ -1111,9 +1111,9 @@
</message> </message>
<message numerus="yes"> <message numerus="yes">
<source>Are you sure you want to remove %n page(s) from the selected document &apos;%1&apos;?</source> <source>Are you sure you want to remove %n page(s) from the selected document &apos;%1&apos;?</source>
<translation type="unfinished"> <translation>
<numerusform></numerusform> <numerusform>Êtes-vous sûr de bien vouloir effacer %n page de ce document &apos;%1&apos;?</numerusform>
<numerusform></numerusform> <numerusform>Êtes-vous sûr de bien vouloir effacer %n pages de ce document &apos;%1&apos;?</numerusform>
</translation> </translation>
</message> </message>
</context> </context>
@ -1204,7 +1204,6 @@
<source>%1 pages copied</source> <source>%1 pages copied</source>
<translation type="unfinished"> <translation type="unfinished">
<numerusform></numerusform> <numerusform></numerusform>
<numerusform></numerusform>
</translation> </translation>
</message> </message>
</context> </context>

@ -294,7 +294,6 @@ int UBWidgetUniboardAPI::currentPageNumber()
return UBApplication::boardController->activeSceneIndex() + 1; return UBApplication::boardController->activeSceneIndex() + 1;
} }
void UBWidgetUniboardAPI::showMessage(const QString& message) void UBWidgetUniboardAPI::showMessage(const QString& message)
{ {
UBApplication::boardController->showMessage(message, false); UBApplication::boardController->showMessage(message, false);
@ -429,6 +428,22 @@ void UBWidgetUniboardAPI::sendFileMetadata(QString metaData)
UBApplication::boardController->displayMetaData(qmMetaDatas); UBApplication::boardController->displayMetaData(qmMetaDatas);
} }
void UBWidgetUniboardAPI::enableDropOnWidget()
{
mGraphicsWidget->setAcceptDrops(true);
}
QString UBWidgetUniboardAPI::downloadUrl(QString objectUrl)
{
qDebug() << "UBWidgetUniboardAPI : " << objectUrl;
QUrl widgetUrl = mGraphicsWidget->widgetWebView()->widgetUrl();
QString destFileName =widgetUrl.toString()+ "/objects/" + QUuid::createUuid().toString();
QFile(objectUrl).copy(destFileName);
qDebug() << "destFileName : " << destFileName;
return destFileName.remove(widgetUrl.toString());
}
UBDocumentDatastoreAPI::UBDocumentDatastoreAPI(UBGraphicsW3CWidgetItem *graphicsWidget) UBDocumentDatastoreAPI::UBDocumentDatastoreAPI(UBGraphicsW3CWidgetItem *graphicsWidget)
: UBW3CWebStorage(graphicsWidget) : UBW3CWebStorage(graphicsWidget)
, mGraphicsW3CWidget(graphicsWidget) , mGraphicsW3CWidget(graphicsWidget)

@ -234,6 +234,19 @@ class UBWidgetUniboardAPI : public QObject
*/ */
void sendFileMetadata(QString metaData); void sendFileMetadata(QString metaData);
// widget download
/**
* If the widget support a the drop of an object it will notify sankore about this.
*/
void enableDropOnWidget ();
/**
* When an object is dropped on a widget, this one send us the informations to download it locally.
* this method download the object on the widget directory and return the path of the downloaded object
*/
QString downloadUrl(QString objectUrl);
private: private:
QString uuid(); QString uuid();

@ -1055,7 +1055,7 @@ void UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QString
} }
else if (sourceUrl.toString() == UBToolsManager::manager()->mask.id) else if (sourceUrl.toString() == UBToolsManager::manager()->mask.id)
{ {
mActiveScene->addMask(); mActiveScene->addMask(pPos);
UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector); UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector);
} }
else else

@ -708,23 +708,100 @@ UBBoardView::drawItems (QPainter *painter, int numItems,
} }
} }
void void UBBoardView::dragEnterEvent (QDragEnterEvent *event)
UBBoardView::dragEnterEvent (QDragEnterEvent *event)
{ {
// TODO UB 4.x be smarter with drag accept code .... we cannot handle everything ... // TODO UB 4.x be smarter with drag accept code .... we cannot handle everything ...
event->acceptProposedAction (); event->acceptProposedAction ();
} }
void void UBBoardView::dragMoveEvent (QDragMoveEvent *event)
UBBoardView::dragMoveEvent (QDragMoveEvent *event)
{ {
event->acceptProposedAction (); QGraphicsItem* graphicsItemAtPos = itemAt(event->pos().x(),event->pos().y());
UBGraphicsWidgetItem* graphicsWidget = dynamic_cast<UBGraphicsWidgetItem*>(graphicsItemAtPos);
if (graphicsWidget && graphicsWidget->acceptDrops()){
QPoint newPoint(graphicsWidget->mapFromScene(mapToScene(event->pos())).toPoint());
QDragMoveEvent newEvent(newPoint, event->dropAction(), event->mimeData(), event->mouseButtons(), event->keyboardModifiers());
QApplication::sendEvent(graphicsWidget->widgetWebView(),&newEvent);
return;
}
event->acceptProposedAction();
} }
void QList<QUrl> UBBoardView::processMimeData(const QMimeData* pMimeData)
UBBoardView::dropEvent (QDropEvent *event) {
QList<QUrl> result;
if(pMimeData->hasHtml())
{
QString qsHtml = pMimeData->html();
result.append(QUrl(UBApplication::urlFromHtml(qsHtml)));
}
if (pMimeData->hasUrls())
{
result.append(pMimeData->urls());
return result;
}
if (pMimeData->hasImage())
{
qWarning() << "Not supported yet";
}
if (pMimeData->hasText())
{
if("" != pMimeData->text()){
// Sometimes, it is possible to have an URL as text. we check here if it is the case
QString qsTmp = pMimeData->text().remove(QRegExp("[\\0]"));
if(qsTmp.startsWith("http")){
result.append(QUrl(qsTmp));
}
else{
qWarning() << "what to do with this : " << pMimeData->text();
//mActiveScene->addText(pMimeData->text(), pPos);
}
}
else{
#ifdef Q_WS_MACX
// With Safari, in 95% of the drops, the mime datas are hidden in Apple Web Archive pasteboard type.
// This is due to the way Safari is working so we have to dig into the pasteboard in order to retrieve
// the data.
QString qsUrl = UBPlatformUtils::urlFromClipboard();
if("" != qsUrl){
// We finally got the url of the dropped ressource! Let's import it!
result.append(QUrl(qsUrl));
}
#endif
}
}
return result;
}
void UBBoardView::dropEvent (QDropEvent *event)
{ {
qDebug() << event->source(); qDebug() << event->source();
QGraphicsItem* graphicsItemAtPos = itemAt(event->pos().x(),event->pos().y());
UBGraphicsWidgetItem* graphicsWidget = dynamic_cast<UBGraphicsWidgetItem*>(graphicsItemAtPos);
bool acceptDrops(false);
if (graphicsWidget) {
acceptDrops = graphicsWidget->acceptDrops();
graphicsWidget->setAcceptDrops(true);
}
if (graphicsWidget && graphicsWidget->acceptDrops()){
// A new event is build to avoid problem related to different way to pass the mime type
// A parsing is done to try to provide a mimeType with only urls.
QMimeData mimeData;
mimeData.setData("Text",processMimeData(event->mimeData()).at(0).toString().toAscii());
QPoint newPoint(graphicsWidget->mapFromScene(mapToScene(event->pos())).toPoint());
QDropEvent cleanedEvent(newPoint, event->dropAction(), &mimeData, event->mouseButtons(), event->keyboardModifiers());
QApplication::sendEvent(graphicsWidget->widgetWebView(),&cleanedEvent);
cleanedEvent.acceptProposedAction();
event->acceptProposedAction();
return;
}
if(!event->source() || dynamic_cast<UBThumbnailWidget *>(event->source()) || dynamic_cast<QWebView*>(event->source())) if(!event->source() || dynamic_cast<UBThumbnailWidget *>(event->source()) || dynamic_cast<QWebView*>(event->source()))
{ {
mController->processMimeData (event->mimeData (), mapToScene (event->pos ())); mController->processMimeData (event->mimeData (), mapToScene (event->pos ()));

@ -86,6 +86,7 @@ class UBBoardView : public QGraphicsView
return (ok && (itemLayerType >= mStartLayer && itemLayerType <= mEndLayer)); return (ok && (itemLayerType >= mStartLayer && itemLayerType <= mEndLayer));
} }
QList<QUrl> processMimeData(const QMimeData* pMimeData);
UBBoardController* mController; UBBoardController* mController;

@ -71,9 +71,9 @@ void ub_message_output(QtMsgType type, const char *msg) {
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
// Uncomment next section to have memory leaks information // Uncomment next section to have memory leaks information
// tracing in VC++ debug mode under Windows // tracing in VC++ debug mode under Windows
/* /*
#if defined(_MSC_VER) && defined(_DEBUG) #if defined(_MSC_VER) && defined(_DEBUG)
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
#endif #endif

@ -26,8 +26,6 @@
#include "network/UBNetworkAccessManager.h" #include "network/UBNetworkAccessManager.h"
#include "api/UBWidgetUniboardAPI.h"
#include "web/UBWebPage.h" #include "web/UBWebPage.h"
#include "web/UBWebKitUtils.h" #include "web/UBWebKitUtils.h"
#include "web/UBWebController.h" #include "web/UBWebController.h"
@ -49,9 +47,15 @@ UBAbstractWidget::UBAbstractWidget(const QUrl& pWidgetUrl, QWidget *parent)
, mIsFrozen(false) , mIsFrozen(false)
, mIsTakingSnapshot(false) , mIsTakingSnapshot(false)
{ {
setAcceptDrops(true);
setPage(new UBWebPage(this)); setPage(new UBWebPage(this));
QWebView::settings()->setAttribute(QWebSettings::JavaEnabled, true);
QWebView::settings()->setAttribute(QWebSettings::PluginsEnabled, true); QWebView::settings()->setAttribute(QWebSettings::PluginsEnabled, true);
QWebView::settings()->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, true); QWebView::settings()->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, true);
QWebView::settings()->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, true);
QWebView::settings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true);
QWebView::settings()->setAttribute(QWebSettings::JavascriptCanAccessClipboard, true);
QWebView::settings()->setAttribute(QWebSettings::DnsPrefetchEnabled, true);
QWebView::page()->setNetworkAccessManager(UBNetworkAccessManager::defaultAccessManager()); QWebView::page()->setNetworkAccessManager(UBNetworkAccessManager::defaultAccessManager());
@ -312,7 +316,6 @@ void UBAbstractWidget::mousePressEvent(QMouseEvent *event)
event->accept(); event->accept();
return; return;
} }
UBRoutedMouseEventWebView::mousePressEvent(event); UBRoutedMouseEventWebView::mousePressEvent(event);
mMouseIsPressed = true; mMouseIsPressed = true;
} }
@ -353,7 +356,6 @@ void UBAbstractWidget::mouseReleaseEvent(QMouseEvent *event)
mFirstReleaseAfterMove = true; mFirstReleaseAfterMove = true;
} }
QWebView * UBAbstractWidget::createWindow(QWebPage::WebWindowType type) QWebView * UBAbstractWidget::createWindow(QWebPage::WebWindowType type)
{ {
if (type == QWebPage::WebBrowserWindow) if (type == QWebPage::WebBrowserWindow)

@ -15,11 +15,8 @@
#include "UBAppleWidget.h" #include "UBAppleWidget.h"
#include <QtNetwork> #include <QtNetwork>
#include "api/UBWidgetUniboardAPI.h"
#include "web/UBWebKitUtils.h" #include "web/UBWebKitUtils.h"
#include "network/UBNetworkAccessManager.h" #include "network/UBNetworkAccessManager.h"

@ -53,7 +53,6 @@ class UBGraphicsProxyWidget: public QGraphicsProxyWidget, public UBItem, public
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value); virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
// UBGraphicsItemDelegate* mDelegate;
}; };
#endif /* UBGRAPHICSPROXYWIDGET_H_ */ #endif /* UBGRAPHICSPROXYWIDGET_H_ */

@ -1763,7 +1763,7 @@ void UBGraphicsScene::addCache()
UBApplication::boardController->notifyPageChanged(); UBApplication::boardController->notifyPageChanged();
} }
void UBGraphicsScene::addMask() void UBGraphicsScene::addMask(const QPointF &center)
{ {
UBGraphicsCurtainItem* curtain = new UBGraphicsCurtainItem(); // mem : owned and destroyed by the scene UBGraphicsCurtainItem* curtain = new UBGraphicsCurtainItem(); // mem : owned and destroyed by the scene
mTools << curtain; mTools << curtain;
@ -1774,16 +1774,15 @@ void UBGraphicsScene::addMask()
else else
view = (QGraphicsView*)UBApplication::boardController->controlView(); view = (QGraphicsView*)UBApplication::boardController->controlView();
QPolygonF polygon = view->mapToScene(view->rect()); // curtain->setZValue(toolLayerStart + toolOffsetCurtain);
// curtain->setZValue(toolLayerStart + toolOffsetCurtain);
UBGraphicsItem::assignZValue(curtain, toolLayerStart + toolOffsetCurtain); UBGraphicsItem::assignZValue(curtain, toolLayerStart + toolOffsetCurtain);
QRectF rect = polygon.boundingRect(); QRectF rect = UBApplication::boardController->activeScene()->normalizedSceneRect();
qreal xScale = view->matrix().m11(); rect.setSize(QSizeF(rect.width()/2, rect.height()/2));
qreal yScale = view->matrix().m22();
rect.adjust(120 / xScale, 80 / yScale, -120 / xScale, -80 / yScale); QPointF origin = center.isNull() ? rect.bottomRight() : center;
curtain->setRect(rect); curtain->setRect(rect.translated(origin - rect.topLeft() / 2));
addItem(curtain); addItem(curtain);
curtain->setVisible(true); curtain->setVisible(true);

@ -175,7 +175,7 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
void addTriangle(QPointF center); void addTriangle(QPointF center);
void addMagnifier(UBMagnifierParams params); void addMagnifier(UBMagnifierParams params);
void addMask(); void addMask(const QPointF &center = QPointF());
void addCache(); void addCache();
class SceneViewState class SceneViewState

@ -34,6 +34,7 @@ UBGraphicsWidgetItem::UBGraphicsWidgetItem(QGraphicsItem *parent, int widgetType
, mShouldMoveWidget(false) , mShouldMoveWidget(false)
, mUniboardAPI(0) , mUniboardAPI(0)
{ {
setAcceptDrops(false);
UBGraphicsWidgetItemDelegate* delegate = new UBGraphicsWidgetItemDelegate(this, widgetType); UBGraphicsWidgetItemDelegate* delegate = new UBGraphicsWidgetItemDelegate(this, widgetType);
delegate->init(); delegate->init();
setDelegate(delegate); setDelegate(delegate);
@ -366,7 +367,6 @@ UBItem* UBGraphicsW3CWidgetItem::deepCopy() const
UBGraphicsW3CWidgetItem *copy = new UBGraphicsW3CWidgetItem(mWebKitWidget->widgetUrl(), parentItem()); UBGraphicsW3CWidgetItem *copy = new UBGraphicsW3CWidgetItem(mWebKitWidget->widgetUrl(), parentItem());
copy->setPos(this->pos()); copy->setPos(this->pos());
// copy->setZValue(this->zValue());
UBGraphicsItem::assignZValue(copy, this->zValue()); UBGraphicsItem::assignZValue(copy, this->zValue());
copy->setTransform(this->transform()); copy->setTransform(this->transform());
copy->setFlag(QGraphicsItem::ItemIsMovable, true); copy->setFlag(QGraphicsItem::ItemIsMovable, true);

@ -29,7 +29,6 @@ UBLibWebView::UBLibWebView(QWidget* parent, const char* name):QWidget(parent)
mpWebSettings = QWebSettings::globalSettings(); mpWebSettings = QWebSettings::globalSettings();
mpWebSettings->setAttribute(QWebSettings::JavaEnabled, true); mpWebSettings->setAttribute(QWebSettings::JavaEnabled, true);
mpWebSettings->setAttribute(QWebSettings::PluginsEnabled, true); mpWebSettings->setAttribute(QWebSettings::PluginsEnabled, true);
mpWebSettings->setAttribute(QWebSettings::JavaEnabled, true);
mpWebSettings->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, true); mpWebSettings->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, true);
mpWebSettings->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, true); mpWebSettings->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, true);
mpWebSettings->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true); mpWebSettings->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true);

@ -93,4 +93,3 @@ void UBRoutedMouseEventWebView::wheelEvent(QWheelEvent* ev)
p->event(ev); p->event(ev);
} }
} }

@ -31,6 +31,7 @@ class UBRoutedMouseEventWebView : public QWebView
public: public:
UBRoutedMouseEventWebView(QWidget * parent = 0 ); UBRoutedMouseEventWebView(QWidget * parent = 0 );
virtual ~UBRoutedMouseEventWebView(); virtual ~UBRoutedMouseEventWebView();
protected: protected:
virtual void mouseMoveEvent(QMouseEvent* ev); virtual void mouseMoveEvent(QMouseEvent* ev);
virtual void mousePressEvent(QMouseEvent* ev); virtual void mousePressEvent(QMouseEvent* ev);
@ -38,7 +39,6 @@ class UBRoutedMouseEventWebView : public QWebView
virtual void mouseReleaseEvent(QMouseEvent* ev); virtual void mouseReleaseEvent(QMouseEvent* ev);
virtual void contextMenuEvent(QContextMenuEvent* ev); virtual void contextMenuEvent(QContextMenuEvent* ev);
virtual void wheelEvent(QWheelEvent* ev); virtual void wheelEvent(QWheelEvent* ev);
}; };
#endif /* UBROUTEDMOUSEEVENTWEBVIEW_H_ */ #endif /* UBROUTEDMOUSEEVENTWEBVIEW_H_ */

@ -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)

@ -29,7 +29,6 @@ class UBMainWindow;
class UBWebToolsPalette; class UBWebToolsPalette;
class WBWebView; class WBWebView;
class UBServerXMLHttpRequest; class UBServerXMLHttpRequest;
//class UBKeyboardPalette;
class UBWebController : public QObject class UBWebController : public QObject
{ {
@ -127,6 +126,7 @@ class UBWebController : public QObject
void activePageChanged(); void activePageChanged();
void trapFlash(); void trapFlash();
void toggleWebTrap(bool checked); void toggleWebTrap(bool checked);
void onOEmbedParsed(QVector<sOEmbedContent> contents); void onOEmbedParsed(QVector<sOEmbedContent> contents);
// void showKeyboard(bool checked); // void showKeyboard(bool checked);

Loading…
Cancel
Save