Public Member Functions | Private Slots | Private Attributes | Static Private Attributes | List of all members
QtCtrlSelect Class Reference

This class defines an accept/cancel dialog to create a controller and its display widget which will be used by the qt_ctrl GUI. More...

#include <selectCtrl.hpp>

Inheritance diagram for QtCtrlSelect:
Inheritance graph
[legend]

Public Member Functions

bool emptyROSworkspace () const
 Indicates if starting ROS should use empty workspace. More...
 
ControllernewController ()
 Gives the selected controller, or null pointer if the dialog was cancelled. More...
 
ControlWidgetnewCtrlWidget ()
 Gives the selected controller's widget, or null pointer if the dialog was cancelled. More...
 
 QtCtrlSelect (QWidget *parent, const double tm_stp, const MotionModel &motion)
 The dialog is build with a given parent and a time step for the future controller. More...
 
const QString & saveFileName () const
 Gives the save file name. More...
 
bool startROS () const
 Indicates whether ROS should be started. More...
 
- Public Member Functions inherited from OkCancelDialog
 OkCancelDialog (QWidget *parent, const char *title, const char *msg)
 The dialog is build with a given parent and title. More...
 

Private Slots

void updateCtrl (int new_id)
 Changes the selected controller. More...
 
void updateCtrl ()
 Updates the parameters of the current controller. More...
 
void updateFileName ()
 Updates the button displaying the save file. More...
 
void updateROSline ()
 Enables or disables the ROS workspace group box. More...
 

Private Attributes

Controllercontroller
 The controller created by this dialog. More...
 
int ctrl_id
 The identification number of the selected controller. More...
 
QPushButton ctrl_param
 The button to set the controller's parameters. More...
 
QComboBox ctrl_select
 The pop-up menu with the list of possible controllers. More...
 
ControlWidgetctrl_wdgt
 The widget showing the controller's velocities. More...
 
const MotionModelmotion_model
 The motion model of the controlled robot. More...
 
QGroupBox ROS_workspace
 The ROS workspace group box (may be desabled). More...
 
QPushButton save_file
 The button displaying and changing save file. More...
 
QString save_file_name
 The save file name. More...
 
QRadioButton select_ROS [ROS_choices][ROS_choices]
 The radio buttons to select ROS environment. More...
 
const double time_step
 The controller's time step. More...
 

Static Private Attributes

static const char * default_save_name = "None"
 The name displayed when no save file is selected. More...
 
static const int ROS_choices = 2
 The number of ROS environments and sub-environments. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from OkCancelDialog
static bool getDoubleArray (QWidget *parent, const char *title, const char *msg, const int nb_lines, const int nb_col, const char *nameVal[], const bool isGreek[], double val[])
 Asks in a dialog for a set of doubles, and returns it. More...
 
static bool getOrPtConfig (QWidget *parent, const char *title, const char *msg, iSeeML::rob::OrPtConfig &q)
 Asks in a dialog for an oriented point. More...
 
static bool getState (QWidget *parent, const char *title, const char *msg, State &state)
 Asks in a dialog for a state. More...
 
- Protected Member Functions inherited from OkCancelDialog
void insertWidget (QWidget &widget)
 Inserts the given widget (containing the inputs) in the dialog, between message and buttons. More...
 

Detailed Description

This class defines an accept/cancel dialog to create a controller and its display widget which will be used by the qt_ctrl GUI.

Both controller and display widget are allocated dynamically (they will be used after this dialog has been freed), they have to be deleted by the qt_ctrl GUI.

Version
0.3.2

Definition at line 34 of file selectCtrl.hpp.

Constructor & Destructor Documentation

QtCtrlSelect::QtCtrlSelect ( QWidget *  parent,
const double  tm_stp,
const MotionModel motion 
)

The dialog is build with a given parent and a time step for the future controller.

Parameters
parentthe parent widget of the dialog,
tm_stpthe future controller's time step,
motionthe controller motion model.

Definition at line 34 of file selectCtrl.cpp.

