Merge branch 'master' of github.com:Sankore/Sankore-3.1

preferencesAboutTextFull
Ilia Ryabokon 13 years ago
commit 0ba0dcc79c
  1. 6
      Sankore_3.1.pro
  2. 33
      Subdirs.pro
  3. 13
      plugins/cffadaptor/UBCFFAdaptor.pro
  4. 5
      plugins/cffadaptor/postScript_mac.sh
  5. 9
      src/board/UBBoardPaletteManager.cpp
  6. 4
      src/board/UBBoardPaletteManager.h
  7. 3
      src/document/UBDocumentController.cpp
  8. 6
      src/domain/UBGraphicsDelegateFrame.cpp
  9. 11
      src/domain/UBGraphicsMediaItem.cpp
  10. 9
      src/frameworks/UBPlatformUtils_mac.mm
  11. 2
      src/web/UBWebController.cpp

@ -3,6 +3,7 @@ TEMPLATE = app
THIRD_PARTY_PATH=../Sankore-ThirdParty
CONFIG -= flat
CONFIG += debug_and_release \
no_include_pwd
@ -133,8 +134,9 @@ win32 {
macx {
LIBS += -framework Foundation
LIBS += -lcrypto
LIBS += -framework AppKit
LIBS += -framework WebKit
#commented because Sankore crashes on Java Script. It seems to backends dependencies.
#LIBS += -framework AppKit
#LIBS += -framework WebKit
CONFIG(release, debug|release):CONFIG += x86

@ -0,0 +1,33 @@
TEMPLATE = subdirs
CONFIG += recursive
CONFIG += debug_and_release
win32: SUB_DIR = win32
macx: SUB_DIR = macx
linux-g++: SUB_DIR = linux
linux-g++-32: SUB_DIR = linux
linux-g++-64: SUB_DIR = linux
BUILD_DIR = build/$$SUB_DIR
CONFIG(debug, debug|release):BUILD_DIR = $$BUILD_DIR/debug
CONFIG(release, debug|release) {
BUILD_DIR = $$BUILD_DIR/release
CONFIG += warn_off
}
SANKORE_DIR = $$PWD
SANKORE_PRO = $$SANKORE_DIR/Sankore_3.1.pro
THIRD_PARTY_DIR = $$PWD/Sankore-ThirdParty
SANKORE_PLUGINS_DIR = $$SANKORE_DIR/plugins
PLUGIN_CFF_ADAPTOR_DIR = $$SANKORE_PLUGINS_DIR/cffadaptor
PLUGIN_CFF_ADAPTOR_PRO = $$PLUGIN_CFF_ADAPTOR_DIR/UBCFFAdaptor.pro
if(exists($$PLUGIN_CFF_ADAPTOR_DIR)){
SUBDIRS += $$PLUGIN_CFF_ADAPTOR_PRO
$$SANKORE_PRO.depends = $$PLUGIN_CFF_ADAPTOR_PRO
}
SUBDIRS += $$SANKORE_PRO
recurse_target = $$SANKORE_PRO

@ -16,7 +16,7 @@ linux-g++-64: SUB_DIR = linux
THIRD_PARTY_PATH = ../../../Sankore-ThirdParty
QUAZIP_DIR = "$$PWD/../../../Sankore-ThirdParty/quazip/quazip-0.3"
BUILD_DIR = $$PWD/build/$$SUB_DIR
BUILD_DIR = build/$$SUB_DIR
CONFIG(debug, debug|release):BUILD_DIR = $$BUILD_DIR/debug
CONFIG(release, debug|release) {
BUILD_DIR = $$BUILD_DIR/release
@ -31,12 +31,19 @@ OBJECTS_DIR = $$BUILD_DIR/objects
MOC_DIR = $$BUILD_DIR/moc
DESTDIR = $$BUILD_DIR/lib
RCC_DIR = $$BUILD_DIR/rcc
SANKORE_DIR = ../..
win32:{
QMAKE_POST_LINK += copy $$replace(DESTDIR,/,\\)\\CFF_Adaptor.dll" $$replace(SANKORE_DIR,/,\\)\\CFF_Adaptor.dll /y"
}
macx:{
QMAKE_POST_LINK += bash postScript_mac.sh "$$DESTDIR" "$$SANKORE_DIR/$$BUILD_DIR/product/Open-Sankore.app/Contents/MacOS"
}
LIBS += "-L$$THIRD_PARTY_PATH/quazip/lib/$$SUB_DIR" "-lquazip"
QT += xml xmlpatterns core
QT += gui
QT += svg
QT += svg
DEFINES += UBCFFADAPTOR_LIBRARY
@ -59,4 +66,4 @@ HEADERS +=\
src/UBCFFConstants.h
RESOURCES += \
resources/resources.qrc
resources/resources.qrc

@ -0,0 +1,5 @@
#!/bin/bash
SOURCE=$1
DESTINATION=$2
mkdir -p $DESTINATION
cp -R $SOURCE/ $DESTINATION

@ -29,6 +29,7 @@
#include "gui/UBKeyboardPalette.h"
#include "gui/UBToolWidget.h"
#include "gui/UBZoomPalette.h"
#include "gui/UBWebToolsPalette.h"
#include "gui/UBActionPalette.h"
#include "gui/UBFavoriteToolPalette.h"
#include "gui/UBDockTeacherGuideWidget.h"
@ -73,6 +74,7 @@ UBBoardPaletteManager::UBBoardPaletteManager(QWidget* container, UBBoardControll
, mRightPalette(NULL)
, mBackgroundsPalette(0)
, mToolsPalette(0)
, mWebToolsCurrentPalette(0)
, mAddItemPalette(0)
, mErasePalette(NULL)
, mPagePalette(NULL)
@ -683,6 +685,8 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
if( !isInit )
containerResized();
if (mWebToolsCurrentPalette)
mWebToolsCurrentPalette->hide();
}
break;
@ -723,6 +727,9 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
if( !isInit )
UBApplication::applicationController->uninotesController()->TransparentWidgetResized();
if (mWebToolsCurrentPalette)
mWebToolsCurrentPalette->hide();
}
break;
@ -764,6 +771,8 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
else
mKeyboardPalette->setParent(UBApplication::documentController->controlView());
}
if (mWebToolsCurrentPalette)
mWebToolsCurrentPalette->hide();
}
break;

