The class exposing the History API to QML.
More...
#include <qmlhistory.h>
|
| QmlHistory (QObject *parent=nullptr) |
|
Q_INVOKABLE QList< QObject * > | search (const QString &text) |
| Searches History Entries against a search query. More...
|
|
Q_INVOKABLE int | getVisits (const QString &url) |
| Get the visit count of a url. More...
|
|
Q_INVOKABLE void | addUrl (const QVariantMap &map) |
| Add url to the history. More...
|
|
Q_INVOKABLE void | deleteUrl (const QString &url) |
| Deletes a url from the history. More...
|
|
Q_INVOKABLE void | deleteRange (const QVariantMap &map) |
| Deletes history entries within the given range. More...
|
|
Q_INVOKABLE void | deleteAll () |
| Clears all the history. More...
|
|
The class exposing the History API to QML.
Definition at line 26 of file qmlhistory.h.
◆ QmlHistory()
QmlHistory::QmlHistory |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
◆ addUrl()
void QmlHistory::addUrl |
( |
const QVariantMap & |
map | ) |
|
Add url to the history.
- Parameters
-
A | JavaScript object containing
- title: String representing the title of the hisotry entry
- url: String representing the url of the history entry
|
Definition at line 57 of file qmlhistory.cpp.
◆ deleteAll()
void QmlHistory::deleteAll |
( |
| ) |
|
◆ deleteRange()
void QmlHistory::deleteRange |
( |
const QVariantMap & |
map | ) |
|
Deletes history entries within the given range.
- Parameters
-
A | JavaScript object containing
- startTime: A JavaScript Date object representing the start time
- endTime: A JavaScript Date object representing the end time
|
Definition at line 76 of file qmlhistory.cpp.
◆ deleteUrl()
void QmlHistory::deleteUrl |
( |
const QString & |
url | ) |
|
Deletes a url from the history.
- Parameters
-
String | representing the url of the history entry |
Definition at line 71 of file qmlhistory.cpp.
◆ getVisits()
int QmlHistory::getVisits |
( |
const QString & |
url | ) |
|
Get the visit count of a url.
- Parameters
-
String | representing the url |
- Returns
- Integer representing the visit count of the given url
Definition at line 51 of file qmlhistory.cpp.
◆ search()
QList< QObject * > QmlHistory::search |
( |
const QString & |
text | ) |
|
Searches History Entries against a search query.
- Parameters
-
String | representing the search query |
- Returns
- List of History Entries, each of type QmlHistoryItem, matching the search query
Definition at line 39 of file qmlhistory.cpp.
◆ visited
The signal emitted when a HistoryEntry is added.
- Parameters
-
◆ visitRemoved
The signal emitted when a HistoryEntry is removed.
- Parameters
-
The documentation for this class was generated from the following files: