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

preferencesAboutTextFull
Ivan Ilyin 13 years ago
commit eb83f2722f
  1. 6
      src/adaptors/UBSvgSubsetAdaptor.cpp
  2. 7
      src/board/UBFeaturesController.cpp
  3. 22
      src/gui/UBFeaturesWidget.cpp

@ -428,7 +428,7 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene()
}
else if (mXmlReader.name() == "g")
{
// Create new stroke, if its NULL or already has poligons
// Create new stroke, if its NULL or already has polygons
if (annotationGroup)
{
if (!annotationGroup->polygons().empty())
@ -439,6 +439,7 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene()
if(eDrawingMode_Vector == dc->drawingMode()){
strokesGroup = new UBGraphicsStrokesGroup();
graphicsItemFromSvg(strokesGroup);
}
QStringRef ubZValue = mXmlReader.attributes().value(mNamespaceUri, "z-value");
@ -485,6 +486,7 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene()
if(eDrawingMode_Vector == dc->drawingMode()){
if(strokesGroup){
polygonItem->setTransform(strokesGroup->transform());
strokesGroup->addToGroup(polygonItem);
}
}else{
@ -510,6 +512,7 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene()
if(eDrawingMode_Vector == dc->drawingMode()){
if(strokesGroup){
polygonItem->setTransform(strokesGroup->transform());
strokesGroup->addToGroup(polygonItem);
}
}else{
@ -838,6 +841,7 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene()
{
if(strokesGroup && scene){
scene->addItem(strokesGroup);
//graphicsItemFromSvg(strokesGroup);
}
if (annotationGroup)

@ -315,7 +315,14 @@ UBFeature UBFeaturesController::newFolder( const QString &name )
void UBFeaturesController::addItemToPage(const UBFeature &item)
{
if ( item.getType() == FEATURE_INTERNAL )
{
UBApplication::boardController->downloadURL( QUrl( item.getFullPath() ) );
}
else
{
UBApplication::boardController->downloadURL( QUrl::fromLocalFile( item.getFullPath() ) );
}
}
UBFeature UBFeaturesController::moveItemToFolder( const QUrl &url, const UBFeature &destination )

@ -49,6 +49,7 @@ UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPale
//featuresListView->setStyleSheet( QString("background: #EEEEEE;border-radius: 10px;border: 2px solid #999999;") );
featuresListView->setDragDropMode( QAbstractItemView::DragDrop );
featuresListView->setSelectionMode( QAbstractItemView::ContiguousSelection );
featuresListView->setModel( featuresProxyModel );
featuresListView->setResizeMode( QListView::Adjust );
@ -72,7 +73,7 @@ UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPale
pathListView->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOn );
//pathListView->setResizeMode( QListView::Adjust );
//pathListView->setMovement( QListView::Static );
pathListView->setDragDropMode( QAbstractItemView::DragDrop );
pathListView->setDragDropMode( QAbstractItemView::DropOnly );
pathScene = new QGraphicsScene(this);
//pathViewer = new UBFeaturesPathViewer( QPixmap(":images/libpalette/home.png"), controller->getRootPath(), pathScene, this );
@ -629,7 +630,24 @@ Qt::ItemFlags UBFeaturesModel::flags( const QModelIndex &index ) const
return defaultFlags | Qt::ItemIsDropEnabled;
else return defaultFlags;
}
return defaultFlags | Qt::ItemIsDropEnabled;
/*if ( index.isValid() )
{
UBFeature item = index.data( Qt::UserRole + 1 ).value<UBFeature>();
switch( item.getType() )
{
case FEATURE_CATEGORY:
case FEATURE_FOLDER:
case FEATURE_FAVORITE:
case FEATURE_TRASH:
return Qt::ItemIsDropEnabled | Qt::ItemIsEnabled;
case FEATURE_INTERACTIVE:
case FEATURE_INTERNAL:
case FEATURE_ITEM:
return Qt::ItemIsDragEnabled | Qt::ItemIsEnabled | Qt::ItemIsSelectable;
default:;
}
}*/
return defaultFlags;
}

Loading…
Cancel
Save