@ -30,6 +30,7 @@
#include "gui/UBFeaturesWidget.h"
class UBWebToolsPalette;
class UBStylusPalette;
class UBClockPalette;
class UBPageNumberPalette;
@ -66,6 +67,9 @@ class UBBoardPaletteManager : public QObject
UBKeyboardPalette *mKeyboardPalette;
void setCurrentWebToolsPalette(UBWebToolsPalette *palette) {mWebToolsCurrentPalette = palette;}
UBWebToolsPalette* mWebToolsCurrentPalette;
void processPalettersWidget(UBDockPalette *paletter, eUBDockPaletteWidgetMode mode);
void changeMode(eUBDockPaletteWidgetMode newMode, bool isInit = false);
void startDownloads();

@ -122,6 +122,9 @@ UBDocumentProxyTreeItem* UBDocumentController::findDocument(UBDocumentProxy* pro
void UBDocumentController::selectDocument(UBDocumentProxy* proxy, bool setAsCurrentDocument)
{
if (!proxy)
return;
QTreeWidgetItemIterator it(mDocumentUI->documentTreeWidget);
mDocumentUI->documentTreeWidget->clearSelection();

@ -249,6 +249,9 @@ bool UBGraphicsDelegateFrame::canResizeBottomRight(qreal width, qreal height, qr
void UBGraphicsDelegateFrame::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
if (mDelegate->delegated()->data(UBGraphicsItemData::ItemLocked).toBool())
return;
QLineF move(mStartingPoint, event->scenePos());
qreal moveX = move.length() * cos((move.angle() - mAngle) * PI / 180);
qreal moveY = -move.length() * sin((move.angle() - mAngle) * PI / 180);
@ -390,9 +393,6 @@ void UBGraphicsDelegateFrame::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
QSizeF newSize = resizableItem->size() + incVector;
if (!(mDelegate->getToolBarItem()->isVisibleOnBoard()
&& (newSize.width() < mDelegate->getToolBarItem()->minWidth() / mDelegate->antiScaleRatio()
|| newSize.height() < mDelegate->getToolBarItem()->minWidth() / mDelegate->antiScaleRatio() * 3/4)))
resizableItem->resize(newSize);
}
}

@ -223,14 +223,6 @@ UBItem* UBGraphicsMediaItem::deepCopy() const
void UBGraphicsMediaItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
// QDrag* mDrag = new QDrag(event->widget());
// QMimeData* pMime = new QMimeData();
// mDrag->setMimeData(pMime);
// mDrag->start();
// UBApplication::boardController->activeScene()->setActiveItem(this);
if (mDelegate)
{
mDelegate->mousePressEvent(event);
@ -279,6 +271,9 @@ void UBGraphicsMediaItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
void UBGraphicsMediaItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
if (data(UBGraphicsItemData::ItemLocked).toBool())
return;
if(mShouldMove && (event->buttons() & Qt::LeftButton))
{
QPointF offset = event->scenePos() - mMousePressPos;

@ -10,8 +10,12 @@
#import <Foundation/NSAutoreleasePool.h>
#import <Carbon/Carbon.h>
#import <APELite.h>
/*
// commented because Sankore crashes on Java Script. It seems to backends dependencies.
#import <WebKit/WebKit.h>
#import <AppKit/AppKit.h>
*/
NSString* bundleShortVersion(NSBundle *bundle)
@ -543,13 +547,14 @@ void UBPlatformUtils::destroyKeyboardLayouts()
QString UBPlatformUtils::urlFromClipboard()
{
QString qsRet;
/*
// commented because Sankore crashes on Java Script. It seems to backends dependencies.
NSPasteboard* pPasteboard = [NSPasteboard pasteboardWithName:@"Apple CFPasteboard drag"];
WebArchive* pArchive = [[WebArchive alloc] initWithData:[pPasteboard dataForType:@"com.apple.webarchive"]];
qsRet = [[[[pArchive mainResource] URL] absoluteString] UTF8String];
[pArchive release];
*/
return qsRet;
}

@ -424,7 +424,7 @@ void UBWebController::setupPalettes()
if(!(*mToolsCurrentPalette))
{
(*mToolsCurrentPalette) = new UBWebToolsPalette(UBApplication::mainWindow, false);
UBApplication::boardController->paletteManager()->setCurrentWebToolsPalette(*mToolsCurrentPalette);
#ifndef Q_WS_WIN
if (UBPlatformUtils::hasVirtualKeyboard() && UBApplication::boardController->paletteManager()->mKeyboardPalette)
connect(UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(closed()),

Loading…
Cancel
Save