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
34c6aa28
Commit
34c6aa28
authored
Sep 04, 2012
by
Anatoly Mihalchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reversed changed...
parent
b5d26ab5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
39 deletions
+26
-39
UBPlatformUtils.h
src/frameworks/UBPlatformUtils.h
+16
-24
UBPlatformUtils_linux.cpp
src/frameworks/UBPlatformUtils_linux.cpp
+5
-5
UBPlatformUtils_win.cpp
src/frameworks/UBPlatformUtils_win.cpp
+5
-10
No files found.
src/frameworks/UBPlatformUtils.h
View file @
34c6aa28
...
...
@@ -19,11 +19,6 @@
#include <QtCore>
#include <QIcon>
#ifdef Q_WS_MACX
#import <Carbon/Carbon.h>
#endif
class
QMainWindow
;
#define SYMBOL_KEYS_COUNT 47
...
...
@@ -130,31 +125,28 @@ struct KEYBT
class
UBKeyboardLocale
{
public
:
#ifdef Q_WS_MACX
UBKeyboardLocale
(
const
QString
&
_fullName
,
const
QString
&
_name
,
TISInputSourceRef
_tisInputSourceRef
,
QIcon
*
_icon
,
KEYBT
**
_symbols
)
:
fullName
(
_fullName
),
name
(
_name
),
tisInputSourceRef
(
_tisInputSourceRef
),
icon
(
_icon
),
constSymbols
(
NULL
),
varSymbols
(
_symbols
)
{}
TISInputSourceRef
tisInputSourceRef
;
#else
UBKeyboardLocale
(
const
QString
&
_fullName
,
const
QString
&
_name
,
QIcon
*
_icon
,
KEYBT
_symbols
[])
:
fullName
(
_fullName
),
name
(
_name
),
icon
(
_icon
),
UBKeyboardLocale
(
const
QString
&
_fullName
,
const
QString
&
_name
,
const
QString
&
_id
,
QIcon
*
_icon
,
KEYBT
**
_symbols
)
:
fullName
(
_fullName
),
name
(
_name
),
id
(
_id
),
icon
(
_icon
),
constSymbols
(
NULL
),
varSymbols
(
_symbols
)
{}
UBKeyboardLocale
(
const
QString
&
_fullName
,
const
QString
&
_name
,
const
QString
&
_id
,
QIcon
*
_icon
,
KEYBT
_symbols
[])
:
fullName
(
_fullName
),
name
(
_name
),
id
(
_id
),
icon
(
_icon
),
constSymbols
(
_symbols
),
varSymbols
(
NULL
)
{}
#endif
{}
~
UBKeyboardLocale
();
const
QString
fullName
;
const
QString
name
;
const
QString
id
;
QIcon
*
icon
;
KEYBT
*
operator
[]
(
int
index
)
const
{
...
...
src/frameworks/UBPlatformUtils_linux.cpp
View file @
34c6aa28
...
...
@@ -399,11 +399,11 @@ void UBPlatformUtils::initializeKeyboardLayouts()
{
nKeyboardLayouts
=
5
;
keyboardLayouts
=
new
UBKeyboardLocale
*
[
nKeyboardLayouts
];
keyboardLayouts
[
0
]
=
new
UBKeyboardLocale
(
tr
(
"English"
),
"en"
,
new
QIcon
(
":/images/flags/en.png"
),
ENGLISH_LOCALE
);
keyboardLayouts
[
1
]
=
new
UBKeyboardLocale
(
tr
(
"Russian"
),
"ru"
,
new
QIcon
(
":/images/flags/ru.png"
),
RUSSIAN_LOCALE
);
keyboardLayouts
[
2
]
=
new
UBKeyboardLocale
(
tr
(
"German"
),
"de"
,
new
QIcon
(
":/images/flags/de.png"
),
GERMAN_LOCALE
);
keyboardLayouts
[
3
]
=
new
UBKeyboardLocale
(
tr
(
"French"
),
"fr"
,
new
QIcon
(
":/images/flags/fr.png"
),
FRENCH_LOCALE
);
keyboardLayouts
[
4
]
=
new
UBKeyboardLocale
(
tr
(
"Swiss French"
),
"fr-CH"
,
new
QIcon
(
":/images/flags/fr.png"
),
SWISS_FRENCH_LOCALE
);
keyboardLayouts
[
0
]
=
new
UBKeyboardLocale
(
tr
(
"English"
),
"en"
,
""
,
new
QIcon
(
":/images/flags/en.png"
),
ENGLISH_LOCALE
);
keyboardLayouts
[
1
]
=
new
UBKeyboardLocale
(
tr
(
"Russian"
),
"ru"
,
""
,
new
QIcon
(
":/images/flags/ru.png"
),
RUSSIAN_LOCALE
);
keyboardLayouts
[
2
]
=
new
UBKeyboardLocale
(
tr
(
"German"
),
"de"
,
""
,
new
QIcon
(
":/images/flags/de.png"
),
GERMAN_LOCALE
);
keyboardLayouts
[
3
]
=
new
UBKeyboardLocale
(
tr
(
"French"
),
"fr"
,
""
,
new
QIcon
(
":/images/flags/fr.png"
),
FRENCH_LOCALE
);
keyboardLayouts
[
4
]
=
new
UBKeyboardLocale
(
tr
(
"Swiss French"
),
"fr-CH"
,
""
,
new
QIcon
(
":/images/flags/fr.png"
),
SWISS_FRENCH_LOCALE
);
}
void
UBPlatformUtils
::
destroyKeyboardLayouts
()
...
...
src/frameworks/UBPlatformUtils_win.cpp
View file @
34c6aa28
...
...
@@ -407,16 +407,11 @@ void UBPlatformUtils::initializeKeyboardLayouts()
{
nKeyboardLayouts
=
5
;
keyboardLayouts
=
new
UBKeyboardLocale
*
[
nKeyboardLayouts
];
keyboardLayouts
[
0
]
=
new
UBKeyboardLocale
(
tr
(
"English"
),
"en"
,
new
QIcon
(
":/images/flags/en.png"
),
ENGLISH_LOCALE
);
keyboardLayouts
[
1
]
=
new
UBKeyboardLocale
(
tr
(
"Russian"
),
"ru"
,
new
QIcon
(
":/images/flags/ru.png"
),
RUSSIAN_LOCALE
);
keyboardLayouts
[
2
]
=
new
UBKeyboardLocale
(
tr
(
"French"
),
"fr"
,
new
QIcon
(
":/images/flags/fr.png"
),
FRENCH_LOCALE
);
keyboardLayouts
[
3
]
=
new
UBKeyboardLocale
(
tr
(
"Swiss French"
),
"fr-CH"
,
new
QIcon
(
":/images/flags/fr.png"
),
SWISS_FRENCH_LOCALE
);
keyboardLayouts
[
4
]
=
new
UBKeyboardLocale
(
tr
(
"German"
),
"de"
,
new
QIcon
(
":/images/flags/de.png"
),
GERMAN_LOCALE
);
keyboardLayouts
[
0
]
=
new
UBKeyboardLocale
(
tr
(
"English"
),
"en"
,
""
,
new
QIcon
(
":/images/flags/en.png"
),
ENGLISH_LOCALE
);
keyboardLayouts
[
1
]
=
new
UBKeyboardLocale
(
tr
(
"Russian"
),
"ru"
,
""
,
new
QIcon
(
":/images/flags/ru.png"
),
RUSSIAN_LOCALE
);
keyboardLayouts
[
2
]
=
new
UBKeyboardLocale
(
tr
(
"French"
),
"fr"
,
""
,
new
QIcon
(
":/images/flags/fr.png"
),
FRENCH_LOCALE
);
keyboardLayouts
[
3
]
=
new
UBKeyboardLocale
(
tr
(
"Swiss French"
),
"fr-CH"
,
""
,
new
QIcon
(
":/images/flags/fr.png"
),
SWISS_FRENCH_LOCALE
);
keyboardLayouts
[
4
]
=
new
UBKeyboardLocale
(
tr
(
"German"
),
"de"
,
""
,
new
QIcon
(
":/images/flags/de.png"
),
GERMAN_LOCALE
);
}
void
UBPlatformUtils
::
destroyKeyboardLayouts
()
...
...
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