Kstars

mosaicplanner.cpp
1 /*
2  SPDX-FileCopyrightText: 2022 Jasem Mutlaq <[email protected]>
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 
16 namespace Ekos
17 {
18 
19 MosaicPlanner::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_OSX
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 
56 MosaicPlanner::~MosaicPlanner()
57 {
58 }
59 
60 }
Ekos is an advanced Astrophotography tool for Linux. It is based on a modular extensible framework to...
Definition: align.cpp:70
QString i18n(const char *text, const TYPE &arg...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 12 2022 04:00:55 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.