VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
makVrv::DtPersistenceToolbarWidget Class Reference

A widget that displays a persistence GUI in some way Operations presented are import, export, save, and restore. More...

Inheritance diagram for makVrv::DtPersistenceToolbarWidget:
Inheritance graph
[legend]

Public Member Functions

 DtPersistenceToolbarWidget (DtDe &de, QWidget *p=0, Qt::WindowFlags f=0)
 CTOR.
virtual ~DtPersistenceToolbarWidget ()
 DTOR.
virtual void setPersistentStateName (const QString &name)
 Set the name of thing being saved.
virtual void queryImportFilePath (DtDe &de, const std::string &importType, const std::string &path, const std::string &fileFilter)
 Ask for a filename to import from fileFilter is the desired extension with no dot.
virtual void queryMergeFilePath (DtDe &de, const std::string &importType, const std::string &path, const std::string &fileFilter)
 Ask for a filename to merge from fileFilter is the desired extension with no dot.
virtual void queryExportFilePath (DtDe &de, const std::string &importType, const std::string &path, const std::string &fileFilter)
 Ask for a filename to export to fileFilter is the desired extension with no dot.
virtual void queryExportHierFilePath (DtDe &de, const std::string &importType, const std::string &path, const std::string &fileFilter)
 Ask for a filename to export the element definition hierarchy fileFilter is the desired extension with no dot.
virtual void queryExportLeafFilePath (DtDe &de, const std::string &importType, const std::string &path, const std::string &fileFilter)
 Ask for a filename to export the element definition leaves fileFilter is the desired extension with no dot.
virtual void setSaveButtonShown (bool shown)
 Shows/hides save button. Default is hidden.
virtual void setSeparatorShown (bool shown)
 Shows/hides horizontal separator. Default is shown.
virtual void setMergeShown (bool shown)
 If true, shows merge button to allow merging of settings.
virtual void setExportShown (bool)
 If true will export selected item(s) to a file.
virtual void setImportShown (bool)
 If true will import settings.
virtual void setExportEnabled (bool)
 Sets whether or not export button is enabled.
virtual void setMergeEnabled (bool)
 Sets whether or not merge button is enabled.
virtual void setImportEnabled (bool)
 Sets whether or not import button is enabled.
virtual void setExportSelectedEnabled (bool)
 Sets whether or not export selected button is enabled.
virtual void setBackupRestoreEnabled (bool shown)
 Sets whether or not the restore from backup button is enabled.
virtual void setFactoryRestoreEnabled (bool shown)
 Sets whether or not the restore from factory button is enabled.
virtual void setSaveDefaultsEnabled (bool b)
 Sets whether or not the save defaults button is enabled.
virtual void setBackup (DtBackupInterface *)
 Sets the backup object that will be used to restore from.
virtual void disableAllButtons (bool)
 Quick way to disable/enable all buttons.
virtual void activateSaveDefaults ()
 Prompt to save (usually on exit from a page)
virtual int activateRememberToExport (bool &dontShowAagin)
 Remind user to export (usually prompting on page exit) with a checkbox allow user to not show it again the user check the "dont show again".
- Public Member Functions inherited from makVrv::DtPersistenceControlsInterface
virtual ~DtPersistenceControlsInterface ()
 DTOR.
virtual bool showImportLeavesFirstBox ()
 show the messabge box to remind the user to import leave before import hireachy(for entity,unit,tactical graphics)

Protected Slots

virtual void on_myImportButton_clicked ()
virtual void on_myExportButton_clicked ()
virtual void on_myMergeButton_clicked ()
virtual void on_myExportSelectedButton_clicked ()
virtual void on_mySaveButton_clicked ()
virtual void on_myRestoreButton_clicked ()
virtual void on_myRestoreFactoryButton_clicked ()

Protected Member Functions

virtual void backupFileChanged (const DtBackupInterface *)
 Called from the backup manager when the status of restoring from backup or factory changes.
virtual void rememberToExportDialog ()
 For the VRF style definitions, entity type mappings reminder user to export to keep their changes.
std::string labelNameToExportDialogDisplayName (const std::string &name)
 map label name to the name displayed in the rememberToExport dialog name
