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
a8ed6766
Commit
a8ed6766
authored
Aug 02, 2013
by
Didier Clerc
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'OEFUniboard' of github.com:stayonshadow/PrivateBoard into OEFUniboard
parents
be14bdc6
98b3cccc
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
21 deletions
+29
-21
OpenBoard.pro
OpenBoard.pro
+1
-1
UBSvgSubsetAdaptor.cpp
src/adaptors/UBSvgSubsetAdaptor.cpp
+0
-2
UBBoardController.cpp
src/board/UBBoardController.cpp
+8
-5
UBDocumentContainer.h
src/document/UBDocumentContainer.h
+6
-4
UBDocumentNavigator.cpp
src/gui/UBDocumentNavigator.cpp
+5
-1
UBDocumentTreeWidget.cpp
src/gui/UBDocumentTreeWidget.cpp
+9
-5
UBPageNavigationWidget.cpp
src/gui/UBPageNavigationWidget.cpp
+0
-3
No files found.
OpenBoard.pro
View file @
a8ed6766
...
@@ -11,7 +11,7 @@ CONFIG += debug_and_release \
...
@@ -11,7 +11,7 @@ CONFIG += debug_and_release \
VERSION_MAJ
=
0
VERSION_MAJ
=
0
VERSION_MIN
=
08
VERSION_MIN
=
08
VERSION_TYPE
=
b
#
a
=
alpha
,
b
=
beta
,
r
=
release
,
other
=>
error
VERSION_TYPE
=
b
#
a
=
alpha
,
b
=
beta
,
r
=
release
,
other
=>
error
VERSION_PATCH
=
0
2
VERSION_PATCH
=
0
3
VERSION
=
"$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}"
VERSION
=
"$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}"
VERSION
=
$$
replace
(
VERSION
,
"\\.r"
,
""
)
VERSION
=
$$
replace
(
VERSION
,
"\\.r"
,
""
)
...
...
src/adaptors/UBSvgSubsetAdaptor.cpp
View file @
a8ed6766
...
@@ -64,8 +64,6 @@
...
@@ -64,8 +64,6 @@
#include "core/UBApplication.h"
#include "core/UBApplication.h"
#include "core/UBTextTools.h"
#include "core/UBTextTools.h"
#include "document/UBDocumentContainer.h"
#include "pdf/PDFRenderer.h"
#include "pdf/PDFRenderer.h"
#include "core/memcheck.h"
#include "core/memcheck.h"
...
...
src/board/UBBoardController.cpp
View file @
a8ed6766
...
@@ -485,11 +485,14 @@ void UBBoardController::addScene(UBGraphicsScene* scene, bool replaceActiveIfEmp
...
@@ -485,11 +485,14 @@ void UBBoardController::addScene(UBGraphicsScene* scene, bool replaceActiveIfEmp
QString
source
=
scene
->
document
()
->
persistencePath
()
+
"/"
+
relativeFile
.
toString
();
QString
source
=
scene
->
document
()
->
persistencePath
()
+
"/"
+
relativeFile
.
toString
();
QString
target
=
selectedDocument
()
->
persistencePath
()
+
"/"
+
relativeFile
.
toString
();
QString
target
=
selectedDocument
()
->
persistencePath
()
+
"/"
+
relativeFile
.
toString
();
QFileInfo
fi
(
target
);
if
(
QFileInfo
(
source
).
isDir
())
QDir
d
=
fi
.
dir
();
Q_ASSERT
(
UBFileSystemUtils
::
copyDir
(
source
,
target
));
else
{
d
.
mkpath
(
d
.
absolutePath
());
QFileInfo
fi
(
target
);
QFile
::
copy
(
source
,
target
);
QDir
d
=
fi
.
dir
();
d
.
mkpath
(
d
.
absolutePath
());
Q_ASSERT
(
QFile
::
copy
(
source
,
target
));
}
}
}
}
}
...
...
src/document/UBDocumentContainer.h
View file @
a8ed6766
...
@@ -41,8 +41,8 @@ class UBDocumentContainer : public QObject
...
@@ -41,8 +41,8 @@ class UBDocumentContainer : public QObject
int
pageCount
(){
return
mDocumentThumbs
.
size
();}
int
pageCount
(){
return
mDocumentThumbs
.
size
();}
const
QPixmap
*
pageAt
(
int
index
){
return
mDocumentThumbs
[
index
];}
const
QPixmap
*
pageAt
(
int
index
){
return
mDocumentThumbs
[
index
];}
static
int
pageFromSceneIndex
(
int
sceneIndex
);
static
int
pageFromSceneIndex
(
int
sceneIndex
);
static
int
sceneIndexFromPage
(
int
sceneIndex
);
static
int
sceneIndexFromPage
(
int
sceneIndex
);
void
duplicatePages
(
QList
<
int
>&
pageIndexes
);
void
duplicatePages
(
QList
<
int
>&
pageIndexes
);
bool
movePageToIndex
(
int
source
,
int
target
);
bool
movePageToIndex
(
int
source
,
int
target
);
...
@@ -51,15 +51,17 @@ class UBDocumentContainer : public QObject
...
@@ -51,15 +51,17 @@ class UBDocumentContainer : public QObject
void
updatePage
(
int
index
);
void
updatePage
(
int
index
);
void
addEmptyThumbPage
();
void
addEmptyThumbPage
();
void
insertThumbPage
(
int
index
);
private
:
private
:
UBDocumentProxy
*
mCurrentDocument
;
UBDocumentProxy
*
mCurrentDocument
;
QList
<
const
QPixmap
*>
mDocumentThumbs
;
QList
<
const
QPixmap
*>
mDocumentThumbs
;
protected
:
protected
:
void
deleteThumbPage
(
int
index
);
void
deleteThumbPage
(
int
index
);
void
updateThumbPage
(
int
index
);
void
updateThumbPage
(
int
index
);
void
insertThumbPage
(
int
index
);
void
reloadThumbnails
();
void
reloadThumbnails
();
signals
:
signals
:
...
...
src/gui/UBDocumentNavigator.cpp
View file @
a8ed6766
...
@@ -85,7 +85,6 @@ UBDocumentNavigator::~UBDocumentNavigator()
...
@@ -85,7 +85,6 @@ UBDocumentNavigator::~UBDocumentNavigator()
void
UBDocumentNavigator
::
generateThumbnails
(
UBDocumentContainer
*
source
)
void
UBDocumentNavigator
::
generateThumbnails
(
UBDocumentContainer
*
source
)
{
{
mThumbsWithLabels
.
clear
();
mThumbsWithLabels
.
clear
();
// foreach(QGraphicsItem* it, mScene->items())
int
selectedIndex
=
-
1
;
int
selectedIndex
=
-
1
;
QList
<
QGraphicsItem
*>
graphicsItemList
=
mScene
->
items
();
QList
<
QGraphicsItem
*>
graphicsItemList
=
mScene
->
items
();
for
(
int
i
=
0
;
i
<
graphicsItemList
.
size
();
i
+=
1
)
for
(
int
i
=
0
;
i
<
graphicsItemList
.
size
();
i
+=
1
)
...
@@ -100,6 +99,11 @@ void UBDocumentNavigator::generateThumbnails(UBDocumentContainer* source)
...
@@ -100,6 +99,11 @@ void UBDocumentNavigator::generateThumbnails(UBDocumentContainer* source)
for
(
int
i
=
0
;
i
<
source
->
selectedDocument
()
->
pageCount
();
i
++
)
for
(
int
i
=
0
;
i
<
source
->
selectedDocument
()
->
pageCount
();
i
++
)
{
{
//claudio This is a very bad hack and shows a architectural problem
// source->selectedDocument()->pageCount() != source->pageCount()
if
(
i
>=
source
->
pageCount
())
source
->
insertThumbPage
(
i
);
const
QPixmap
*
pix
=
source
->
pageAt
(
i
);
const
QPixmap
*
pix
=
source
->
pageAt
(
i
);
Q_ASSERT
(
!
pix
->
isNull
());
Q_ASSERT
(
!
pix
->
isNull
());
int
pageIndex
=
UBDocumentContainer
::
pageFromSceneIndex
(
i
);
int
pageIndex
=
UBDocumentContainer
::
pageFromSceneIndex
(
i
);
...
...
src/gui/UBDocumentTreeWidget.cpp
View file @
a8ed6766
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include "UBDocumentTreeWidget.h"
#include "UBDocumentTreeWidget.h"
#include "document/UBDocumentProxy.h"
#include "document/UBDocumentProxy.h"
//#include "document/UBDocumentContainer.h"
#include "core/UBSettings.h"
#include "core/UBSettings.h"
#include "core/UBApplication.h"
#include "core/UBApplication.h"
...
@@ -326,11 +327,14 @@ void UBDocumentTreeWidget::dropEvent(QDropEvent *event)
...
@@ -326,11 +327,14 @@ void UBDocumentTreeWidget::dropEvent(QDropEvent *event)
QString
source
=
scene
->
document
()
->
persistencePath
()
+
"/"
+
relativeFile
.
toString
();
QString
source
=
scene
->
document
()
->
persistencePath
()
+
"/"
+
relativeFile
.
toString
();
QString
target
=
targetDocProxy
->
persistencePath
()
+
"/"
+
relativeFile
.
toString
();
QString
target
=
targetDocProxy
->
persistencePath
()
+
"/"
+
relativeFile
.
toString
();
QFileInfo
fi
(
target
);
if
(
QFileInfo
(
source
).
isDir
())
QDir
d
=
fi
.
dir
();
Q_ASSERT
(
UBFileSystemUtils
::
copyDir
(
source
,
target
));
else
{
d
.
mkpath
(
d
.
absolutePath
());
QFileInfo
fi
(
target
);
QFile
::
copy
(
source
,
target
);
QDir
d
=
fi
.
dir
();
d
.
mkpath
(
d
.
absolutePath
());
Q_ASSERT
(
QFile
::
copy
(
source
,
target
));
}
}
}
UBPersistenceManager
::
persistenceManager
()
->
insertDocumentSceneAt
(
targetDocProxy
,
sceneClone
,
targetDocProxy
->
pageCount
());
UBPersistenceManager
::
persistenceManager
()
->
insertDocumentSceneAt
(
targetDocProxy
,
sceneClone
,
targetDocProxy
->
pageCount
());
...
...
src/gui/UBPageNavigationWidget.cpp
View file @
a8ed6766
...
@@ -25,9 +25,6 @@
...
@@ -25,9 +25,6 @@
#include "core/UBApplication.h"
#include "core/UBApplication.h"
#include "board/UBBoardController.h"
#include "board/UBBoardController.h"
#include "document/UBDocumentContainer.h"
#include "globals/UBGlobals.h"
#include "globals/UBGlobals.h"
#include "core/memcheck.h"
#include "core/memcheck.h"
...
...
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