AtCore  1.0.72
AtCore is a API to manage the serial connection between the computer and 3D Printers.
Signals | Public Member Functions | Private Member Functions | Private Attributes | List of all members
AxisControl Class Reference

AxisControl is a Widget to generate axis relative movements. More...

#include <axiscontrol.h>

Inheritance diagram for AxisControl:

Signals

void clicked (const QLatin1Char axis, double value)
 User has clicked to move an axis. More...
 
void unitsChanged (int selection)
 User has changed the units. More...
 

Public Member Functions

 AxisControl (QWidget *parent=nullptr)
 Create a new AxisControl. More...
 
 ~AxisControl ()=default
 

Private Member Functions

QPushButton * makeButton (const QLatin1Char axis, int multiplier, const QSize &iconSize, const QString &themeIcon, const QString &fallbackText)
 Create A push button connected to the emit event. More...
 
QWidget * makeSimpleAxis (const QLatin1Char axis, const QSize &iconSize)
 makeSimpleAxis More...
 

Private Attributes

QDoubleSpinBox * sbValue = nullptr
 

Detailed Description

AxisControl is a Widget to generate axis relative movements.

Usage: Create a instance of AxisControl and connect the clicked signal, it will give you the axis and value that was clicked.

Constructor & Destructor Documentation

◆ AxisControl()

AxisControl::AxisControl ( QWidget *  parent = nullptr)

Create a new AxisControl.

Parameters
parent

◆ ~AxisControl()

AxisControl::~AxisControl ( )
default

Member Function Documentation

◆ clicked

void AxisControl::clicked ( const QLatin1Char  axis,
double  value 
)
signal

User has clicked to move an axis.

Parameters
axisAxis to move
valueAmount to move

◆ makeButton()

QPushButton * AxisControl::makeButton ( const QLatin1Char  axis,
int  multiplier,
const QSize &  iconSize,
const QString &  themeIcon,
const QString &  fallbackText 
)
private

Create A push button connected to the emit event.

Parameters
axisSingle letter of the axis (X,Y,Z,E)
multiplierUsed to set the move direction set to 1 or -1
iconSizesize to set the icon
themeIconicon to use "fromTheme"
fallbackTextFallback text if theme fails
Returns
The Created PushButton

◆ makeSimpleAxis()

QWidget * AxisControl::makeSimpleAxis ( const QLatin1Char  axis,
const QSize &  iconSize 
)
private

makeSimpleAxis

Parameters
axisAxis
iconSizeSize of the icon
Returns
Simple Axis Widget

◆ unitsChanged

void AxisControl::unitsChanged ( int  selection)
signal

User has changed the units.

Parameters
selectionSelection of Metric (0) or Imperial(1)

Member Data Documentation

◆ sbValue

QDoubleSpinBox* AxisControl::sbValue = nullptr
private

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