Fixed merge conflict

preferencesAboutTextFull
Ilia Ryabokon 12 years ago
commit 639383f76f
  1. 2
      Sankore_3.1.pro
  2. 2
      plugins/cffadaptor/src/UBCFFAdaptor.cpp
  3. 4
      resources/library/applications/Sel video.wgt/css/main.css
  4. 2
      resources/library/applications/Sel video.wgt/index.html
  5. 35
      src/board/UBBoardView.cpp
  6. 1
      src/board/UBBoardView.h
  7. 20
      src/desktop/UBDesktopAnnotationController.cpp
  8. 1
      src/desktop/UBDesktopAnnotationController.h
  9. 91
      src/document/UBDocumentController.cpp

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

@ -858,7 +858,7 @@ bool UBCFFAdaptor::UBToCFFConverter::itIsSupportedFormat(const QString &format)
QStringList tsl = format.split(".", QString::SkipEmptyParts);
if (0 < tsl.count())
bRet = cffSupportedFileFormats.contains(tsl.at(tsl.count()-1));
bRet = cffSupportedFileFormats.contains(tsl.at(tsl.count()-1).toLower());
else
bRet = false;

@ -1,7 +1,6 @@
body{
margin-top:10px;
margin-left:10px;
margin: 0;
font-family:Arial, Sans-serif;
font-size:15px;
color:#444;
@ -104,7 +103,6 @@ body{
}
#embeded-content{
border:1px solid rgb(230,230,230);
position:relative;
z-index:3;
float:left;

@ -143,7 +143,7 @@
top:($("#embeded-content").children(":first").height()-35)/2
});
adaptWidgetSize(5, 13);
adaptWidgetSize(3, 0);
return false;
};

