List of all members | Public Types | Public Slots | Public Member Functions | Public Attributes | Protected Slots
FileMoveSelector Class Reference

The FileMoveSelector provides a standardized user interface for selecting what the application should do with a file in the host file system after it has been processed. More...

#include <filemoveselector.h>

Inheritance diagram for FileMoveSelector:
QWidget Ui::FileMoveSelector Ui_FileMoveSelector

Public Types

enum  FileMoveOption { Nothing, Suffix, ChangeDir, Delete }
 

Public Slots

bool setCode (QString pcode)
 Programatically set the selection using a text code value. More...
 
bool setDestdir (QString pdir)
 Programatically set the destination directory. More...
 
bool setOption (FileMoveOption poption)
 Programatically set the selection using one of the FileMoveOption enumerated values. More...
 
bool setSuffix (QString psuffix)
 Programatically set the suffix to append. More...
 

Public Member Functions

 FileMoveSelector (QWidget *parent=0, Qt::WindowFlags fl=0)
 
 ~FileMoveSelector ()
 
Q_INVOKABLE QString code () const
 Return the text code value of the currently-selected return option. More...
 
Q_INVOKABLE QString codeForOption (FileMoveOption poption) const
 Translate a FileMoveOption enumerated value to a text code value. More...
 
Q_INVOKABLE QString destdir () const
 The destination directory for files which are to be moved. More...
 
Q_INVOKABLE FileMoveOption option () const
 The enumerated FileMoveOption value of the current selection. More...
 
void retranslateUi (QWidget *FileMoveSelector)
 
void retranslateUi (QWidget *FileMoveSelector)
 
void setupUi (QWidget *FileMoveSelector)
 
void setupUi (QWidget *FileMoveSelector)
 
Q_INVOKABLE QString suffix () const
 The suffix that should be appended to files that have been processed. More...
 

Public Attributes

QWidget_deletePage
 
QWidget_invalidPage
 
FileCluster_movedir
 
XLabel_movedirLit
 
QWidget_movePage
 
QWidget_nothingPage
 
XComboBox_status
 
QStackedWidget * _statusStack
 
XLineEdit_suffix
 
XLabel_suffixLit
 
QWidget_suffixPage
 
QHBoxLayout * horizontalLayout
 
QHBoxLayout * horizontalLayout_2
 
QHBoxLayout * horizontalLayout_3
 

Protected Slots

virtual void languageChange ()
 

Detailed Description

The FileMoveSelector provides a standardized user interface for selecting what the application should do with a file in the host file system after it has been processed.

The FileMoveSelector encodes a simple user interface paradigm for how the application should handle files after they have been processed. The application window that has a FileMoveSelector must store the user's selection. The application code that processes the files should check this stored selection and have its own means of handling files in the selected manner.

See also
configureIE
ImportHelper

Member Enumeration Documentation

◆ FileMoveOption

Enumerator
Nothing 
Suffix 
ChangeDir 
Delete 

Constructor & Destructor Documentation

◆ FileMoveSelector()

FileMoveSelector::FileMoveSelector ( QWidget parent = 0,
Qt::WindowFlags  fl = 0 
)

◆ ~FileMoveSelector()

FileMoveSelector::~FileMoveSelector ( )

Member Function Documentation

◆ code()

QString FileMoveSelector::code ( ) const

Return the text code value of the currently-selected return option.

See also
codeForOption(FileMoveOption) for possible return values

◆ codeForOption()

QString FileMoveSelector::codeForOption ( FileMoveOption  poption) const

Translate a FileMoveOption enumerated value to a text code value.

The text code values are not translatable. They are intended to be used for storing the user's selection in a database or configuration file, and for applications to read from the database or configuration file when deciding how to handle a file after it has been processed.

Returns
The text code value corresponding to the FileMoveOption enumerated value. Possible values are "None", "Rename", "Move", and "Delete", or QString::null if poption is invalid or not yet supported.

