• 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
  • dialogs
locationdialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  locationdialog.h - K Desktop Planetarium
3  -------------------
4  begin : Sun Feb 11 2001
5  copyright : (C) 2001 by Jason Harris
6  email : jharris@30doradus.org
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 #ifndef LOCATIONDIALOG_H_
19 #define LOCATIONDIALOG_H_
20 
44 #include <QLabel>
45 #include <QVBoxLayout>
46 #include <QHBoxLayout>
47 #include <QGridLayout>
48 #include <QTimer>
49 
50 #include <kdialog.h>
51 #include "geolocation.h"
52 
53 namespace Ui {
54 class LocationDialog;
55 }
56 
57 class LocationDialog : public KDialog {
58  Q_OBJECT
59 
60 public:
64  explicit LocationDialog( QWidget* parent );
65 
67  ~LocationDialog();
68 
73  void initCityList( void );
74 
76  GeoLocation* selectedCity() const { return SelectedCity; }
77 
79  QList<GeoLocation*> filteredList() { return filteredCityList; }
80 
86  void findCitiesNear( int longitude, int latitude );
87 
89  QString selectedCityName( void ) const { return SelectedCity->translatedName(); }
90 
92  QString selectedProvinceName( void ) const { return SelectedCity->translatedProvince(); }
93 
95  QString selectedCountryName( void ) const { return SelectedCity->translatedCountry(); }
96 
98  bool addCityEnabled();
99 
100 public slots:
107  void filterCity();
108 
112  void enqueueFilterCity();
113 
117  void changeCity();
118 
123  bool addCity();
124 
125  void clearFields();
126  void showTZRules();
127  void nameChanged();
128  void dataChanged();
129  void slotOk();
130 
131 private:
133  bool checkLongLat( void );
134 
135  bool dataModified, nameModified;
136 
137  Ui::LocationDialog *ui;
138  GeoLocation *SelectedCity;
139  QList<GeoLocation*> filteredCityList;
140  QTimer *timer;
141 };
142 
143 #endif
LocationDialog::initCityList
void initCityList(void)
Initialize list of cities.
Definition: locationdialog.cpp:93
LocationDialog
Dialog for changing the geographic location of the observer.
Definition: locationdialog.h:57
GeoLocation::translatedName
QString translatedName() const
Definition: geolocation.cpp:78
LocationDialog::enqueueFilterCity
void enqueueFilterCity()
Filter by city / province / country only after a few milliseconds.
Definition: locationdialog.cpp:126
LocationDialog::findCitiesNear
void findCitiesNear(int longitude, int latitude)
Show only cities within 3 degrees of point specified by arguments.
Definition: locationdialog.cpp:308
QWidget
LocationDialog::changeCity
void changeCity()
When the selected city in the QListBox changes, repaint the MapCanvas so that the crosshairs icon app...
Definition: locationdialog.cpp:174
KDialog
LocationDialog::filteredList
QList< GeoLocation * > filteredList()
Definition: locationdialog.h:79
geolocation.h
LocationDialog::filterCity
void filterCity()
When text is entered in the City/Province/Country Filter KLineEdits, the List of cities is trimmed to...
Definition: locationdialog.cpp:137
GeoLocation::translatedProvince
QString translatedProvince() const
Definition: geolocation.cpp:88
LocationDialog::showTZRules
void showTZRules()
Definition: locationdialog.cpp:368
LocationDialog::addCityEnabled
bool addCityEnabled()
Definition: locationdialog.cpp:437
LocationDialog::slotOk
void slotOk()
Definition: locationdialog.cpp:432
GeoLocation
Contains all relevant information for specifying a location on Earth: City Name, State/Province name...
Definition: geolocation.h:39
LocationDialog::addCity
bool addCity()
When the "Add new city" QPushButton is clicked, add the manually-entered city information to the user...
Definition: locationdialog.cpp:218
LocationDialog::~LocationDialog
~LocationDialog()
Destructor (empty)
Definition: locationdialog.cpp:89
LocationDialog::nameChanged
void nameChanged()
Definition: locationdialog.cpp:419
LocationDialog::selectedCityName
QString selectedCityName(void) const
Definition: locationdialog.h:89
LocationDialog::LocationDialog
LocationDialog(QWidget *parent)
Constructor.
Definition: locationdialog.cpp:33
LocationDialog::selectedProvinceName
QString selectedProvinceName(void) const
Definition: locationdialog.h:92
LocationDialog::dataChanged
void dataChanged()
Definition: locationdialog.cpp:425
LocationDialog::selectedCity
GeoLocation * selectedCity() const
Definition: locationdialog.h:76
LocationDialog::clearFields
void clearFields()
Definition: locationdialog.cpp:351
GeoLocation::translatedCountry
QString translatedCountry() const
Definition: geolocation.cpp:92
LocationDialog::selectedCountryName
QString selectedCountryName(void) const
Definition: locationdialog.h:95
QList
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