Member Function Documentation

bool QtCtrlSelect::emptyROSworkspace ( ) const
inline

Indicates if starting ROS should use empty workspace.

Returns
True if ROS should be start with empty workspace, false if it should be start with default one.

Definition at line 96 of file selectCtrl.hpp.

Controller* QtCtrlSelect::newController ( )
inline

Gives the selected controller, or null pointer if the dialog was cancelled.

Returns
A pointer on the build controller.

Definition at line 102 of file selectCtrl.hpp.

ControlWidget* QtCtrlSelect::newCtrlWidget ( )
inline

Gives the selected controller's widget, or null pointer if the dialog was cancelled.

Returns
A pointer on the build controller's widget.

Definition at line 107 of file selectCtrl.hpp.

const QString& QtCtrlSelect::saveFileName ( ) const
inline

Gives the save file name.

Returns
The save file name.

Definition at line 110 of file selectCtrl.hpp.

bool QtCtrlSelect::startROS ( ) const
inline

Indicates whether ROS should be started.

Returns
True if ROS should be started, false if it already runs.

Definition at line 91 of file selectCtrl.hpp.

void QtCtrlSelect::updateCtrl ( int  new_id)
privateslot

Changes the selected controller.

Parameters
new_idthe new controller number, in the selection list.

Definition at line 115 of file selectCtrl.cpp.

void QtCtrlSelect::updateCtrl ( )
inlineprivateslot

Updates the parameters of the current controller.

See also
updateCtrl(int)

Definition at line 122 of file selectCtrl.hpp.

void QtCtrlSelect::updateFileName ( )
privateslot

Updates the button displaying the save file.

Definition at line 218 of file selectCtrl.cpp.

void QtCtrlSelect::updateROSline ( )
inlineprivateslot

Enables or disables the ROS workspace group box.

Definition at line 114 of file selectCtrl.hpp.

Member Data Documentation

Controller* QtCtrlSelect::controller
private

The controller created by this dialog.

Definition at line 71 of file selectCtrl.hpp.

int QtCtrlSelect::ctrl_id
private

The identification number of the selected controller.

Definition at line 50 of file selectCtrl.hpp.

QPushButton QtCtrlSelect::ctrl_param
private

The button to set the controller's parameters.

Definition at line 53 of file selectCtrl.hpp.

QComboBox QtCtrlSelect::ctrl_select
private

The pop-up menu with the list of possible controllers.

Definition at line 47 of file selectCtrl.hpp.

ControlWidget* QtCtrlSelect::ctrl_wdgt
private

The widget showing the controller's velocities.

Definition at line 74 of file selectCtrl.hpp.

const char * QtCtrlSelect::default_save_name = "None"
staticprivate

The name displayed when no save file is selected.

Definition at line 56 of file selectCtrl.hpp.

const MotionModel& QtCtrlSelect::motion_model
private

The motion model of the controlled robot.

Definition at line 68 of file selectCtrl.hpp.

const int QtCtrlSelect::ROS_choices = 2
staticprivate

The number of ROS environments and sub-environments.

Definition at line 38 of file selectCtrl.hpp.

QGroupBox QtCtrlSelect::ROS_workspace
private

The ROS workspace group box (may be desabled).

Definition at line 41 of file selectCtrl.hpp.

QPushButton QtCtrlSelect::save_file
private

The button displaying and changing save file.

Definition at line 62 of file selectCtrl.hpp.

QString QtCtrlSelect::save_file_name
private

The save file name.

Definition at line 59 of file selectCtrl.hpp.

QRadioButton QtCtrlSelect::select_ROS[ROS_choices][ROS_choices]
private

The radio buttons to select ROS environment.

Definition at line 44 of file selectCtrl.hpp.

const double QtCtrlSelect::time_step
private

The controller's time step.

Definition at line 65 of file selectCtrl.hpp.


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


qt_ctrl
Author(s): Alexis Scheuer
autogenerated on Wed Dec 16 2020 15:51:32