Merge branch 'OEFUniboard' into claudio-dev

preferencesAboutTextFull
Claudio Valerio 11 years ago
commit 34deb9d92a
  1. 2
      OpenBoard.pro
  2. 8
      buildDebianPackage.sh
  3. 11
      release.macx.sh
  4. 4
      release.win7.vc9.bat
  5. 20
      src/board/UBBoardController.cpp
  6. 1
      src/board/UBBoardController.h
  7. 12
      src/desktop/UBDesktopAnnotationController.cpp
  8. 1
      src/desktop/UBDesktopAnnotationController.h
  9. 3
      src/domain/UBGraphicsItemUndoCommand.cpp
  10. 2
      src/domain/UBGraphicsItemUndoCommand.h
  11. 1
      src/domain/UBGraphicsScene.cpp
  12. 1
      src/gui/UBDocumentNavigator.cpp

@ -11,7 +11,7 @@ CONFIG += debug_and_release \
VERSION_MAJ = 0 VERSION_MAJ = 0
VERSION_MIN = 08 VERSION_MIN = 08
VERSION_TYPE = b # a = alpha, b = beta, r = release, other => error VERSION_TYPE = b # a = alpha, b = beta, r = release, other => error
VERSION_PATCH = 01 VERSION_PATCH = 02
VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}" VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}"
VERSION = $$replace(VERSION, "\\.r", "") VERSION = $$replace(VERSION, "\\.r", "")

