Class Avogadro::MoleQueue::MoleQueueManager#
-
class MoleQueueManager : public QObject#
The MoleQueueManager class provides access to a MoleQueue server.
<avogadro/molequeue/molequeuemanager.h>
This singleton class provides access to a single MoleQueue::Client instance that can be used to communicate with the server. The available queues and programs are cached in a MoleQueueQueueListModel (queueListModel()). The connectIfNeeded convenience function can be used to ensure that the client is connected before use.
Unnamed Group
-
Client &client()#
- Returns:
A reference to the managed Client instance.
-
const Client &client() const#
- Returns:
A reference to the managed Client instance.
Public Functions
-
explicit MoleQueueManager(QObject *parent_ = nullptr)#
-
~MoleQueueManager() override#
-
bool connectIfNeeded()#
Test if the client is connected, and if not, attempt a connection.
- Returns:
True if the client is already connected or a new connection has been successfully created. False if the new connection failed.
-
MoleQueueQueueListModel &queueListModel()#
- Returns:
A QAbstractItemModel subclass representing the queue/program tree.
Public Slots
-
bool requestQueueList()#
Request that the cached queue list is updated.
- Returns:
True if the request is send successfully.
Signals
-
void queueListUpdated()#
Emitted when the internal queue list is updated.
Public Static Functions
-
static MoleQueueManager &instance()#
- Returns:
The singleton instance.
-
Client &client()#