kstars
#include <locationdialog.h>

Public Slots | |
bool | addCity () |
void | changeCity () |
void | clearFields () |
void | dataChanged () |
void | enqueueFilterCity () |
void | filterCity () |
void | nameChanged () |
void | showTZRules () |
void | slotOk () |
Public Member Functions | |
LocationDialog (QWidget *parent) | |
~LocationDialog () | |
bool | addCityEnabled () |
QList< GeoLocation * > | filteredList () |
void | findCitiesNear (int longitude, int latitude) |
void | initCityList (void) |
GeoLocation * | selectedCity () const |
QString | selectedCityName (void) const |
QString | selectedCountryName (void) const |
QString | selectedProvinceName (void) const |
Detailed Description
Dialog for changing the geographic location of the observer.
The dialog is divided into two sections.
The top section allows the location to be selected from a database of 2000 cities. It contains a MapCanvas (showing map of the globe with cities overlaid, with a handler for mouse clicks), a QListBox containing the names of cities in the database, and three KLineEdit widgets, which allow the user to filter the List by the name of the City, Province, and Country. In addition, the List can be filtered by location, by clicking anywhere in the MapCanvas. Doing so will display cities within 2 degrees of the clicked position.
The bottom section allows the location to be specified manually. The Longitude, Latitude, City name, Province/State name, and Country name are entered into KLineEdits. There is also a QPushButton for adding the location to the custom Cities database. If the user selects "Add" without filling in all of the manual entry fields, an error message is displayed. Geographic Location dialog
- Version
- 1.0
Definition at line 57 of file locationdialog.h.
Constructor & Destructor Documentation
|
explicit |
Constructor.
Create all widgets, and pack them into QLayouts. Connect Signals to Slots. Run initCityList().
Definition at line 33 of file locationdialog.cpp.
LocationDialog::~LocationDialog | ( | ) |
Destructor (empty)
Definition at line 89 of file locationdialog.cpp.
Member Function Documentation
|
slot |
When the "Add new city" QPushButton is clicked, add the manually-entered city information to the user's custom city database.
- Returns
- true on success
Definition at line 218 of file locationdialog.cpp.
bool LocationDialog::addCityEnabled | ( | ) |
- Returns
- true if the AddCityBUtton is enabled
Definition at line 437 of file locationdialog.cpp.
|
slot |
When the selected city in the QListBox changes, repaint the MapCanvas so that the crosshairs icon appears on the newly selected city.
Definition at line 174 of file locationdialog.cpp.
|
slot |
Definition at line 351 of file locationdialog.cpp.
|
slot |
Definition at line 425 of file locationdialog.cpp.
|
slot |
Filter by city / province / country only after a few milliseconds.
Definition at line 126 of file locationdialog.cpp.
|
slot |
When text is entered in the City/Province/Country Filter KLineEdits, the List of cities is trimmed to show only cities beginning with the entered text.
Also, the QMemArray of ID numbers is kept in sync with the filtered list.
Definition at line 137 of file locationdialog.cpp.
|
inline |
- Returns
- pointer to the List of filtered city pointers.
Definition at line 79 of file locationdialog.h.
void LocationDialog::findCitiesNear | ( | int | longitude, |
int | latitude | ||
) |
Show only cities within 3 degrees of point specified by arguments.
- Parameters
-
longitude the longitude of the search point (int) latitude the latitude of the search point (int)
Definition at line 308 of file locationdialog.cpp.
void LocationDialog::initCityList | ( | void | ) |
Initialize list of cities.
Note that the database is not read in here, that is done in the KStars constructor. This simply loads the local QListBox with the names of the cities from the kstarsData object.
Definition at line 93 of file locationdialog.cpp.
|
slot |
Definition at line 419 of file locationdialog.cpp.
|
inline |
- Returns
- pointer to the highlighted city in the List.
Definition at line 76 of file locationdialog.h.
|
inline |
- Returns
- the city name of the selected location.
Definition at line 89 of file locationdialog.h.
|
inline |
- Returns
- the country name of the selected location.
Definition at line 95 of file locationdialog.h.
|
inline |
- Returns
- the province name of the selected location.
Definition at line 92 of file locationdialog.h.
|
slot |
Definition at line 368 of file locationdialog.cpp.
|
slot |
Definition at line 432 of file locationdialog.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:22 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.