◆ destdir()

QString FileMoveSelector::destdir ( ) const

The destination directory for files which are to be moved.

This value reflects the current contents of the destination directory field. The destination directory may not be visible, depending on the currently selected option.

Returns
The text entered in the destination directory field of the FileMoveSelector. This value should not be used to determine how the user would like files to be handled. Use code() or option() for this purpose.

◆ languageChange

void FileMoveSelector::languageChange ( )
protectedvirtualslot

◆ option()

FileMoveSelector::FileMoveOption FileMoveSelector::option ( ) const

The enumerated FileMoveOption value of the current selection.

Returns
The currently selected option, or -1 if there is an error.

◆ retranslateUi() [1/2]

void Ui_FileMoveSelector::retranslateUi ( QWidget FileMoveSelector)
inlineinherited

◆ retranslateUi() [2/2]

void Ui_FileMoveSelector::retranslateUi ( QWidget FileMoveSelector)
inlineinherited

◆ setCode

bool FileMoveSelector::setCode ( QString  pcode)
slot

Programatically set the selection using a text code value.

Returns
true if successful or false if the pcode does not exactly match a known value.

◆ setDestdir

bool FileMoveSelector::setDestdir ( QString  pdir)
slot

Programatically set the destination directory.

This does not automatically set the selection to ChangeDir.

Returns
true

◆ setOption

bool FileMoveSelector::setOption ( FileMoveOption  poption)
slot

Programatically set the selection using one of the FileMoveOption enumerated values.

Returns
true if successful or false if poption is not valid.

◆ setSuffix

bool FileMoveSelector::setSuffix ( QString  psuffix)
slot

Programatically set the suffix to append.

This does not automatically set the selection to Suffix.

Returns
true

◆ setupUi() [1/2]

void Ui_FileMoveSelector::setupUi ( QWidget FileMoveSelector)
inlineinherited

◆ setupUi() [2/2]

void Ui_FileMoveSelector::setupUi ( QWidget FileMoveSelector)
inlineinherited

◆ suffix()

QString FileMoveSelector::suffix ( ) const

The suffix that should be appended to files that have been processed.

This value reflects the current contents of the suffix field. This field may not be visible, depending on the currently selected option.

Returns
The text entered in the suffix field of the FileMoveSelector. This value should not be used to determine how the user would like files to be handled. Use code() or option() for this purpose.

Member Data Documentation

◆ _deletePage

QWidget * Ui_FileMoveSelector::_deletePage
inherited

◆ _invalidPage

QWidget * Ui_FileMoveSelector::_invalidPage
inherited

◆ _movedir

FileCluster * Ui_FileMoveSelector::_movedir
inherited

◆ _movedirLit

XLabel * Ui_FileMoveSelector::_movedirLit
inherited

◆ _movePage

QWidget * Ui_FileMoveSelector::_movePage
inherited

◆ _nothingPage

QWidget * Ui_FileMoveSelector::_nothingPage
inherited

◆ _status

XComboBox * Ui_FileMoveSelector::_status
inherited

◆ _statusStack

QStackedWidget * Ui_FileMoveSelector::_statusStack
inherited

◆ _suffix

XLineEdit * Ui_FileMoveSelector::_suffix
inherited

◆ _suffixLit

XLabel * Ui_FileMoveSelector::_suffixLit
inherited

◆ _suffixPage

QWidget * Ui_FileMoveSelector::_suffixPage
inherited

◆ horizontalLayout

QHBoxLayout * Ui_FileMoveSelector::horizontalLayout
inherited

◆ horizontalLayout_2

QHBoxLayout * Ui_FileMoveSelector::horizontalLayout_2
inherited

◆ horizontalLayout_3

QHBoxLayout * Ui_FileMoveSelector::horizontalLayout_3
inherited

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

Generated on Fri Apr 9 2021 xTuple ERP Programmer Reference, Version 5.0.0 doxygen 1.8.17