void setupGui ()
virtual QString willAlsoRestore (int) const
 If other items will be restored by either restoring local or factory, return text string which describes what will be restored.

Protected Attributes

DtDemyDe
DtBackupInterfacemyBackup
QLabelmyLabel
QPushButtonmyImportButton
QPushButtonmyExportButton
QPushButtonmyMergeButton
QPushButtonmyExportSelectedButton
QPushButtonmySaveButton
QPushButtonmyRestoreButton
QPushButtonmyRestoreFactoryButton
QFrame * mySeparator
QHBoxLayout * myButtonLayout

Additional Inherited Members

- Public Attributes inherited from makVrv::DtPersistenceControlsInterface
boost::signal< void()> signal_saveDefaults
 Signal emitted when the user wants to save to a default file.
boost::signal< void()> signal_restoreDefaults
 Signal emitted when the user wants to load the default file.
boost::signal< void()> signal_restoreFactoryDefaults
 Signal emitted when the user wants to load the factory settings file.
boost::signal< void()> signal_defaultsAboutToBeRestored
 Signal emitted right before the defaults are about to be restored to the settings backup object.
boost::signal< void()> signal_defaultsRestored
 Signal emitted when the defaults have been restored via the settings backup object.
boost::signal< void()> signal_factoryDefaultsAboutToBeRestored
 Signal emitted when factory is about to be restored via the settings backup object.
boost::signal< void()> signal_factoryDefaultsRestored
 Signal emitted when factory has been restored via the settings backup object.
boost::signal< void()> signal_export
 Signal emitted when the user wants to export to a file.
boost::signal< void()> signal_import
 Signal emitted when the user wants to import.
boost::signal< void()> signal_exportSelected
 Signal emitted when the user wants to export selected item(s) to a file.
boost::signal< void()> signal_exportHier
 Signal emitted when the user wants to export an element definition hierarchy to a file.
boost::signal< void()> signal_exportLeaves
 Signal emitted when the user wants to export element definition leaves to a file.
boost::signal< void()> signal_exportSelectedLeaves
 Signal emitted when the user wants to export selected element definition leaves to a file.
boost::signal< void()> signal_merge
 Signal emitted when the user wants to merge.
boost::signal< void(const
std::string &)> 
signal_importFilenameChosen
 Signal emitted when the user has chosen a filename to import from.
boost::signal< void(const
std::string &)> 
signal_mergeFilenameChosen
 Signal emitted when the user has chosen a filename to merge from.
boost::signal< void(const
std::string &)> 
signal_exportFilenameChosen
 Signal emitted when the user has chosen a filename to export to.
boost::signal< void(const
std::string &)> 
signal_exportHierFilenameChosen
 Signal emitted when the user has chosen a filename to export the hierarchy element definitions to.
boost::signal< void(const
std::string &)> 
signal_exportLeafFilenameChosen
 Signal emitted when the user has chosen a filename to export the leaf element definitions to.

Detailed Description

A widget that displays a persistence GUI in some way Operations presented are import, export, save, and restore.

Constructor & Destructor Documentation

makVrv::DtPersistenceToolbarWidget::DtPersistenceToolbarWidget ( DtDe de,
QWidget *  p = 0,
Qt::WindowFlags  f = 0 
)

CTOR.

virtual makVrv::DtPersistenceToolbarWidget::~DtPersistenceToolbarWidget ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtPersistenceToolbarWidget::setPersistentStateName ( const QString &  name)
virtual

Set the name of thing being saved.

virtual void makVrv::DtPersistenceToolbarWidget::queryImportFilePath ( DtDe de,
const std::string &  importType,
const std::string &  path,
const std::string &  fileFilter 
)
virtual

Ask for a filename to import from fileFilter is the desired extension with no dot.

Implements makVrv::DtPersistenceControlsInterface.

Reimplemented in makVrv::DtDefinitionPersistenceWidget.

virtual void makVrv::DtPersistenceToolbarWidget::queryMergeFilePath ( DtDe de,
const std::string &  importType,
const std::string &  path,
const std::string &  fileFilter 
)
virtual

Ask for a filename to merge from fileFilter is the desired extension with no dot.

