ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
PlyOpenDlg Class Reference

Dialog for configuration of PLY files opening sequence. More...

#include <PlyOpenDlg.h>

Inheritance diagram for PlyOpenDlg:
Collaboration diagram for PlyOpenDlg:

Signals

void fullyAccepted ()
 

Public Member Functions

 PlyOpenDlg (QWidget *parent=nullptr)
 
void setDefaultComboItems (const QStringList &stdPropsText)
 
void setListComboItems (const QStringList &listPropsText)
 
void setSingleComboItems (const QStringList &singlePropsText)
 
bool isValid (bool displayErrors=true) const
 Returns whether the current configuration is valid or not. More...
 
bool restorePreviousContext (bool &hasAPreviousContext)
 Restores the previously saved configuration (if any) More...
 
bool canBeSkipped () const
 Returns whether the dialog can be 'skipped'. More...
 
void addSFComboBox (int selectedIndex=0)
 

Static Public Member Functions

static void ResetApplyAll ()
 Resets the "apply all" flag (if set) More...
 

Public Attributes

std::vector< QComboBox * > m_standardCombos
 Standard comboboxes. More...
 
std::vector< QComboBox * > m_listCombos
 List-related comboboxes (faces, etc.) More...
 
std::vector< QComboBox * > m_singleCombos
 Single-related comboboxes (texture index, etc.) More...
 
std::vector< QComboBox * > m_sfCombos
 SF comboboxes. More...
 

Protected Member Functions

void apply ()
 
void applyAll ()
 
void addAllStdPropsAsSF ()
 
void saveContext (PlyLoadingContext *context)
 Saves current configuration (for internal use) More...
 
bool restoreContext (PlyLoadingContext *context, int &unassignedProps, int &mismatchProps)
 Restore a previously saved configuration (for internal use) More...
 

Protected Attributes

QStringList m_stdPropsText
 Standard comboboxes elements. More...
 
QStringList m_listPropsText
 List-related comboboxes elements. More...
 
QStringList m_singlePropsText
 Single-related comboboxes elements. More...
 

Detailed Description

Dialog for configuration of PLY files opening sequence.

Definition at line 24 of file PlyOpenDlg.h.

Constructor & Destructor Documentation

◆ PlyOpenDlg()

PlyOpenDlg::PlyOpenDlg ( QWidget *  parent = nullptr)
explicit

Member Function Documentation

◆ addAllStdPropsAsSF()

void PlyOpenDlg::addAllStdPropsAsSF ( )
protected

Definition at line 437 of file PlyOpenDlg.cpp.

References addSFComboBox(), m_sfCombos, m_standardCombos, m_stdPropsText, and CVLog::Warning().

Referenced by PlyOpenDlg().

◆ addSFComboBox()

void PlyOpenDlg::addSFComboBox ( int  selectedIndex = 0)

Definition at line 419 of file PlyOpenDlg.cpp.

References m_sfCombos, and m_stdPropsText.

Referenced by addAllStdPropsAsSF(), PlyFilter::loadFile(), PlyOpenDlg(), and restoreContext().

◆ apply()

void PlyOpenDlg::apply ( )
protected

Definition at line 349 of file PlyOpenDlg.cpp.

References PlyLoadingContext::applyAll, fullyAccepted(), isValid(), s_lastContext, and saveContext().

Referenced by PlyOpenDlg().

◆ applyAll()

void PlyOpenDlg::applyAll ( )
protected

Definition at line 357 of file PlyOpenDlg.cpp.

References PlyLoadingContext::applyAll, fullyAccepted(), isValid(), s_lastContext, and saveContext().

Referenced by PlyOpenDlg().

◆ canBeSkipped()

bool PlyOpenDlg::canBeSkipped ( ) const

Returns whether the dialog can be 'skipped'.

i.e. 'Apply all' button has been previously clicked and the configuration is valid.

Definition at line 415 of file PlyOpenDlg.cpp.

References PlyLoadingContext::applyAll, isValid(), s_lastContext, and PlyLoadingContext::valid.

Referenced by PlyFilter::loadFile().

◆ fullyAccepted

void PlyOpenDlg::fullyAccepted ( )
signal

Referenced by apply(), applyAll(), and PlyOpenDlg().

◆ isValid()

bool PlyOpenDlg::isValid ( bool  displayErrors = true) const

Returns whether the current configuration is valid or not.

Definition at line 365 of file PlyOpenDlg.cpp.

References m_listCombos, m_listPropsText, m_sfCombos, m_singleCombos, m_singlePropsText, m_standardCombos, and m_stdPropsText.

