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
b84e68c9
Commit
b84e68c9
authored
May 27, 2011
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed claudio's bug
parent
6c742be8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
UBLibraryController.cpp
src/board/UBLibraryController.cpp
+4
-3
UBToolsManager.cpp
src/tools/UBToolsManager.cpp
+4
-4
UBToolsManager.h
src/tools/UBToolsManager.h
+2
-2
No files found.
src/board/UBLibraryController.cpp
View file @
b84e68c9
...
@@ -262,9 +262,10 @@ QImage* UBLibraryController::createThumbnail(UBLibElement* pElement)
...
@@ -262,9 +262,10 @@ QImage* UBLibraryController::createThumbnail(UBLibElement* pElement)
QImage
*
UBLibraryController
::
thumbnailForFile
(
UBLibElement
*
pElement
)
QImage
*
UBLibraryController
::
thumbnailForFile
(
UBLibElement
*
pElement
)
{
{
if
(
pElement
->
path
().
toString
().
contains
(
"uniboardTool://"
))
if
(
pElement
->
path
().
toString
().
contains
(
"uniboardTool://"
)){
return
&
UBToolsManager
::
manager
()
->
iconFromToolId
(
pElement
->
path
().
toString
()).
toImage
();
QImage
*
image
=
new
QImage
(
UBToolsManager
::
manager
()
->
iconFromToolId
(
pElement
->
path
().
toString
()));
return
image
;
}
QString
thumbnailPath
=
UBFileSystemUtils
::
thumbnailPath
(
pElement
->
path
().
toLocalFile
());
QString
thumbnailPath
=
UBFileSystemUtils
::
thumbnailPath
(
pElement
->
path
().
toLocalFile
());
if
(
!
thumbnailPath
.
length
())
if
(
!
thumbnailPath
.
length
())
...
...
src/tools/UBToolsManager.cpp
View file @
b84e68c9
...
@@ -17,28 +17,28 @@ UBToolsManager::UBToolsManager(QObject *parent)
...
@@ -17,28 +17,28 @@ UBToolsManager::UBToolsManager(QObject *parent)
mask
.
icon
=
QPixmap
(
":/images/toolPalette/maskTool.png"
);
mask
.
icon
=
QPixmap
(
":/images/toolPalette/maskTool.png"
);
mask
.
label
=
tr
(
"Mask"
);
mask
.
label
=
tr
(
"Mask"
);
mask
.
version
=
"1.0"
;
mask
.
version
=
"1.0"
;
mToolsIcon
.
insert
(
mask
.
id
,
mask
.
icon
);
mToolsIcon
.
insert
(
mask
.
id
,
":/images/toolPalette/maskTool.png"
);
mDescriptors
<<
mask
;
mDescriptors
<<
mask
;
ruler
.
id
=
"uniboardTool://uniboard.mnemis.com/ruler"
;
ruler
.
id
=
"uniboardTool://uniboard.mnemis.com/ruler"
;
ruler
.
icon
=
QPixmap
(
":/images/toolPalette/rulerTool.png"
);
ruler
.
icon
=
QPixmap
(
":/images/toolPalette/rulerTool.png"
);
ruler
.
label
=
tr
(
"Ruler"
);
ruler
.
label
=
tr
(
"Ruler"
);
ruler
.
version
=
"1.0"
;
ruler
.
version
=
"1.0"
;
mToolsIcon
.
insert
(
ruler
.
id
,
ruler
.
icon
);
mToolsIcon
.
insert
(
ruler
.
id
,
":/images/toolPalette/rulerTool.png"
);
mDescriptors
<<
ruler
;
mDescriptors
<<
ruler
;
compass
.
id
=
"uniboardTool://uniboard.mnemis.com/compass"
;
compass
.
id
=
"uniboardTool://uniboard.mnemis.com/compass"
;
compass
.
icon
=
QPixmap
(
":/images/toolPalette/compassTool.png"
);
compass
.
icon
=
QPixmap
(
":/images/toolPalette/compassTool.png"
);
compass
.
label
=
tr
(
"Compass"
);
compass
.
label
=
tr
(
"Compass"
);
compass
.
version
=
"1.0"
;
compass
.
version
=
"1.0"
;
mToolsIcon
.
insert
(
compass
.
id
,
compass
.
icon
);
mToolsIcon
.
insert
(
compass
.
id
,
":/images/toolPalette/compassTool.png"
);
mDescriptors
<<
compass
;
mDescriptors
<<
compass
;
protractor
.
id
=
"uniboardTool://uniboard.mnemis.com/protractor"
;
protractor
.
id
=
"uniboardTool://uniboard.mnemis.com/protractor"
;
protractor
.
icon
=
QPixmap
(
":/images/toolPalette/protractorTool.png"
);
protractor
.
icon
=
QPixmap
(
":/images/toolPalette/protractorTool.png"
);
protractor
.
label
=
tr
(
"Protractor"
);
protractor
.
label
=
tr
(
"Protractor"
);
protractor
.
version
=
"1.0"
;
protractor
.
version
=
"1.0"
;
mToolsIcon
.
insert
(
protractor
.
id
,
protractor
.
icon
);
mToolsIcon
.
insert
(
protractor
.
id
,
":/images/toolPalette/protractorTool.png"
);
mDescriptors
<<
protractor
;
mDescriptors
<<
protractor
;
}
}
...
...
src/tools/UBToolsManager.h
View file @
b84e68c9
...
@@ -70,7 +70,7 @@ class UBToolsManager : public QObject
...
@@ -70,7 +70,7 @@ class UBToolsManager : public QObject
UBToolDescriptor
compass
;
UBToolDescriptor
compass
;
UBToolDescriptor
mask
;
UBToolDescriptor
mask
;
Q
Pixmap
iconFromToolId
(
QString
id
)
{
return
mToolsIcon
.
value
(
id
);}
Q
String
iconFromToolId
(
QString
id
)
{
return
mToolsIcon
.
value
(
id
);}
private
:
private
:
UBToolsManager
(
QObject
*
parent
=
0
);
UBToolsManager
(
QObject
*
parent
=
0
);
...
@@ -80,7 +80,7 @@ class UBToolsManager : public QObject
...
@@ -80,7 +80,7 @@ class UBToolsManager : public QObject
QList
<
UBToolDescriptor
>
mDescriptors
;
QList
<
UBToolDescriptor
>
mDescriptors
;
QMap
<
QString
,
Q
Pixmap
>
mToolsIcon
;
QMap
<
QString
,
Q
String
>
mToolsIcon
;
};
};
...
...
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