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
5547d2b7
Commit
5547d2b7
authored
Feb 16, 2013
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separe oplugin header
parent
394b77b8
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
62 additions
and
25 deletions
+62
-25
skproto.cpp
plugins/skproto.cpp
+2
-15
skproto.h
plugins/skproto.h
+48
-0
skproto.pro
plugins/skproto.pro
+4
-4
skylivex.pro
skylivex.pro
+1
-0
mainwin.cpp
src/mainwin.cpp
+1
-1
pluginsinterfaces.h
src/pluginsinterfaces.h
+2
-2
skylivex.cpp
src/skylivex.cpp
+3
-3
skylivex.pro
src/skylivex.pro
+1
-0
No files found.
plugins/skproto.cpp
View file @
5547d2b7
...
...
@@ -32,25 +32,12 @@
* Purpose:
*
*/
#include <QObject>
#include <QtPlugin>
#include "../src/pluginsinterfaces.h"
#include "pluginsinterfaces.h"
#include <iostream>
class
SkyliveProtocol
:
public
QObject
,
SkylivexPluginInterface
{
Q_OBJECT
Q_INTERFACES
(
SkylivexPluginInterface
)
//Q_PLUGIN_METADATA(IID "com.skylivex.SkylivexPlugin/1.0" FILE skproto.json)
public
:
void
startPlugin
();
};
#include "skproto.h"
void
SkyliveProtocol
::
startPlugin
()
{
std
::
cout
<<
"SkyliveProtocol initialized"
<<
std
::
endl
;
}
// Qt 5.0 broke compatibility with old metadata macro
//Q_EXPORT_PLUGIN2(skproto, SkyliveProtocol)
plugins/skproto.h
0 → 100644
View file @
5547d2b7
/* ____ _ _ _ __ __
* / ___|| | ___ _| (_)_ _____\ \/ /
* \___ \| |/ / | | | | \ \ / / _ \\ /
* ___) | <| |_| | | |\ 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:
*
*/
#include <QObject>
#include <QtPlugin>
#include "pluginsinterfaces.h"
class
SkyliveProtocol
:
public
QObject
,
SkylivexPluginInterface
{
Q_OBJECT
Q_PLUGIN_METADATA
(
IID
"com.skylivex.SkylivexPlugin/1.0"
)
Q_INTERFACES
(
SkylivexPluginInterface
)
public
:
void
startPlugin
();
};
plugins/skproto.pro
View file @
5547d2b7
TEMPLATE
=
lib
SOURCES
=
skproto
.
cpp
HEADERS
=
..
/
src
/
pluginsinterfaces
.
h
CONFIG
+=
plugin
HEADERS
=
skproto
.
h
INCLUDEPATH
=
..
/
src
QT
+=
core
network
widgets
DESTDIR
=
..
/
plugins
skylivex.pro
View file @
5547d2b7
TEMPLATE
=
subdirs
SUBDIRS
=
src
/
skylivex
.
pro
\
plugins
/
skproto
.
pro
DESTDIR
=
release
src/mainwin.cpp
View file @
5547d2b7
...
...
@@ -67,5 +67,5 @@ MainWin::~MainWin()
void
MainWin
::
msgFromCore
(
std
::
string
&
msg
)
{
std
::
cout
<<
"Message from core: "
<<
msg
<<
std
::
endl
;
//std::cout << "Message from core: " << msg << std::endl;
}
src/pluginsinterfaces.h
View file @
5547d2b7
...
...
@@ -50,7 +50,7 @@ class SkylivexPluginInterface
};
QT_BEGIN_NAMESPACE
Q_DECLARE_INTERFACE
(
SkylivexPluginInterface
,
"com.skylivex.SkylivexPlugin/1.0"
)
#define skylivexplugin_iid "com.skylivex.SkylivexPlugin/1.0"
Q_DECLARE_INTERFACE
(
SkylivexPluginInterface
,
skylivexplugin_iid
)
QT_END_NAMESPACE
#endif
src/skylivex.cpp
View file @
5547d2b7
...
...
@@ -71,8 +71,8 @@ void SkyliveX::loadPlugins()
foreach
(
QString
fileName
,
pluginsDir
.
entryList
(
QDir
::
Files
))
{
std
::
cout
<<
"Testing "
<<
pluginsDir
.
absoluteFilePath
(
fileName
).
toStdString
()
<<
std
::
endl
;
QPluginLoader
l
oader
(
pluginsDir
.
absoluteFilePath
(
fileName
));
QObject
*
plugin
=
l
oader
.
instance
();
QPluginLoader
pluginL
oader
(
pluginsDir
.
absoluteFilePath
(
fileName
));
QObject
*
plugin
=
pluginL
oader
.
instance
();
if
(
plugin
)
{
std
::
cout
<<
"Loading "
<<
fileName
.
toStdString
()
<<
std
::
endl
;
...
...
@@ -81,7 +81,7 @@ void SkyliveX::loadPlugins()
}
else
{
std
::
cout
<<
l
oader
.
errorString
().
toStdString
()
<<
std
::
endl
;
std
::
cout
<<
pluginL
oader
.
errorString
().
toStdString
()
<<
std
::
endl
;
std
::
cout
<<
plugin
<<
std
::
endl
;
}
}
...
...
src/skylivex.pro
View file @
5547d2b7
...
...
@@ -11,3 +11,4 @@ QT += core network webkitwidgets widgets
OTHER_FILES
+=
\
..
/
gui
/
splash
.
html
\
..
/
gui
/
img
/
logo
.
png
DESTDIR
=
.
/
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