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
e2aef9f0
Commit
e2aef9f0
authored
7 years ago
by
Clément Fauconnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
increased messages during document loading + optimized some calls
parent
012e8384
master
bugfix
1.5.4z3
1.5.4z2
1.5.4z
No related merge requests found
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
39 additions
and
20 deletions
+39
-20
UBThumbnailAdaptor.cpp
src/adaptors/UBThumbnailAdaptor.cpp
+1
-0
UBBoardController.cpp
src/board/UBBoardController.cpp
+4
-2
UBApplicationController.cpp
src/core/UBApplicationController.cpp
+1
-0
UBPersistenceManager.cpp
src/core/UBPersistenceManager.cpp
+1
-0
UBDocumentContainer.cpp
src/document/UBDocumentContainer.cpp
+0
-1
UBDocumentContainer.h
src/document/UBDocumentContainer.h
+0
-1
UBDocumentController.cpp
src/document/UBDocumentController.cpp
+2
-1
UBBoardThumbnailsView.cpp
src/gui/UBBoardThumbnailsView.cpp
+16
-11
UBMessageWindow.cpp
src/gui/UBMessageWindow.cpp
+2
-2
UBThumbnailWidget.cpp
src/gui/UBThumbnailWidget.cpp
+12
-2
No files found.
src/adaptors/UBThumbnailAdaptor.cpp
View file @
e2aef9f0
...
...
@@ -85,6 +85,7 @@ void UBThumbnailAdaptor::generateMissingThumbnails(UBDocumentProxy* proxy)
const
QPixmap
*
UBThumbnailAdaptor
::
get
(
UBDocumentProxy
*
proxy
,
int
pageIndex
)
{
UBApplication
::
showMessage
(
tr
(
"loading thumbnail of page %1"
).
arg
(
pageIndex
+
1
));
QString
fileName
=
proxy
->
persistencePath
()
+
UBFileSystemUtils
::
digitFileFormat
(
"/page%1.thumbnail.jpg"
,
pageIndex
);
QFile
file
(
fileName
);
...
...
This diff is collapsed.
Click to expand it.
src/board/UBBoardController.cpp
View file @
e2aef9f0
...
...
@@ -189,6 +189,7 @@ void UBBoardController::initBackgroundGridSize()
int
gridSize
=
(
resolutionRatio
*
10.
*
dpi
)
/
UBGeometryUtils
::
inchSize
;
UBSettings
::
settings
()
->
crossSize
=
gridSize
;
UBSettings
::
settings
()
->
defaultCrossSize
=
gridSize
;
mActiveScene
->
setBackgroundGridSize
(
gridSize
);
//qDebug() << "grid size: " << gridSize;
...
...
@@ -228,10 +229,11 @@ void UBBoardController::setupViews()
mDisplayView
->
setInteractive
(
false
);
mDisplayView
->
setTransformationAnchor
(
QGraphicsView
::
NoAnchor
);
mMessageWindow
=
new
UBMessageWindow
(
mControlView
);
mPaletteManager
=
new
UBBoardPaletteManager
(
mControlContainer
,
this
);
mMessageWindow
=
new
UBMessageWindow
(
mControlContainer
);
mMessageWindow
->
hide
();
mPaletteManager
=
new
UBBoardPaletteManager
(
mControlContainer
,
this
);
connect
(
this
,
SIGNAL
(
activeSceneChanged
()),
mPaletteManager
,
SLOT
(
activeSceneChanged
()));
}
...
...
This diff is collapsed.
Click to expand it.
src/core/UBApplicationController.cpp
View file @
e2aef9f0
...
...
@@ -358,6 +358,7 @@ void UBApplicationController::showBoard()
}
}
UBApplication
::
showMessage
(
tr
(
"Drawing active scene and thumbnail previews"
));
mMainMode
=
Board
;
adaptToolBar
();
...
...
This diff is collapsed.
Click to expand it.
src/core/UBPersistenceManager.cpp
View file @
e2aef9f0
...
...
@@ -777,6 +777,7 @@ void UBPersistenceManager::persistDocumentScene(UBDocumentProxy* pDocumentProxy,
if
(
pDocumentProxy
->
isModified
())
persistDocumentMetadata
(
pDocumentProxy
,
forceImmediateSaving
);
UBApplication
::
showMessage
(
tr
(
"saving document thumbnail for the page %1"
).
arg
(
pSceneIndex
+
1
));
UBThumbnailAdaptor
::
persistScene
(
pDocumentProxy
,
pScene
,
pSceneIndex
);
if
(
forceImmediateSaving
)
UBSvgSubsetAdaptor
::
persistScene
(
pDocumentProxy
,
pScene
,
pSceneIndex
);
...
...
This diff is collapsed.
Click to expand it.
src/document/UBDocumentContainer.cpp
View file @
e2aef9f0
...
...
@@ -54,7 +54,6 @@ void UBDocumentContainer::setDocument(UBDocumentProxy* document, bool forceReloa
emit
initThumbnailsRequired
(
this
);
emit
documentSet
(
mCurrentDocument
);
reloadThumbnails
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/document/UBDocumentContainer.h
View file @
e2aef9f0
...
...
@@ -61,7 +61,6 @@ class UBDocumentContainer : public QObject
void
insertThumbPage
(
int
index
);
private
:
UBDocumentProxy
*
mCurrentDocument
;
QList
<
const
QPixmap
*>
mDocumentThumbs
;
...
...
This diff is collapsed.
Click to expand it.
src/document/UBDocumentController.cpp
View file @
e2aef9f0
...
...
@@ -168,6 +168,7 @@ void UBDocumentController::selectDocument(UBDocumentProxy* proxy, bool setAsCurr
if
(
selected
)
{
setDocument
(
proxy
);
reloadThumbnails
();
selected
->
setSelected
(
true
);
...
...
@@ -267,7 +268,7 @@ void UBDocumentController::itemSelectionChanged()
{
updateCurrentSelection
();
reloadThumbnails
(
);
emit
documentThumbnailsUpdated
(
this
);
if
(
multipleSelection
())
mSelectionType
=
Multiple
;
...
...
This diff is collapsed.
Click to expand it.
src/gui/UBBoardThumbnailsView.cpp
View file @
e2aef9f0
...
...
@@ -115,6 +115,8 @@ void UBBoardThumbnailsView::removeThumbnail(int i)
UBDraggableThumbnailView
*
UBBoardThumbnailsView
::
createThumbnail
(
UBDocumentContainer
*
source
,
int
i
)
{
UBApplication
::
showMessage
(
tr
(
"Loading document scene (%1/%2)"
).
arg
(
i
+
1
).
arg
(
source
->
selectedDocument
()
->
pageCount
()));
UBGraphicsScene
*
pageScene
=
UBPersistenceManager
::
persistenceManager
()
->
loadDocumentScene
(
source
->
selectedDocument
(),
i
);
UBThumbnailView
*
pageView
=
new
UBThumbnailView
(
pageScene
);
...
...
@@ -200,6 +202,10 @@ void UBBoardThumbnailsView::resizeEvent(QResizeEvent *event)
void
UBBoardThumbnailsView
::
mousePressEvent
(
QMouseEvent
*
event
)
{
QGraphicsView
::
mousePressEvent
(
event
);
if
(
!
event
->
isAccepted
())
{
mLongPressTimer
.
start
();
mLastPressedMousePos
=
event
->
pos
();
...
...
@@ -212,8 +218,7 @@ void UBBoardThumbnailsView::mousePressEvent(QMouseEvent *event)
UBApplication
::
boardController
->
setActiveDocumentScene
(
item
->
sceneIndex
());
UBApplication
::
boardController
->
centerOn
(
UBApplication
::
boardController
->
activeScene
()
->
lastCenter
());
}
QGraphicsView
::
mousePressEvent
(
event
);
}
}
void
UBBoardThumbnailsView
::
mouseMoveEvent
(
QMouseEvent
*
event
)
...
...
This diff is collapsed.
Click to expand it.
src/gui/UBMessageWindow.cpp
View file @
e2aef9f0
...
...
@@ -42,7 +42,7 @@ UBMessageWindow::UBMessageWindow(QWidget *parent)
mLabel
=
new
QLabel
(
parent
);
mLabel
->
setStyleSheet
(
QString
(
"QLabel { color: white; background-color: transparent; border: none; font-family: Arial; font-size: 14px }"
));
mOriginalAlpha
=
mBackgroundBrush
.
color
().
alpha
()
;
mOriginalAlpha
=
255
;
mLayout
->
setContentsMargins
(
radius
()
+
15
,
4
,
radius
()
+
15
,
4
);
...
...
@@ -79,7 +79,7 @@ void UBMessageWindow::showMessage(const QString& message, bool showSpinningWheel
{
mSpinningWheel
->
hide
();
mSpinningWheel
->
stopAnimation
();
mTimer
.
start
(
20
0
,
this
);
mTimer
.
start
(
5
0
,
this
);
}
adjustSizeAndPosition
();
...
...
This diff is collapsed.
Click to expand it.
src/gui/UBThumbnailWidget.cpp
View file @
e2aef9f0
...
...
@@ -898,17 +898,27 @@ void UBDraggableThumbnail::mousePressEvent(QGraphicsSceneMouseEvent *event)
if
(
triggered
(
p
.
y
()))
{
if
(
deletable
()
&&
getIcon
(
"close"
)
->
triggered
(
p
.
x
()))
{
event
->
accept
();
deletePage
();
}
else
if
(
getIcon
(
"duplicate"
)
->
triggered
(
p
.
x
()))
{
event
->
accept
();
duplicatePage
();
}
/*
else if(movableUp() && getIcon("moveUp")->triggered(p.x()))
moveUpPage();
else if (movableDown() && getIcon("moveDown")->triggered(p.x()))
moveDownPage();*/
}
event
->
accept
();
event
->
ignore
();
}
else
{
event
->
ignore
();
}
}
void
UBDraggableThumbnail
::
mouseReleaseEvent
(
QGraphicsSceneMouseEvent
*
event
)
...
...
This diff is collapsed.
Click to expand it.
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