@ -132,6 +132,14 @@ buildImporter(){
IMPORTER_NAME="OpenBoardImporter" IMPORTER_NAME="OpenBoardImporter"
checkDir $IMPORTER_DIR checkDir $IMPORTER_DIR
cd ${IMPORTER_DIR} cd ${IMPORTER_DIR}
rm moc_*
rm -rf debug release
rm *.o
git reset --hard
git pull
$QMAKE_PATH ${IMPORTER_NAME}.pro $QMAKE_PATH ${IMPORTER_NAME}.pro
make clean make clean
make -j4 make -j4

@ -90,6 +90,12 @@ function addImporter {
fi fi
cd ${importerDir} cd ${importerDir}
git reset --hard
git pull
rm -rf ${importerName}.app
rm moc_*
rm MakeFile*
rm *.o
$QMAKE ${importerName}.pro $QMAKE ${importerName}.pro
make -j4 make -j4
$MACDEPLOYQT ${importerName}.app $MACDEPLOYQT ${importerName}.app
@ -218,7 +224,7 @@ notify "Creating dmg ..."
umount "$VOLUME" 2> /dev/null umount "$VOLUME" 2> /dev/null
$DMGUTIL --open --volume="$APPLICATION_NAME" "$DMG" $DMGUTIL --open --volume="$APPLICATION_NAME" "$DMG"
cp *.pdf "$VOLUME" #cp *.pdf "$VOLUME"
cp -R "$APP" "$VOLUME" cp -R "$APP" "$VOLUME"
ln -s /Applications "$VOLUME" ln -s /Applications "$VOLUME"
@ -226,8 +232,7 @@ $DMGUTIL --set --iconsize=96 --toolbar=false --icon=resources/macx/OpenBoard.icn
$DMGUTIL --set --x=20 --y=60 --width=580 --height=440 "$VOLUME" $DMGUTIL --set --x=20 --y=60 --width=580 --height=440 "$VOLUME"
$DMGUTIL --set --x=180 --y=120 "$VOLUME/`basename \"$APP\"`" $DMGUTIL --set --x=180 --y=120 "$VOLUME/`basename \"$APP\"`"
$DMGUTIL --set --x=400 --y=120 "$VOLUME/Applications" $DMGUTIL --set --x=400 --y=120 "$VOLUME/Applications"
$DMGUTIL --set --x=180 --y=280 "$VOLUME/ReleaseNotes.pdf" #$DMGUTIL --set --x=180 --y=280 "$VOLUME/ReleaseNotes.pdf"
$DMGUTIL --set --x=400 --y=280 "$VOLUME/JournalDesModifications.pdf"
$DMGUTIL --close --volume="$APPLICATION_NAME" "$DMG" $DMGUTIL --close --volume="$APPLICATION_NAME" "$DMG"

@ -44,6 +44,10 @@ IF NOT EXIST "%IMPORTER_PATH%" GOTO EXIT_WITH_ERROR
set HOME_DIR="%cd%" set HOME_DIR="%cd%"
cd %IMPORTER_PATH% cd %IMPORTER_PATH%
IF EXIST "release" (del "release\*.*" /Q) IF EXIST "release" (del "release\*.*" /Q)
IF EXIST "debug" (del "debug\*.*" /Q)
IF EXIST "MakeFile" (del "MakeFile*" /Q)
IF EXIST "MakeFile" (del "MakeFile*" /Q)
IF EXIST "%IMPORTER_NAME%.exe" (del "%IMPORTER_NAME%.exe" /Q)
"%QT_BIN%\qmake.exe" %IMPORTER_NAME%.pro "%QT_BIN%\qmake.exe" %IMPORTER_NAME%.pro
nmake release nmake release
cd %HOME_DIR% cd %HOME_DIR%

@ -1529,7 +1529,6 @@ void UBBoardController::setActiveDocumentScene(UBDocumentProxy* pDocumentProxy,
selectionChanged(); selectionChanged();
updateBackgroundActionsState(mActiveScene->isDarkBackground(), mActiveScene->isCrossedBackground()); updateBackgroundActionsState(mActiveScene->isDarkBackground(), mActiveScene->isCrossedBackground());
updateBackgroundState();
if(documentChange) if(documentChange)
UBGraphicsTextItem::lastUsedTextColor = QColor(); UBGraphicsTextItem::lastUsedTextColor = QColor();
@ -1649,8 +1648,6 @@ void UBBoardController::changeBackground(bool isDark, bool isCrossed)
mActiveScene->setBackground(isDark, isCrossed); mActiveScene->setBackground(isDark, isCrossed);
updateBackgroundState();
emit backgroundChanged(); emit backgroundChanged();
} }
} }
@ -1991,22 +1988,6 @@ void UBBoardController::saveViewState()
} }
} }
void UBBoardController::updateBackgroundState()
{
//adjust background style
QString newBackgroundStyle;
if (mActiveScene && mActiveScene->isDarkBackground())
{
newBackgroundStyle ="QWidget {background-color: #0E0E0E}";
}
else
{
newBackgroundStyle ="QWidget {background-color: #F1F1F1}";
}
}
void UBBoardController::stylusToolChanged(int tool) void UBBoardController::stylusToolChanged(int tool)
{ {
if (UBPlatformUtils::hasVirtualKeyboard() && mPaletteManager->mKeyboardPalette) if (UBPlatformUtils::hasVirtualKeyboard() && mPaletteManager->mKeyboardPalette)
@ -2019,7 +2000,6 @@ void UBBoardController::stylusToolChanged(int tool)
} }
} }
updateBackgroundState();
} }

@ -299,7 +299,6 @@ class UBBoardController : public UBDocumentContainer
void boardViewResized(QResizeEvent* event); void boardViewResized(QResizeEvent* event);
void documentWillBeDeleted(UBDocumentProxy* pProxy); void documentWillBeDeleted(UBDocumentProxy* pProxy);
void updateBackgroundActionsState(bool isDark, bool isCrossed); void updateBackgroundActionsState(bool isDark, bool isCrossed);
void updateBackgroundState();
void colorPaletteChanged(); void colorPaletteChanged();
void libraryDialogClosed(int ret); void libraryDialogClosed(int ret);
void lastWindowClosed(); void lastWindowClosed();

