The class exposing Tabs API to QML.
More...
#include <qmltabs.h>
|
void | changed (int windowId) |
| The signal emitted when tabs in the tab widget are changed. More...
|
|
void | tabInserted (const QVariantMap &map) |
| The signal emitted when a tab is inserted. More...
|
|
void | tabRemoved (const QVariantMap &map) |
| The signal emitted when a tab is removed. More...
|
|
void | tabMoved (const QVariantMap &map) |
| The signal emitted when a tab is moved. More...
|
|
|
| QmlTabs (QObject *parent=nullptr) |
|
Q_INVOKABLE bool | setCurrentIndex (const QVariantMap &map) |
| Sets the current tab in a window. More...
|
|
Q_INVOKABLE bool | nextTab (int windowId=-1) |
| Sets the next tab as current tab. More...
|
|
Q_INVOKABLE bool | previousTab (int windowId=-1) |
| Sets the previous tab as current tab. More...
|
|
Q_INVOKABLE bool | moveTab (const QVariantMap &map) |
| Moves a tab. More...
|
|
Q_INVOKABLE bool | pinTab (const QVariantMap &map) |
| Pins a tab. More...
|
|
Q_INVOKABLE bool | unpinTab (const QVariantMap &map) |
| Un-pins a tab. More...
|
|
Q_INVOKABLE bool | detachTab (const QVariantMap &map) |
| Detaches a tab. More...
|
|
Q_INVOKABLE bool | duplicate (const QVariantMap &map) |
| Duplicates a tab. More...
|
|
Q_INVOKABLE bool | closeTab (const QVariantMap &map) |
| Close a tab. More...
|
|
Q_INVOKABLE bool | reloadTab (const QVariantMap &map) |
| Reloads a tab. More...
|
|
Q_INVOKABLE bool | stopTab (const QVariantMap &map) |
| Stops a tab. More...
|
|
Q_INVOKABLE QmlTab * | get (const QVariantMap &map) const |
| Gets a tab. More...
|
|
Q_INVOKABLE int | normalTabsCount (int windowId=-1) const |
| Get the normal tabs count in a window. More...
|
|
Q_INVOKABLE int | pinnedTabsCount (int windowId=-1) const |
| Get the pinned tabs count in a window. More...
|
|
Q_INVOKABLE QList< QObject * > | getAll (const QVariantMap &map=QVariantMap()) const |
| Gets all the tabs of a window. More...
|
|
Q_INVOKABLE QList< QObject * > | search (const QVariantMap &map) |
| Searches tabs against a criteria. More...
|
|
Q_INVOKABLE bool | addTab (const QVariantMap &map) |
| Adds a tab. More...
|
|
The class exposing Tabs API to QML.
Definition at line 27 of file qmltabs.h.
◆ QmlTabs()
QmlTabs::QmlTabs |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
◆ addTab()
bool QmlTabs::addTab |
( |
const QVariantMap & |
map | ) |
|
Adds a tab.
- Parameters
-
A | JavaScript object containing
- url: String representing the url of the tab
- windowId: The id of window containing the tab
|
- Returns
- True if the tab is added, else false
Definition at line 298 of file qmltabs.cpp.
◆ changed
void QmlTabs::changed |
( |
int |
windowId | ) |
|
|
signal |
The signal emitted when tabs in the tab widget are changed.
- Parameters
-
window | id representing the window in which the change occurs |
◆ closeTab()
bool QmlTabs::closeTab |
( |
const QVariantMap & |
map | ) |
|
Close a tab.
- Parameters
-
A | JavaScript object containing
- index: Integer representing the tab to be closed
- windowId: The id of window containing the tab
|
- Returns
- True if success, else false
Definition at line 176 of file qmltabs.cpp.
◆ detachTab()
bool QmlTabs::detachTab |
( |
const QVariantMap & |
map | ) |
|
Detaches a tab.
- Parameters
-
A | JavaScript object containing
- index: Integer representing the tab to be detached
- windowId: The id of window containing the tab
|
- Returns
- True if tab is detached, else false
Definition at line 142 of file qmltabs.cpp.
◆ duplicate()
bool QmlTabs::duplicate |
( |
const QVariantMap & |
map | ) |
|
Duplicates a tab.
- Parameters
-
A | JavaScript object containing
- index: Integer representing the tab to duplicate
- windowId: The id of window containing the tab
|
- Returns
- True if success, else false
Definition at line 159 of file qmltabs.cpp.
◆ get()
QmlTab * QmlTabs::get |
( |
const QVariantMap & |
map | ) |
const |
Gets a tab.
- Parameters
-
A | JavaScript object containing
- index: Integer representing the index of the tab
- windowId: The id of window containing the tab
|
- Returns
- Tab of type QmlTab if exists, else null
Definition at line 227 of file qmltabs.cpp.
◆ getAll()
QList< QObject * > QmlTabs::getAll |
( |
const QVariantMap & |
map = QVariantMap() | ) |
const |
Gets all the tabs of a window.
- Parameters
-
A | JavaScript object containing
- windowId: The id of window containing the tab
- withPinned: Bool representing if the searched tab can be pinned
|
- Returns
- List of tabs, each of type QmlTab
Definition at line 262 of file qmltabs.cpp.
◆ moveTab()
bool QmlTabs::moveTab |
( |
const QVariantMap & |
map | ) |
|
Moves a tab.
- Parameters
-
A | JavaScript object containing
- from: The initial index of the tab
- to: The final index of the tab
- windowId: The id of window containing the tab
|
- Returns
- True if tab is moved, else false
Definition at line 72 of file qmltabs.cpp.
◆ nextTab()
bool QmlTabs::nextTab |
( |
int |
windowId = -1 | ) |
|
Sets the next tab as current tab.
- Parameters
-
Integer | representing the window |
- Returns
- True if success, else false
Definition at line 52 of file qmltabs.cpp.
◆ normalTabsCount()
int QmlTabs::normalTabsCount |
( |
int |
windowId = -1 | ) |
const |
Get the normal tabs count in a window.
- Parameters
-
Integer | representing the window |
- Returns
- Number of normal tabs in the window
Definition at line 244 of file qmltabs.cpp.
◆ pinnedTabsCount()
int QmlTabs::pinnedTabsCount |
( |
int |
windowId = -1 | ) |
const |
Get the pinned tabs count in a window.
- Parameters
-
Integer | representing the window |
- Returns
- Number of pinned tabs in the window
Definition at line 253 of file qmltabs.cpp.
◆ pinTab()
bool QmlTabs::pinTab |
( |
const QVariantMap & |
map | ) |
|
Pins a tab.
- Parameters
-
A | JavaScript object containing
- index: Integer representing the tab to be pinned
- windowId: The id of window containing the tab
|
- Returns
- True if success, else false
Definition at line 94 of file qmltabs.cpp.
◆ previousTab()
bool QmlTabs::previousTab |
( |
int |
windowId = -1 | ) |
|
Sets the previous tab as current tab.
- Parameters
-
Integer | representing the window |
- Returns
- True if success, else false
Definition at line 62 of file qmltabs.cpp.
◆ reloadTab()
bool QmlTabs::reloadTab |
( |
const QVariantMap & |
map | ) |
|
Reloads a tab.
- Parameters
-
A | JavaScript object containing
- index: Integer representing the tab to be reloaded
- windowId: The id of window containing the tab
|
- Returns
- True if success, else false
Definition at line 193 of file qmltabs.cpp.
◆ search()
QList< QObject * > QmlTabs::search |
( |
const QVariantMap & |
map | ) |
|
Searches tabs against a criteria.
- Parameters
-
A | JavaScript object containing
- title: String representing the title to be searched
- url: String representing the url to be searched
- withPinned: Bool representing if the searched tab can be pinned
|
- Returns
- List of tabs, each of type QmlTab, which are matched against the criteria
Definition at line 281 of file qmltabs.cpp.
◆ setCurrentIndex()
bool QmlTabs::setCurrentIndex |
( |
const QVariantMap & |
map | ) |
|
Sets the current tab in a window.
- Parameters
-
A | JavaScript object containing
- index: Integer representing new current index
- windowId: The id of window containing the tab
|
- Returns
- True if success, else false
Definition at line 35 of file qmltabs.cpp.
◆ stopTab()
bool QmlTabs::stopTab |
( |
const QVariantMap & |
map | ) |
|
Stops a tab.
- Parameters
-
A | JavaScript object containing
- index: Integer representing the tab to be stopped
- windowId: The id of window containing the tab
|
- Returns
- True if success, else false
Definition at line 210 of file qmltabs.cpp.
◆ tabInserted
void QmlTabs::tabInserted |
( |
const QVariantMap & |
map | ) |
|
|
signal |
The signal emitted when a tab is inserted.
- Parameters
-
A | JavaScript object containing
- index: The index of the inserted tab
- windowId: The id of window in which the tab is inserted
|
◆ tabMoved
void QmlTabs::tabMoved |
( |
const QVariantMap & |
map | ) |
|
|
signal |
The signal emitted when a tab is moved.
- Parameters
-
A | JavaScript object containing
- from: The initial index of the moved tab
- to: The final index of the moved tab
- windowId: The id of window in which the tab is moved
|
◆ tabRemoved
void QmlTabs::tabRemoved |
( |
const QVariantMap & |
map | ) |
|
|
signal |
The signal emitted when a tab is removed.
- Parameters
-
A | JavaScript object containing
- index: The index of the removed tab
- windowId: The id of window in which the tab is removed
|
◆ unpinTab()
bool QmlTabs::unpinTab |
( |
const QVariantMap & |
map | ) |
|
Un-pins a tab.
- Parameters
-
A | JavaScript object containing
- index: Integer representing the tab to be unpinned
- windowId: The id of window containing the tab
|
- Returns
- True if success, else false
Definition at line 118 of file qmltabs.cpp.
The documentation for this class was generated from the following files: