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
b5ebaf19
Commit
b5ebaf19
authored
Sep 12, 2011
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issue:
http://188.165.53.52/jira/browse/SANKORE-241
parent
c7c4bca7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
135 additions
and
134 deletions
+135
-134
UBDocumentNavigator.cpp
src/gui/UBDocumentNavigator.cpp
+133
-133
UBDocumentNavigator.h
src/gui/UBDocumentNavigator.h
+2
-1
No files found.
src/gui/UBDocumentNavigator.cpp
View file @
b5ebaf19
...
...
@@ -52,6 +52,7 @@ UBDocumentNavigator::UBDocumentNavigator(QWidget *parent, const char *name):QGra
mThumbnailWidth
=
width
()
-
2
*
border
();
connect
(
UBApplication
::
boardController
,
SIGNAL
(
activeSceneChanged
()),
this
,
SLOT
(
addNewPage
()));
connect
(
UBApplication
::
boardController
,
SIGNAL
(
setDocOnPageNavigator
(
UBDocumentProxy
*
)),
this
,
SLOT
(
generateThumbnails
()));
connect
(
mScene
,
SIGNAL
(
selectionChanged
()),
this
,
SLOT
(
onSelectionChanged
()));
}
...
...
@@ -116,7 +117,6 @@ void UBDocumentNavigator::generateThumbnails()
items
<<
pixmapItem
;
labels
<<
tr
(
"Page %0"
).
arg
(
i
+
1
);
//itemsPath.append(QUrl::fromLocalFile(mCrntDoc->persistencePath() + QString("/pages/%0").arg(i + 1)));
}
// Draw the items
...
...
@@ -345,12 +345,12 @@ void UBDocumentNavigator::resizeEvent(QResizeEvent *event)
mThumbnailWidth
=
(
width
()
>
mThumbnailMinWidth
)
?
width
()
-
2
*
border
()
:
mThumbnailMinWidth
;
// Update the scene rect
// QRect sceneRect;
// sceneRect.setWidth(width() - 2*border());
// sceneRect.setHeight(height() - 2*border());
// sceneRect.moveLeft(border());
// sceneRect.moveTop(border());
// scene()->setSceneRect(sceneRect);
// QRect sceneRect;
// sceneRect.setWidth(width() - 2*border());
// sceneRect.setHeight(height() - 2*border());
// sceneRect.moveLeft(border());
// sceneRect.moveTop(border());
// scene()->setSceneRect(sceneRect);
// Refresh the scene
refreshScene
();
...
...
@@ -430,6 +430,6 @@ UBDocumentProxy* UBDocumentNavigator::currentDoc()
*/
void
UBDocumentNavigator
::
onSelectionChanged
()
{
// QList<QGraphicsItem*> qlItems = mScene->selectedItems();
// qDebug() << "The number of selected items is " << qlItems.count();
// QList<QGraphicsItem*> qlItems = mScene->selectedItems();
// qDebug() << "The number of selected items is " << qlItems.count();
}
src/gui/UBDocumentNavigator.h
View file @
b5ebaf19
...
...
@@ -51,13 +51,14 @@ protected:
private
slots
:
void
addNewPage
();
void
onSelectionChanged
();
void
generateThumbnails
();
private
:
void
setGraphicsItems
(
QList
<
QGraphicsItem
*>
items
,
QStringList
labels
);
void
refreshScene
();
void
updateSpecificThumbnail
(
int
iPage
);
int
border
();
void
generateThumbnails
();
/** The scene */
QGraphicsScene
*
mScene
;
...
...
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