Split jsbridge headers from mainwin

parent 3e0c50be
/* ____ _ _ _ __ __
* / ___|| | ___ _| (_)_ _____\ \/ /
* \___ \| |/ / | | | | \ \ / / _ \\ /
* ___) | <| |_| | | |\ 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:
*
* Purpose:
*
*/
#ifndef JSBRIDGE_H
#define JSBRIDGE_H
#include <QObject>
#include <QStrings>
class MainWin; // forward declaration for typedef
/*
* class JSBridge
* This class connect the javascript object SkyliveX
* to c++
*/
class JSBridge : public QObject
{
Q_OBJECT
public:
MainWin* mwin;
void changePageContent(QString elementid, QString content);
signals:
void changeContent(QString elementid, QString content);
void notify(QString content);
void alertmsg(QString content);
void public_received(QString user, QString content);
public slots:
void pushLogin(QString username, QString password);
void resizeWin(int width, int height);
void toggleBorders(bool borders);
void toggleTransparentBackground(bool transparentbg);
};
#endif
......@@ -42,39 +42,13 @@
#include <QString>
#include <QObject>
#include <ipcmsg.h>
#include "jsbridge.h"
class MainWin; // forward declaration for typedef
// This is for member pointers to map messages
typedef void (MainWin::*SKHandlerFunction)(SKMessage&);
//typedef int (MainWin::*SKHandlerFunction)(SKMessage&);
/*
* class JSBridge
* This class connect the javascript object SkyliveX
* to c++
*/
class JSBridge : public QObject
{
Q_OBJECT
public:
MainWin* mwin;
void changePageContent(QString elementid, QString content);
signals:
void changeContent(QString elementid, QString content);
void notify(QString content);
void alertmsg(QString content);
void public_received(QString user, QString content);
public slots:
void pushLogin(QString username, QString password);
void resizeWin(int width, int height);
void toggleBorders(bool borders);
void toggleTransparentBackground(bool transparentbg);
};
/*
* class MainWin
......
......@@ -6,7 +6,9 @@ SOURCES = main.cpp \
HEADERS = skylivex.h \
mainwin.h \
pluginsinterfaces.h \
ipcmsg.h
ipcmsg.h \
sksettings.h \
jsbridge.h
QT += core network webkitwidgets widgets
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment