Kstars

skyobjectlite.h
1/*
2 SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com>
3 SPDX-License-Identifier: GPL-2.0-or-later
4*/
5#ifndef SKYOBJECTLITE_H_
6#define SKYOBJECTLITE_H_
7
8#include "skyobject.h"
9#include "skypointlite.h"
10#include <QObject>
11
12/**
13* @class SkyObjectLite
14* Wrapper for SkyObject to allow access of some of its properties from QML
15*
16* @author Artem Fedoskin
17* @version 1.0
18*/
19
21{
23 Q_PROPERTY(QString translatedName READ getTranslatedName NOTIFY translatedNameChanged)
24 public:
25 /** Constructor **/
27
28 /** @short sets SkyObject that is needed to be wrapped **/
29 void setObject(SkyObject *object);
30
31 /** @return translated name of currently wrapped SkyObject **/
33
34 /** @return SkyObject that is being wrapped **/
35 SkyObject *getObject() const { return object; }
36 signals:
37 void translatedNameChanged(QString translatedName);
38
39 private:
40 SkyObject *object;
41};
42#endif
Wrapper for SkyObject to allow access of some of its properties from QML.
SkyObjectLite()
Constructor.
Q_INVOKABLE QString getTranslatedName()
void setObject(SkyObject *object)
sets SkyObject that is needed to be wrapped
SkyObject * getObject() const
Provides all necessary information about an object in the sky: its coordinates, name(s),...
Definition skyobject.h:42
Wrapper for SkyPoint to allow access of some of its properties from QML.
Q_INVOKABLEQ_INVOKABLE
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:11:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.