#include <geoip.h>
Public Member Functions | |
GeoIp () | |
GeoIp (QHostAddress ip, float latitude, float longitude, QString city, QString state, QString country) | |
QString | toString () const |
QHostAddress | ip () const |
float | latitude () const |
float | longitude () const |
QString | city () const |
QString | state () const |
QString | country () const |
QString | toLocation () const |
bool | isEmpty () const |
Static Public Member Functions | |
static GeoIp | fromString (QString geoip) |
Private Attributes | |
QHostAddress | _ip |
float | _latitude |
float | _longitude |
QString | _city |
QString | _state |
QString | _country |
Definition at line 35 of file geoip.h.
GeoIp::GeoIp | ( | ) | [inline] |
GeoIp::GeoIp | ( | QHostAddress | ip, | |
float | latitude, | |||
float | longitude, | |||
QString | city, | |||
QString | state, | |||
QString | country | |||
) |
GeoIp GeoIp::fromString | ( | QString | geoip | ) | [static] |
Creates a GeoIp object from a string.
Definition at line 51 of file geoip.cpp.
References city(), country(), GeoIp(), ip(), latitude(), longitude(), and state().
Referenced by GeoIpCacheItem::fromString(), and GeoIpResponse::GeoIpResponse().
QString GeoIp::toString | ( | ) | const |
Builds a comma-delimited string of GeoIp fields.
Definition at line 73 of file geoip.cpp.
References _city, _country, _ip, _latitude, _longitude, and _state.
Referenced by GeoIpCacheItem::toString().
QHostAddress GeoIp::ip | ( | ) | const [inline] |
Returns the IP address for this object.
Definition at line 51 of file geoip.h.
References _ip.
Referenced by GeoIpCache::cache(), GeoIpResolver::disconnected(), fromString(), GeoIpCacheItem::ip(), and NetViewer::resolved().
float GeoIp::latitude | ( | ) | const [inline] |
Returns the latitude coordinate for this IP.
Definition at line 53 of file geoip.h.
References _latitude.
Referenced by fromString(), and NetViewer::resolved().
float GeoIp::longitude | ( | ) | const [inline] |
Returns the longitude coordinate for this IP.
Definition at line 55 of file geoip.h.
References _longitude.
Referenced by fromString(), and NetViewer::resolved().
QString GeoIp::city | ( | ) | const [inline] |
Returns the city in which this IP lives.
Definition at line 57 of file geoip.h.
References _city.
Referenced by fromString().
QString GeoIp::state | ( | ) | const [inline] |
Returns the state or district in which this IP lives.
Definition at line 59 of file geoip.h.
References _state.
Referenced by fromString().
QString GeoIp::country | ( | ) | const [inline] |
Returns the country in which this IP lives.
Definition at line 61 of file geoip.h.
References _country.
Referenced by fromString().
QString GeoIp::toLocation | ( | ) | const |
bool GeoIp::isEmpty | ( | ) | const |
Returns true if the GeoIp object is invalid.
Definition at line 88 of file geoip.cpp.
References _ip, _latitude, and _longitude.
Referenced by GeoIpResponse::GeoIpResponse().
QHostAddress GeoIp::_ip [private] |
float GeoIp::_latitude [private] |
Latitudinal coordinate for this IP's location.
Definition at line 70 of file geoip.h.
Referenced by GeoIp(), isEmpty(), latitude(), and toString().
float GeoIp::_longitude [private] |
Longitudinal coordinate for this IP's location.
Definition at line 71 of file geoip.h.
Referenced by GeoIp(), isEmpty(), longitude(), and toString().
QString GeoIp::_city [private] |
City in which this IP lives.
Definition at line 72 of file geoip.h.
Referenced by city(), GeoIp(), toLocation(), and toString().
QString GeoIp::_state [private] |
State or district in which this IP lives.
Definition at line 73 of file geoip.h.
Referenced by GeoIp(), state(), toLocation(), and toString().
QString GeoIp::_country [private] |
Country in which this IP lives.
Definition at line 74 of file geoip.h.
Referenced by country(), GeoIp(), toLocation(), and toString().