26 #ifndef DIGIKAM_INAT_TALKER_H
27 #define DIGIKAM_INAT_TALKER_H
36 #include <QNetworkReply>
37 #include <QNetworkCookie>
46 class QProgressDialog;
57 class ApiTokenRequest;
73 : m_observationId(-1),
86 int q,
const QString& userName)
87 : m_observationId(-1),
88 m_totalImages (imgs.count()),
115 : m_observationPhotoId(-1),
122 m_observationPhotoId(obsPhId),
136 : m_observationId (-1),
139 m_distanceMeters (-1.0),
141 m_referenceTaxon (0),
142 m_referenceLatitude (0.0),
143 m_referenceLongitude(0.0)
150 double distanceMeters,
153 double referenceLatitude,
154 double referenceLongitude)
155 : m_observationId (id),
156 m_latitude (latitude),
157 m_longitude (longitude),
158 m_distanceMeters (distanceMeters),
159 m_obscured (obscured),
160 m_referenceTaxon (taxon),
161 m_referenceLatitude (referenceLatitude),
162 m_referenceLongitude (referenceLongitude)
169 double distanceMeters)
171 m_observationId = id;
172 m_latitude = latitude;
173 m_longitude = longitude;
174 m_distanceMeters = distanceMeters;
179 return (m_observationId != -1);
193 const QString& serviceName,
199 void removeUserName(
const QString& userName);
204 bool stillUploading()
const;
209 int apiTokenExpiresIn()
const;
214 bool restoreApiToken(
const QString& username,
221 void loadUrl(
const QUrl& url,
int retries = 0);
226 void taxonAutoCompletions(
const QString& partialName);
236 void nearbyPlaces(
double latitude,
double longitude);
241 void closestObservation(uint taxon,
double latitude,
double longitude,
242 double radius_km = 10.0,
243 const QString& origQuery = QString());
248 void computerVision(
const QUrl& localImage);
259 void verifyCreateObservation(
const QByteArray&,
261 int page,
int retries);
266 void deleteObservation(
int id,
const QString& apiKey,
int retries = 0);
297 const QString& name,
const QUrl& iconUrl);
302 QString tmpFileName(
const QString& path);
307 void slotFinished(QNetworkReply* reply);
315 friend class UserRequest;
316 friend class LoadUrlRequest;
317 friend class AutoCompletionRequest;
318 friend class NearbyPlacesRequest;
319 friend class NearbyObservationRequest;
320 friend class ComputerVisionRequest;
Definition: inattalker.h:62
void signalTaxonAutoCompletions(const AutoCompletions &)
QProgressDialog * m_authProgressDlg
Definition: inattalker.h:281
void signalObservationCreated(const INatTalker::PhotoUploadRequest &)
void signalObservationDeleted(int id)
void signalNearbyPlaces(const QStringList &)
void signalNearbyObservation(const INatTalker::NearbyObservation &)
void signalLoadUrlSucceeded(const QUrl &, const QByteArray &)
void signalBusy(bool val)
void signalLinkingSucceeded(const QString &login, const QString &name, const QUrl &iconUrl)
void signalLinkingFailed(const QString &error)
void signalPhotoUploaded(const INatTalker::PhotoUploadResult &)
void signalComputerVisionResults(const ImageScores &)
Definition: dinfointerface.h:56
Definition: inatbrowserdlg.cpp:64
QPair< QString, QList< Taxon > > AutoCompletions
Definition: inatsuggest.h:47
QPair< QString, QList< ComputerVisionScore > > ImageScores
Definition: inatscore.h:75
Definition: datefolderview.cpp:43
Definition: inattalker.h:133
double m_longitude
Definition: inattalker.h:184
double m_latitude
Definition: inattalker.h:183
bool isValid() const
Definition: inattalker.h:177
double m_referenceLongitude
Definition: inattalker.h:189
double m_distanceMeters
Definition: inattalker.h:185
NearbyObservation()
Definition: inattalker.h:135
uint m_referenceTaxon
Definition: inattalker.h:187
int m_observationId
Definition: inattalker.h:182
void updateObservation(int id, double latitude, double longitude, double distanceMeters)
Definition: inattalker.h:166
bool m_obscured
Definition: inattalker.h:186
double m_referenceLatitude
Definition: inattalker.h:188
NearbyObservation(int id, double latitude, double longitude, double distanceMeters, bool obscured, uint taxon, double referenceLatitude, double referenceLongitude)
Definition: inattalker.h:147
Definition: inattalker.h:71
QList< QUrl > m_images
Definition: inattalker.h:100
int m_totalImages
Definition: inattalker.h:99
int m_quality
Definition: inattalker.h:106
int m_observationId
Definition: inattalker.h:98
int m_maxDim
Definition: inattalker.h:105
bool m_rescale
Definition: inattalker.h:104
bool m_updateIds
Definition: inattalker.h:103
PhotoUploadRequest(const QList< QUrl > &imgs, bool updId, bool resize, int mxDim, int q, const QString &userName)
Definition: inattalker.h:82
QString m_user
Definition: inattalker.h:102
QString m_apiKey
Definition: inattalker.h:101
PhotoUploadRequest()
Definition: inattalker.h:72
Definition: inattalker.h:113
int m_observationPhotoId
Definition: inattalker.h:128
PhotoUploadRequest m_request
Definition: inattalker.h:127
int m_photoId
Definition: inattalker.h:129
PhotoUploadResult(const PhotoUploadRequest &req, int obsPhId, int phId)
Definition: inattalker.h:120
PhotoUploadResult()
Definition: inattalker.h:114