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
f5d5a5fa
Commit
f5d5a5fa
authored
Aug 10, 2012
by
Anatoly Mihalchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MAC: displaying import progress
parent
5e7cd527
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
14 deletions
+25
-14
UBDocumentController.cpp
src/document/UBDocumentController.cpp
+25
-14
No files found.
src/document/UBDocumentController.cpp
100644 → 100755
View file @
f5d5a5fa
...
@@ -385,7 +385,12 @@ void UBDocumentController::setupViews()
...
@@ -385,7 +385,12 @@ void UBDocumentController::setupViews()
mDocumentUI
->
thumbnailWidget
->
setBackgroundBrush
(
UBSettings
::
documentViewLightColor
);
mDocumentUI
->
thumbnailWidget
->
setBackgroundBrush
(
UBSettings
::
documentViewLightColor
);
mMessageWindow
=
new
UBMessageWindow
(
mDocumentUI
->
thumbnailWidget
);
#ifdef Q_WS_MACX
mMessageWindow
=
new
UBMessageWindow
(
NULL
);
#else
mMessageWindow
=
new
UBMessageWindow
(
mDocumentUI
->
thumbnailWidget
);
#endif
mMessageWindow
->
hide
();
mMessageWindow
->
hide
();
}
}
...
@@ -732,7 +737,7 @@ void UBDocumentController::exportDocument()
...
@@ -732,7 +737,7 @@ void UBDocumentController::exportDocument()
}
}
else
else
{
{
UBApplication
::
showMessage
(
tr
(
"No document selected!"
));
showMessage
(
tr
(
"No document selected!"
));
}
}
}
}
...
@@ -917,7 +922,7 @@ void UBDocumentController::importFile()
...
@@ -917,7 +922,7 @@ void UBDocumentController::importFile()
if
(
groupName
==
UBSettings
::
defaultDocumentGroupName
||
fileInfo
.
suffix
()
!=
"ubz"
)
if
(
groupName
==
UBSettings
::
defaultDocumentGroupName
||
fileInfo
.
suffix
()
!=
"ubz"
)
groupName
=
""
;
groupName
=
""
;
UBApplication
::
showMessage
(
tr
(
"Importing file %1..."
).
arg
(
fileInfo
.
baseName
()),
true
);
showMessage
(
tr
(
"Importing file %1..."
).
arg
(
fileInfo
.
baseName
()),
true
);
createdDocument
=
docManager
->
importFile
(
selectedFile
,
groupName
);
createdDocument
=
docManager
->
importFile
(
selectedFile
,
groupName
);
...
@@ -927,7 +932,7 @@ void UBDocumentController::importFile()
...
@@ -927,7 +932,7 @@ void UBDocumentController::importFile()
}
}
else
else
{
{
UBApplication
::
showMessage
(
tr
(
"Failed to import file ... "
));
showMessage
(
tr
(
"Failed to import file ... "
));
}
}
}
}
...
@@ -958,7 +963,7 @@ void UBDocumentController::addFolderOfImages()
...
@@ -958,7 +963,7 @@ void UBDocumentController::addFolderOfImages()
if
(
importedImageNumber
==
0
)
if
(
importedImageNumber
==
0
)
{
{
UBApplication
::
showMessage
(
tr
(
"Folder does not contain any image files!"
));
showMessage
(
tr
(
"Folder does not contain any image files!"
));
UBApplication
::
applicationController
->
showDocument
();
UBApplication
::
applicationController
->
showDocument
();
}
}
else
else
...
@@ -1003,7 +1008,7 @@ bool UBDocumentController::addFileToDocument(UBDocumentProxy* document)
...
@@ -1003,7 +1008,7 @@ bool UBDocumentController::addFileToDocument(UBDocumentProxy* document)
QApplication
::
processEvents
();
QApplication
::
processEvents
();
QFile
selectedFile
(
filePath
);
QFile
selectedFile
(
filePath
);
UBApplication
::
showMessage
(
tr
(
"Importing file %1..."
).
arg
(
fileInfo
.
baseName
()),
true
);
showMessage
(
tr
(
"Importing file %1..."
).
arg
(
fileInfo
.
baseName
()),
true
);
success
=
UBDocumentManager
::
documentManager
()
->
addFileToDocument
(
document
,
selectedFile
);
success
=
UBDocumentManager
::
documentManager
()
->
addFileToDocument
(
document
,
selectedFile
);
...
@@ -1014,7 +1019,7 @@ bool UBDocumentController::addFileToDocument(UBDocumentProxy* document)
...
@@ -1014,7 +1019,7 @@ bool UBDocumentController::addFileToDocument(UBDocumentProxy* document)
}
}
else
else
{
{
UBApplication
::
showMessage
(
tr
(
"Failed to import file ... "
));
showMessage
(
tr
(
"Failed to import file ... "
));
}
}
}
}
...
@@ -1382,13 +1387,19 @@ bool UBDocumentController::isOKToOpenDocument(UBDocumentProxy* proxy)
...
@@ -1382,13 +1387,19 @@ bool UBDocumentController::isOKToOpenDocument(UBDocumentProxy* proxy)
void
UBDocumentController
::
showMessage
(
const
QString
&
message
,
bool
showSpinningWheel
)
void
UBDocumentController
::
showMessage
(
const
QString
&
message
,
bool
showSpinningWheel
)
{
{
int
margin
=
UBSettings
::
boardMargin
;
QRect
newSize
=
mDocumentUI
->
thumbnailWidget
->
geometry
();
if
(
mMessageWindow
)
if
(
mMessageWindow
)
{
{
mMessageWindow
->
move
(
margin
,
newSize
.
height
()
-
mMessageWindow
->
height
()
-
margin
);
int
margin
=
UBSettings
::
boardMargin
;
QRect
newSize
=
mDocumentUI
->
thumbnailWidget
->
geometry
();
#ifdef Q_WS_MACX
QPoint
point
(
newSize
.
left
()
+
margin
,
newSize
.
bottom
()
-
mMessageWindow
->
height
()
-
margin
);
mMessageWindow
->
move
(
mDocumentUI
->
thumbnailWidget
->
mapToGlobal
(
point
));
#else
mMessageWindow
->
move
(
margin
,
newSize
.
height
()
-
mMessageWindow
->
height
()
-
margin
);
#endif
mMessageWindow
->
showMessage
(
message
,
showSpinningWheel
);
mMessageWindow
->
showMessage
(
message
,
showSpinningWheel
);
}
}
}
}
...
@@ -1609,9 +1620,9 @@ void UBDocumentController::refreshDocumentThumbnailsView(UBDocumentContainer*)
...
@@ -1609,9 +1620,9 @@ void UBDocumentController::refreshDocumentThumbnailsView(UBDocumentContainer*)
QStringList
labels
;
QStringList
labels
;
if
(
proxy
)
if
(
proxy
)
{
{
setDocument
(
proxy
);
setDocument
(
proxy
);
for
(
int
i
=
0
;
i
<
selectedDocument
()
->
pageCount
();
i
++
)
for
(
int
i
=
0
;
i
<
selectedDocument
()
->
pageCount
();
i
++
)
{
{
...
...
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