Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
c2b9c6a4
Commit
c2b9c6a4
authored
Apr 30, 2012
by
Anna Udovichenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added elements selection
parent
8be4c32b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
3 deletions
+28
-3
UBFeaturesController.cpp
src/board/UBFeaturesController.cpp
+8
-1
UBFeaturesWidget.cpp
src/gui/UBFeaturesWidget.cpp
+20
-2
No files found.
src/board/UBFeaturesController.cpp
View file @
c2b9c6a4
...
@@ -315,7 +315,14 @@ UBFeature UBFeaturesController::newFolder( const QString &name )
...
@@ -315,7 +315,14 @@ UBFeature UBFeaturesController::newFolder( const QString &name )
void
UBFeaturesController
::
addItemToPage
(
const
UBFeature
&
item
)
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
()
)
);
UBApplication
::
boardController
->
downloadURL
(
QUrl
::
fromLocalFile
(
item
.
getFullPath
()
)
);
}
}
}
UBFeature
UBFeaturesController
::
moveItemToFolder
(
const
QUrl
&
url
,
const
UBFeature
&
destination
)
UBFeature
UBFeaturesController
::
moveItemToFolder
(
const
QUrl
&
url
,
const
UBFeature
&
destination
)
...
...
src/gui/UBFeaturesWidget.cpp
View file @
c2b9c6a4
...
@@ -49,6 +49,7 @@ UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPale
...
@@ -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->setStyleSheet( QString("background: #EEEEEE;border-radius: 10px;border: 2px solid #999999;") );
featuresListView
->
setDragDropMode
(
QAbstractItemView
::
DragDrop
);
featuresListView
->
setDragDropMode
(
QAbstractItemView
::
DragDrop
);
featuresListView
->
setSelectionMode
(
QAbstractItemView
::
ContiguousSelection
);
featuresListView
->
setModel
(
featuresProxyModel
);
featuresListView
->
setModel
(
featuresProxyModel
);
featuresListView
->
setResizeMode
(
QListView
::
Adjust
);
featuresListView
->
setResizeMode
(
QListView
::
Adjust
);
...
@@ -72,7 +73,7 @@ UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPale
...
@@ -72,7 +73,7 @@ UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPale
pathListView
->
setHorizontalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOn
);
pathListView
->
setHorizontalScrollBarPolicy
(
Qt
::
ScrollBarAlwaysOn
);
//pathListView->setResizeMode( QListView::Adjust );
//pathListView->setResizeMode( QListView::Adjust );
//pathListView->setMovement( QListView::Static );
//pathListView->setMovement( QListView::Static );
pathListView
->
setDragDropMode
(
QAbstractItemView
::
Dr
agDrop
);
pathListView
->
setDragDropMode
(
QAbstractItemView
::
Dr
opOnly
);
pathScene
=
new
QGraphicsScene
(
this
);
pathScene
=
new
QGraphicsScene
(
this
);
//pathViewer = new UBFeaturesPathViewer( QPixmap(":images/libpalette/home.png"), controller->getRootPath(), pathScene, 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
...
@@ -629,7 +630,24 @@ Qt::ItemFlags UBFeaturesModel::flags( const QModelIndex &index ) const
return
defaultFlags
|
Qt
::
ItemIsDropEnabled
;
return
defaultFlags
|
Qt
::
ItemIsDropEnabled
;
else
return
defaultFlags
;
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
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment