first draft of 'nouvelle barre du prof'

preferencesAboutTextFull
Claudio Valerio 13 years ago
parent 304c97f359
commit 34e778e14e
  1. 10
      src/board/UBBoardPaletteManager.cpp
  2. 3
      src/gui/UBDockPaletteWidget.cpp
  3. 4
      src/gui/UBDockPaletteWidget.h
  4. 129
      src/gui/UBTeacherBarWidget.cpp
  5. 28
      src/gui/UBTeacherBarWidget.h
  6. 5
      src/gui/UBVideoPlayer.h
  7. 8
      src/gui/gui.pri
  8. 2
      src/podcast/youtube/UBYouTubePublisher.cpp
  9. 136
      src/web/UBWebController.cpp
  10. 29
      src/web/UBWebController.h
  11. 8
      src/web/web.pri

@ -199,6 +199,10 @@ void UBBoardPaletteManager::setupDockPaletteWidgets()
mLeftPalette->registerWidget(mpPageNavigWidget); mLeftPalette->registerWidget(mpPageNavigWidget);
mLeftPalette->addTab(mpPageNavigWidget); mLeftPalette->addTab(mpPageNavigWidget);
// The teacher bar widget will always be there
mLeftPalette->registerWidget(mpTeacherBarWidget);
mLeftPalette->addTab(mpTeacherBarWidget);
mLeftPalette->connectSignals(); mLeftPalette->connectSignals();
mRightPalette = new UBRightPalette(mContainer); mRightPalette = new UBRightPalette(mContainer);
@ -207,9 +211,6 @@ void UBBoardPaletteManager::setupDockPaletteWidgets()
mRightPalette->addTab(mpLibWidget); mRightPalette->addTab(mpLibWidget);
// The cache widget will be visible only if a cache is put on the page // The cache widget will be visible only if a cache is put on the page
mRightPalette->registerWidget(mpCachePropWidget); mRightPalette->registerWidget(mpCachePropWidget);
// The teacher bar widget will always be there
mRightPalette->registerWidget(mpTeacherBarWidget);
mRightPalette->addTab(mpTeacherBarWidget);
// The download widget will be part of the right palette but // The download widget will be part of the right palette but
// will become visible only when the first download starts // will become visible only when the first download starts
mRightPalette->registerWidget(mpDownloadWidget); mRightPalette->registerWidget(mpDownloadWidget);
@ -820,9 +821,6 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
} }
else else
mKeyboardPalette->setParent(0); mKeyboardPalette->setParent(0);
// mKeyboardPalette->update();
} }
} }
break; break;

