#include <VP1WebWatcher.h>
Definition at line 29 of file VP1WebWatcher.h.
◆ RESULT
| Enumerator |
|---|
| UNKNOWN | |
| INVALID_URL | |
| CONNECTION_PROBLEMS | |
| NOT_ON_SERVER | |
| EXISTS | |
Definition at line 49 of file VP1WebWatcher.h.
◆ VP1WebWatcher() [1/2]
| VP1WebWatcher::VP1WebWatcher |
( |
int | recheckInterval_ms = 30000, |
|
|
QObject * | parent = 0 ) |
Definition at line 177 of file VP1WebWatcher.cxx.
178 : QObject(parent),
m_d(
new Imp(
this,recheckInterval_ms))
179{
180 startTimer(recheckInterval_ms);
181}
◆ VP1WebWatcher() [2/2]
| VP1WebWatcher::VP1WebWatcher |
( |
const QStringList & | urls, |
|
|
int | recheckInterval_ms = 30000, |
|
|
QObject * | parent = 0 ) |
Definition at line 184 of file VP1WebWatcher.cxx.
185 : QObject(parent),
m_d(
new Imp(
this,recheckInterval_ms))
186{
188 startTimer(recheckInterval_ms);
189}
void addUrls(const QStringList &)
◆ ~VP1WebWatcher()
| VP1WebWatcher::~VP1WebWatcher |
( |
| ) |
|
|
virtual |
Definition at line 192 of file VP1WebWatcher.cxx.
193{
194 while(!
m_d->watchedUrls.isEmpty())
197}
void removeUrl(const QString &)
◆ addUrl()
| void VP1WebWatcher::addUrl |
( |
const QString & | | ) |
|
◆ addUrls()
| void VP1WebWatcher::addUrls |
( |
const QStringList & | | ) |
|
◆ httpRequestDone
| void VP1WebWatcher::httpRequestDone |
( |
bool | error | ) |
|
|
privateslot |
Definition at line 200 of file VP1WebWatcher.cxx.
201{
203 if (wu->thread && wu->thread->handleDone(error, sender())) {
204 bool changed = wu->lastResult != wu->thread->result();
205 wu->lastResult = wu->thread->result();
206 m_d->ensureEndThread(wu->thread);
207 if (changed)
209 return;
210 }
211
212
213}
void urlChanged(const QString &url)
◆ isWatchingUrl()
| bool VP1WebWatcher::isWatchingUrl |
( |
const QString & | u | ) |
const |
Definition at line 216 of file VP1WebWatcher.cxx.
217{
219 if (wu->url == u)
220 return true;
221 }
222 return false;
223}
◆ lastModTime()
| QDateTime VP1WebWatcher::lastModTime |
( |
const QString & | url | ) |
|
Definition at line 325 of file VP1WebWatcher.cxx.
326{
328 if (wu->url==url) {
330 return QDateTime();
331 QString lastmod = wu->lastResult;
332 lastmod = lastmod.simplified();
333 lastmod.chop(4);
334 QDateTime
dt(QDateTime::fromString(lastmod,
"ddd, dd MMM yyyy hh:mm:ss"));
335 dt.setTimeSpec(Qt::UTC);
337 }
338 return QDateTime();
339}
static const QString VP1WebWatcher_PREFIX
◆ lastResult()
Definition at line 291 of file VP1WebWatcher.cxx.
292{
294 if (wu->url==url) {
306 }
308}
static const QString VP1WebWatcher_FileNotExist
static const QString VP1WebWatcher_ResultNotReady
static const QString VP1WebWatcher_httpProblems
static const QString VP1WebWatcher_UrlInvalid
static const QString VP1WebWatcher_Unknown
◆ lastResultToString()
| QString VP1WebWatcher::lastResultToString |
( |
const QString & | url | ) |
|
Definition at line 311 of file VP1WebWatcher.cxx.
312{
314 case UNKNOWN:
return "UNKNOWN";
318 case EXISTS:
return "EXISTS";
319 default:
320 return "UNKNOWN";
321 }
322}
RESULT lastResult(const QString &url)
◆ removeUrl()
| void VP1WebWatcher::removeUrl |
( |
const QString & | | ) |
|
◆ removeUrls()
| void VP1WebWatcher::removeUrls |
( |
const QStringList & | | ) |
|
◆ timerEvent()
| void VP1WebWatcher::timerEvent |
( |
QTimerEvent * | | ) |
|
|
protected |
Definition at line 270 of file VP1WebWatcher.cxx.
271{
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288}
◆ urlChanged
| void VP1WebWatcher::urlChanged |
( |
const QString & | url | ) |
|
|
signal |
◆ urls()
| QStringList VP1WebWatcher::urls |
( |
| ) |
const |
Definition at line 243 of file VP1WebWatcher.cxx.
244{
246
247
249}
l
Printing final latex table to .tex output file.
◆ m_d
The documentation for this class was generated from the following files: