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
c7aac7f8
Commit
c7aac7f8
authored
Feb 24, 2013
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Splig jsbridge.cpp from mainwin.cpp
parent
4323ba56
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
30 deletions
+70
-30
jsbridge.cpp
src/jsbridge.cpp
+69
-0
mainwin.cpp
src/mainwin.cpp
+1
-30
No files found.
src/jsbridge.cpp
0 → 100644
View file @
c7aac7f8
/* ____ _ _ _ __ __
* / ___|| | ___ _| (_)_ _____\ \/ /
* \___ \| |/ / | | | | \ \ / / _ \\ /
* ___) | <| |_| | | |\ V / __// \ Remote Telescopes
* |____/|_|\_\\__, |_|_| \_/ \___/_/\_\ For the masses
* |___/
*
* Copyright (C) 2013 Franco (nextime) Lanza <nextime@nexlab.it>
* Copyright (C) 2013 Ivan Bellia <skylive@skylive.it>
*
* All rights reserved.
*
* This file is part of SkyliveX.
*
* SkyliveX is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Foobar is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Foobar. If not, see <http://www.gnu.org/licenses/>.
*
********************************************************************
*
* File: splashpage.cpp
*
* Purpose:
*
*/
#include <QString>
#include <iostream>
#include "ipcmsg.h"
#include "jsbridge.h"
void
JSBridge
::
changePageContent
(
QString
elementid
,
QString
content
)
{
emit
changeContent
(
elementid
,
content
);
}
void
JSBridge
::
pushLogin
(
QString
username
,
QString
password
)
{
std
::
cout
<<
"pushLogin called from JS"
<<
std
::
endl
;
SKMessage
loginmsg
(
"putlogin"
);
loginmsg
.
parameters
.
insert
(
"username"
,
username
);
loginmsg
.
parameters
.
insert
(
"password"
,
password
);
mwin
->
sendMessage
(
loginmsg
);
}
void
JSBridge
::
resizeWin
(
int
width
,
int
height
)
{
mwin
->
resize
(
width
,
height
);
}
void
JSBridge
::
toggleBorders
(
bool
borders
)
{
mwin
->
toggleBorders
(
borders
);
}
void
JSBridge
::
toggleTransparentBackground
(
bool
transparentbg
)
{
mwin
->
toggleTransparentBackground
(
transparentbg
);
}
src/mainwin.cpp
View file @
c7aac7f8
...
...
@@ -43,6 +43,7 @@
#include <QDragMoveEvent>
#include <iostream>
#include "ipcmsg.h"
#include "jsbridge.h"
#define SENDER "maingui"
...
...
@@ -268,33 +269,3 @@ void MainWin::handle_chatreceived(SKMessage &msg)
}
}
void
JSBridge
::
changePageContent
(
QString
elementid
,
QString
content
)
{
emit
changeContent
(
elementid
,
content
);
}
void
JSBridge
::
pushLogin
(
QString
username
,
QString
password
)
{
std
::
cout
<<
"pushLogin called from JS"
<<
std
::
endl
;
SKMessage
loginmsg
(
"putlogin"
);
loginmsg
.
parameters
.
insert
(
"username"
,
username
);
loginmsg
.
parameters
.
insert
(
"password"
,
password
);
mwin
->
sendMessage
(
loginmsg
);
}
void
JSBridge
::
resizeWin
(
int
width
,
int
height
)
{
mwin
->
resize
(
width
,
height
);
}
void
JSBridge
::
toggleBorders
(
bool
borders
)
{
mwin
->
toggleBorders
(
borders
);
}
void
JSBridge
::
toggleTransparentBackground
(
bool
transparentbg
)
{
mwin
->
toggleTransparentBackground
(
transparentbg
);
}
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