• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
  • printing
pwizfovsh.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  pwizfovsh.cpp - K Desktop Planetarium
3  -------------------
4  begin : Mon Aug 15 2011
5  copyright : (C) 2011 by Rafał Kułaga
6  email : rl.kulaga@gmail.com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #include "pwizfovsh.h"
19 #include "printingwizard.h"
20 #include "dialogs/finddialog.h"
21 #include "pwizobjectselection.h"
22 #include "kstars/kstarsdata.h"
23 #include "dialogs/detaildialog.h"
24 #include <QPointer>
25 
26 PWizFovShUI::PWizFovShUI(PrintingWizard *wizard, QWidget *parent) : QFrame(parent),
27  m_ParentWizard(wizard)
28 {
29  setupUi(this);
30 
31  setupWidgets();
32  setupConnections();
33 }
34 
35 void PWizFovShUI::setBeginObject(SkyObject *obj)
36 {
37  m_ParentWizard->setShBeginObject(obj);
38  objInfoLabel->setText(PWizObjectSelectionUI::objectInfoString(obj));
39  objInfoLabel->setVisible(true);
40  detailsButton->setVisible(true);
41  captureButton->setEnabled(true);
42 }
43 
44 void PWizFovShUI::slotSelectFromList()
45 {
46  QPointer<FindDialog> findDlg( new FindDialog( this ) );
47  if(findDlg->exec() == QDialog::Accepted && findDlg)
48  {
49  SkyObject *obj = findDlg->selectedObject();
50  if(obj)
51  {
52  setBeginObject(obj);
53  }
54  }
55  delete findDlg;
56 }
57 
58 void PWizFovShUI::slotPointObject()
59 {
60  m_ParentWizard->beginShBeginPointing();
61 }
62 
63 void PWizFovShUI::slotDetails()
64 {
65  if(m_ParentWizard->getShBeginObject())
66  {
67  QPointer<DetailDialog> detailDlg( new DetailDialog( m_ParentWizard->getShBeginObject(), KStars::Instance()->data()->ut(),
68  KStars::Instance()->data()->geo(), this ) );
69  detailDlg->exec();
70  delete detailDlg;
71  }
72 }
73 
74 void PWizFovShUI::slotBeginCapture()
75 {
76  m_ParentWizard->beginShFovCapture();
77 }
78 
79 void PWizFovShUI::setupWidgets()
80 {
81  QStringList fovNames;
82  foreach(FOV *fov, KStarsData::Instance()->getAvailableFOVs())
83  {
84  fovNames.append(fov->name());
85  }
86  fovCombo->addItems(fovNames);
87 
88  objInfoLabel->setVisible(false);
89  detailsButton->setVisible(false);
90  captureButton->setEnabled(false);
91 }
92 
93 void PWizFovShUI::setupConnections()
94 {
95  connect(selectFromListButton, SIGNAL(clicked()), this, SLOT(slotSelectFromList()));
96  connect(pointButton, SIGNAL(clicked()), this, SLOT(slotPointObject()));
97  connect(captureButton, SIGNAL(clicked()), this, SLOT(slotBeginCapture()));
98  connect(detailsButton, SIGNAL(clicked()), this, SLOT(slotDetails()));
99 }
100 
101 
DetailDialog
window showing detailed information for a selected object.
Definition: detaildialog.h:88
FOV
class encapulating a Field-of-View symbol
Definition: fov.h:32
detaildialog.h
PrintingWizard::getShBeginObject
SkyObject * getShBeginObject()
Get object at which star hopping will begin.
Definition: printingwizard.h:153
QWidget
KStarsData::Instance
static KStarsData * Instance()
Definition: kstarsdata.h:92
KStars::Instance
static KStars * Instance()
Definition: kstars.h:125
PrintingWizard::beginShBeginPointing
void beginShBeginPointing()
Enter star hopping begin pointing mode.
Definition: printingwizard.cpp:97
KStarsData::geo
GeoLocation * geo()
Definition: kstarsdata.h:164
pwizfovsh.h
PrintingWizard
Class representing Printing Wizard for KStars printed documents (currently only finder charts)...
Definition: printingwizard.h:66
printingwizard.h
PrintingWizard::setShBeginObject
void setShBeginObject(SkyObject *obj)
Set SkyObject at which star hopper will begin.
Definition: printingwizard.h:165
PrintingWizard::beginShFovCapture
void beginShFovCapture()
Capture FOV snapshots using star hopper-based method.
Definition: printingwizard.cpp:198
finddialog.h
KStars::data
KStarsData * data() const
Definition: kstars.h:131
PWizFovShUI::PWizFovShUI
PWizFovShUI(PrintingWizard *wizard, QWidget *parent=0)
Constructor.
Definition: pwizfovsh.cpp:26
pwizobjectselection.h
FOV::name
QString name() const
Definition: fov.h:46
PWizObjectSelectionUI::objectInfoString
static QString objectInfoString(SkyObject *obj)
Static function: get QString with basic information about SkyObject.
Definition: pwizobjectselection.cpp:88
kstarsdata.h
KStarsData::ut
const KStarsDateTime & ut() const
Definition: kstarsdata.h:140
SkyObject
Provides all necessary information about an object in the sky: its coordinates, name(s), type, magnitude, and QStringLists of URLs for images and webpages regarding the object.
Definition: skyobject.h:46
QFrame
PWizFovShUI::setBeginObject
void setBeginObject(SkyObject *obj)
Set object at which star hopper will begin.
Definition: pwizfovsh.cpp:35
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal