Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
skylivex
Project
Project
Details
Activity
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
astronomy
skylivex
Commits
931d6aa8
Commit
931d6aa8
authored
Feb 28, 2013
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Managed IMAGE command from server
parent
a088835d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
skproto.cpp
plugins/skproto.cpp
+14
-0
mainwin.cpp
src/mainwin.cpp
+7
-3
No files found.
plugins/skproto.cpp
View file @
931d6aa8
...
...
@@ -236,6 +236,20 @@ void SkyliveProtocol::processPackets()
QList
<
QString
>
paramlist
=
pkt
.
params
.
split
(
PARAM_SEPARATOR
);
mmsg
.
parameters
.
insert
(
"when"
,
paramlist
[
0
]);
sendMessage
(
mmsg
);
}
else
if
(
pkt
.
cmd
==
"IMAGE"
)
{
QList
<
QString
>
paramlist
=
pkt
.
params
.
split
(
PARAM_SEPARATOR
);
if
(
paramlist
.
size
()
==
3
)
{
SKMessage
mmsg
(
"openurl"
);
mmsg
.
parameters
.
insert
(
"url"
,
QByteArray
::
fromPercentEncoding
(
paramlist
[
0
].
toLocal8Bit
()));
mmsg
.
parameters
.
insert
(
"width"
,
paramlist
[
1
]);
mmsg
.
parameters
.
insert
(
"height"
,
paramlist
[
2
]);
sendMessage
(
mmsg
);
}
}
else
{
...
...
src/mainwin.cpp
View file @
931d6aa8
...
...
@@ -158,13 +158,17 @@ void MainWin::handle_openurl(SKMessage &msg)
if
(
msg
.
parameters
.
contains
(
"url"
))
{
std
::
cout
<<
"OPEN URL "
<<
msg
.
parameters
[
"url"
].
toStdString
()
<<
std
::
endl
;
//if(msg.parameters.contains("width")
//if(msg.parameters.contains("height);
WebWin
*
wv
=
new
WebWin
;
QWebPage
*
newWeb
=
new
QWebPage
(
wv
);
wv
->
setPage
(
newWeb
);
wv
->
setAttribute
(
Qt
::
WA_DeleteOnClose
,
true
);
if
(
msg
.
parameters
.
contains
(
"width"
)
&&
msg
.
parameters
.
contains
(
"height"
))
wv
->
resize
(
msg
.
parameters
[
"width"
].
toInt
(),
msg
.
parameters
[
"height"
].
toInt
());
else
if
(
msg
.
parameters
.
contains
(
"width"
))
wv
->
resize
(
msg
.
parameters
[
"width"
].
toInt
(),
wv
->
height
());
else
if
(
msg
.
parameters
.
contains
(
"height"
))
wv
->
resize
(
wv
->
width
(),
msg
.
parameters
[
"height"
].
toInt
());
wv
->
setUrl
(
QUrl
(
msg
.
parameters
[
"url"
]));
wv
->
show
();
...
...
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