@ -55,6 +55,8 @@
#include "document/UBDocumentProxy.h"
#include "tools/UBGraphicsRuler.h"
#include "tools/UBGraphicsCurtainItem.h"
#include "tools/UBGraphicsCompass.h"
#include "tools/UBGraphicsCache.h"
#include "tools/UBGraphicsTriangle.h"
@ -433,6 +435,15 @@ bool UBBoardView::itemHaveParentWithType(QGraphicsItem *item, int type)
return itemHaveParentWithType(item->parentItem(), type);
}
bool UBBoardView::isUBItem(QGraphicsItem *item)
{
if ((UBGraphicsItemType::UserTypesCount > item->type()) && (item->type() > QGraphicsItem::UserType))
return true;
else
{
return false;
}
}
void UBBoardView::handleItemsSelection(QGraphicsItem *item)
{
@ -504,6 +515,13 @@ Here we determines cases when items should to get mouse press event at pressing
switch(item->type())
{
case UBGraphicsProtractor::Type:
case UBGraphicsRuler::Type:
case UBGraphicsTriangle::Type:
case UBGraphicsCompass::Type:
case UBGraphicsCache::Type:
return true;
case UBGraphicsDelegateFrame::Type:
case QGraphicsSvgItem::Type:
return true;
@ -533,7 +551,12 @@ Here we determines cases when items should to get mouse press event at pressing
return false;
break;
case UBToolWidget::Type:
return true;
case QGraphicsWebView::Type:
return true;
case UBGraphicsWidgetItem::Type:
if (currentTool == UBStylusTool::Selector && item->parentItem() && item->parentItem()->isSelected())
return true;
@ -541,10 +564,11 @@ Here we determines cases when items should to get mouse press event at pressing
return true;
if (currentTool == UBStylusTool::Play)
return true;
return false;
break;
}
return false;
return !isUBItem(item); // standard behavior of QGraphicsScene for not UB items. UB items should be managed upper.
}
bool UBBoardView::itemShouldReceiveSuspendedMousePressEvent(QGraphicsItem *item)
@ -556,9 +580,11 @@ bool UBBoardView::itemShouldReceiveSuspendedMousePressEvent(QGraphicsItem *item)
return false;
UBStylusTool::Enum currentTool = (UBStylusTool::Enum)UBDrawingController::drawingController()->stylusTool();
switch(item->type())
{
case QGraphicsWebView::Type:
return false;
case UBGraphicsPixmapItem::Type:
case UBGraphicsTextItem::Type:
case UBGraphicsWidgetItem::Type:
@ -598,6 +624,7 @@ bool UBBoardView::itemShouldBeMoved(QGraphicsItem *item)
switch(item->type())
{
case UBGraphicsCurtainItem::Type:
case UBGraphicsGroupContainerItem::Type:
return true;
@ -1091,9 +1118,11 @@ UBBoardView::mouseReleaseEvent (QMouseEvent *event)
}
else
{
if (QGraphicsSvgItem::Type != movingItem->type() &&
if (isUBItem(movingItem) &&
QGraphicsSvgItem::Type != movingItem->type() &&
UBGraphicsDelegateFrame::Type != movingItem->type() &&
UBToolWidget::Type != movingItem->type() &&
UBGraphicsCache::Type != movingItem->type() &&
QGraphicsWebView::Type != movingItem->type() && // for W3C widgets as Tools.
!(!isMultipleSelectionEnabled() && movingItem->parentItem() && UBGraphicsWidgetItem::Type == movingItem->type() && UBGraphicsGroupContainerItem::Type == movingItem->parentItem()->type()))
{

@ -57,6 +57,7 @@ class UBBoardView : public QGraphicsView
protected:
bool itemIsLocked(QGraphicsItem *item);
bool isUBItem(QGraphicsItem *item); // we should to determine items who is not UB and use general scene behavior for them.
void handleItemsSelection(QGraphicsItem *item);
bool itemShouldReceiveMousePressEvent(QGraphicsItem *item);
bool itemShouldReceiveSuspendedMousePressEvent(QGraphicsItem *item);

@ -67,7 +67,6 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
{
mTransparentDrawingView = new UBBoardView(UBApplication::boardController, static_cast<QWidget*>(0), true); // deleted in UBDesktopAnnotationController::destructor
mTransparentDrawingView->setAttribute(Qt::WA_TranslucentBackground, true);
#ifdef Q_WS_MAC
mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true);
@ -102,9 +101,15 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
}
connect(mDesktopPalette, SIGNAL(uniboardClick()), this, SLOT(goToUniboard()));
connect(mDesktopPalette, SIGNAL(uniboardClick()), this, SLOT(onToolClicked()));
connect(mDesktopPalette, SIGNAL(customClick()), this, SLOT(customCapture()));
connect(mDesktopPalette, SIGNAL(customClick()), this, SLOT(onToolClicked()));
connect(mDesktopPalette, SIGNAL(windowClick()), this, SLOT(windowCapture()));
connect(mDesktopPalette, SIGNAL(windowClick()), this, SLOT(onToolClicked()));
connect(mDesktopPalette, SIGNAL(screenClick()), this, SLOT(screenCapture()));
connect(mDesktopPalette, SIGNAL(screenClick()), this, SLOT(onToolClicked()));
connect(UBApplication::mainWindow->actionPointer, SIGNAL(triggered()), this, SLOT(onToolClicked()));
connect(UBApplication::mainWindow->actionSelector, SIGNAL(triggered()), this, SLOT(onToolClicked()));
connect(mDesktopPalette, SIGNAL(maximized()), this, SLOT(onDesktopPaletteMaximized()));
connect(mDesktopPalette, SIGNAL(minimizeStart(eMinimizedLocation)), this, SLOT(onDesktopPaletteMinimize()));
@ -382,6 +387,7 @@ void UBDesktopAnnotationController::hideWindow()
void UBDesktopAnnotationController::goToUniboard()
{
onToolClicked();
hideWindow();
UBPlatformUtils::setDesktopMode(false);
@ -397,6 +403,7 @@ void UBDesktopAnnotationController::goToUniboard()
void UBDesktopAnnotationController::customCapture()
{
onToolClicked();
mIsFullyTransparent = true;
updateBackground();
@ -424,6 +431,7 @@ void UBDesktopAnnotationController::customCapture()
void UBDesktopAnnotationController::windowCapture()
{
onToolClicked();
mIsFullyTransparent = true;
updateBackground();
@ -453,6 +461,7 @@ void UBDesktopAnnotationController::windowCapture()
void UBDesktopAnnotationController::screenCapture()
{
onToolClicked();
mIsFullyTransparent = true;
updateBackground();
@ -539,7 +548,6 @@ void UBDesktopAnnotationController::penActionPressed()
*/
void UBDesktopAnnotationController::penActionReleased()
{
qDebug() << "penActionReleased()";
mHoldTimerPen.stop();
if(mPendingPenButtonPressed)
{
@ -594,7 +602,6 @@ void UBDesktopAnnotationController::eraserActionPressed()
*/
void UBDesktopAnnotationController::eraserActionReleased()
{
qDebug() << "eraserActionReleased()";
mHoldTimerEraser.stop();
if(mPendingEraserButtonPressed)
{
@ -651,7 +658,6 @@ void UBDesktopAnnotationController::markerActionPressed()
*/
void UBDesktopAnnotationController::markerActionReleased()
{
qDebug() << "markerActionReleased()";
mHoldTimerMarker.stop();
if(mPendingMarkerButtonPressed)
{
@ -930,3 +936,9 @@ void UBDesktopAnnotationController::refreshMask()
updateMask(true);
}
}
void UBDesktopAnnotationController::onToolClicked(){
mDesktopEraserPalette->hide();
mDesktopMarkerPalette->hide();
mDesktopPenPalette->hide();
}

@ -111,6 +111,7 @@ class UBDesktopAnnotationController : public QObject
void onDesktopPaletteMinimize();
void onTransparentWidgetResized();
void refreshMask();
void onToolClicked();
private:
void setAssociatedPalettePosition(UBActionPalette* palette, const QString& actionName);

@ -551,8 +551,11 @@ void UBDocumentController::deleteSelectedItem()
{
if(UBApplication::mainWindow->yesNoQuestion(tr("Remove Document"), tr("Are you sure you want to remove the document '%1'?").arg(proxyTi->proxy()->metaData(UBSettings::documentName).toString())))
{
if (proxyTi->parent() == mTrashTi)
if (proxyTi->parent() != mTrashTi)
{
// We have to move document into Trash
// Select another document for processing
// This is for Board, where this document can be selected
int index = proxyTi->parent()->indexOfChild(proxyTi);
index --;
@ -560,7 +563,7 @@ void UBDocumentController::deleteSelectedItem()
{
if (proxyTi->proxy() == mBoardController->selectedDocument())
{
selectDocument(((UBDocumentProxyTreeItem*)proxyTi->parent()->child(index))->proxy());
selectDocument(((UBDocumentProxyTreeItem*)proxyTi->parent()->child(index))->proxy(), true);
}
else
proxyTi->parent()->child(index)->setSelected(true);
@ -569,7 +572,7 @@ void UBDocumentController::deleteSelectedItem()
{
if (proxyTi->proxy() == mBoardController->selectedDocument())
{
selectDocument(((UBDocumentProxyTreeItem*)proxyTi->parent()->child(1))->proxy());
selectDocument(((UBDocumentProxyTreeItem*)proxyTi->parent()->child(1))->proxy(), true);
}
else
proxyTi->parent()->child(1)->setSelected(true);
@ -578,30 +581,36 @@ void UBDocumentController::deleteSelectedItem()
{
if (proxyTi->proxy() == mBoardController->selectedDocument())
{
bool documentFound = false;
for (int i = 0; i < mDocumentUI->documentTreeWidget->topLevelItemCount(); i++)
{
QTreeWidgetItem* item = mDocumentUI->documentTreeWidget->topLevelItem(i);
UBDocumentGroupTreeItem* groupItem = dynamic_cast<UBDocumentGroupTreeItem*>(item);
if (groupItem != selectedDocumentGroupTreeItem() && groupItem->childCount() > 0)
if (!groupItem->isTrashFolder())
{
selectDocument(((UBDocumentProxyTreeItem*)groupItem->child(0))->proxy());
break;
for(int j=0; j<groupItem->childCount(); j++)
{
if (((UBDocumentProxyTreeItem*)groupItem->child(j))->proxy() != mBoardController->selectedDocument())
{
selectDocument(((UBDocumentProxyTreeItem*)groupItem->child(0))->proxy(), true);
documentFound = true;
break;
}
}
}
if (documentFound)
break;
}
if (!documentFound)
{
UBDocumentProxy *document = UBPersistenceManager::persistenceManager()->createDocument(groupTi->groupName());
selectDocument(document, true);
}
}
else
proxyTi->parent()->setSelected(true);
}
proxyTi->parent()->removeChild(proxyTi);
UBPersistenceManager::persistenceManager()->deleteDocument(proxyTi->proxy());
reloadThumbnails();
}
else
{
// Move document to trash
QString oldGroupName = proxyTi->proxy()->metaData(UBSettings::documentGroupName).toString();
proxyTi->proxy()->setMetaData(UBSettings::documentGroupName, UBSettings::trashedDocumentGroupNamePrefix + oldGroupName);
UBPersistenceManager::persistenceManager()->persistDocumentMetadata(proxyTi->proxy());
@ -610,6 +619,14 @@ void UBDocumentController::deleteSelectedItem()
mTrashTi->addChild(proxyTi);
proxyTi->setFlags(proxyTi->flags() ^ Qt::ItemIsEditable);
}
else
{
// We have to physical delete document
// No action with selection required - document from Trash cant be selected in Board
proxyTi->parent()->removeChild(proxyTi);
UBPersistenceManager::persistenceManager()->deleteDocument(proxyTi->proxy());
}
}
}
else if (groupTi)
@ -661,20 +678,6 @@ void UBDocumentController::deleteSelectedItem()
}
}
if (changeCurrentDocument)
{
for (int i = 0; i < mDocumentUI->documentTreeWidget->topLevelItemCount(); i++)
{
QTreeWidgetItem* item = mDocumentUI->documentTreeWidget->topLevelItem(i);
UBDocumentGroupTreeItem* groupItem = dynamic_cast<UBDocumentGroupTreeItem*>(item);
if (groupItem != groupTi && groupItem->childCount() > 0)
{
selectDocument(((UBDocumentProxyTreeItem*)groupItem->child(0))->proxy());
break;
}
}
}
QList<UBDocumentProxyTreeItem*> toBeDeleted;
for (int i = 0; i < groupTi->childCount(); i++)
@ -712,6 +715,36 @@ void UBDocumentController::deleteSelectedItem()
}
}
if (changeCurrentDocument)
{
bool documentFound = false;
for (int i = 0; i < mDocumentUI->documentTreeWidget->topLevelItemCount(); i++)
{
QTreeWidgetItem* item = mDocumentUI->documentTreeWidget->topLevelItem(i);
UBDocumentGroupTreeItem* groupItem = dynamic_cast<UBDocumentGroupTreeItem*>(item);
if (!groupItem->isTrashFolder() && groupItem != groupTi)
{
for(int j=0; j<groupItem->childCount(); j++)
{
if (((UBDocumentProxyTreeItem*)groupItem->child(j))->proxy() != mBoardController->selectedDocument())
{
selectDocument(((UBDocumentProxyTreeItem*)groupItem->child(0))->proxy(), true);
documentFound = true;
break;
}
}
}
if (documentFound)
break;
}
if (!documentFound)
{
UBDocumentProxy *document = UBPersistenceManager::persistenceManager()->createDocument( UBSettings::defaultDocumentGroupName );
selectDocument(document, true);
}
}
reloadThumbnails();
QApplication::restoreOverrideCursor();

Loading…
Cancel
Save