qCC_io version 2.13.alpha (Qt) - 31 May 2022
CloudCompare standard I/O filters (file readers & writers)
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ccShiftAndScaleCloudDlg Class Reference

Dialog for selection of cloud center. More...

#include <ccShiftAndScaleCloudDlg.h>

Inheritance diagram for ccShiftAndScaleCloudDlg:
Inheritance graph
[legend]
Collaboration diagram for ccShiftAndScaleCloudDlg:
Collaboration graph
[legend]

Public Member Functions

 ccShiftAndScaleCloudDlg (const CCVector3d &Pg, double Dg=0, QWidget *parent=nullptr)
 Default constructor. More...
 
 ccShiftAndScaleCloudDlg (const CCVector3d &Pl, double Dl, const CCVector3d &Pg, double Dg, QWidget *parent=nullptr)
 Reverse mode constructor. More...
 
void setShiftFieldsPrecision (int precision)
 Sets the Shift fields (X, Y and Z) precision (default should be 2)
 
virtual ~ccShiftAndScaleCloudDlg ()
 Destructor.
 
CCVector3d getShift () const
 Returns shift.
 
double getScale () const
 Returns scale.
 
bool applyAll () const
 Whether shift should be applied to all files.
 
bool cancelled () const
 Whether the user has clicked on the cancel button or not.
 
void showScaleItems (bool state)
 Whether to show dialog items related to scale.
 
void showApplyAllButton (bool state)
 Whether to show the 'Apply all' button or not.
 
void showApplyButton (bool state)
 Whether to show the 'Apply' button or not.
 
void showNoButton (bool state)
 Whether to show the 'No' button or not.
 
void showCancelButton (bool state)
 Whether to show the 'Cancel' button or not.
 
void showWarning (bool state)
 Whether to show or not the warning about non pertinent shift information.
 
void showTitle (bool state)
 Whether to show or not the title.
 
void showKeepGlobalPosCheckbox (bool state)
 Whether to show or not the 'Keep global position' checkbox.
 
bool keepGlobalPos () const
 Returns whether the global position should be preserved or not.
 
void setKeepGlobalPos (bool state)
 Sets whether the global position should be preserved or not.
 
void showPreserveShiftOnSave (bool state)
 Whether to show or not the 'Preserve shift on save' checkbox.
 
bool preserveShiftOnSave () const
 Returns whether the global shift should be preserved or not.
 
void setPreserveShiftOnSave (bool state)
 Sets whether the global shift should be preserved or not.
 
int addShiftInfo (const ccGlobalShiftManager::ShiftInfo &info)
 Adds shift info to the combox. More...
 
int addShiftInfo (const std::vector< ccGlobalShiftManager::ShiftInfo > &info)
 Adds shift info to the combox. More...
 
bool getInfo (size_t index, ccGlobalShiftManager::ShiftInfo &info) const
 Returns a given input info.
 
size_t infoCount () const
 Returns the number of info currently stored.
 
void setCurrentProfile (int index)
 Sets the current combo-box entry (profile)
 

Static Public Member Functions

static void SetLastInfo (const CCVector3d &shift, double scale)
 Sets the last shift and scale information.
 

Protected Member Functions

void onLoadIndexChanged (int)
 Slot called when the 'loadComboBox' index changes.
 
void onGlobalPosCheckBoxToggled (bool)
 Slot called when the 'Keep global position' checkbox is toggled.
 
void onClick (QAbstractButton *button)
 Analyzes the clicked button.
 
void updateGlobalAndLocalSystems ()
 Updates info on the global and local coordinate systems.
 
void displayMoreInfo ()
 Displays more info about global shift mechanism.
 
void init ()
 Initialization routine.
 
void setShift (const CCVector3d &shift)
 Sets displayed shift.
 
void setScale (double scale)
 Sets displayed scale.
 
void updateLocalSystem ()
 Updates info on the local coordinate system.
 
void updateGlobalSystem ()
 Updates info on the global coordinate system.
 

Protected Attributes

Ui_GlobalShiftAndScaleDlg * m_ui
 Associated UI.
 
bool m_applyAll
 Whether shift should be applied to all files.
 
bool m_cancel
 Whether the user has clicked on Cancel or not.
 
std::vector< ccGlobalShiftManager::ShiftInfom_defaultInfos
 Default infos (typically loaded from the global_shift_list.txt' file)
 
int m_activeInfoIndex
 Active info entry index.
 
CCVector3d m_originalPoint
 Original coordinate system point.
 
double m_originalDiagonal
 Original coordinate system diagonal.
 
CCVector3d m_localPoint
 Local coordinate system point (reversed mode only)
 
double m_localDiagonal
 Local coordinate system diagonal (reversed mode only)
 
bool m_reversedMode
 Whether the reverse mode is active or not.
 

Detailed Description

Dialog for selection of cloud center.

Constructor & Destructor Documentation

◆ ccShiftAndScaleCloudDlg() [1/2]

ccShiftAndScaleCloudDlg::ccShiftAndScaleCloudDlg ( const CCVector3d &  Pg,
double  Dg = 0,
QWidget *  parent = nullptr 
)

Default constructor.

Parameters
Pga point expressed in the original coordinate system
Dgbounding box diagonal in the original coordinate system (or <= 0 to ignore)
parentparent widget

◆ ccShiftAndScaleCloudDlg() [2/2]

ccShiftAndScaleCloudDlg::ccShiftAndScaleCloudDlg ( const CCVector3d &  Pl,
double  Dl,
const CCVector3d &  Pg,
double  Dg,
QWidget *  parent = nullptr 
)

Reverse mode constructor.

Parameters
Pla point expressed in the local coordinate system
Dlbounding box diagonal in the local coordinate system
Pga point expressed in the original coordinate system
Dgbounding box diagonal in the original coordinate system
parentparent widget

Member Function Documentation

◆ addShiftInfo() [1/2]

int ccShiftAndScaleCloudDlg::addShiftInfo ( const ccGlobalShiftManager::ShiftInfo info)

Adds shift info to the combox.

Parameters
infoshift info
Returns
index in combo-box

◆ addShiftInfo() [2/2]

int ccShiftAndScaleCloudDlg::addShiftInfo ( const std::vector< ccGlobalShiftManager::ShiftInfo > &  info)

Adds shift info to the combox.

Parameters
infoshift info
Returns
index in combo-box

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