Skip to content

Commit

Permalink
Start documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jmeyers314 committed Jan 23, 2025
1 parent aa589cb commit 5c29582
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 26 deletions.
66 changes: 49 additions & 17 deletions plugins/MosaicCamera/src/MosaicCamera.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,39 +21,71 @@

#include "StelModule.hpp"
#include "StelPluginInterface.hpp"
#include <QColor>
#include <QVector>
#include <QObject>
#include <QPointF>
#include <QSettings>
#include <QString>

class MosaicCameraDialog;

struct PolygonSet {
QString name;
QVector<QVector<QPointF>> corners;
QColor color;
/*! @defgroup mosaicCamera Mosaic Camera plug-in
@{
The Mosaic Camera plugin overlays camera sensor boundaries on the sky.
@}
*/

/// @brief Represents a set of polygons with associated properties.
struct PolygonSet
{
QString name; ///< The name of the polygon set.
QVector<QVector<QPointF>> corners; ///< Polygons as vectors of corner points.
QColor color; ///< Color associated with the polygon set.
};

struct Camera {
QString name;
double ra;
double dec;
double rotation;
bool visible;
QVector<PolygonSet> polygon_sets;

/// @brief Represents a camera with its properties and associated polygon sets.
struct Camera
{
QString name; ///< The name of the camera.
double ra; ///< Right Ascension of camera pointing [deg]
double dec; ///< Declination of camera pointing [deg]
double rotation; ///< Rotation angle of the camera [deg]
bool visible; ///< Visibility status of the camera.
QVector<PolygonSet> polygon_sets; ///< Collection of polygon sets associated with the camera.
};

//! @class MosaicCamera
//! @ingroup mosaicCamera
//! Main class of the Mosaic Camera plug-in.
//! @author Josh Meyers
class MosaicCamera : public StelModule
{
Q_OBJECT
/**
* @name Camera properties
* @{
* We maintain the concept of a "current" camera primarily for the convenience of
* setting and getting properties through the Stellarium Remove Control HTTP API.
*/

/// @property currentCamera
/// @brief The name of the current camera
Q_PROPERTY(QString currentCamera READ getCurrentCamera WRITE setCurrentCamera )

/// @property ra
/// @brief Set or get the current camera's right ascension [deg]
Q_PROPERTY(double ra READ getRA WRITE setRA )

/// @property dec
/// @brief Set or get the current camera's declination [deg]
Q_PROPERTY(double dec READ getDec WRITE setDec )

/// @property rotation
/// @brief Set or get the current camera's rotation [deg]
Q_PROPERTY(double rotation READ getRotation WRITE setRotation )

/// @property visible
/// @brief Set or get the current camera's visibility
Q_PROPERTY(bool visible READ getVisibility WRITE setVisibility )

/** @} */

public:
MosaicCamera();
~MosaicCamera() override;
Expand Down
14 changes: 6 additions & 8 deletions plugins/MosaicCamera/src/gui/MosaicCameraDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/

// #include <QFileDialog>

#include "StelApp.hpp"
#include "ui_mosaicCameraDialog.h"
#include "MosaicCameraDialog.hpp"
#include "MosaicCamera.hpp"
#include "StelModuleMgr.hpp"
#include "StelStyle.hpp"
#include "MosaicCameraDialog.hpp"
#include "ui_mosaicCameraDialog.h"

#include "StelGui.hpp"
#include "StelTranslator.hpp"

#include "StelApp.hpp"
#include "StelModule.hpp"
#include "StelModuleMgr.hpp"

MosaicCameraDialog::MosaicCameraDialog()
: StelDialog("MosaicCamera")
Expand Down
1 change: 0 additions & 1 deletion plugins/MosaicCamera/src/gui/MosaicCameraDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "MosaicCamera.hpp"

class Ui_mosaicCameraDialog;
class QTimer;
class MosaicCamera;

class MosaicCameraDialog : public StelDialog
Expand Down

0 comments on commit 5c29582

Please sign in to comment.