Implements makVrv::DtPersistenceControlsInterface.

Reimplemented in makVrv::DtDefinitionPersistenceWidget.

virtual void makVrv::DtPersistenceToolbarWidget::queryExportFilePath ( DtDe de,
const std::string &  importType,
const std::string &  path,
const std::string &  fileFilter 
)
virtual

Ask for a filename to export to fileFilter is the desired extension with no dot.

Implements makVrv::DtPersistenceControlsInterface.

Reimplemented in makVrv::DtDefinitionPersistenceWidget.

virtual void makVrv::DtPersistenceToolbarWidget::queryExportHierFilePath ( DtDe de,
const std::string &  importType,
const std::string &  path,
const std::string &  fileFilter 
)
virtual

Ask for a filename to export the element definition hierarchy fileFilter is the desired extension with no dot.

Implements makVrv::DtPersistenceControlsInterface.

Reimplemented in makVrv::DtDefinitionPersistenceWidget.

virtual void makVrv::DtPersistenceToolbarWidget::queryExportLeafFilePath ( DtDe de,
const std::string &  importType,
const std::string &  path,
const std::string &  fileFilter 
)
virtual

Ask for a filename to export the element definition leaves fileFilter is the desired extension with no dot.

Implements makVrv::DtPersistenceControlsInterface.

Reimplemented in makVrv::DtDefinitionPersistenceWidget.

virtual void makVrv::DtPersistenceToolbarWidget::setSaveButtonShown ( bool  shown)
virtual

Shows/hides save button. Default is hidden.

Implements makVrv::DtPersistenceControlsInterface.

virtual void makVrv::DtPersistenceToolbarWidget::setSeparatorShown ( bool  shown)
virtual

Shows/hides horizontal separator. Default is shown.

Implements makVrv::DtPersistenceControlsInterface.

virtual void makVrv::DtPersistenceToolbarWidget::setMergeShown ( bool  shown)
virtual

If true, shows merge button to allow merging of settings.

Merge will add or replace, not remove items. is hidden

Implements makVrv::DtPersistenceControlsInterface.

virtual void makVrv::DtPersistenceToolbarWidget::setExportShown ( bool  )
virtual

If true will export selected item(s) to a file.

Default is hidden

Implements makVrv::DtPersistenceControlsInterface.

virtual void makVrv::DtPersistenceToolbarWidget::setImportShown ( bool  )
virtual

If true will import settings.

Default is shown

Implements makVrv::DtPersistenceControlsInterface.

virtual void makVrv::DtPersistenceToolbarWidget::setExportEnabled ( bool  )
virtual

Sets whether or not export button is enabled.

Initially enabled.

Implements makVrv::DtPersistenceControlsInterface.

virtual void makVrv::DtPersistenceToolbarWidget::setMergeEnabled ( bool  )
virtual

Sets whether or not merge button is enabled.

Merge will add or replace, not remove items. Initially disabled.

Implements makVrv::DtPersistenceControlsInterface.

virtual void makVrv::DtPersistenceToolbarWidget::setImportEnabled ( bool  )
virtual

Sets whether or not import button is enabled.

Initially enabled

Implements makVrv::DtPersistenceControlsInterface.

virtual void makVrv::DtPersistenceToolbarWidget::setExportSelectedEnabled ( bool  )
virtual

Sets whether or not export selected button is enabled.

Initially disabled

Implements makVrv::DtPersistenceControlsInterface.

virtual void makVrv::DtPersistenceToolbarWidget::setBackupRestoreEnabled ( bool  shown)
virtual

Sets whether or not the restore from backup button is enabled.

Initially disabled

Implements makVrv::DtPersistenceControlsInterface.

virtual void makVrv::DtPersistenceToolbarWidget::setFactoryRestoreEnabled ( bool  shown)
virtual

Sets whether or not the restore from factory button is enabled.

Initially disabled

Implements makVrv::DtPersistenceControlsInterface.

virtual void makVrv::DtPersistenceToolbarWidget::setSaveDefaultsEnabled ( bool  b)
virtual

Sets whether or not the save defaults button is enabled.

Initially enabled

Implements makVrv::DtPersistenceControlsInterface.

