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
9ceff120
Commit
9ceff120
authored
Aug 29, 2012
by
Ilia Ryabokon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UBFeatures translations
parent
1b3a3a61
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
96 additions
and
59 deletions
+96
-59
UBFeaturesController.cpp
src/board/UBFeaturesController.cpp
+71
-44
UBFeaturesController.h
src/board/UBFeaturesController.h
+21
-11
UBApplication.cpp
src/core/UBApplication.cpp
+1
-1
UBFeaturesWidget.cpp
src/gui/UBFeaturesWidget.cpp
+3
-3
No files found.
src/board/UBFeaturesController.cpp
View file @
9ceff120
This diff is collapsed.
Click to expand it.
src/board/UBFeaturesController.h
View file @
9ceff120
...
@@ -94,6 +94,7 @@ public:
...
@@ -94,6 +94,7 @@ public:
// UBFeature();
// UBFeature();
virtual
~
UBFeature
();
virtual
~
UBFeature
();
QString
getName
()
const
{
return
mName
;
}
QString
getName
()
const
{
return
mName
;
}
QString
getDisplayName
()
const
{
return
mDisplayName
;}
QImage
getThumbnail
()
const
{
return
mThumbnail
;}
QImage
getThumbnail
()
const
{
return
mThumbnail
;}
QString
getVirtualPath
()
const
{
return
virtualDir
;
}
QString
getVirtualPath
()
const
{
return
virtualDir
;
}
//QString getPath() const { return mPath; };
//QString getPath() const { return mPath; };
...
@@ -112,11 +113,17 @@ public:
...
@@ -112,11 +113,17 @@ public:
const
QMap
<
QString
,
QString
>
&
getMetadata
()
const
{
return
metadata
;
}
const
QMap
<
QString
,
QString
>
&
getMetadata
()
const
{
return
metadata
;
}
void
setMetadata
(
const
QMap
<
QString
,
QString
>
&
data
)
{
metadata
=
data
;
}
void
setMetadata
(
const
QMap
<
QString
,
QString
>
&
data
)
{
metadata
=
data
;
}
private
:
QString
getNameFromVirtualPath
(
const
QString
&
pVirtPath
);
QString
getVirtualDirFromVirtualPath
(
const
QString
&
pVirtPath
);
private
:
private
:
QString
virtualDir
;
QString
virtualDir
;
QString
virtualPath
;
QString
virtualPath
;
QImage
mThumbnail
;
QImage
mThumbnail
;
QString
mName
;
QString
mName
;
QString
mDisplayName
;
QUrl
mPath
;
QUrl
mPath
;
UBFeatureElementType
elementType
;
UBFeatureElementType
elementType
;
QMap
<
QString
,
QString
>
metadata
;
QMap
<
QString
,
QString
>
metadata
;
...
@@ -182,6 +189,19 @@ public:
...
@@ -182,6 +189,19 @@ public:
void
assignFeaturesListVeiw
(
UBFeaturesListView
*
pList
);
void
assignFeaturesListVeiw
(
UBFeaturesListView
*
pList
);
void
assignPathListView
(
UBFeaturesListView
*
pList
);
void
assignPathListView
(
UBFeaturesListView
*
pList
);
public
:
static
const
QString
rootPath
;
static
const
QString
audiosPath
;
static
const
QString
moviesPath
;
static
const
QString
picturesPath
;
static
const
QString
appPath
;
static
const
QString
flashPath
;
static
const
QString
shapesPath
;
static
const
QString
interactPath
;
static
const
QString
trashPath
;
static
const
QString
favoritePath
;
static
const
QString
webSearchPath
;
signals
:
signals
:
void
maxFilesCountEvaluated
(
int
pLimit
);
void
maxFilesCountEvaluated
(
int
pLimit
);
void
scanStarted
();
void
scanStarted
();
...
@@ -235,17 +255,7 @@ private:
...
@@ -235,17 +255,7 @@ private:
QUrl
trashDirectoryPath
;
QUrl
trashDirectoryPath
;
QUrl
mLibSearchDirectoryPath
;
QUrl
mLibSearchDirectoryPath
;
QString
rootPath
;
QString
audiosPath
;
QString
moviesPath
;
QString
picturesPath
;
QString
appPath
;
QString
flashPath
;
QString
shapesPath
;
QString
interactPath
;
QString
trashPath
;
QString
favoritePath
;
QString
webSearchPath
;
int
mLastItemOffsetIndex
;
int
mLastItemOffsetIndex
;
UBFeature
currentElement
;
UBFeature
currentElement
;
...
...
src/core/UBApplication.cpp
View file @
9ceff120
...
@@ -233,7 +233,7 @@ void UBApplication::setupTranslator(QString forcedLanguage)
...
@@ -233,7 +233,7 @@ void UBApplication::setupTranslator(QString forcedLanguage)
mApplicationTranslator
=
new
QTranslator
(
this
);
mApplicationTranslator
=
new
QTranslator
(
this
);
mQtGuiTranslator
=
new
QTranslator
(
this
);
mQtGuiTranslator
=
new
QTranslator
(
this
);
mApplicationTranslator
->
load
(
UBPlatformUtils
::
translationPath
(
QString
(
"sankore_"
),
language
));
mApplicationTranslator
->
load
(
UBPlatformUtils
::
translationPath
(
QString
(
"sankore_"
),
language
));
installTranslator
(
mApplicationTranslator
);
installTranslator
(
mApplicationTranslator
);
...
...
src/gui/UBFeaturesWidget.cpp
View file @
9ceff120
...
@@ -259,7 +259,7 @@ void UBFeaturesWidget::onDisplayMetadata( QMap<QString,QString> metadata )
...
@@ -259,7 +259,7 @@ void UBFeaturesWidget::onDisplayMetadata( QMap<QString,QString> metadata )
}
break
;
}
break
;
}
}
UBFeature
feature
(
QString
()
,
QImage
(
previewImageUrl
),
QString
(),
metadata
[
"Url"
],
FEATURE_ITEM
);
UBFeature
feature
(
"/root"
,
QImage
(
previewImageUrl
),
QString
(),
metadata
[
"Url"
],
FEATURE_ITEM
);
feature
.
setMetadata
(
metadata
);
feature
.
setMetadata
(
metadata
);
centralWidget
->
showElement
(
feature
,
UBFeaturesCentralWidget
::
FeaturePropertiesList
);
centralWidget
->
showElement
(
feature
,
UBFeaturesCentralWidget
::
FeaturePropertiesList
);
...
@@ -1080,7 +1080,7 @@ QVariant UBFeaturesModel::data(const QModelIndex &index, int role) const
...
@@ -1080,7 +1080,7 @@ QVariant UBFeaturesModel::data(const QModelIndex &index, int role) const
return
QVariant
();
return
QVariant
();
if
(
role
==
Qt
::
DisplayRole
)
{
if
(
role
==
Qt
::
DisplayRole
)
{
return
featuresList
->
at
(
index
.
row
()).
get
Name
();
return
featuresList
->
at
(
index
.
row
()).
getDisplay
Name
();
}
}
else
if
(
role
==
Qt
::
DecorationRole
)
{
else
if
(
role
==
Qt
::
DecorationRole
)
{
...
@@ -1311,7 +1311,7 @@ void UBFeaturesModel::moveData(const UBFeature &source, const UBFeature &destina
...
@@ -1311,7 +1311,7 @@ void UBFeaturesModel::moveData(const UBFeature &source, const UBFeature &destina
}
}
}
}
UBFeature
newElement
(
destVirtualPath
,
sourceIcon
,
name
,
QUrl
::
fromLocalFile
(
destFullPath
),
sourceType
);
UBFeature
newElement
(
destVirtualPath
+
"/"
+
name
,
sourceIcon
,
name
,
QUrl
::
fromLocalFile
(
destFullPath
),
sourceType
);
addItem
(
newElement
);
addItem
(
newElement
);
if
(
deleteManualy
)
{
if
(
deleteManualy
)
{
...
...
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