LiveHubEngine Class

The LiveHubEngine class watches over a workspace and notifies a node on changes. More...

Header: #include <LiveHubEngine>
Inherits: QObject

Public Types

enum Error { NoError, WatcherMaximumReached, WatcherSystemError }

Public Functions

LiveHubEngine(QObject *parent = 0)
LiveDocument activePath() const
LiveHubEngine::Error error()
bool hasError()
void setWorkspace(const QString &path)
QString workspace() const

Public Slots

void publishWorkspace()
void setActivePath(const LiveDocument &path)
void setFilePublishingActive(bool on)


void activateDocument(const LiveDocument &document)
void beginPublishWorkspace()
void endPublishWorkspace()
void errorChanged()
void fileChanged(const LiveDocument &document)
void publishFile(const LiveDocument &document)
void workspaceChanged(const QString &workspace)

Static Public Members

int maximumWatches()
void setMaximumWatches(int maximumWatches)

Detailed Description

The live hub watches over a workspace and notifies a live node about changed files. A node can run on the same device or even on a remote device using a RemotePublisher.

Member Type Documentation

enum LiveHubEngine::Error

Describes error state of an engine

LiveHubEngine::NoError0No error
LiveHubEngine::WatcherMaximumReached1The maximum number of watches set with setMaximumWatches() was exceeded
LiveHubEngine::WatcherSystemError2Watching a directory for changes failed for an unspecified reason

Member Function Documentation

LiveHubEngine::LiveHubEngine(QObject *parent = 0)

Standard constructor using parent as parent

[signal] void LiveHubEngine::activateDocument(const LiveDocument &document)

The signal is emitted when the document identified by document has been activated

[signal] void LiveHubEngine::beginPublishWorkspace()

This signal is emitted at the beginning of publishWorkspace() call before any publishFile signal is emitted.

[signal] void LiveHubEngine::endPublishWorkspace()

This signal is emitted at the end of publishWorkspace() call after all publishFile signals were emitted.

[signal] void LiveHubEngine::errorChanged()

The signal is emitted when the error state desctibed by error() changed

[signal] void LiveHubEngine::fileChanged(const LiveDocument &document)

This signal is emitted during publishing a directory to inform a connected node that document has changed on the hub.

[signal] void LiveHubEngine::publishFile(const LiveDocument &document)

This signal is emitted during publishing the directory to inform a connected node to publish the document to the remote device form the hub

[slot] void LiveHubEngine::publishWorkspace()

Publish the whole workspace to a connected node.

[slot] void LiveHubEngine::setActivePath(const LiveDocument &path)

Sets the active document path to path. Emits activateDocument() with this path.

See also activePath().

[slot] void LiveHubEngine::setFilePublishingActive(bool on)

Sets the file publishing to on

[signal] void LiveHubEngine::workspaceChanged(const QString &workspace)

The signal is emitted when the workspace identified by workspace has changed

LiveDocument LiveHubEngine::activePath() const

Returns the active Document

See also setActivePath().

LiveHubEngine::Error LiveHubEngine::error()

Returns current Error

bool LiveHubEngine::hasError()

Returns true if error() is not NoError

[static] int LiveHubEngine::maximumWatches()

Returns the maximum number of watched directories

See also setMaximumWatches().

[static] void LiveHubEngine::setMaximumWatches(int maximumWatches)

Sets the maximum number of watched directories to maximumWatches

See also maximumWatches().

void LiveHubEngine::setWorkspace(const QString &path)

Sets the workspace folder to watch over to path

See also workspace().

QString LiveHubEngine::workspace() const

Returns the current workspace

See also setWorkspace().

© 2019 Luxoft Sweden AB. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.