Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kumir2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kumir
kumir2
Commits
d1eaa0b8
Commit
d1eaa0b8
authored
Sep 22, 2011
by
victor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
http://lpm.org.ru/svn/kumir2@354
382dccb8-6cdf-11e0-9640-eb60159f4418
parent
df1d94a4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
2 deletions
+34
-2
src/app/kumir2-classic.pro
src/app/kumir2-classic.pro
+1
-0
src/app/kumir2-ide.pro
src/app/kumir2-ide.pro
+1
-1
src/app/kumir2-teacher.pro
src/app/kumir2-teacher.pro
+1
-1
src/app/main.cpp
src/app/main.cpp
+31
-0
No files found.
src/app/kumir2-classic.pro
View file @
d1eaa0b8
...
...
@@ -17,6 +17,7 @@ include(../rpath.pri)
OBJECTS_DIR
=
$$
IDE_BUILD_TREE
/
src
/
app
/
$$
TARGET
#
defines
default
template
for
this
build
DEFINES
+=
CONFIGURATION_TEMPLATE
=
\\\
"Editor,Browser,Actor*,KumirAnalizer,KumirCodeGenerator,KumirCodeRun,!CoreGUI\\(notabs,icon=classic,nostartpage,nosessions\\)\\\"
DEFINES
+=
SPLASHSCREEN
=
\\\
"coregui/splashscreens/classic.png\\\"
win32
{
CONFIG
(
debug
,
debug
|
release
)
:
LIBS
*=
-
lExtensionSystemd
...
...
src/app/kumir2-ide.pro
View file @
d1eaa0b8
...
...
@@ -20,7 +20,7 @@ include(../rpath.pri)
OBJECTS_DIR
=
$$
IDE_BUILD_TREE
/
src
/
app
/
$$
TARGET
#
defines
default
template
for
this
build
DEFINES
+=
CONFIGURATION_TEMPLATE
=
\\\
"Editor,Browser,Actor*,KumirAnalizer,KumirNativeGenerator,KumirCodeGenerator,KumirCodeRun,!CoreGUI\\\"
DEFINES
+=
SPLASHSCREEN
=
\\\
"coregui/splashscreens/professional.png\\\"
win32
{
CONFIG
(
debug
,
debug
|
release
)
:
LIBS
*=
-
lExtensionSystemd
...
...
src/app/kumir2-teacher.pro
View file @
d1eaa0b8
...
...
@@ -20,7 +20,7 @@ include(../rpath.pri)
OBJECTS_DIR
=
$$
IDE_BUILD_TREE
/
src
/
app
/
$$
TARGET
#
defines
default
template
for
this
build
DEFINES
+=
CONFIGURATION_TEMPLATE
=
\\\
"Editor\\(teacher\\),Browser,Actor*,KumirAnalizer\\(teacher\\),KumirNativeGenerator,KumirCodeGenerator,KumirCodeRun,!CoreGUI\\(icon=teacher\\)\\\"
DEFINES
+=
SPLASHSCREEN
=
\\\
"coregui/splashscreens/teacher.png\\\"
win32
{
CONFIG
(
debug
,
debug
|
release
)
:
LIBS
*=
-
lExtensionSystemd
else
:
LIBS
*=
-
lExtensionSystem
...
...
src/app/main.cpp
View file @
d1eaa0b8
...
...
@@ -13,6 +13,7 @@
# define SHARE_PATH "/../share/kumir2"
#endif
void
showErrorMessage
(
const
QString
&
text
)
{
bool
gui
=
true
;
...
...
@@ -48,6 +49,7 @@ int main(int argc, char **argv)
#ifndef Q_OS_WIN32
app
->
addLibraryPath
(
QDir
::
cleanPath
(
app
->
applicationDirPath
()
+
"/../"
+
IDE_LIBRARY_BASENAME
+
"/kumir2/"
));
#endif
QString
versionStatus
;
if
(
VERSION_BETA
)
versionStatus
=
QString
(
"beta%1"
).
arg
(
VERSION_BETA
,
2
,
10
,
QChar
(
'0'
));
...
...
@@ -63,7 +65,36 @@ int main(int argc, char **argv)
#ifdef SVN_REV
app
->
setProperty
(
"svnRev"
,
SVN_REV
);
#endif
QSplashScreen
*
splashScreen
=
0
;
const
QString
sharePath
=
QDir
(
app
->
applicationDirPath
()
+
SHARE_PATH
).
canonicalPath
();
#ifdef SPLASHSCREEN
if
(
gui
)
{
QString
imgPath
=
sharePath
+
QString
(
"/"
)
+
SPLASHSCREEN
;
splashScreen
=
new
QSplashScreen
();
QImage
img
(
imgPath
);
QPainter
p
(
&
img
);
p
.
setPen
(
QColor
(
Qt
::
black
));
p
.
setBrush
(
QColor
(
Qt
::
black
));
QFont
f
=
p
.
font
();
f
.
setPixelSize
(
12
);
QString
v
=
qApp
->
applicationVersion
();
if
(
app
->
property
(
"svnRev"
).
isValid
())
{
v
+=
" (rev. "
+
app
->
property
(
"svnRev"
).
toString
();
}
int
tw
=
QFontMetrics
(
f
).
width
(
v
);
int
th
=
QFontMetrics
(
f
).
height
();
int
x
=
img
.
width
()
-
tw
;
int
y
=
8
;
p
.
drawText
(
x
,
y
,
tw
,
th
,
0
,
v
);
p
.
end
();
QPixmap
px
=
QPixmap
::
fromImage
(
img
);
splashScreen
->
setPixmap
(
px
);
splashScreen
->
show
();
}
#endif
QDir
translationsDir
(
sharePath
+
"/translations"
);
QStringList
ts_files
=
translationsDir
.
entryList
(
QStringList
()
<<
"*_"
+
getLanguage
()
+
".qm"
);
foreach
(
QString
tsname
,
ts_files
)
{
...
...
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