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
ec1bc49e
Commit
ec1bc49e
authored
Apr 13, 2013
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userlist is quasi-ready
parent
60f7357f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
5 deletions
+34
-5
SkyliveX.js
gui/SkyliveX.js
+6
-1
chatgui.html
gui/chatgui.html
+9
-2
jsbridge.h
src/jsbridge.h
+1
-0
skylivex.cpp
src/skylivex.cpp
+4
-0
webwin.cpp
src/webwin.cpp
+13
-2
webwin.h
src/webwin.h
+1
-0
No files found.
gui/SkyliveX.js
View file @
ec1bc49e
...
...
@@ -45,10 +45,15 @@ skyliveClass.prototype.userlistChange = function(action, u){
}
}
};
skyliveClass
.
prototype
.
changeTelescope
=
function
(
tele
){
if
(
typeof
(
telescopeChanged
)
==
"function"
)
telescopeChanged
(
tele
);
};
SkyliveXPage
=
new
skyliveClass
();
SkyliveX
.
changeContent
.
connect
(
SkyliveXPage
.
changeContent
);
SkyliveX
.
notify
.
connect
(
SkyliveXPage
.
notify
);
SkyliveX
.
alertmsg
.
connect
(
SkyliveXPage
.
msgalert
);
SkyliveX
.
public_received
.
connect
(
SkyliveXPage
.
publicReceived
);
SkyliveX
.
userlist_change
.
connect
(
SkyliveXPage
.
userlistChange
);
//SkyliveX.userlist_change.connect(SkyliveXPage.userlistChange);
SkyliveX
.
changeTelescope
.
connect
(
SkyliveXPage
.
changeTelescope
);
gui/chatgui.html
View file @
ec1bc49e
<html
debug=
true
>
<head>
<title>
SkyliveX 0.1.0
</title>
<script
type=
"text/javascript"
src=
"https://getfirebug.com/firebug-lite.js"
></script
>
<!-- <script type="text/javascript" src="https://getfirebug.com/firebug-lite.js"></script> --
>
<script
type=
"text/javascript"
src=
"jquery-1.9.1.min.js"
></script>
<script
type=
"text/javascript"
src=
"SkyliveX.js"
></script>
<script
type=
"text/javascript"
>
...
...
@@ -18,6 +18,7 @@
sendMsg
();
}
}
telescopenum
=
"1"
;
</script>
<style>
...
...
@@ -190,7 +191,7 @@
{
var
d
=
new
Date
();
$
.
get
(
"http://live1.skylive.name/tele
1
/userlist.txt?"
+
d
.
getTime
(),
function
(
data
)
{
$
.
get
(
"http://live1.skylive.name/tele
"
+
telescopenum
+
"
/userlist.txt?"
+
d
.
getTime
(),
function
(
data
)
{
var
ad
=
$
(
"#admins"
);
ad
.
empty
();
var
uarr
=
data
.
split
(
"
\n
"
);
...
...
@@ -204,6 +205,12 @@
});
});
}
function
telescopeChanged
(
tele
)
{
telescopenum
=
tele
;
updateUserlist
();
}
document
.
addEventListener
(
'DOMContentLoaded'
,
function
(){
//setTimeout(function() { SkyliveX.resizeWin(636, 420); }, 500);
updateUserlist
();
...
...
src/jsbridge.h
View file @
ec1bc49e
...
...
@@ -64,6 +64,7 @@ class JSBridge : public QObject
void
public_received
(
QString
user
,
QString
content
);
void
updateUserList
(
QString
user
,
QString
utype
,
QString
direction
);
void
deleteUserList
();
void
changeTelescope
(
QString
telescope
);
public
slots
:
void
pushLogin
(
QString
username
,
QString
password
);
...
...
src/skylivex.cpp
View file @
ec1bc49e
...
...
@@ -135,6 +135,10 @@ void SkyliveX::receiveFromGui(SKMessage &msg)
connect
(
msg
.
webwin
,
SIGNAL
(
putMessage
(
SKMessage
&
)),
this
,
SLOT
(
receiveFromGui
(
SKMessage
&
)));
connect
(
this
,
SIGNAL
(
msgForGui
(
SKMessage
&
)),
msg
.
webwin
,
SLOT
(
msgFromCore
(
SKMessage
&
)));
}
if
(
msg
.
handle
==
"changeTelescope"
)
{
emit
msgForGui
(
msg
);
}
emit
msgForPlugins
(
msg
);
}
...
...
src/webwin.cpp
View file @
ec1bc49e
...
...
@@ -198,8 +198,8 @@ void WebWin::setHtmlCont(QString cont, QUrl baseUrl, bool borders, bool transpar
void
WebWin
::
msgFromCore
(
SKMessage
&
msg
)
{
std
::
cout
<<
"WebWindow msg re
v
eived: "
<<
msg
.
handle
.
toStdString
()
<<
std
::
endl
;
if
(
_handlers
.
contains
(
msg
.
handle
)
&&
msg
.
sender
!=
msgsender
)
std
::
cout
<<
"WebWindow msg re
c
eived: "
<<
msg
.
handle
.
toStdString
()
<<
std
::
endl
;
if
(
_handlers
.
contains
(
msg
.
handle
)
&&
(
msg
.
handle
==
"changeTelescope"
||
msg
.
sender
!=
msgsender
)
)
{
SKHandlerFunction
mf
=
_handlers
[
msg
.
handle
];
(
this
->*
mf
)(
msg
);
...
...
@@ -279,6 +279,8 @@ SkylivexWin::SkylivexWin(QString &htmlfile)
registerHandler
((
QString
)
"notify"
,
(
SKHandlerFunction
)
&
SkylivexWin
::
handle_notify
);
registerHandler
((
QString
)
"publicchatrcv"
,
(
SKHandlerFunction
)
&
SkylivexWin
::
handle_chatreceived
);
registerHandler
((
QString
)
"userlist"
,
(
SKHandlerFunction
)
&
SkylivexWin
::
handle_userlist
);
registerHandler
((
QString
)
"changeTelescope"
,
(
SKHandlerFunction
)
&
SkylivexWin
::
handle_changetelescope
);
}
...
...
@@ -296,6 +298,7 @@ SkylivexWin::SkylivexWin()
registerHandler
((
QString
)
"notify"
,
(
SKHandlerFunction
)
&
SkylivexWin
::
handle_notify
);
registerHandler
((
QString
)
"publicchatrcv"
,
(
SKHandlerFunction
)
&
SkylivexWin
::
handle_chatreceived
);
registerHandler
((
QString
)
"userlist"
,
(
SKHandlerFunction
)
&
SkylivexWin
::
handle_userlist
);
registerHandler
((
QString
)
"changeTelescope"
,
(
SKHandlerFunction
)
&
SkylivexWin
::
handle_changetelescope
);
}
...
...
@@ -411,3 +414,11 @@ void SkylivexWin::handle_userlist(SKMessage &msg)
}
}
}
void
SkylivexWin
::
handle_changetelescope
(
SKMessage
&
msg
)
{
if
(
msg
.
parameters
.
size
()
>
0
)
{
jsbridge
->
changeTelescope
(
msg
.
parameters
[
"telescope"
]);
}
}
src/webwin.h
View file @
ec1bc49e
...
...
@@ -132,6 +132,7 @@ class SkylivexWin : public WebWin
void
handle_notify
(
SKMessage
&
msg
);
void
handle_chatreceived
(
SKMessage
&
msg
);
void
handle_userlist
(
SKMessage
&
msg
);
void
handle_changetelescope
(
SKMessage
&
msg
);
private
slots
:
void
refreshJsObject
();
...
...
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