ClassificationWidget Class Reference

A widget to display classification markings. More...

#include <ClassificationWidget.h>

List of all members.

Public Member Functions

 ClassificationWidget (QWidget *pParent=NULL)
virtual ~ClassificationWidget ()
void setClassification (Classification *pClassification, bool initializeWidgets=true)

Static Public Member Functions

static const DynamicObjectgetSettingFavorites ()
static bool hasSettingFavorites ()
static void setSettingFavorites (DynamicObject *pNewValue, bool setIfSame=false)
static std::string getSettingFavoritesKey ()

Protected Slots

void updateMarkings ()

Protected Member Functions

virtual void showEvent (QShowEvent *pEvent)
virtual void hideEvent (QHideEvent *pEvent)
bool serializeFavorites ()
bool deserializeFavorites ()
void updateFavoritesCombo ()
void clearFavorites ()


Detailed Description

A widget to display classification markings.

The classification widget provides the means by which users can view and/or edit classification markings. The widget contains two tabs: one tab for the markings that are displayed at the top and bottom of an object or product, and another tab for ancillary information with the classification.

The first tab allows users to choose the overall classification level and the values of the various classification fields that also comprise the overall markings string. A preview of the final classification string is provided.

The second tab contains the following information that is included in the classification object:

At the bottom of the widget outside of the tab widget is the favorites list. This list allows users to store commonly used classification markings for the purpose of easily updating the markings for multiple objects. The favorites list is stored in the user's configuration file as the user adds or removes items from the list.

See also:
Classification

Definition at line 69 of file ClassificationWidget.h.


Constructor & Destructor Documentation

ClassificationWidget::ClassificationWidget ( QWidget *  pParent = NULL  ) 

Creates the classification widget.

Parameters:
pParent The parent widget.

virtual ClassificationWidget::~ClassificationWidget (  )  [virtual]

Destroys the classification widget.


Member Function Documentation

static const DynamicObject* ClassificationWidget::getSettingFavorites (  )  [static]

Returns the current value for this setting.

If this setting does not exist in ConfigurationSettings, a NULL value will be returned.

Please see Settings Macros for more details

Returns:
the current value for this setting or NULL if not found.

Definition at line 82 of file ClassificationWidget.h.

static bool ClassificationWidget::hasSettingFavorites (  )  [static]

Returns true if this setting exists in ConfigurationSettings.

It may still be NULL however.

Please see Settings Macros for more details

Returns:
true if this setting exists, false otherwise.

Definition at line 89 of file ClassificationWidget.h.

static void ClassificationWidget::setSettingFavorites ( DynamicObject pNewValue,
bool  setIfSame = false 
) [static]

Changes the current value of this setting to the new value.

Please see Settings Macros for more details

Parameters:
pNewValue the new value for this setting. If NULL, the value will not be set.
setIfSame If true, the value will be set into ConfigurationSettings even if the pNewValue and existing value are the same. This has the side-effect of making the value a per-user setting and stored in the user's configuration file. If false, this value will only be set if the pNewValue and existing value are different. Therefore the value will only be stored in the user's configuration file if the pNewValue is unique to the user.

Definition at line 105 of file ClassificationWidget.h.

static std::string ClassificationWidget::getSettingFavoritesKey (  )  [static]

Returns the key for this setting that could be passed to ConfigurationSettings::getSetting() or ConfigurationSettings::setSetting().

Please see Settings Macros for more details

Returns:
the key used for this setting.

Definition at line 113 of file ClassificationWidget.h.

void ClassificationWidget::setClassification ( Classification pClassification,
bool  initializeWidgets = true 
)

Sets the widget to view and edit the markings of a given Classification object.

This method sets the internal Classification object that is being edited to the given classification. All changes to the widgets are applied immediately to the Classification object.

Parameters:
pClassification The Classification object to display and edit.
initializeWidgets If set to true, the widgets are initialized to the values contained in the given Classification object. If set to false the widgets are initialized to empty values.

virtual void ClassificationWidget::showEvent ( QShowEvent *  pEvent  )  [protected, virtual]

Initializes the widgets if the Classification object has been modified since the widget was last displayed.

This method is used internally and should not be called directly.

Parameters:
pEvent The show event causing the update.

virtual void ClassificationWidget::hideEvent ( QHideEvent *  pEvent  )  [protected, virtual]

Attaches to the Classification object to determine whether the widgets should be initialized when the widget is shown.

This method is used internally and should not be called directly.

Parameters:
pEvent The hide event causing the update.

bool ClassificationWidget::serializeFavorites (  )  [protected]

Writes the favorites list to the user configuration settings and serializes the configuration settings to the configuration file.

This method is called automatically when the user adds or removes items from the favorites list.

Returns:
Returns true if the favorites list was successfully written to the user configuration settings; otherwise returns false.

bool ClassificationWidget::deserializeFavorites (  )  [protected]

Reads the favorites list from the user configuration settings and populates the favorites combo box.

This method is called automatically when the widget is created.

Returns:
Returns true if the favorites list was successfully populated from the user configuration settings; otherwise returns false.

void ClassificationWidget::updateFavoritesCombo (  )  [protected]

Populates the favorites combo box from the current list of favorites.

void ClassificationWidget::clearFavorites (  )  [protected]

Clears the favorites list.

This method clears the favorites list but does not change the contents of the favorites combo box. To update the favorites combo box, call updateFavoritesCombo().

void ClassificationWidget::updateMarkings (  )  [protected, slot]

Updates the markings preview widget.

This method updates the markings string in the preview widget to reflect the current widget values. This method is called automatically when the user changes widget values and should not need to be called directly.


Software Development Kit - Opticks 4.9.0 Build 16218