VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Slots | Protected Member Functions | Protected Attributes
makVrf::DtCountrySelectionEntryWidget Class Reference

Widget that allows the selection of a country.

Inheritance diagram for makVrf::DtCountrySelectionEntryWidget:
Inheritance graph
[legend]

Public Member Functions

 DtCountrySelectionEntryWidget (makVrv::DtDe &de, QWidget *parent, const Qt::WindowFlags &flags=0, const CreationFlags &cflags=NormalMode)
 
virtual ~DtCountrySelectionEntryWidget ()
 
virtual void setLabel (const QString &)
 
virtual QString label () const
 
virtual void setLabel (const std::string &)
 
virtual void setRange (double bottom, double top)
 
virtual void setDefaultValue (const std::string &)
 
virtual void setVariableData (const std::string &)
 
virtual void setupFrom (const std::vector< makVrv::DtSimEntry * > &data)
 
virtual void setToolTip (const QString &)
 
virtual DtReaderWritercreateBoundVariable (const std::string &variableName)
 
virtual void addCountry (const std::string &code, const std::string &countryName, const QPixmap &flag)
 
virtual void setupFromBoundVariable (const DtReaderWriter *variableName)
 
virtual void setCountryCode (const std::string &)
 
virtual std::string countryCode () const
 
virtual QString countryName (bool translated=true) const
 
virtual void setIndent (int)
 
virtual void setHasAll (bool)
 
bool hasAll () const
 
virtual void setHasUncategorized (bool)
 
bool hasUncategoriezed () const
 
virtual void clear ()
 
virtual bool isValid () const
 
virtual std::string scriptedTaskVariableName () const
 
virtual void initializeCountries (bool immediate=false)
 
virtual void setHideCountries (const std::set< std::string > &countryCodes)
 
const std::set< std::string > & hideCountries () const
 
virtual void setShowCountries (const std::set< std::string > &countryCodes)
 
const std::set< std::string > & showCountries () const
 
virtual void setAllowNone (bool)
 
bool allowNone () const
 
- Public Member Functions inherited from makVrf::DtTaskSetVariableWidgetInterface
 DtTaskSetVariableWidgetInterface ()
 
virtual ~DtTaskSetVariableWidgetInterface ()
 
virtual void setTopLineVisible (bool)
 
virtual bool topLineVisible () const
 
virtual void widgetInitializedForDialog (DtScriptedTaskDialog *, const std::vector< makVrv::DtSimEntry * > &data)
 
virtual const std::set
< makVrv::DtUniqueID > & 
selection () const
 
virtual void setDefaultValueFromStateProperty (const DtPropertyInterface &)
 
virtual
DtTaskSetVariableWidgetExtensionInterface
parameterContents (QWidget *parent, const Qt::WindowFlags &flags=0) const
 
virtual bool guiElementOnly () const
 

Static Public Member Functions

static makVrv::DtUnicode codeVariableType ()
 
static std::string designerGroup ()
 
static std::string headerFile ()
 
static std::string variableName ()
 
static bool includeInQtDesigner ()
 
static std::string uncategorizedCode ()
 
static std::string allCode ()
 
- Static Public Member Functions inherited from makVrf::DtTaskSetVariableWidgetInterface
static bool canBeUsedAsWidget ()
 
static void initializeForQtDesignerExtension (makVrv::DtDe &de, QDesignerFormEditorInterface *core)
 
static bool includeInQtDesigner ()
 

Public Attributes

boost::signals2::signal< void(std::string)> signal_countrySelectionChanged
 
QLabelmyCountryLabel
 
QComboBoxmyCountry
 
QHBoxLayout * myContentLayout
 
QSpacerItem * mySpacerItem
 

Protected Slots

virtual void activated (int)
 

Protected Member Functions

virtual std::string variableDataFromUiDesigner (const QDomElement &, const DtScriptedTaskVariableLayoutConverter &) const
 
virtual void initialize ()
 
virtual void slot_countryAdded (const std::string &code)
 
virtual void slot_countryRemoved (const std::string &code)
 
virtual void slot_countriesReloaded ()
 
void setSelection (const std::set< makVrv::DtUniqueID > &)
 
void setSelection (const std::vector< makVrv::DtSimEntry * > &)
 
virtual void internalInitializeCountries ()
 

Protected Attributes

makVrv::DtDemyDe
 
bool myInitialized
 
makVrv::DtSignalConnectionManager myConnections
 
bool myHasAll
 
bool myHasUncategorized
 
std::set< std::string > myHideCountries
 
std::set< std::string > myShowCountries
 
bool myAllowNone
 
boost::signals2::scoped_connection myInitializeCountriesConnection
 
std::string myDefaultCountry
 

Additional Inherited Members