@ -91,6 +91,8 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB
mTransparentDrawingView->setStyleSheet(backgroundStyle); mTransparentDrawingView->setStyleSheet(backgroundStyle);
mTransparentDrawingScene = new UBGraphicsScene(0, false); mTransparentDrawingScene = new UBGraphicsScene(0, false);
updateColors();
mTransparentDrawingView->setScene(mTransparentDrawingScene); mTransparentDrawingView->setScene(mTransparentDrawingScene);
mTransparentDrawingScene->setDrawingMode(true); mTransparentDrawingScene->setDrawingMode(true);
@ -150,7 +152,8 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB
mDesktopEraserPalette->setVisible(false); mDesktopEraserPalette->setVisible(false);
connect(UBApplication::mainWindow->actionEraseDesktopAnnotations, SIGNAL(triggered()), this, SLOT(eraseDesktopAnnotations())); connect(UBApplication::mainWindow->actionEraseDesktopAnnotations, SIGNAL(triggered()), this, SLOT(eraseDesktopAnnotations()));
connect(UBApplication::boardController, SIGNAL(backgroundChanged()), this, SLOT(updateColors()));
connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), this, SLOT(updateColors()));
connect(&mHoldTimerPen, SIGNAL(timeout()), this, SLOT(penActionReleased())); connect(&mHoldTimerPen, SIGNAL(timeout()), this, SLOT(penActionReleased()));
connect(&mHoldTimerMarker, SIGNAL(timeout()), this, SLOT(markerActionReleased())); connect(&mHoldTimerMarker, SIGNAL(timeout()), this, SLOT(markerActionReleased()));
connect(&mHoldTimerEraser, SIGNAL(timeout()), this, SLOT(eraserActionReleased())); connect(&mHoldTimerEraser, SIGNAL(timeout()), this, SLOT(eraserActionReleased()));
@ -174,6 +177,13 @@ UBDesktopAnnotationController::~UBDesktopAnnotationController()
delete mTransparentDrawingView; delete mTransparentDrawingView;
} }
void UBDesktopAnnotationController::updateColors(){
if(UBApplication::boardController->activeScene()->isDarkBackground()){
mTransparentDrawingScene->setBackground(true, false);
}else{
mTransparentDrawingScene->setBackground(false, false);
}
}
UBDesktopPalette* UBDesktopAnnotationController::desktopPalette() UBDesktopPalette* UBDesktopAnnotationController::desktopPalette()
{ {

@ -100,6 +100,7 @@ class UBDesktopAnnotationController : public QObject
UBGraphicsScene* mTransparentDrawingScene; UBGraphicsScene* mTransparentDrawingScene;
private slots: private slots:
void updateColors();
void desktopPenActionToggled(bool checked); void desktopPenActionToggled(bool checked);
void desktopMarkerActionToggled(bool checked); void desktopMarkerActionToggled(bool checked);
void desktopEraserActionToggled(bool checked); void desktopEraserActionToggled(bool checked);

@ -157,7 +157,7 @@ void UBGraphicsItemUndoCommand::undo()
} }
void UBGraphicsItemUndoCommand::redo() /*void UBGraphicsItemUndoCommand::redo()
{ {
// the Undo framework calls a redo while appending the undo command. // the Undo framework calls a redo while appending the undo command.
// as we have already plotted the elements, we do not want to do it twice // as we have already plotted the elements, we do not want to do it twice
@ -236,3 +236,4 @@ void UBGraphicsItemUndoCommand::redo()
mFirstRedo = false; mFirstRedo = false;
} }
} }
*/

@ -52,7 +52,7 @@ class UBGraphicsItemUndoCommand : public UBUndoCommand
protected: protected:
virtual void undo(); virtual void undo();
virtual void redo(); //virtual void redo();
private: private:
UBGraphicsScene* mScene; UBGraphicsScene* mScene;

@ -1712,6 +1712,7 @@ void UBGraphicsScene::deselectAllItems()
{ {
foreach(QGraphicsItem *gi, selectedItems ()) foreach(QGraphicsItem *gi, selectedItems ())
{ {
gi->clearFocus();
gi->setSelected(false); gi->setSelected(false);
// Hide selection frame // Hide selection frame
if (mSelectionFrame) { if (mSelectionFrame) {

@ -142,6 +142,7 @@ void UBDocumentNavigator::onScrollToSelectedPage(int index)
} }
c++; c++;
} }
if(NULL != mSelectedThumbnail)
centerOn(mSelectedThumbnail); centerOn(mSelectedThumbnail);
} }

Loading…
Cancel
Save