Referenced by apply(), applyAll(), and canBeSkipped().

◆ ResetApplyAll()

void PlyOpenDlg::ResetApplyAll ( )
static

Resets the "apply all" flag (if set)

Definition at line 111 of file PlyOpenDlg.cpp.

References PlyLoadingContext::applyAll, and s_lastContext.

Referenced by PlyFilter::loadFile().

◆ restoreContext()

bool PlyOpenDlg::restoreContext ( PlyLoadingContext context,
int &  unassignedProps,
int &  mismatchProps 
)
protected

Restore a previously saved configuration (for internal use)

Definition at line 224 of file PlyOpenDlg.cpp.

References addSFComboBox(), context, count, m_listCombos, m_singleCombos, m_standardCombos, and m_stdPropsText.

Referenced by restorePreviousContext().

◆ restorePreviousContext()

bool PlyOpenDlg::restorePreviousContext ( bool &  hasAPreviousContext)

Restores the previously saved configuration (if any)

Parameters
hasAPreviousContextreturns whether a previous context is stored
Returns
whether the previous context can be restored or not

Definition at line 113 of file PlyOpenDlg.cpp.

References PlyLoadingContext::applyAll, restoreContext(), s_lastContext, and PlyLoadingContext::valid.

Referenced by PlyFilter::loadFile().

◆ saveContext()

void PlyOpenDlg::saveContext ( PlyLoadingContext context)
protected

Saves current configuration (for internal use)

Definition at line 131 of file PlyOpenDlg.cpp.

References context, count, m_listCombos, m_sfCombos, m_singleCombos, and m_standardCombos.

Referenced by apply(), and applyAll().

◆ setDefaultComboItems()

void PlyOpenDlg::setDefaultComboItems ( const QStringList &  stdPropsText)

Definition at line 72 of file PlyOpenDlg.cpp.

References m_sfCombos, m_standardCombos, and m_stdPropsText.

Referenced by PlyFilter::loadFile().

◆ setListComboItems()

void PlyOpenDlg::setListComboItems ( const QStringList &  listPropsText)

Definition at line 89 of file PlyOpenDlg.cpp.

References m_listCombos, and m_listPropsText.

Referenced by PlyFilter::loadFile().

◆ setSingleComboItems()

void PlyOpenDlg::setSingleComboItems ( const QStringList &  singlePropsText)

Definition at line 100 of file PlyOpenDlg.cpp.

References m_singleCombos, and m_singlePropsText.

Referenced by PlyFilter::loadFile().

Member Data Documentation

◆ m_listCombos

std::vector<QComboBox*> PlyOpenDlg::m_listCombos

List-related comboboxes (faces, etc.)

Definition at line 37 of file PlyOpenDlg.h.

Referenced by isValid(), PlyOpenDlg(), restoreContext(), saveContext(), and setListComboItems().

◆ m_listPropsText

QStringList PlyOpenDlg::m_listPropsText
protected

List-related comboboxes elements.

Definition at line 83 of file PlyOpenDlg.h.

Referenced by isValid(), and setListComboItems().

◆ m_sfCombos

std::vector<QComboBox*> PlyOpenDlg::m_sfCombos

SF comboboxes.

Definition at line 41 of file PlyOpenDlg.h.

Referenced by addAllStdPropsAsSF(), addSFComboBox(), isValid(), PlyFilter::loadFile(), saveContext(), and setDefaultComboItems().

◆ m_singleCombos

std::vector<QComboBox*> PlyOpenDlg::m_singleCombos

Single-related comboboxes (texture index, etc.)

Definition at line 39 of file PlyOpenDlg.h.

Referenced by isValid(), PlyOpenDlg(), restoreContext(), saveContext(), and setSingleComboItems().

◆ m_singlePropsText

QStringList PlyOpenDlg::m_singlePropsText
protected

Single-related comboboxes elements.

Definition at line 85 of file PlyOpenDlg.h.

Referenced by isValid(), and setSingleComboItems().

◆ m_standardCombos

std::vector<QComboBox*> PlyOpenDlg::m_standardCombos

Standard comboboxes.

Definition at line 35 of file PlyOpenDlg.h.

Referenced by addAllStdPropsAsSF(), isValid(), PlyOpenDlg(), restoreContext(), saveContext(), and setDefaultComboItems().

◆ m_stdPropsText

QStringList PlyOpenDlg::m_stdPropsText
protected

Standard comboboxes elements.

Definition at line 81 of file PlyOpenDlg.h.

Referenced by addAllStdPropsAsSF(), addSFComboBox(), isValid(), restoreContext(), and setDefaultComboItems().


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