- Public Types inherited from makVrf::DtTaskSetVariableWidgetInterface
enum  CreationFlags { NormalMode = 0x00000000, QtDesignerMode = 0x00000001 }
 

Constructor & Destructor Documentation

makVrf::DtCountrySelectionEntryWidget::DtCountrySelectionEntryWidget ( makVrv::DtDe de,
QWidget *  parent,
const Qt::WindowFlags &  flags = 0,
const CreationFlags cflags = NormalMode 
)
virtual makVrf::DtCountrySelectionEntryWidget::~DtCountrySelectionEntryWidget ( )
virtual

Member Function Documentation

virtual void makVrf::DtCountrySelectionEntryWidget::setLabel ( const QString &  )
virtual

Qt version label.

Implements makVrf::DtTaskSetVariableWidgetInterface.

virtual QString makVrf::DtCountrySelectionEntryWidget::label ( ) const
virtual
virtual void makVrf::DtCountrySelectionEntryWidget::setLabel ( const std::string &  )
virtual

Display label.

Implements makVrf::DtTaskSetVariableWidgetInterface.

virtual void makVrf::DtCountrySelectionEntryWidget::setRange ( double  bottom,
double  top 
)
virtual

Validation range. Not applicable.

Implements makVrf::DtTaskSetVariableWidgetInterface.

virtual void makVrf::DtCountrySelectionEntryWidget::setDefaultValue ( const std::string &  )
virtual

Default value to set in control. If value contains colons then treat as DD:HH:MM:SS else treat as seconds.

Implements makVrf::DtTaskSetVariableWidgetInterface.

virtual void makVrf::DtCountrySelectionEntryWidget::setVariableData ( const std::string &  )
virtual

Variable data. Unused in this widget.

Implements makVrf::DtTaskSetVariableWidgetInterface.

virtual void makVrf::DtCountrySelectionEntryWidget::setupFrom ( const std::vector< makVrv::DtSimEntry * > &  data)
virtual

Sets up widget with currently selected item. Requests data.

Implements makVrf::DtTaskSetVariableWidgetInterface.

virtual void makVrf::DtCountrySelectionEntryWidget::setToolTip ( const QString &  )
virtual

Sets the tool tip for the widget.

Implements makVrf::DtTaskSetVariableWidgetInterface.

virtual DtReaderWriter* makVrf::DtCountrySelectionEntryWidget::createBoundVariable ( const std::string &  variableName)
virtual

Creates the reader/writer variable that will be used as part of the task statement.

Implements makVrf::DtTaskSetVariableWidgetInterface.

virtual void makVrf::DtCountrySelectionEntryWidget::addCountry ( const std::string &  code,
const std::string &  countryName,
const QPixmap &  flag 
)
virtual

Adds a new force info potential forces and force combo.

virtual void makVrf::DtCountrySelectionEntryWidget::setupFromBoundVariable ( const DtReaderWriter variableName)
virtual

Sets up the widget from the given reader/writer variables.

Implements makVrf::DtTaskSetVariableWidgetInterface.

virtual void makVrf::DtCountrySelectionEntryWidget::setCountryCode ( const std::string &  )
virtual

Sets the current country (by code)

virtual std::string makVrf::DtCountrySelectionEntryWidget::countryCode ( ) const
virtual

Returns the current country code.

virtual QString makVrf::DtCountrySelectionEntryWidget::countryName ( bool  translated = true) const
virtual

Returns the name of the country selected.

virtual void makVrf::DtCountrySelectionEntryWidget::setIndent ( int  )
virtual

Sets the indent level for the contents of this widget.

Implements makVrf::DtTaskSetVariableWidgetInterface.

virtual void makVrf::DtCountrySelectionEntryWidget::setHasAll ( bool  )
virtual

Whether or not to include "All" (default is true)

bool makVrf::DtCountrySelectionEntryWidget::hasAll ( ) const
inline
virtual void makVrf::DtCountrySelectionEntryWidget::setHasUncategorized ( bool  )
virtual

Whether or not to include "Uncategorized" (default is true)

bool makVrf::DtCountrySelectionEntryWidget::hasUncategoriezed ( ) const
inline
virtual void makVrf::DtCountrySelectionEntryWidget::clear ( )
virtual
virtual bool makVrf::DtCountrySelectionEntryWidget::isValid ( void  ) const
inlinevirtual

Indicates the current selection is valid.

Implements makVrf::DtTaskSetVariableWidgetInterface.

static makVrv::DtUnicode makVrf::DtCountrySelectionEntryWidget::codeVariableType ( )
inlinestatic
static std::string makVrf::DtCountrySelectionEntryWidget::designerGroup ( )
inlinestatic
static std::string makVrf::DtCountrySelectionEntryWidget::headerFile ( )
inlinestatic
static std::string makVrf::DtCountrySelectionEntryWidget::variableName ( )
inlinestatic
static bool makVrf::DtCountrySelectionEntryWidget::includeInQtDesigner ( )
inlinestatic
virtual std::string makVrf::DtCountrySelectionEntryWidget::scriptedTaskVariableName ( ) const
virtual

