Dialog CATDlgLock

Usage: you must use this class as is. You should never derive it.


public class CATDlgLock

Base class to create a lock button.
Role:This class is useful to set lock button before attributs that are managed by an administrator.

See also:


Constructor and Destructor Index


o CATDlgLock(CATDialog*,CATString&,CATSettingInfo&,CATDlgStyle)
Constructs an instance.
o CATDlgLock(CATDialog*,CATString&,CATSettingInfo*,int,CATDlgStyle)
Constructs an instance.
o ~CATDlgLock()

Method Index


o AddAssociatedDialog(CATDialog*)
Associates a Dialog object to the lock.
o ViewLock(char)
Sets the lock button style.

Constructor and Destructor


o CATDlgLock
public CATDlgLock( pParent,
const rObjectName,
const iSettingInfo,
iStyle= NULL)
Constructs an instance.
Parameters:
iParent
The parent widget.
iObjectName
The internal name of the button.
iSettingInfo
This information comes from the setting repository.
iStyle
The style of the button. Should be NULL which is the default value.
o CATDlgLock
public CATDlgLock( pParent,
const rObjectName,
const iSettingInfoArray,
const iNumberOfSettings,
iStyle= NULL)
Constructs an instance.
Parameters:
iParent
The parent widget.
iObjectName
The internal name of the button.
iSettingInfoArray
Array of information concerning the attributes to be locked or kept unlocked. Those attributes must refer to the same setting repository.
iNumberOfSettings
The size of iSettingInfoArray
iStyle
The style of the button. Should be NULL which is the default value.
o ~CATDlgLock
public virtual ~CATDlgLock()

Methods


o AddAssociatedDialog
public AddAssociatedDialog( iAssociatedDialog)
Associates a Dialog object to the lock.
This method has to be called for each object under the responsability of a given CATDlgLock.
Parameters:
iAssociatedDialog
The associated dialog object will be disabled if the lock is on.
o ViewLock
public ViewLock( iAttributLockState)
Sets the lock button style. Role: Sets the lock button style, and returns the style that should have associated Dialog objects.

This method should be used only for information purpose, since the does the same job.

In administrator mode, the button can be green, orange or red.
In end-user mode, the button can only be red, or grey (disabled green).
With no administration, the button is not represented.
Returns:
The returned style is to be used to set the sensitivity of the attribut Dialog's object.
Parameters:
iAttributLockState
The state of the attribut to lock. Calls
method to get this parameter.
  Example of use: 
 
   _MyDialogObjectToLock = new CATDlgCombo(..)
   _MyDialogObjectButtonLock = new CATDlgLock(..)
 
 First choice:
   char mystate 
   _mysettingrepository->GetLock("Myattribut",mystate)

   CATULong style = _MyDialogObjectButtonLock->ViewLock(mystate)

   _MyDialogObjectToLock->SetSensibility(style)
 

Second choice: This is a preferable alternative. _MyDialogObjectButtonLock->AddAssociatedDialog(_MyDialogObjectToLock);

This object is included in the file: CATDlgLock.h
If needed, your Imakefile.mk should include the module: DI0PANV2

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.