Kstars

printingwizard.cpp
1/*
2 SPDX-FileCopyrightText: 2011 Rafał Kułaga <rl.kulaga@gmail.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "printingwizard.h"
8
9#include <QStackedWidget>
10#include <QPrinter>
11#include <QStandardPaths>
12
13#include "finderchart.h"
14#include "loggingform.h"
15#include "detailstable.h"
16#include "pwizobjectselection.h"
17#include "pwizchartconfig.h"
18#include "pwizfovbrowse.h"
19#include "pwizfovconfig.h"
20#include "pwizfovtypeselection.h"
21#include "pwizfovmanual.h"
22#include "pwizfovsh.h"
23#include "pwizchartcontents.h"
24#include "pwizprint.h"
25#include "projections/projector.h"
26#include "kstars.h"
27#include "kstarsdata.h"
28#include "skymap.h"
29#include "legend.h"
30#include "shfovexporter.h"
31#include "Options.h"
32#include "kspaths.h"
33
35{
36 setupUi(this);
37}
38
40 : QDialog(parent), m_KStars(KStars::Instance()), m_FinderChart(nullptr), m_SkyObject(nullptr), m_FovType(FT_UNDEFINED),
41 m_FovImageSize(QSize(500, 500)), m_ShBeginObject(nullptr), m_PointingShBegin(false), m_SwitchColors(false),
42 m_RecapturingFov(false), m_RecaptureIdx(-1)
43{
44 m_Printer = new QPrinter(QPrinter::ScreenResolution);
45
46 setupWidgets();
47}
48
50{
51 // Clean up
52 if (m_Printer)
53 {
54 delete m_Printer;
55 }
56 if (m_FinderChart)
57 {
58 delete m_FinderChart;
59 }
60
61 qDeleteAll(m_FovSnapshots);
62}
63
65{
66 switch (m_WizardStack->currentIndex())
67 {
68 case PW_OBJECT_SELECTION: // object selection
69 {
70 nextB->setEnabled(m_SkyObject != nullptr);
71 break;
72 }
73 }
74}
75
77{
78 // If there is sky object already selected, center sky map around it
79 if (m_SkyObject)
80 {
81 m_KStars->map()->setClickedObject(m_SkyObject);
82 m_KStars->map()->slotCenter();
83 }
84
85 m_KStars->map()->setObjectPointingMode(true);
86 hide();
87}
88
90{
91 m_PointingShBegin = true;
92
93 if (m_ShBeginObject)
94 {
95 m_KStars->map()->setClickedObject(m_SkyObject);
96 m_KStars->map()->slotCenter();
97 }
98
99 m_KStars->map()->setObjectPointingMode(true);
100 hide();
101}
102
104{
105 if (m_PointingShBegin)
106 {
107 m_ShBeginObject = obj;
108 m_WizFovShUI->setBeginObject(obj);
109 m_PointingShBegin = false;
110 }
111 else
112 {
113 m_SkyObject = obj;
114 m_WizObjectSelectionUI->setSkyObject(obj);
115 }
116
117 show();
118}
119
121{
122 if (m_SkyObject)
123 {
124 slewAndBeginCapture(m_SkyObject);
125 }
126}
127
129{
130 slewAndBeginCapture(center, fov);
131}
132
134{
135 if (m_KStars->data()->getVisibleFOVs().isEmpty())
136 {
137 return;
138 }
139
140 QPixmap pixmap(m_FovImageSize);
141 m_SimpleFovExporter.exportFov(m_KStars->data()->getVisibleFOVs().first(), &pixmap);
142 if (m_WizFovConfigUI->isLegendEnabled())
143 {
144 // Set legend position, orientation and type
145 Legend legend(m_WizFovConfigUI->getLegendOrientation(), m_WizFovConfigUI->getLegendPosition());
146 legend.setType(m_WizFovConfigUI->getLegendType());
147
148 // Check if alpha blending is enabled
149 if (m_WizFovConfigUI->isAlphaBlendingEnabled())
150 {
151 QColor bgColor = legend.getBgColor();
152 bgColor.setAlpha(200);
153 legend.setBgColor(bgColor);
154 }
155
156 // Paint legend
157 legend.paintLegend(&pixmap);
158 }
159 FovSnapshot *snapshot = new FovSnapshot(pixmap, QString(), m_KStars->data()->getVisibleFOVs().first(),
160 m_KStars->map()->getCenterPoint());
161
162 if (m_RecapturingFov)
163 {
164 delete m_FovSnapshots.at(m_RecaptureIdx);
165 m_FovSnapshots.replace(m_RecaptureIdx, snapshot);
166 m_KStars->map()->setFovCaptureMode(false);
167 m_RecapturingFov = false;
168 m_RecaptureIdx = -1;
170 }
171 else
172 {
173 m_FovSnapshots.append(snapshot);
174 }
175}
176
178{
179 //Restore old color scheme if necessary
180 //(if printing was aborted, the ColorScheme is still restored)
181 if (m_SwitchColors)
182 {
183 m_KStars->loadColorScheme(m_PrevSchemeName);
184 m_KStars->map()->forceUpdate();
185 }
186
187 if (m_RecapturingFov)
188 {
189 m_RecapturingFov = false;
190 m_RecaptureIdx = -1;
191 }
192
193 show();
194}
195
197{
198 if (!m_ShBeginObject)
199 {
200 return;
201 }
202
203 ShFovExporter exporter(this, KStars::Instance()->map());
204
205 // Get selected FOV symbol
206 double fovArcmin(0);
207 foreach (FOV *fov, KStarsData::Instance()->getAvailableFOVs())
208 {
209 if (fov->name() == m_WizFovShUI->getFovName())
210 {
211 fovArcmin = qMin(fov->sizeX(), fov->sizeY());
212 break;
213 }
214 }
215
216 // Calculate path and check if it's not empty
217 if (!exporter.calculatePath(*m_SkyObject, *m_ShBeginObject, fovArcmin / 60, m_WizFovShUI->getMaglim()))
218 {
220 i18n("Star hopper returned empty path. We advise you to change star hopping settings "
221 "or use manual capture mode."),
222 i18n("Star hopper failed to find path"));
223 return;
224 }
225
226 // If FOV shape should be overridden, do this now
227 m_SimpleFovExporter.setFovShapeOverriden(m_WizFovConfigUI->isFovShapeOverriden());
228 m_SimpleFovExporter.setFovSymbolDrawn(m_WizFovConfigUI->isFovShapeOverriden());
229
230 // If color scheme should be switched, save previous scheme name and switch to "sky chart" color scheme
231 m_SwitchColors = m_WizFovConfigUI->isSwitchColorsEnabled();
232 m_PrevSchemeName = m_KStars->data()->colorScheme()->fileName();
233 if (m_SwitchColors)
234 {
235 m_KStars->loadColorScheme("chart.colors");
236 }
237
238 // Save previous FOV symbol names and switch to symbol selected by user
239 QStringList prevFovNames = Options::fOVNames();
240 Options::setFOVNames(QStringList(m_WizFovShUI->getFovName()));
241 KStarsData::Instance()->syncFOV();
242 if (KStarsData::Instance()->getVisibleFOVs().isEmpty())
243 {
244 return;
245 }
246
247 // Hide Printing Wizard
248 hide();
249
250 // Draw and export path
251 exporter.exportPath();
252
253 // Restore old color scheme if necessary
254 if (m_SwitchColors)
255 {
256 m_KStars->loadColorScheme(m_PrevSchemeName);
257 m_KStars->map()->forceUpdate();
258 }
259
260 // Update skymap
261 m_KStars->map()->forceUpdate(true);
262
263 // Restore previous FOV symbol names
264 Options::setFOVNames(prevFovNames);
265 KStarsData::Instance()->syncFOV();
266
267 //FIXME: this is _dirty_ workaround to get PrintingWizard displayed in its previous position.
268 QTimer::singleShot(50, this, SLOT(show()));
269}
270
272{
273 // Set recapturing flag and index of the FOV snapshot to replace
274 m_RecapturingFov = true;
275 m_RecaptureIdx = idx;
276
277 // Begin FOV snapshot capture
278 SkyPoint p = m_FovSnapshots.at(m_RecaptureIdx)->getCentralPoint();
279 slewAndBeginCapture(&p, m_FovSnapshots.at(m_RecaptureIdx)->getFov());
280}
281
282void PrintingWizard::slotPrevPage()
283{
284 int currentIdx = m_WizardStack->currentIndex();
285 switch (currentIdx)
286 {
287 case PW_FOV_BROWSE:
288 {
289 switch (m_FovType)
290 {
291 case FT_MANUAL:
292 {
293 m_WizardStack->setCurrentIndex(PW_FOV_MANUAL);
294 break;
295 }
296
297 case FT_STARHOPPER:
298 {
299 m_WizardStack->setCurrentIndex(PW_FOV_SH);
300 break;
301 }
302
303 default:
304 {
305 return;
306 }
307 }
308
309 break;
310 }
311
312 case PW_FOV_SH:
313 {
314 m_WizardStack->setCurrentIndex(PW_FOV_CONFIG);
315 break;
316 }
317
318 default:
319 {
320 m_WizardStack->setCurrentIndex(currentIdx - 1);
321 break;
322 }
323 }
324
326 updateButtons();
327}
328
329void PrintingWizard::slotNextPage()
330{
331 int currentIdx = m_WizardStack->currentIndex();
332 switch (currentIdx)
333 {
334 case PW_FOV_TYPE:
335 {
336 m_FovType = m_WizFovTypeSelectionUI->getFovExportType();
337 m_WizardStack->setCurrentIndex(PW_FOV_CONFIG);
338 break;
339 }
340
341 case PW_FOV_CONFIG:
342 {
343 switch (m_FovType)
344 {
345 case FT_MANUAL:
346 {
347 m_WizardStack->setCurrentIndex(PW_FOV_MANUAL);
348 break;
349 }
350
351 case FT_STARHOPPER:
352 {
353 m_WizardStack->setCurrentIndex(PW_FOV_SH);
354 break;
355 }
356
357 default: // Undefined FOV type - do nothing
358 {
359 return;
360 }
361 }
362
363 break;
364 }
365
366 case PW_FOV_MANUAL:
367 {
368 m_WizardStack->setCurrentIndex(PW_FOV_BROWSE);
369 break;
370 }
371
372 case PW_FOV_BROWSE:
373 {
374 m_WizChartContentsUI->entered();
375 m_WizardStack->setCurrentIndex(PW_CHART_CONTENTS);
376 break;
377 }
378
379 case PW_CHART_CONTENTS:
380 {
381 createFinderChart();
382 m_WizardStack->setCurrentIndex(PW_CHART_PRINT);
383 break;
384 }
385
386 default:
387 {
388 m_WizardStack->setCurrentIndex(currentIdx + 1);
389 }
390 }
391
392 updateButtons();
394}
395
396void PrintingWizard::setupWidgets()
397{
398#ifdef Q_OS_OSX
400#endif
401 m_WizardStack = new QStackedWidget(this);
402
403 setWindowTitle(i18nc("@title:window", "Printing Wizard"));
404
405 QVBoxLayout *mainLayout = new QVBoxLayout;
406 mainLayout->addWidget(m_WizardStack);
407 setLayout(mainLayout);
408
410 mainLayout->addWidget(buttonBox);
411 connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
412
413 nextB = new QPushButton(i18n("&Next >"));
414 nextB->setToolTip(i18n("Go to next Wizard page"));
415 nextB->setDefault(true);
416 backB = new QPushButton(i18n("< &Back"));
417 backB->setToolTip(i18n("Go to previous Wizard page"));
418 backB->setEnabled(false);
419
420 buttonBox->addButton(backB, QDialogButtonBox::ActionRole);
421 buttonBox->addButton(nextB, QDialogButtonBox::ActionRole);
422
423 connect(nextB, SIGNAL(clicked()), this, SLOT(slotNextPage()));
424 connect(backB, SIGNAL(clicked()), this, SLOT(slotPrevPage()));
425
426 // Create step widgets
427 m_WizWelcomeUI = new PWizWelcomeUI(m_WizardStack);
428 m_WizObjectSelectionUI = new PWizObjectSelectionUI(this, m_WizardStack);
429 m_WizChartConfigUI = new PWizChartConfigUI(this);
430 m_WizFovTypeSelectionUI = new PWizFovTypeSelectionUI(this, m_WizardStack);
431 m_WizFovConfigUI = new PWizFovConfigUI(m_WizardStack);
432 m_WizFovManualUI = new PWizFovManualUI(this, m_WizardStack);
433 m_WizFovShUI = new PWizFovShUI(this, m_WizardStack);
434 m_WizFovBrowseUI = new PWizFovBrowseUI(this, m_WizardStack);
435 m_WizChartContentsUI = new PWizChartContentsUI(this, m_WizardStack);
436 m_WizPrintUI = new PWizPrintUI(this, m_WizardStack);
437
438 // Add step widgets to m_WizardStack
439 m_WizardStack->addWidget(m_WizWelcomeUI);
440 m_WizardStack->addWidget(m_WizObjectSelectionUI);
441 m_WizardStack->addWidget(m_WizChartConfigUI);
442 m_WizardStack->addWidget(m_WizFovTypeSelectionUI);
443 m_WizardStack->addWidget(m_WizFovConfigUI);
444 m_WizardStack->addWidget(m_WizFovManualUI);
445 m_WizardStack->addWidget(m_WizFovShUI);
446 m_WizardStack->addWidget(m_WizFovBrowseUI);
447 m_WizardStack->addWidget(m_WizChartContentsUI);
448 m_WizardStack->addWidget(m_WizPrintUI);
449
450 // Set banner images for steps
451 QPixmap bannerImg;
452 if (bannerImg.load(KSPaths::locate(QStandardPaths::AppLocalDataLocation, "wzstars.png")))
453 {
454 m_WizWelcomeUI->banner->setPixmap(bannerImg);
455 m_WizObjectSelectionUI->banner->setPixmap(bannerImg);
456 m_WizChartConfigUI->banner->setPixmap(bannerImg);
457 m_WizFovTypeSelectionUI->banner->setPixmap(bannerImg);
458 m_WizFovConfigUI->banner->setPixmap(bannerImg);
459 m_WizFovManualUI->banner->setPixmap(bannerImg);
460 m_WizFovShUI->banner->setPixmap(bannerImg);
461 m_WizFovBrowseUI->banner->setPixmap(bannerImg);
462 m_WizChartContentsUI->banner->setPixmap(bannerImg);
463 m_WizPrintUI->banner->setPixmap(bannerImg);
464 }
465
466 backB->setEnabled(false);
467}
468
469void PrintingWizard::updateButtons()
470{
471 nextB->setEnabled(m_WizardStack->currentIndex() < m_WizardStack->count() - 1);
472 backB->setEnabled(m_WizardStack->currentIndex() > 0);
473}
474
475void PrintingWizard::slewAndBeginCapture(SkyPoint *center, FOV *fov)
476{
477 if (!center)
478 {
479 return;
480 }
481
482 // If pointer to FOV is passed...
483 if (fov)
484 {
485 // Switch to appropriate FOV symbol
486 Options::setFOVNames(QStringList(fov->name()));
487 m_KStars->data()->syncFOV();
488
489 // Adjust map's zoom level
490 double zoom = m_FovImageSize.width() > m_FovImageSize.height() ?
491 SimpleFovExporter::calculateZoomLevel(m_FovImageSize.width(), fov->sizeX()) :
492 SimpleFovExporter::calculateZoomLevel(m_FovImageSize.height(), fov->sizeY());
493 m_KStars->map()->setZoomFactor(zoom);
494 }
495
496 m_SimpleFovExporter.setFovShapeOverriden(m_WizFovConfigUI->isFovShapeOverriden());
497 m_SimpleFovExporter.setFovSymbolDrawn(m_WizFovConfigUI->isFovShapeOverriden());
498
499 m_SwitchColors = m_WizFovConfigUI->isSwitchColorsEnabled();
500 m_PrevSchemeName = m_KStars->data()->colorScheme()->fileName();
501 if (m_SwitchColors)
502 {
503 m_KStars->loadColorScheme("chart.colors");
504 }
505
506 m_KStars->hideAllFovExceptFirst();
507 m_KStars->map()->setClickedPoint(center);
508 m_KStars->map()->slotCenter();
509 m_KStars->map()->setFovCaptureMode(true);
510 hide();
511}
512
513void PrintingWizard::createFinderChart()
514{
515 // Delete old (if needed) and create new FinderChart
516 if (m_FinderChart)
517 {
518 delete m_FinderChart;
519 }
520 m_FinderChart = new FinderChart;
521
522 // Insert title and subtitle
523 m_FinderChart->insertTitleSubtitle(m_WizChartConfigUI->titleEdit->text(), m_WizChartConfigUI->subtitleEdit->text());
524
525 // Insert description
526 if (!m_WizChartConfigUI->descriptionTextEdit->toPlainText().isEmpty())
527 {
528 m_FinderChart->insertDescription(m_WizChartConfigUI->descriptionTextEdit->toPlainText());
529 }
530
531 // Insert simple finder chart logging form
532 if (m_WizChartContentsUI->isLoggingFormChecked())
533 {
534 LoggingForm chartLogger;
535 chartLogger.createFinderChartLogger();
536 m_FinderChart->insertSectionTitle(i18n("Logging Form"));
537 m_FinderChart->insertLoggingForm(&chartLogger);
538 }
539
540 m_FinderChart->insertSectionTitle(i18n("Field of View Snapshots"));
541
542 // Insert FOV images and descriptions
543 for (int i = 0; i < m_FovSnapshots.size(); i++)
544 {
545 FOV *fov = m_FovSnapshots.at(i)->getFov();
546 QString fovDescription =
547 i18nc("%1 = FOV index, %2 = FOV count, %3 = FOV name, %4 = FOV X size, %5 = FOV Y size",
548 "FOV (%1/%2): %3 (%4' x %5')", QString::number(i + 1), QString::number(m_FovSnapshots.size()),
549 fov->name(), QString::number(fov->sizeX()), QString::number(fov->sizeY())) +
550 "\n";
551 m_FinderChart->insertImage(m_FovSnapshots.at(i)->getPixmap().toImage(),
552 fovDescription + m_FovSnapshots.at(i)->getDescription(), true);
553 }
554
555 if (m_WizChartContentsUI->isGeneralTableChecked() || m_WizChartContentsUI->isPositionTableChecked() ||
556 m_WizChartContentsUI->isRSTTableChecked() || m_WizChartContentsUI->isAstComTableChecked())
557 {
558 m_FinderChart->insertSectionTitle(i18n("Details About Object"));
559 m_FinderChart->insertGeoTimeInfo(KStarsData::Instance()->ut(), KStarsData::Instance()->geo());
560 }
561
562 // Insert details table : general
563 DetailsTable detTable;
564 if (m_WizChartContentsUI->isGeneralTableChecked())
565 {
566 detTable.createGeneralTable(m_SkyObject);
567 m_FinderChart->insertDetailsTable(&detTable);
568 }
569
570 // Insert details table : position
571 if (m_WizChartContentsUI->isPositionTableChecked())
572 {
573 detTable.createCoordinatesTable(m_SkyObject, m_KStars->data()->ut(), m_KStars->data()->geo());
574 m_FinderChart->insertDetailsTable(&detTable);
575 }
576
577 // Insert details table : RST
578 if (m_WizChartContentsUI->isRSTTableChecked())
579 {
580 detTable.createRSTTAble(m_SkyObject, m_KStars->data()->ut(), m_KStars->data()->geo());
581 m_FinderChart->insertDetailsTable(&detTable);
582 }
583
584 // Insert details table : Asteroid/Comet
585 if (m_WizChartContentsUI->isAstComTableChecked())
586 {
587 detTable.createAsteroidCometTable(m_SkyObject);
588 m_FinderChart->insertDetailsTable(&detTable);
589 }
590}
QString fileName() const
Definition colorscheme.h:91
Represents details tables that can be inserted to finder charts and logging forms.
void createRSTTAble(SkyObject *obj, const KStarsDateTime &ut, GeoLocation *geo)
Create Rise/Set/Transit details table.
void createAsteroidCometTable(SkyObject *obj)
Create Asteroid/Comet details table.
void createGeneralTable(SkyObject *obj)
Create general details table.
void createCoordinatesTable(SkyObject *obj, const KStarsDateTime &ut, GeoLocation *geo)
Create coordinates details table.
A simple class encapsulating a Field-of-View symbol.
Definition fov.h:28
Class that represents finder chart document.
Definition finderchart.h:30
void insertDetailsTable(DetailsTable *table)
Insert details table to the finder chart.
void insertDescription(const QString &description)
Insert description to the finder chart.
void insertSectionTitle(const QString &title)
Insert section title to the finder chart.
void insertLoggingForm(LoggingForm *log)
Insert logging form to the finder chart.
void insertTitleSubtitle(const QString &title, const QString &subtitle)
Insert title and subtitle to the finder chart.
void insertImage(const QImage &img, const QString &description, bool descriptionBelow=true)
Insert image to the finder chart.
void insertGeoTimeInfo(const KStarsDateTime &ut, GeoLocation *geo)
Insert details about date&time and geographic location.
Class that represents single field of view snapshot.
Definition fovsnapshot.h:25
ColorScheme * colorScheme()
Definition kstarsdata.h:172
const KStarsDateTime & ut() const
Definition kstarsdata.h:157
void syncFOV()
Synchronize list of visible FOVs and list of selected FOVs in Options.
GeoLocation * geo()
Definition kstarsdata.h:230
const QList< FOV * > getVisibleFOVs() const
Definition kstarsdata.h:306
This is the main window for KStars.
Definition kstars.h:91
SkyMap * map() const
Definition kstars.h:141
static KStars * Instance()
Definition kstars.h:123
KStarsData * data() const
Definition kstars.h:135
Q_SCRIPTABLE Q_NOREPLY void loadColorScheme(const QString &name)
DBUS interface function.
Class that represents logging form.
Definition loggingform.h:21
void createFinderChartLogger()
Create simple logging form for finder charts.
User interface for "Configure basic finder chart settings" step of the Printing Wizard.
User interface for "Configure chart contents" step of the Printing Wizard.
bool isPositionTableChecked()
Check if position details table is enabled.
bool isAstComTableChecked()
Check if Asteroid/Comet details table is enabled.
bool isRSTTableChecked()
Check if Rise/Set/Transit details table is enabled.
bool isGeneralTableChecked()
Check if general details table is enabled.
void entered()
Enable or disable specific fields depending on the type of selected object.
bool isLoggingFormChecked()
Check if logging form is enabled.
User interface for "Browse captured FOV images" step of Printing Wizard.
User interface for "Configure common FOV export options" step of the Printing Wizard.
bool isLegendEnabled()
Check if legend will be added to FOV images.
bool isAlphaBlendingEnabled()
Check if alpha blending is enabled.
bool isFovShapeOverriden()
Check if FOV shape is always rectangular.
Legend::LEGEND_POSITION getLegendPosition()
Get selected legend position.
Legend::LEGEND_TYPE getLegendType()
Get selected legend type.
Legend::LEGEND_ORIENTATION getLegendOrientation()
Get selected legend orientation.
bool isSwitchColorsEnabled()
Check if switching to "Sky Chart" color scheme is enabled.
User interface for "Manual FOV capture" step of the Printing Wizard.
User interface for "Star hopper FOV snapshot capture" step of the Printing Wizard.
Definition pwizfovsh.h:21
QString getFovName()
Get FOV name set by user.
Definition pwizfovsh.h:39
void setBeginObject(SkyObject *obj)
Set object at which star hopper will begin.
Definition pwizfovsh.cpp:26
double getMaglim()
Get magnitude limit set by user.
Definition pwizfovsh.h:33
User interface for "Select FOV capture method" step of the Printing Wizard.
PrintingWizard::FOV_TYPE getFovExportType()
Get selected FOV export method.
User interface for "Select observed object" step of the Printing Wizard.
void setSkyObject(SkyObject *obj)
Update UI elements for newly selected SkyObject.
User interface for last "Print and export finder chart" step of the Printing Wizard.
Definition pwizprint.h:22
User interface for the first step of the Printing Wizard.
PWizWelcomeUI(QWidget *parent=nullptr)
Constructor.
PrintingWizard(QWidget *parent=nullptr)
Constructor.
void fovCaptureDone()
Disable FOV capture mode.
void recaptureFov(int idx)
Recapture FOV snapshot of passed index.
void beginFovCapture()
Hide Printing Wizard and put SkyMap in FOV capture mode.
void beginPointing()
Set SkyMap to pointing mode and hide Printing Wizard.
~PrintingWizard() override
Destructor.
void updateStepButtons()
Update Next/Previous step buttons.
void beginShBeginPointing()
Enter star hopping begin pointing mode.
void pointingDone(SkyObject *obj)
Quit object pointing mode and set the pointed object.
void captureFov()
Capture current contents of FOV symbol.
void beginShFovCapture()
Capture FOV snapshots using star hopper-based method.
Helper class used as a wrapper for StarHopper when capturing FOV snapshots.
bool calculatePath(const SkyPoint &src, const SkyPoint &dest, double fov, double maglim)
Calculate path between source and destination SkyPoints.
bool exportPath()
Export FOV snapshots across calculated path.
SimpleFovExporter class is used for FOV representation exporting.
void setFovSymbolDrawn(bool draw)
Enable or disable FOV symbol drawing.
static double calculateZoomLevel(int pixelSize, float degrees)
Calculate zoom level at which given angular length will occupy given length in pixels.
void exportFov(SkyPoint *point, FOV *fov, QPaintDevice *pd)
Paint FOV representation on passed QPaintDevice subclass.
void setFovShapeOverriden(bool overrideFovShape)
Enable or disable FOV shape overriding.
void setZoomFactor(double factor)
@ Set zoom factor.
Definition skymap.cpp:1167
void setClickedPoint(const SkyPoint *f)
Set the ClickedPoint to the skypoint given as an argument.
Definition skymap.cpp:1012
void setClickedObject(SkyObject *o)
Set the ClickedObject pointer to the argument.
Definition skymap.cpp:366
void forceUpdate(bool now=false)
Recalculates the positions of objects in the sky, and then repaints the sky map.
Definition skymap.cpp:1177
void slotCenter()
Center the display at the point ClickedPoint.
Definition skymap.cpp:380
Provides all necessary information about an object in the sky: its coordinates, name(s),...
Definition skyobject.h:42
The sky coordinates of a point in the sky.
Definition skypoint.h:45
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
GeoCoordinates geo(const QVariant &location)
void information(QWidget *parent, const QString &text, const QString &title=QString(), const QString &dontShowAgainName=QString(), Options options=Notify)
QAction * zoom(const QObject *recvr, const char *slot, QObject *parent)
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
void setAlpha(int alpha)
virtual void reject()
void rejected()
QPushButton * addButton(StandardButton button)
void append(QList< T > &&value)
const_reference at(qsizetype i) const const
T & first()
bool isEmpty() const const
void replace(qsizetype i, parameter_type value)
qsizetype size() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool load(const QString &fileName, const char *format, Qt::ImageConversionFlags flags)
void setDefault(bool)
int height() const const
int width() const const
int addWidget(QWidget *widget)
QString number(double n, char format, int precision)
void setEnabled(bool)
void hide()
void setLayout(QLayout *layout)
void setupUi(QWidget *widget)
void show()
void setToolTip(const QString &)
void setWindowFlags(Qt::WindowFlags type)
void setWindowTitle(const QString &)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 12 2024 12:00:41 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.