In most cases this is the objectName of the object, however, in some cases (as in radio button) this could be a name that is shared amongst like objects, so, that is returned instead. If the blank name is returned then just use the variable name.

Implements makVrf::DtTaskSetVariableWidgetInterface.

virtual void makVrf::DtCountrySelectionEntryWidget::initializeCountries ( bool  immediate = false)
virtual

Clears and re-initializes country list. If immediate is true initializes at this time, else, puts in a connection for a post de tick to initialize.

virtual void makVrf::DtCountrySelectionEntryWidget::setHideCountries ( const std::set< std::string > &  countryCodes)
virtual
const std::set<std::string>& makVrf::DtCountrySelectionEntryWidget::hideCountries ( ) const
inline
virtual void makVrf::DtCountrySelectionEntryWidget::setShowCountries ( const std::set< std::string > &  countryCodes)
virtual

If this is empty will return to default behavior of showing all available. If this is not empty will also not show all or uncategorized.

const std::set<std::string>& makVrf::DtCountrySelectionEntryWidget::showCountries ( ) const
inline
static std::string makVrf::DtCountrySelectionEntryWidget::uncategorizedCode ( )
static

The internal code that will select "Uncategorized".

static std::string makVrf::DtCountrySelectionEntryWidget::allCode ( )
static

The internal code that will select "All".

virtual void makVrf::DtCountrySelectionEntryWidget::setAllowNone ( bool  )
virtual

Allow "None" to be put in. The code will be the empty string (default is false)

bool makVrf::DtCountrySelectionEntryWidget::allowNone ( ) const
inline
virtual void makVrf::DtCountrySelectionEntryWidget::activated ( int  )
protectedvirtualslot
virtual std::string makVrf::DtCountrySelectionEntryWidget::variableDataFromUiDesigner ( const QDomElement &  ,
const DtScriptedTaskVariableLayoutConverter  
) const
inlineprotectedvirtual

Given the Ui designer properties create a string that will represent the variable data for those properties.

Implements makVrf::DtTaskSetVariableWidgetInterface.

virtual void makVrf::DtCountrySelectionEntryWidget::initialize ( )
protectedvirtual
virtual void makVrf::DtCountrySelectionEntryWidget::slot_countryAdded ( const std::string &  code)
protectedvirtual
virtual void makVrf::DtCountrySelectionEntryWidget::slot_countryRemoved ( const std::string &  code)
protectedvirtual
virtual void makVrf::DtCountrySelectionEntryWidget::slot_countriesReloaded ( )
protectedvirtual
void makVrf::DtCountrySelectionEntryWidget::setSelection ( const std::set< makVrv::DtUniqueID > &  selection)
inlineprotectedvirtual

The selection set can be used to determine the display units to show.

Reimplemented from makVrf::DtTaskSetVariableWidgetInterface.

void makVrf::DtCountrySelectionEntryWidget::setSelection ( const std::vector< makVrv::DtSimEntry * > &  )
inlineprotectedvirtual
virtual void makVrf::DtCountrySelectionEntryWidget::internalInitializeCountries ( )
protectedvirtual

Member Data Documentation

boost::signals2::signal<void (std::string)> makVrf::DtCountrySelectionEntryWidget::signal_countrySelectionChanged
QLabel* makVrf::DtCountrySelectionEntryWidget::myCountryLabel
QComboBox* makVrf::DtCountrySelectionEntryWidget::myCountry
QHBoxLayout* makVrf::DtCountrySelectionEntryWidget::myContentLayout
QSpacerItem* makVrf::DtCountrySelectionEntryWidget::mySpacerItem
makVrv::DtDe& makVrf::DtCountrySelectionEntryWidget::myDe
protected
bool makVrf::DtCountrySelectionEntryWidget::myInitialized
protected
makVrv::DtSignalConnectionManager makVrf::DtCountrySelectionEntryWidget::myConnections
protected
bool makVrf::DtCountrySelectionEntryWidget::myHasAll
protected
bool makVrf::DtCountrySelectionEntryWidget::myHasUncategorized
protected
std::set<std::string> makVrf::DtCountrySelectionEntryWidget::myHideCountries
protected
std::set<std::string> makVrf::DtCountrySelectionEntryWidget::myShowCountries
protected
bool makVrf::DtCountrySelectionEntryWidget::myAllowNone
protected
boost::signals2::scoped_connection makVrf::DtCountrySelectionEntryWidget::myInitializeCountriesConnection
protected
std::string makVrf::DtCountrySelectionEntryWidget::myDefaultCountry
protected

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

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)