@ -27,6 +27,9 @@ QString UBDockPaletteWidget::name()
return mName; return mName;
} }
/**
* When a widget registers a mode it means that it would be displayed on that mode
*/
void UBDockPaletteWidget::registerMode(eUBDockPaletteWidgetMode mode) void UBDockPaletteWidget::registerMode(eUBDockPaletteWidgetMode mode)
{ {
if(!mRegisteredModes.contains(mode)) if(!mRegisteredModes.contains(mode))

@ -5,6 +5,10 @@
#include <QPixmap> #include <QPixmap>
#include <QString> #include <QString>
/**
* This enum defines the different mode availables.
*/
typedef enum typedef enum
{ {
eUBDockPaletteWidget_BOARD, eUBDockPaletteWidget_BOARD,

@ -32,6 +32,7 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock
, mpAction1(NULL) , mpAction1(NULL)
, mpAction2(NULL) , mpAction2(NULL)
, mpAction3(NULL) , mpAction3(NULL)
, mpDropMediaZone(NULL)
, mpContainer(NULL) , mpContainer(NULL)
, mpContainerLayout(NULL) , mpContainerLayout(NULL)
{ {
@ -122,6 +123,10 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock
mpLayout->addWidget(mpAction2); mpLayout->addWidget(mpAction2);
mpLayout->addWidget(mpAction3); mpLayout->addWidget(mpAction3);
// Media
mpDropMediaZone = new UBTeacherBarDropMediaZone();
mpLayout->addWidget(mpDropMediaZone);
populateCombos(); populateCombos();
connect(UBApplication::boardController, SIGNAL(activeSceneWillChange()), this, SLOT(saveContent())); connect(UBApplication::boardController, SIGNAL(activeSceneWillChange()), this, SLOT(saveContent()));
@ -142,6 +147,11 @@ UBTeacherBarWidget::UBTeacherBarWidget(QWidget *parent, const char *name):UBDock
UBTeacherBarWidget::~UBTeacherBarWidget() UBTeacherBarWidget::~UBTeacherBarWidget()
{ {
if(NULL != mpDropMediaZone)
{
delete mpDropMediaZone;
mpDropMediaZone = NULL;
}
if(NULL != mpAction3) if(NULL != mpAction3)
{ {
delete mpAction3; delete mpAction3;
@ -356,9 +366,7 @@ UBTeacherStudentAction::UBTeacherStudentAction(int actionNumber, QWidget *parent
mpTeacherLayout = new QHBoxLayout(); mpTeacherLayout = new QHBoxLayout();
//TODO: I'm not able to translate this string using the normal way *qm file why?
mpTeacherLabel = new QLabel(tr("Teacher"), this); mpTeacherLabel = new QLabel(tr("Teacher"), this);
// mpTeacherLabel = new QLabel(tr("Enseignant"), this);
mpTeacherLabel->setAlignment(Qt::AlignTop); mpTeacherLabel->setAlignment(Qt::AlignTop);
mpTeacher = new QTextEdit(this); mpTeacher = new QTextEdit(this);
mpTeacher->setObjectName("TeacherStudentBox"); mpTeacher->setObjectName("TeacherStudentBox");
@ -369,7 +377,6 @@ UBTeacherStudentAction::UBTeacherStudentAction(int actionNumber, QWidget *parent
mpStudentLayout = new QHBoxLayout(); mpStudentLayout = new QHBoxLayout();
mpStudentLabel = new QLabel(tr("Student"), this); mpStudentLabel = new QLabel(tr("Student"), this);
// mpStudentLabel = new QLabel(tr("Élève"), this);
mpStudentLabel->setAlignment(Qt::AlignTop); mpStudentLabel->setAlignment(Qt::AlignTop);
mpStudent = new QTextEdit(this); mpStudent = new QTextEdit(this);
mpStudent->setObjectName("TeacherStudentBox"); mpStudent->setObjectName("TeacherStudentBox");
@ -452,3 +459,119 @@ QTextEdit* UBTeacherStudentAction::student()
{ {
return mpStudent; return mpStudent;
} }
#include "gui/UBMediaPlayer.h"
#include "gui/UBVideoPlayer.h"
#include "frameworks/UBFileSystemUtils.h"
UBTeacherBarDropMediaZone::UBTeacherBarDropMediaZone(QWidget *parent, const char *name):QWidget(parent)
, mpTitleLabel(NULL)
, mpImageTab(NULL)
, mpTabWidget(NULL)
, mpLayout(NULL)
{
setObjectName(name);
setAcceptDrops(true);
setAttribute(Qt::WA_StyledBackground, true);
setStyleSheet(UBApplication::globalStyleSheet());
// Create the GUI
mpLayout = new QVBoxLayout(this);
setLayout(mpLayout);
mpImageTab = new QLabel();
mpVideoTab = new UBMediaPlayer();
mpAudioTab = new UBMediaPlayer();
mpTitleLabel = new QLabel(tr("Drop media here"));
mpLayout->addWidget(mpTitleLabel);
mpTabWidget = new QTabWidget();
mpTabWidget->setMinimumHeight(200);
mpTabWidget->addTab(mpImageTab,QIcon(":images/toolbar/extraTool.png"),"");
mpTabWidget->addTab(mpVideoTab,QIcon(":images/libpalette/movieIcon.svg"),"");
mpTabWidget->addTab(mpAudioTab,QIcon(":images/libpalette/soundIcon.svg"),"");
mpLayout->addWidget(mpTabWidget);
}
UBTeacherBarDropMediaZone::~UBTeacherBarDropMediaZone()
{
if(NULL != mpTitleLabel)
{
delete mpTitleLabel;
mpTitleLabel = NULL;
}
if(NULL != mpImageTab)
{
delete mpImageTab;
mpImageTab = NULL;
}
if(NULL != mpVideoTab)
{
delete mpVideoTab;
mpVideoTab = NULL;
}
if(NULL != mpAudioTab)
{
delete mpAudioTab;
mpAudioTab = NULL;
}
if(NULL != mpTabWidget)
{
delete mpTabWidget;
mpTabWidget = NULL;
}
if(NULL != mpLayout)
{
delete mpLayout;
mpLayout = NULL;
}
}
void UBTeacherBarDropMediaZone::dragEnterEvent(QDragEnterEvent *pEvent)
{
setBackgroundRole(QPalette::Highlight);
pEvent->acceptProposedAction();
}
void UBTeacherBarDropMediaZone::dragLeaveEvent(QDragLeaveEvent *pEvent)
{
setBackgroundRole(QPalette::Dark);
pEvent->accept();
}
void UBTeacherBarDropMediaZone::dropEvent(QDropEvent *pEvent)
{
setBackgroundRole(QPalette::Dark);
if(pEvent->mimeData()->hasHtml()) qDebug() << pEvent->mimeData()->html();
if(pEvent->mimeData()->hasUrls()) qDebug() << pEvent->mimeData()->urls();
if(pEvent->mimeData()->hasText()) qDebug() << pEvent->mimeData()->text();
QString mimeType = UBFileSystemUtils::mimeTypeFromFileName(pEvent->mimeData()->urls().at(0).toLocalFile());
if(mimeType.contains("image")){
QPixmap pix = QPixmap(pEvent->mimeData()->urls().at(0).toLocalFile());
mpImageTab->setPixmap(pix);
mpTabWidget->setCurrentWidget(mpImageTab);
}
else if(mimeType.contains("video")){
mpVideoTab->setFile(pEvent->mimeData()->urls().at(0).toLocalFile());
mpVideoTab->playPause();
mpTabWidget->setCurrentWidget(mpVideoTab);
}
else if(mimeType.contains("audio")){
mpVideoTab->setFile(pEvent->mimeData()->urls().at(0).toLocalFile());
mpVideoTab->playPause();
mpTabWidget->setCurrentWidget(mpAudioTab);
}
else{
qWarning() << "bad idea to come here";
}
pEvent->acceptProposedAction();
}
void UBTeacherBarDropMediaZone::dragMoveEvent(QDragMoveEvent *pEvent)
{
pEvent->acceptProposedAction();
}

@ -1,6 +1,9 @@
#ifndef UBTEACHERBARWIDGET_H #ifndef UBTEACHERBARWIDGET_H
#define UBTEACHERBARWIDGET_H #define UBTEACHERBARWIDGET_H
class UBMediaPlayer;
class UBVideoPlayer;
#include <QWidget> #include <QWidget>
#include <QVBoxLayout> #include <QVBoxLayout>
#include <QHBoxLayout> #include <QHBoxLayout>
@ -39,6 +42,30 @@ private:
QHBoxLayout* mpStudentLayout; QHBoxLayout* mpStudentLayout;
}; };
class UBTeacherBarDropMediaZone : public QWidget
{
Q_OBJECT
public:
UBTeacherBarDropMediaZone(QWidget* parent=0, const char* name="UBTeacherBarDropMediaZone");
~UBTeacherBarDropMediaZone();
private:
QLabel* mpTitleLabel;
QLabel* mpImageTab;
UBMediaPlayer* mpVideoTab;
UBMediaPlayer* mpAudioTab;
QTabWidget* mpTabWidget;
QVBoxLayout* mpLayout;
protected:
void dragEnterEvent(QDragEnterEvent* pEvent);
void dropEvent(QDropEvent *pEvent);
void dragMoveEvent(QDragMoveEvent* pEvent);
void dragLeaveEvent(QDragLeaveEvent* pEvent);
};
class UBTeacherBarWidget : public UBDockPaletteWidget class UBTeacherBarWidget : public UBDockPaletteWidget
{ {
Q_OBJECT Q_OBJECT
@ -75,6 +102,7 @@ private:
UBTeacherStudentAction* mpAction1; UBTeacherStudentAction* mpAction1;
UBTeacherStudentAction* mpAction2; UBTeacherStudentAction* mpAction2;
UBTeacherStudentAction* mpAction3; UBTeacherStudentAction* mpAction3;
UBTeacherBarDropMediaZone* mpDropMediaZone;
QWidget* mpContainer; QWidget* mpContainer;
QVBoxLayout* mpContainerLayout; QVBoxLayout* mpContainerLayout;
}; };

@ -35,6 +35,11 @@ class UBVideoPlayer : public QWidget
return mVideoPlayer; return mVideoPlayer;
} }
void loadMedia(QUrl url)
{
mVideoPlayer->load(Phonon::MediaSource(url));
}
protected: protected:
Phonon::VideoPlayer* mVideoPlayer; Phonon::VideoPlayer* mVideoPlayer;

@ -46,7 +46,8 @@ HEADERS += src/gui/UBThumbnailView.h \
src/gui/UBTeacherBarWidget.h \ src/gui/UBTeacherBarWidget.h \
src/gui/UBLibWebView.h \ src/gui/UBLibWebView.h \
src/gui/UBDownloadWidget.h \ src/gui/UBDownloadWidget.h \
src/gui/UBDockDownloadWidget.h src/gui/UBDockDownloadWidget.h \
src/gui/UBMediaPlayer.h
SOURCES += src/gui/UBThumbnailView.cpp \ SOURCES += src/gui/UBThumbnailView.cpp \
src/gui/UBFloatingPalette.cpp \ src/gui/UBFloatingPalette.cpp \
@ -95,7 +96,8 @@ SOURCES += src/gui/UBThumbnailView.cpp \
src/gui/UBTeacherBarWidget.cpp \ src/gui/UBTeacherBarWidget.cpp \
src/gui/UBLibWebView.cpp \ src/gui/UBLibWebView.cpp \
src/gui/UBDownloadWidget.cpp \ src/gui/UBDownloadWidget.cpp \
src/gui/UBDockDownloadWidget.cpp src/gui/UBDockDownloadWidget.cpp \
src/gui/UBMediaPlayer.cpp
win32 { win32 {
@ -123,3 +125,5 @@ linux-g++-64 {
SOURCES += src/gui/UBKeyboardPalette_linux.cpp SOURCES += src/gui/UBKeyboardPalette_linux.cpp
} }

@ -24,7 +24,7 @@
#include "core/UBSetting.h" #include "core/UBSetting.h"
#include "gui/UBMainWindow.h" #include "gui/UBMainWindow.h"
#include "gui/UBVideoPlayer.h" //#include "gui/UBVideoPlayer.h"
#include "network/UBNetworkAccessManager.h" #include "network/UBNetworkAccessManager.h"
#include "network/UBServerXMLHttpRequest.h" #include "network/UBServerXMLHttpRequest.h"

@ -14,8 +14,6 @@
*/ */
#include <QtGui> #include <QtGui>
#include <QDomDocument>
#include <QXmlQuery>
#include "frameworks/UBPlatformUtils.h" #include "frameworks/UBPlatformUtils.h"
@ -62,6 +60,7 @@ UBWebController::UBWebController(UBMainWindow* mainWindow)
// , mKeyboardCurrentPalette(0) // , mKeyboardCurrentPalette(0)
, mToolsPalettePositionned(false) , mToolsPalettePositionned(false)
, mDownloadViewIsVisible(false) , mDownloadViewIsVisible(false)
{ {
connect(mMainWindow->actionWebTools, SIGNAL(toggled(bool)), this, SLOT(toggleWebToolsPalette(bool))); connect(mMainWindow->actionWebTools, SIGNAL(toggled(bool)), this, SLOT(toggleWebToolsPalette(bool)));
@ -73,13 +72,11 @@ UBWebController::UBWebController(UBMainWindow* mainWindow)
mToolsPalettePositionnedList[i] = false; mToolsPalettePositionnedList[i] = false;
} }
connect(&mOEmbedParser, SIGNAL(oembedParsed(QVector<sOEmbedContent>)), this, SLOT(onOEmbedParsed(QVector<sOEmbedContent>)));
// TODO : Comment the next line to continue the Youtube button bugfix
initialiazemOEmbedProviders(); initialiazemOEmbedProviders();
} }
UBWebController::~UBWebController() UBWebController::~UBWebController()
{ {
// NOOP // NOOP
@ -96,6 +93,7 @@ void UBWebController::initialiazemOEmbedProviders()
mOEmbedProviders << "metacafe.com"; mOEmbedProviders << "metacafe.com";
mOEmbedProviders << "qik.com"; mOEmbedProviders << "qik.com";
mOEmbedProviders << "slideshare"; mOEmbedProviders << "slideshare";
mOEmbedProviders << "5min.com";
mOEmbedProviders << "twitpic.com"; mOEmbedProviders << "twitpic.com";
mOEmbedProviders << "viddler.com"; mOEmbedProviders << "viddler.com";
mOEmbedProviders << "vimeo.com"; mOEmbedProviders << "vimeo.com";
@ -328,53 +326,16 @@ void UBWebController::activePageChanged()
mTrapFlashController->updateTrapFlashFromPage((*mCurrentWebBrowser)->currentTabWebView()->page()->currentFrame()); mTrapFlashController->updateTrapFlashFromPage((*mCurrentWebBrowser)->currentTabWebView()->page()->currentFrame());
} }
mMainWindow->actionWebTrap->setChecked(false); mMainWindow->actionWebTrap->setChecked(false);
QUrl latestUrl = (*mCurrentWebBrowser)->currentTabWebView()->url(); QUrl latestUrl = (*mCurrentWebBrowser)->currentTabWebView()->url();
// TODO : Uncomment the next line to continue the youtube button bugfix
//UBApplication::mainWindow->actionWebOEmbed->setEnabled(hasEmbeddedContent());
// And remove this line once the previous one is uncommented
UBApplication::mainWindow->actionWebOEmbed->setEnabled(isOEmbedable(latestUrl)); UBApplication::mainWindow->actionWebOEmbed->setEnabled(isOEmbedable(latestUrl));
UBApplication::mainWindow->actionEduMedia->setEnabled(isEduMedia(latestUrl)); UBApplication::mainWindow->actionEduMedia->setEnabled(isEduMedia(latestUrl));
emit activeWebPageChanged((*mCurrentWebBrowser)->currentTabWebView()); emit activeWebPageChanged((*mCurrentWebBrowser)->currentTabWebView());
} }
} }
bool UBWebController::hasEmbeddedContent()
{
bool bHasContent = false;
if(mCurrentWebBrowser){
QString html = (*mCurrentWebBrowser)->currentTabWebView()->webPage()->mainFrame()->toHtml();
// search the presence of "+oembed"
QString query = "\\+oembed([^>]*)>";
QRegExp exp(query);
exp.indexIn(html);
QStringList results = exp.capturedTexts();
if(2 <= results.size() && "" != results.at(1)){
// An embedded content has been found, no need to check the other ones
bHasContent = true;
}else{
QList<QUrl> contentUrls;
lookForEmbedContent(&html, "embed", "src", &contentUrls);
lookForEmbedContent(&html, "video", "src", &contentUrls);
lookForEmbedContent(&html, "object", "data", &contentUrls);
// TODO: check the hidden iFrame
if(!contentUrls.empty()){
bHasContent = true;
}
}
}
return bHasContent;
}
QPixmap UBWebController::captureCurrentPage() QPixmap UBWebController::captureCurrentPage()
{ {
@ -580,12 +541,9 @@ void UBWebController::showTabAtTop(bool attop)
void UBWebController::captureoEmbed() void UBWebController::captureoEmbed()
{ {
if ( mCurrentWebBrowser && (*mCurrentWebBrowser) && (*mCurrentWebBrowser)->currentTabWebView()){ if ( mCurrentWebBrowser && (*mCurrentWebBrowser)
// TODO : Uncomment the next lines to continue the youtube button bugfix && (*mCurrentWebBrowser)->currentTabWebView())
// getEmbeddableContent(); {
// And comment from here
QWebView* webView = (*mCurrentWebBrowser)->currentTabWebView(); QWebView* webView = (*mCurrentWebBrowser)->currentTabWebView();
QUrl currentUrl = webView->url(); QUrl currentUrl = webView->url();
@ -599,56 +557,9 @@ void UBWebController::captureoEmbed()
UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector); UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector);
} }
} }
// --> Until here
}
}
void UBWebController::lookForEmbedContent(QString* pHtml, QString tag, QString attribute, QList<QUrl> *pList)
{
if(NULL != pHtml && NULL != pList){
QVector<QString> urlsFound;
// Check for <embed> content
QRegExp exp(QString("<%0(.*)").arg(tag));
exp.indexIn(*pHtml);
QStringList strl = exp.capturedTexts();
if(2 <= strl.size() && strl.at(1) != ""){
// Here we call this regular expression:
// src\s?=\s?['"]([^'"]*)['"]
// It says: give me all characters that are after src=" (or src = ")
QRegExp src(QString("%0\\s?=\\s?['\"]([^'\"]*)['\"]").arg(attribute));
for(int i=1; i<strl.size(); i++){
src.indexIn(strl.at(i));
QStringList urls = src.capturedTexts();
if(2 <= urls.size() && urls.at(1) != "" && !urlsFound.contains(urls.at(1))){
urlsFound << urls.at(1);
pList->append(QUrl(urls.at(1)));
}
}
}
} }
} }
void UBWebController::checkForOEmbed(QString *pHtml)
{
mOEmbedParser.parse(*pHtml);
}
void UBWebController::getEmbeddableContent()
{
// Get the source code of the page
if(mCurrentWebBrowser){
QNetworkAccessManager* pNam = (*mCurrentWebBrowser)->currentTabWebView()->webPage()->networkAccessManager();
if(NULL != pNam){
QString html = (*mCurrentWebBrowser)->currentTabWebView()->webPage()->mainFrame()->toHtml();
mOEmbedParser.setNetworkAccessManager(pNam);
// First, we have to check if there is some oembed content
checkForOEmbed(&html);
// Note: The other contents will be verified once the oembed ones have been checked
}
}
}
void UBWebController::captureEduMedia() void UBWebController::captureEduMedia()
{ {
@ -809,38 +720,3 @@ void UBWebController::cut()
act->trigger(); act->trigger();
} }
} }
void UBWebController::onOEmbedParsed(QVector<sOEmbedContent> contents)
{
QList<QUrl> urls;
foreach(sOEmbedContent cnt, contents){
urls << QUrl(cnt.url);
}
// TODO : Implement this
//lookForEmbedContent(&html, "embed", "src", &urls);
//lookForEmbedContent(&html, "video", "src", &contentUrls);
//lookForEmbedContent(&html, "object", "data", &contentUrls);
// TODO: check the hidden iFrame
if(!urls.empty()){
QUrl contentUrl; // The selected content url
if(1 == urls.size()){
contentUrl = urls.at(0);
}else{
// TODO : Display a dialog box asking the user which content to get and set contentUrl to the selected content
}
UBGraphicsW3CWidgetItem * widget = UBApplication::boardController->activeScene()->addOEmbed(contentUrl);
if(widget)
{
UBApplication::applicationController->showBoard();
UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector);
}
}
}

