Kstars

mosaicplanner.cpp
1/*
2 SPDX-FileCopyrightText: 2022 Jasem Mutlaq <mutlaqja@ikarustech.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include <QQuickView>
8#include <klocalizedcontext.h>
9#include <klocalizedstring.h>
10#include <QQmlContext>
11
12#include "mosaicplanner.h"
13#include "Options.h"
14#include "ekos_scheduler_debug.h"
15
16namespace Ekos
17{
18
19MosaicPlanner::MosaicPlanner(QWidget *parent) : QWidget(parent)
20{
21
22 m_FocalLength = Options::telescopeFocalLength();
23 m_CameraSize.setWidth(Options::cameraWidth());
24 m_CameraSize.setHeight(Options::cameraHeight());
25 m_PixelSize.setWidth(Options::cameraPixelWidth());
26 m_PixelSize.setHeight(Options::cameraPixelHeight());
27
28 // QML Stuff
29 m_BaseView = new QQuickView();
30
31 m_BaseView->setTitle(i18n("Mosaic Planner"));
32#ifdef Q_OS_MACOS
33 m_BaseView->setFlags(Qt::Tool | Qt::WindowStaysOnTopHint);
34#else
36#endif
37
38 // Theming?
39 m_BaseView->setColor(Qt::black);
40
41 m_BaseObj = m_BaseView->rootObject();
42
43 m_Ctxt = m_BaseView->rootContext();
44
45 m_Ctxt->setContextObject(new KLocalizedContext(m_BaseView));
46
47 m_Ctxt->setContextProperty("MosaicPlanner", this);
48
49 m_BaseView->setResizeMode(QQuickView::SizeRootObjectToView);
50
51 m_BaseView->setSource(QUrl("qrc:/qml/mosaic/mosaicwizard.qml"));
52
53 m_BaseView->show();
54}
55
56MosaicPlanner::~MosaicPlanner()
57{
58}
59
60}
QString i18n(const char *text, const TYPE &arg...)
Ekos is an advanced Astrophotography tool for Linux.
Definition align.cpp:83
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.