virtual void makVrv::DtPersistenceToolbarWidget::setBackup ( DtBackupInterface )
virtual

Sets the backup object that will be used to restore from.

If the object is NULL, and the restore buttons are pressed, the signal to restore factory and defaults will be sent. If the object is not NULL, the object will be restored by the toolbar and the defaultsRestored and factoryDefaultsRestored signals will be sent

Implements makVrv::DtPersistenceControlsInterface.

virtual void makVrv::DtPersistenceToolbarWidget::disableAllButtons ( bool  )
virtual

Quick way to disable/enable all buttons.

Implements makVrv::DtPersistenceControlsInterface.

Reimplemented in makVrv::DtDefinitionPersistenceWidget.

virtual void makVrv::DtPersistenceToolbarWidget::activateSaveDefaults ( )
virtual

Prompt to save (usually on exit from a page)

Implements makVrv::DtPersistenceControlsInterface.

virtual int makVrv::DtPersistenceToolbarWidget::activateRememberToExport ( bool dontShowAagin)
virtual

Remind user to export (usually prompting on page exit) with a checkbox allow user to not show it again the user check the "dont show again".

Returns
int QMessageBox::StandardButton

Reimplemented from makVrv::DtPersistenceControlsInterface.

virtual void makVrv::DtPersistenceToolbarWidget::on_myImportButton_clicked ( )
protectedvirtualslot
virtual void makVrv::DtPersistenceToolbarWidget::on_myExportButton_clicked ( )
protectedvirtualslot
virtual void makVrv::DtPersistenceToolbarWidget::on_myMergeButton_clicked ( )
protectedvirtualslot
virtual void makVrv::DtPersistenceToolbarWidget::on_myExportSelectedButton_clicked ( )
protectedvirtualslot
virtual void makVrv::DtPersistenceToolbarWidget::on_mySaveButton_clicked ( )
protectedvirtualslot
virtual void makVrv::DtPersistenceToolbarWidget::on_myRestoreButton_clicked ( )
protectedvirtualslot
virtual void makVrv::DtPersistenceToolbarWidget::on_myRestoreFactoryButton_clicked ( )
protectedvirtualslot
virtual void makVrv::DtPersistenceToolbarWidget::backupFileChanged ( const DtBackupInterface )
protectedvirtual

Called from the backup manager when the status of restoring from backup or factory changes.

Will enable/disable appropriate button

virtual void makVrv::DtPersistenceToolbarWidget::rememberToExportDialog ( )
protectedvirtual

For the VRF style definitions, entity type mappings reminder user to export to keep their changes.

std::string makVrv::DtPersistenceToolbarWidget::labelNameToExportDialogDisplayName ( const std::string &  name)
protected

map label name to the name displayed in the rememberToExport dialog name

void makVrv::DtPersistenceToolbarWidget::setupGui ( )
protected
virtual QString makVrv::DtPersistenceToolbarWidget::willAlsoRestore ( int  ) const
protectedvirtual

If other items will be restored by either restoring local or factory, return text string which describes what will be restored.

Member Data Documentation

DtDe& makVrv::DtPersistenceToolbarWidget::myDe
protected
DtBackupInterface* makVrv::DtPersistenceToolbarWidget::myBackup
protected
QLabel* makVrv::DtPersistenceToolbarWidget::myLabel
protected
QPushButton* makVrv::DtPersistenceToolbarWidget::myImportButton
protected
QPushButton* makVrv::DtPersistenceToolbarWidget::myExportButton
protected
QPushButton* makVrv::DtPersistenceToolbarWidget::myMergeButton
protected
QPushButton* makVrv::DtPersistenceToolbarWidget::myExportSelectedButton
protected
QPushButton* makVrv::DtPersistenceToolbarWidget::mySaveButton
protected
QPushButton* makVrv::DtPersistenceToolbarWidget::myRestoreButton
protected
QPushButton* makVrv::DtPersistenceToolbarWidget::myRestoreFactoryButton
protected
QFrame* makVrv::DtPersistenceToolbarWidget::mySeparator
protected
QHBoxLayout* makVrv::DtPersistenceToolbarWidget::myButtonLayout
protected

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

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)