@ -19,7 +19,6 @@
#include <QtGui> #include <QtGui>
#include <QtWebKit> #include <QtWebKit>
#include "web/UBOEmbedParser.h"
class WBBrowserWindow; class WBBrowserWindow;
class UBApplication; class UBApplication;
@ -31,6 +30,7 @@ class WBWebView;
class UBServerXMLHttpRequest; class UBServerXMLHttpRequest;
//class UBKeyboardPalette; //class UBKeyboardPalette;
class UBWebController : public QObject class UBWebController : public QObject
{ {
Q_OBJECT; Q_OBJECT;
@ -88,9 +88,6 @@ class UBWebController : public QObject
void captureEduMedia(); void captureEduMedia();
bool isOEmbedable(const QUrl& pUrl); bool isOEmbedable(const QUrl& pUrl);
bool hasEmbeddedContent();
void getEmbeddableContent();
bool isEduMedia(const QUrl& pUrl); bool isEduMedia(const QUrl& pUrl);
void copy(); void copy();
@ -98,36 +95,41 @@ class UBWebController : public QObject
void cut(); void cut();
private: private:
void initialiazemOEmbedProviders();
void tutorialWebInstance();
void webBrowserInstance();
void paraschoolWebInstance();
void lookForEmbedContent(QString* pHtml, QString tag, QString attribute, QList<QUrl>* pList);
void checkForOEmbed(QString* pHtml);
QStackedWidget mStackedWidget[TotalNumberOfWebInstances]; QStackedWidget mStackedWidget[TotalNumberOfWebInstances];
UBMainWindow *mMainWindow; UBMainWindow *mMainWindow;
WBBrowserWindow* mWebBrowserList[TotalNumberOfWebInstances]; WBBrowserWindow* mWebBrowserList[TotalNumberOfWebInstances];
WBBrowserWindow** mCurrentWebBrowser; WBBrowserWindow** mCurrentWebBrowser;
QWidget* mBrowserWidget; QWidget* mBrowserWidget;
UBTrapFlashController* mTrapFlashController; UBTrapFlashController* mTrapFlashController;
UBWebToolsPalette** mToolsCurrentPalette; UBWebToolsPalette** mToolsCurrentPalette;
UBWebToolsPalette* mToolsPaletteList[TotalNumberOfWebInstances]; UBWebToolsPalette* mToolsPaletteList[TotalNumberOfWebInstances];
// UBKeyboardPalette** mKeyboardCurrentPalette; // UBKeyboardPalette** mKeyboardCurrentPalette;
// UBKeyboardPalette* mKeyboardPaletteList[TotalNumberOfWebInstances]; // UBKeyboardPalette* mKeyboardPaletteList[TotalNumberOfWebInstances];
bool mToolsPalettePositionned; bool mToolsPalettePositionned;
bool mToolsPalettePositionnedList[TotalNumberOfWebInstances]; bool mToolsPalettePositionnedList[TotalNumberOfWebInstances];
bool mDownloadViewIsVisible; bool mDownloadViewIsVisible;
QStringList mOEmbedProviders; QStringList mOEmbedProviders;
UBOEmbedParser mOEmbedParser;
void initialiazemOEmbedProviders();
void tutorialWebInstance();
void webBrowserInstance();
void paraschoolWebInstance();
private slots: private slots:
void activePageChanged(); void activePageChanged();
void trapFlash(); void trapFlash();
void toggleWebTrap(bool checked); void toggleWebTrap(bool checked);
void onOEmbedParsed(QVector<sOEmbedContent> contents);
// void showKeyboard(bool checked); // void showKeyboard(bool checked);
signals: signals:
@ -137,6 +139,7 @@ class UBWebController : public QObject
* @param pCapturedPixmap QPixmap corresponding to the capture. * @param pCapturedPixmap QPixmap corresponding to the capture.
*/ */
void imageCaptured(const QPixmap& pCapturedPixmap, bool pageMode, const QUrl& source); void imageCaptured(const QPixmap& pCapturedPixmap, bool pageMode, const QUrl& source);
void activeWebPageChanged(WBWebView* pWebView); void activeWebPageChanged(WBWebView* pWebView);
}; };

@ -26,8 +26,7 @@ HEADERS += src/web/UBWebController.h \
src/web/browser/WBUrlLineEdit.h \ src/web/browser/WBUrlLineEdit.h \
src/web/browser/WBWebView.h \ src/web/browser/WBWebView.h \
src/web/browser/WBHistory.h \ src/web/browser/WBHistory.h \
src/web/browser/WBWebTrapWebView.h \ src/web/browser/WBWebTrapWebView.h
src/web/UBOEmbedParser.h
SOURCES += src/web/UBWebController.cpp \ SOURCES += src/web/UBWebController.cpp \
src/web/UBTrapFlashController.cpp \ src/web/UBTrapFlashController.cpp \
@ -47,7 +46,8 @@ SOURCES += src/web/UBWebController.cpp \
src/web/browser/WBUrlLineEdit.cpp \ src/web/browser/WBUrlLineEdit.cpp \
src/web/browser/WBWebView.cpp \ src/web/browser/WBWebView.cpp \
src/web/browser/WBHistory.cpp \ src/web/browser/WBHistory.cpp \
src/web/browser/WBWebTrapWebView.cpp \ src/web/browser/WBWebTrapWebView.cpp
src/web/UBOEmbedParser.cpp

Loading…
Cancel
Save