parent
dcf9d3bed5
commit
56c8bfc3d1
@ -1,192 +1,192 @@ |
|||||||
/*
|
/*
|
||||||
* This program is free software: you can redistribute it and/or modify |
* This program is free software: you can redistribute it and/or modify |
||||||
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
||||||
* the Free Software Foundation, either version 3 of the License, or |
* the Free Software Foundation, either version 3 of the License, or |
||||||
* (at your option) any later version. |
* (at your option) any later version. |
||||||
* |
* |
||||||
* This program is distributed in the hope that it will be useful, |
* This program is distributed in the hope that it will be useful, |
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
* GNU General Public License for more details. |
* GNU General Public License for more details. |
||||||
* |
* |
||||||
* You should have received a copy of the GNU General Public License |
* You should have received a copy of the GNU General Public License |
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/ |
*/ |
||||||
|
|
||||||
#ifndef UBBOARDPALETTEMANAGER_H_ |
#ifndef UBBOARDPALETTEMANAGER_H_ |
||||||
#define UBBOARDPALETTEMANAGER_H_ |
#define UBBOARDPALETTEMANAGER_H_ |
||||||
|
|
||||||
#include <QtGui> |
#include <QtGui> |
||||||
#include <QtWebKit> |
#include <QtWebKit> |
||||||
|
|
||||||
#include "web/UBRoutedMouseEventWebView.h" |
#include "web/UBRoutedMouseEventWebView.h" |
||||||
#include "gui/UBLeftPalette.h" |
#include "gui/UBLeftPalette.h" |
||||||
#include "gui/UBRightPalette.h" |
#include "gui/UBRightPalette.h" |
||||||
#include "gui/UBPageNavigationWidget.h" |
#include "gui/UBPageNavigationWidget.h" |
||||||
#include "gui/UBLibWidget.h" |
#include "gui/UBLibWidget.h" |
||||||
#include "gui/UBCachePropertiesWidget.h" |
#include "gui/UBCachePropertiesWidget.h" |
||||||
#include "gui/UBDockDownloadWidget.h" |
#include "gui/UBDockDownloadWidget.h" |
||||||
#include "core/UBApplicationController.h" |
#include "core/UBApplicationController.h" |
||||||
#include "gui/UBFeaturesWidget.h" |
#include "gui/UBFeaturesWidget.h" |
||||||
|
|
||||||
|
|
||||||
class UBStylusPalette; |
class UBStylusPalette; |
||||||
class UBClockPalette; |
class UBClockPalette; |
||||||
class UBPageNumberPalette; |
class UBPageNumberPalette; |
||||||
class UBZoomPalette; |
class UBZoomPalette; |
||||||
class UBActionPalette; |
class UBActionPalette; |
||||||
class UBBoardController; |
class UBBoardController; |
||||||
class UBFloatingPalette; |
class UBFloatingPalette; |
||||||
class UBServerXMLHttpRequest; |
class UBServerXMLHttpRequest; |
||||||
class UBKeyboardPalette; |
class UBKeyboardPalette; |
||||||
class UBMainWindow; |
class UBMainWindow; |
||||||
class UBApplicationController; |
class UBApplicationController; |
||||||
class UBDockTeacherGuideWidget; |
class UBDockTeacherGuideWidget; |
||||||
|
|
||||||
// Uncomment this to use old-styles lib paletter
|
// Uncomment this to use old-styles lib paletter
|
||||||
// #define USE_WEB_WIDGET
|
#define USE_WEB_WIDGET |
||||||
|
|
||||||
|
|
||||||
class UBBoardPaletteManager : public QObject |
class UBBoardPaletteManager : public QObject |
||||||
{ |
{ |
||||||
Q_OBJECT |
Q_OBJECT |
||||||
|
|
||||||
public: |
public: |
||||||
UBBoardPaletteManager(QWidget* container, UBBoardController* controller); |
UBBoardPaletteManager(QWidget* container, UBBoardController* controller); |
||||||
virtual ~UBBoardPaletteManager(); |
virtual ~UBBoardPaletteManager(); |
||||||
|
|
||||||
void setupLayout(); |
void setupLayout(); |
||||||
UBLeftPalette* leftPalette(){return mLeftPalette;} |
UBLeftPalette* leftPalette(){return mLeftPalette;} |
||||||
UBRightPalette* rightPalette(){return mRightPalette;} |
UBRightPalette* rightPalette(){return mRightPalette;} |
||||||
UBStylusPalette* stylusPalette(){return mStylusPalette;} |
UBStylusPalette* stylusPalette(){return mStylusPalette;} |
||||||
void showVirtualKeyboard(bool show = true); |
void showVirtualKeyboard(bool show = true); |
||||||
void initPalettesPosAtStartup(); |
void initPalettesPosAtStartup(); |
||||||
void connectToDocumentController(); |
void connectToDocumentController(); |
||||||
void refreshPalettes(); |
void refreshPalettes(); |
||||||
|
|
||||||
UBKeyboardPalette *mKeyboardPalette; |
UBKeyboardPalette *mKeyboardPalette; |
||||||
|
|
||||||
void processPalettersWidget(UBDockPalette *paletter, eUBDockPaletteWidgetMode mode); |
void processPalettersWidget(UBDockPalette *paletter, eUBDockPaletteWidgetMode mode); |
||||||
void changeMode(eUBDockPaletteWidgetMode newMode, bool isInit = false); |
void changeMode(eUBDockPaletteWidgetMode newMode, bool isInit = false); |
||||||
void startDownloads(); |
void startDownloads(); |
||||||
void stopDownloads(); |
void stopDownloads(); |
||||||
|
|
||||||
signals: |
signals: |
||||||
void connectToDocController(); |
void connectToDocController(); |
||||||
void signal_changeMode(eUBDockPaletteWidgetMode newMode); |
void signal_changeMode(eUBDockPaletteWidgetMode newMode); |
||||||
|
|
||||||
public slots: |
public slots: |
||||||
|
|
||||||
void activeSceneChanged(); |
void activeSceneChanged(); |
||||||
void containerResized(); |
void containerResized(); |
||||||
void addItem(const QUrl& pUrl); |
void addItem(const QUrl& pUrl); |
||||||
void addItem(const QPixmap& pPixmap, const QPointF& p = QPointF(0.0, 0.0), qreal scale = 1.0, const QUrl& sourceUrl = QUrl()); |
void addItem(const QPixmap& pPixmap, const QPointF& p = QPointF(0.0, 0.0), qreal scale = 1.0, const QUrl& sourceUrl = QUrl()); |
||||||
|
|
||||||
void slot_changeMainMode(UBApplicationController::MainMode); |
void slot_changeMainMode(UBApplicationController::MainMode); |
||||||
void slot_changeDesktopMode(bool); |
void slot_changeDesktopMode(bool); |
||||||
|
|
||||||
private: |
private: |
||||||
|
|
||||||
void setupPalettes(); |
void setupPalettes(); |
||||||
void connectPalettes(); |
void connectPalettes(); |
||||||
void positionFreeDisplayPalette(); |
void positionFreeDisplayPalette(); |
||||||
void setupDockPaletteWidgets(); |
void setupDockPaletteWidgets(); |
||||||
|
|
||||||
QWidget* mContainer; |
QWidget* mContainer; |
||||||
UBBoardController *mBoardControler; |
UBBoardController *mBoardControler; |
||||||
|
|
||||||
UBStylusPalette *mStylusPalette; |
UBStylusPalette *mStylusPalette; |
||||||
|
|
||||||
UBZoomPalette *mZoomPalette; |
UBZoomPalette *mZoomPalette; |
||||||
|
|
||||||
/** The left dock palette */ |
/** The left dock palette */ |
||||||
UBLeftPalette* mLeftPalette; |
UBLeftPalette* mLeftPalette; |
||||||
/** The right dock palette */ |
/** The right dock palette */ |
||||||
UBRightPalette* mRightPalette; |
UBRightPalette* mRightPalette; |
||||||
|
|
||||||
UBActionPalette *mBackgroundsPalette; |
UBActionPalette *mBackgroundsPalette; |
||||||
UBActionPalette *mToolsPalette; |
UBActionPalette *mToolsPalette; |
||||||
UBActionPalette* mAddItemPalette; |
UBActionPalette* mAddItemPalette; |
||||||
UBActionPalette* mErasePalette; |
UBActionPalette* mErasePalette; |
||||||
UBActionPalette* mPagePalette; |
UBActionPalette* mPagePalette; |
||||||
|
|
||||||
QUrl mItemUrl; |
QUrl mItemUrl; |
||||||
QPixmap mPixmap; |
QPixmap mPixmap; |
||||||
QPointF mPos; |
QPointF mPos; |
||||||
qreal mScaleFactor; |
qreal mScaleFactor; |
||||||
|
|
||||||
QTime mPageButtonPressedTime; |
QTime mPageButtonPressedTime; |
||||||
bool mPendingPageButtonPressed; |
bool mPendingPageButtonPressed; |
||||||
|
|
||||||
QTime mZoomButtonPressedTime; |
QTime mZoomButtonPressedTime; |
||||||
bool mPendingZoomButtonPressed; |
bool mPendingZoomButtonPressed; |
||||||
|
|
||||||
QTime mPanButtonPressedTime; |
QTime mPanButtonPressedTime; |
||||||
bool mPendingPanButtonPressed; |
bool mPendingPanButtonPressed; |
||||||
|
|
||||||
QTime mEraseButtonPressedTime; |
QTime mEraseButtonPressedTime; |
||||||
bool mPendingEraseButtonPressed; |
bool mPendingEraseButtonPressed; |
||||||
|
|
||||||
/** The page navigator widget */ |
/** The page navigator widget */ |
||||||
UBPageNavigationWidget* mpPageNavigWidget; |
UBPageNavigationWidget* mpPageNavigWidget; |
||||||
|
|
||||||
#ifdef USE_WEB_WIDGET |
#ifdef USE_WEB_WIDGET |
||||||
/** The library widget */ |
/** The library widget */ |
||||||
UBLibWidget* mpLibWidget; |
UBLibWidget* mpLibWidget; |
||||||
#endif |
#endif |
||||||
|
|
||||||
/** The cache properties widget */ |
/** The cache properties widget */ |
||||||
UBCachePropertiesWidget* mpCachePropWidget; |
UBCachePropertiesWidget* mpCachePropWidget; |
||||||
|
|
||||||
UBFeaturesWidget *mpFeaturesWidget; |
UBFeaturesWidget *mpFeaturesWidget; |
||||||
|
|
||||||
/** The download widget */ |
/** The download widget */ |
||||||
UBDockDownloadWidget* mpDownloadWidget; |
UBDockDownloadWidget* mpDownloadWidget; |
||||||
// HACK: here we duplicate the lib widget for the desktop mode
|
// HACK: here we duplicate the lib widget for the desktop mode
|
||||||
// we MUST refactor the architecture in order to use only one
|
// we MUST refactor the architecture in order to use only one
|
||||||
// lib widget!
|
// lib widget!
|
||||||
UBLibWidget* mpDesktopLibWidget; |
UBLibWidget* mpDesktopLibWidget; |
||||||
|
|
||||||
UBDockTeacherGuideWidget* mpTeacherGuideWidget; |
UBDockTeacherGuideWidget* mpTeacherGuideWidget; |
||||||
|
|
||||||
bool mDownloadInProgress; |
bool mDownloadInProgress; |
||||||
|
|
||||||
private slots: |
private slots: |
||||||
|
|
||||||
void changeBackground(); |
void changeBackground(); |
||||||
|
|
||||||
void toggleBackgroundPalette(bool checked); |
void toggleBackgroundPalette(bool checked); |
||||||
void backgroundPaletteClosed(); |
void backgroundPaletteClosed(); |
||||||
|
|
||||||
void toggleStylusPalette(bool checked); |
void toggleStylusPalette(bool checked); |
||||||
void tooglePodcastPalette(bool checked); |
void tooglePodcastPalette(bool checked); |
||||||
|
|
||||||
void erasePaletteButtonPressed(); |
void erasePaletteButtonPressed(); |
||||||
void erasePaletteButtonReleased(); |
void erasePaletteButtonReleased(); |
||||||
|
|
||||||
void toggleErasePalette(bool ckecked); |
void toggleErasePalette(bool ckecked); |
||||||
void erasePaletteClosed(); |
void erasePaletteClosed(); |
||||||
|
|
||||||
void togglePagePalette(bool ckecked); |
void togglePagePalette(bool ckecked); |
||||||
void pagePaletteClosed(); |
void pagePaletteClosed(); |
||||||
|
|
||||||
void pagePaletteButtonPressed(); |
void pagePaletteButtonPressed(); |
||||||
void pagePaletteButtonReleased(); |
void pagePaletteButtonReleased(); |
||||||
|
|
||||||
void addItemToCurrentPage(); |
void addItemToCurrentPage(); |
||||||
void addItemToNewPage(); |
void addItemToNewPage(); |
||||||
void addItemToLibrary(); |
void addItemToLibrary(); |
||||||
|
|
||||||
void purchaseLinkActivated(const QString&); |
void purchaseLinkActivated(const QString&); |
||||||
|
|
||||||
void linkClicked(const QUrl& url); |
void linkClicked(const QUrl& url); |
||||||
|
|
||||||
void zoomButtonPressed(); |
void zoomButtonPressed(); |
||||||
void zoomButtonReleased(); |
void zoomButtonReleased(); |
||||||
void panButtonPressed(); |
void panButtonPressed(); |
||||||
void panButtonReleased(); |
void panButtonReleased(); |
||||||
|
|
||||||
void changeStylusPaletteOrientation(QVariant var); |
void changeStylusPaletteOrientation(QVariant var); |
||||||
}; |
}; |
||||||
|
|
||||||
#endif /* UBBOARDPALETTEMANAGER_H_ */ |
#endif /* UBBOARDPALETTEMANAGER_H_ */ |
||||||
|
Loading…
Reference in new issue