AppLock Class Reference

#include <applock.h>

Public Types

enum  AcquireMode { Silent , Interactive }
 

Public Member Functions

 AppLock (QObject *parent=0)
 
 AppLock (QString table, int id, QObject *parent=0)
 
 ~AppLock ()
 
Q_INVOKABLE bool acquire (AcquireMode mode=Silent)
 
Q_INVOKABLE bool acquire (QString table, int id, AcquireMode mode=Silent)
 
Q_INVOKABLE bool holdsLock () const
 
Q_INVOKABLE bool isLockedOut () const
 
Q_INVOKABLE QString lastError () const
 
Q_INVOKABLE bool release ()
 
Q_INVOKABLE QString toString () const
 

Member Enumeration Documentation

◆ AcquireMode

Enumerator
Silent 
Interactive 

Constructor & Destructor Documentation

◆ AppLock() [1/2]

AppLock::AppLock ( QObject * parent = 0)

◆ AppLock() [2/2]

AppLock::AppLock ( QString table,
int id,
QObject * parent = 0 )

◆ ~AppLock()

AppLock::~AppLock ( )

Member Function Documentation

◆ acquire() [1/2]

bool AppLock::acquire ( AppLock::AcquireMode mode = Silent)

Try to acquire an application-level lock on the record described in the constructor or last call to this AppLock's acquire(table, id).

Returns
true if this AppLock instance appears to hold the lock
false if the lock could not be acquired
See also
holdsLock()
isLockedOut()
lastError()

◆ acquire() [2/2]

bool AppLock::acquire ( QString table,
int id,
AppLock::AcquireMode mode = Silent )

◆ holdsLock()

bool AppLock::holdsLock ( ) const
Returns
true if this instance of AppLock holds the lock

◆ isLockedOut()

bool AppLock::isLockedOut ( ) const
Returns
true if the object appears locked by some other entity

◆ lastError()

QString AppLock::lastError ( ) const

◆ release()

bool AppLock::release ( )

◆ toString()

QString AppLock::toString ( ) const

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

Generated on Mon Feb 17 2025 xTuple ERP Programmer Reference, Version 6.2.0 doxygen 1.11.0