Changeset View
Changeset View
Standalone View
Standalone View
tests/model/window.cpp
Show First 20 Lines • Show All 317 Lines • ▼ Show 20 Line(s) | 291 | { | |||
---|---|---|---|---|---|
318 | 318 | | |||
319 | ui->viewResultsQML->setSource(QUrl(QStringLiteral("qrc:/main.qml"))); | 319 | ui->viewResultsQML->setSource(QUrl(QStringLiteral("qrc:/main.qml"))); | ||
320 | } | 320 | } | ||
321 | 321 | | |||
322 | void Window::updateResults() | 322 | void Window::updateResults() | ||
323 | { | 323 | { | ||
324 | qDebug() << "Updating the results"; | 324 | qDebug() << "Updating the results"; | ||
325 | 325 | | |||
326 | QString textDate = ui->textDate->text(); | ||||
327 | | ||||
326 | setQuery( | 328 | setQuery( | ||
327 | // What should we get | 329 | // What should we get | ||
328 | ( | 330 | ( | ||
329 | ui->radioSelectUsedResources->isChecked() ? UsedResources : | 331 | ui->radioSelectUsedResources->isChecked() ? UsedResources : | ||
330 | ui->radioSelectLinkedResources->isChecked() ? LinkedResources : | 332 | ui->radioSelectLinkedResources->isChecked() ? LinkedResources : | ||
331 | AllResources | 333 | AllResources | ||
332 | ) | | 334 | ) | | ||
333 | 335 | | |||
Show All 13 Lines | |||||
347 | Type(ui->textMimetype->text().split(QLatin1Char(','))) | | 349 | Type(ui->textMimetype->text().split(QLatin1Char(','))) | | ||
348 | 350 | | |||
349 | // Which activities? | 351 | // Which activities? | ||
350 | Activity(ui->comboActivity->currentText().split(QLatin1Char(','))) | | 352 | Activity(ui->comboActivity->currentText().split(QLatin1Char(','))) | | ||
351 | 353 | | |||
352 | // And URL filters | 354 | // And URL filters | ||
353 | Url(ui->textUrl->text().split(QLatin1Char(','), QString::SkipEmptyParts)) | | 355 | Url(ui->textUrl->text().split(QLatin1Char(','), QString::SkipEmptyParts)) | | ||
354 | 356 | | |||
357 | // And date filter | ||||
358 | ( | ||||
359 | textDate == QStringLiteral("today") ? Date::today() : | ||||
360 | textDate == QStringLiteral("yesterday") ? Date::yesterday() : | ||||
361 | Date(QDate::fromString(textDate, Qt::ISODate)) | ||||
362 | ) | | ||||
363 | | ||||
355 | // And how many items | 364 | // And how many items | ||
356 | Limit(ui->spinLimitCount->value()) | 365 | Limit(ui->spinLimitCount->value()) | ||
357 | ); | 366 | ); | ||
358 | } | 367 | } | ||
359 | 368 | |