Kstars

printingwizard.cpp
1 /*
2  SPDX-FileCopyrightText: 2011 Rafał Kułaga <[email protected]>
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;
169  fovCaptureDone();
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 
282 void 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 
329 void 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 
396 void 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 
469 void PrintingWizard::updateButtons()
470 {
471  nextB->setEnabled(m_WizardStack->currentIndex() < m_WizardStack->count() - 1);
472  backB->setEnabled(m_WizardStack->currentIndex() > 0);
473 }
474 
475 void 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 
513 void 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 }
bool isSwitchColorsEnabled()
Check if switching to "Sky Chart" color scheme is enabled.
Definition: pwizfovconfig.h:31
void append(const T &value)
T & first()
void exportFov(SkyPoint *point, FOV *fov, QPaintDevice *pd)
Paint FOV representation on passed QPaintDevice subclass.
bool isLoggingFormChecked()
Check if logging form is enabled.
Definition: fov.h:27
SimpleFovExporter class is used for FOV representation exporting. Central point is defined by passed ...
PrintingWizard::FOV_TYPE getFovExportType()
Get selected FOV export method.
Legend::LEGEND_ORIENTATION getLegendOrientation()
Get selected legend orientation.
Definition: pwizfovconfig.h:61
User interface for last "Print and export finder chart" step of the Printing Wizard.
Definition: pwizprint.h:21
QString number(int n, int base)
Class that represents finder chart document. FinderChart class is a subclass of KStarsDocument class,...
Definition: finderchart.h:29
User interface for the first step of the Printing Wizard.
~PrintingWizard() override
Destructor.
virtual void reject()
void insertImage(const QImage &img, const QString &description, bool descriptionBelow=true)
Insert image to the finder chart.
Class that represents single field of view snapshot. FovSnapshot class stores data of single FOV snap...
Definition: fovsnapshot.h:24
void setFovShapeOverriden(bool overrideFovShape)
Enable or disable FOV shape overriding.
User interface for "Configure basic finder chart settings" step of the Printing Wizard.
Stores dms coordinates for a point in the sky. for converting between coordinate systems.
Definition: skypoint.h:44
const QList< FOV * > getVisibleFOVs() const
Definition: kstarsdata.h:305
void setZoomFactor(double factor)
@ Set zoom factor.
Definition: skymap.cpp:1176
void fovCaptureDone()
Disable FOV capture mode.
void setClickedPoint(const SkyPoint *f)
Set the ClickedPoint to the skypoint given as an argument.
Definition: skymap.cpp:996
Helper class used as a wrapper for StarHopper when capturing FOV snapshots.
Definition: shfovexporter.h:21
bool exportPath()
Export FOV snapshots across calculated path.
SkyMap * map() const
Definition: kstars.h:143
int width() const const
void replace(int i, const T &value)
void beginShFovCapture()
Capture FOV snapshots using star hopper-based method.
void beginFovCapture()
Hide Printing Wizard and put SkyMap in FOV capture mode.
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
bool isFovShapeOverriden()
Check if FOV shape is always rectangular.
Definition: pwizfovconfig.h:37
void createCoordinatesTable(SkyObject *obj, const KStarsDateTime &ut, GeoLocation *geo)
Create coordinates details table.
void hide()
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
void updateStepButtons()
Update Next/Previous step buttons.
void entered()
Enable or disable specific fields depending on the type of selected object.
static KStars * Instance()
Definition: kstars.h:125
PWizWelcomeUI(QWidget *parent=nullptr)
Constructor.
void createRSTTAble(SkyObject *obj, const KStarsDateTime &ut, GeoLocation *geo)
Create Rise/Set/Transit details table.
User interface for "Configure common FOV export options" step of the Printing Wizard.
Definition: pwizfovconfig.h:18
PrintingWizard(QWidget *parent=nullptr)
Constructor.
bool isGeneralTableChecked()
Check if general details table is enabled.
int size() const const
User interface for "Select FOV capture method" step of the Printing Wizard.
void rejected()
bool calculatePath(const SkyPoint &src, const SkyPoint &dest, double fov, double maglim)
Calculate path between source and destination SkyPoints.
bool isAlphaBlendingEnabled()
Check if alpha blending is enabled.
Definition: pwizfovconfig.h:49
QString i18n(const char *text, const TYPE &arg...)
QAction * zoom(const QObject *recvr, const char *slot, QObject *parent)
void setWindowFlags(Qt::WindowFlags type)
bool isLegendEnabled()
Check if legend will be added to FOV images.
Definition: pwizfovconfig.h:43
int height() const const
Q_SCRIPTABLE Q_NOREPLY void loadColorScheme(const QString &name)
DBUS interface function.
Definition: kstarsdbus.cpp:607
User interface for "Select observed object" step of the Printing Wizard.
Class that represents logging form. Currently, LoggingForm class is used to create logging forms for ...
Definition: loggingform.h:20
bool isRSTTableChecked()
Check if Rise/Set/Transit details table is enabled.
void createGeneralTable(SkyObject *obj)
Create general details table.
ColorScheme * colorScheme()
Definition: kstarsdata.h:171
GeoLocation * geo()
Definition: kstarsdata.h:229
void insertDetailsTable(DetailsTable *table)
Insert details table to the finder chart.
User interface for "Configure chart contents" step of the Printing Wizard.
void setWindowTitle(const QString &)
const T & at(int i) const const
void setAlpha(int alpha)
void beginShBeginPointing()
Enter star hopping begin pointing mode.
QString fileName() const
Definition: colorscheme.h:91
void setClickedObject(SkyObject *o)
Set the ClickedObject pointer to the argument.
Definition: skymap.cpp:331
bool isEmpty() const const
void setFovSymbolDrawn(bool draw)
Enable or disable FOV symbol drawing.
void addButton(QAbstractButton *button, QDialogButtonBox::ButtonRole role)
User interface for "Manual FOV capture" step of the Printing Wizard.
Definition: pwizfovmanual.h:19
void createFinderChartLogger()
Create simple logging form for finder charts.
Definition: loggingform.cpp:14
QString getFovName()
Get FOV name set by user.
Definition: pwizfovsh.h:39
GeoCoordinates geo(const QVariant &location)
Legend::LEGEND_TYPE getLegendType()
Get selected legend type.
This is the main window for KStars. In addition to the GUI elements, the class contains the program c...
Definition: kstars.h:92
void insertDescription(const QString &description)
Insert description to the finder chart.
Definition: finderchart.cpp:55
void setupUi(QWidget *widget)
User interface for "Browse captured FOV images" step of Printing Wizard.
Definition: pwizfovbrowse.h:19
void setEnabled(bool)
Legend::LEGEND_POSITION getLegendPosition()
Get selected legend position.
Definition: pwizfovconfig.h:70
void slotCenter()
Center the display at the point ClickedPoint.
Definition: skymap.cpp:345
void show()
Represents details tables that can be inserted to finder charts and logging forms....
Definition: detailstable.h:28
bool load(const QString &fileName, const char *format, Qt::ImageConversionFlags flags)
const KStarsDateTime & ut() const
Definition: kstarsdata.h:156
static double calculateZoomLevel(int pixelSize, float degrees)
Calculate zoom level at which given angular length will occupy given length in pixels.
bool isAstComTableChecked()
Check if Asteroid/Comet details table is enabled.
void insertGeoTimeInfo(const KStarsDateTime &ut, GeoLocation *geo)
Insert details about date&time and geographic location.
Definition: finderchart.cpp:71
double getMaglim()
Get magnitude limit set by user.
Definition: pwizfovsh.h:33
void setToolTip(const QString &)
void insertLoggingForm(LoggingForm *log)
Insert logging form to the finder chart.
void setSkyObject(SkyObject *obj)
Update UI elements for newly selected SkyObject.
bool isPositionTableChecked()
Check if position details table is enabled.
void beginPointing()
Set SkyMap to pointing mode and hide Printing Wizard.
QString i18nc(const char *context, const char *text, const TYPE &arg...)
void setDefault(bool)
void insertSectionTitle(const QString &title)
Insert section title to the finder chart.
void pointingDone(SkyObject *obj)
Quit object pointing mode and set the pointed object.
void insertTitleSubtitle(const QString &title, const QString &subtitle)
Insert title and subtitle to the finder chart.
Definition: finderchart.cpp:24
KStarsData * data() const
Definition: kstars.h:137
void information(QWidget *parent, const QString &text, const QString &title=QString(), const QString &dontShowAgainName=QString(), Options options=Notify)
void forceUpdate(bool now=false)
Recalculates the positions of objects in the sky, and then repaints the sky map.
Definition: skymap.cpp:1186
void syncFOV()
Synchronize list of visible FOVs and list of selected FOVs in Options.
void captureFov()
Capture current contents of FOV symbol.
void createAsteroidCometTable(SkyObject *obj)
Create Asteroid/Comet details table.
void setBeginObject(SkyObject *obj)
Set object at which star hopper will begin.
Definition: pwizfovsh.cpp:26
void setLayout(QLayout *layout)
Information about an object in the sky.
Definition: skyobject.h:41
Legend class is used for painting legends on class inheriting QPaintDevice. Its methods enable changi...
Definition: legend.h:32
User interface for "Star hopper FOV snapshot capture" step of the Printing Wizard.
Definition: pwizfovsh.h:20
void recaptureFov(int idx)
Recapture FOV snapshot of passed index.
int addWidget(QWidget *widget)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Aug 8 2022 04:13:23 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.