Falkon Develop
Cross-platform Qt-based web browser
QmlHistory Class Reference

The class exposing the History API to QML. More...

#include <qmlhistory.h>

Inheritance diagram for QmlHistory:

Signals

void visited (QmlHistoryItem *historyItem)
 The signal emitted when a HistoryEntry is added. More...
 
void visitRemoved (QmlHistoryItem *historyItem)
 The signal emitted when a HistoryEntry is removed. More...
 

Public Member Functions

 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...
 

Detailed Description

The class exposing the History API to QML.

Definition at line 26 of file qmlhistory.h.

Constructor & Destructor Documentation

◆ QmlHistory()

QmlHistory::QmlHistory ( QObject *  parent = nullptr)
explicit

Definition at line 25 of file qmlhistory.cpp.

Member Function Documentation

◆ addUrl()

void QmlHistory::addUrl ( const QVariantMap &  map)

Add url to the history.

Parameters
AJavaScript 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 ( )

Clears all the history.

Definition at line 91 of file qmlhistory.cpp.

◆ deleteRange()

void QmlHistory::deleteRange ( const QVariantMap &  map)

Deletes history entries within the given range.

Parameters
AJavaScript 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
Stringrepresenting 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
Stringrepresenting 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
Stringrepresenting 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

void QmlHistory::visited ( QmlHistoryItem historyItem)
signal

The signal emitted when a HistoryEntry is added.

Parameters
Objectof type QmlHistoryItem, representing the added History Entry

◆ visitRemoved

void QmlHistory::visitRemoved ( QmlHistoryItem historyItem)
signal

The signal emitted when a HistoryEntry is removed.

Parameters
Objectof type QmlHistoryItem, representing the removed History Entry

The documentation for this class was generated from the following files: