Aimsun Next Scripting  22
Public Types | Public Member Functions | Public Attributes | List of all members
GMultiChooserEditor Class Reference
Inheritance diagram for GMultiChooserEditor:

Public Types

enum  Type {
  eSingleObject , eMultiObject , eInt , eDouble ,
  eBool , eString , eDate , eTime ,
  eDateTime , eDuration , eNone , eQComboBox
}
 

Public Member Functions

 GMultiChooserEditor (QWidget *parent=0, Qt::WindowFlags fl=Qt::WindowFlags())
 
 ~GMultiChooserEditor ()
 
void addEditor (int pos, const QString &title, Type type)
 
QWidget * getWidget (int pos)
 
QComboBox * getComboBox (int pos)
 
void setFilterMulti (int pos, GKType *objectType)
 
void setFilterSingle (int pos, GKType *objectType)
 
void setLimits (int pos, double min, double max)
 
GKObjectgetObject (int pos) const
 
QVector< GKObject * > getObjects (int pos) const
 
int getInt (int pos) const
 
double getDouble (int pos) const
 
bool getBool (int pos) const
 
QString getString (int pos) const
 
QDate getDate (int pos) const
 
QTime getTime (int pos) const
 
QDateTime getDateTime (int pos) const
 
GKTimeDuration getDuration (int pos) const
 
int execDialog ()
 

Public Attributes

MethodCode sipRes = sipCpp -> exec()
 

Detailed Description

GMultiChooserEditor editor( gui );
editor.addEditor( 0, "Enter a number:", GMultiChooserEditor::eInt );
editor.setLimits( 0, -4, 4 );
editor.addEditor( 1, "Select a centroid:", GMultiChooserEditor::eSingleObject );
editor.setFilterSingle( 1, gui->getActiveModel()->getType( "GKCentroid" ) );
if( editor.exec() == QDialog::Accepted ){
int number = editor.getInt( 0 );
GKObject * centroid = editor.getObject( 1 );
}else{
}
Main class, almost all the objects derive from this class.
Definition: GKObject.sip:238
A multi component editor.
Definition: GMultiChooserEditor.sip:40
@ eSingleObject
Definition: GMultiChooserEditor.sip:50
@ eInt
Definition: GMultiChooserEditor.sip:50

Member Enumeration Documentation

◆ Type

Type of editors

Enumerator
eSingleObject 
eMultiObject 
eInt 
eDouble 
eBool 
eString 
eDate 
eTime 
eDateTime 
eDuration 
eNone 
eQComboBox 

Constructor & Destructor Documentation

◆ GMultiChooserEditor()

GMultiChooserEditor::GMultiChooserEditor ( QWidget *  parent = 0,
Qt::WindowFlags  fl = Qt::WindowFlags() 
)

◆ ~GMultiChooserEditor()

GMultiChooserEditor::~GMultiChooserEditor ( )

Member Function Documentation

◆ addEditor()

void GMultiChooserEditor::addEditor ( int  pos,
const QString &  title,
Type  type 
)

Adds an editor with a title and a type. Use pos as a way to access the result later

◆ execDialog()

int GMultiChooserEditor::execDialog ( )

It opens the dialog as a modal dialog and returns either QDialog::Accepted (1) or QDialog::Rejected (0)

◆ getBool()

bool GMultiChooserEditor::getBool ( int  pos) const

Get the value of editor at "pos"

◆ getComboBox()

QComboBox * GMultiChooserEditor::getComboBox ( int  pos)

Get comboBox

◆ getDate()

QDate GMultiChooserEditor::getDate ( int  pos) const

Get the value of editor at "pos"

◆ getDateTime()

QDateTime GMultiChooserEditor::getDateTime ( int  pos) const

Get the value of editor at "pos"

◆ getDouble()

double GMultiChooserEditor::getDouble ( int  pos) const

Get the value of editor at "pos"

◆ getDuration()

GKTimeDuration GMultiChooserEditor::getDuration ( int  pos) const

Get the value of editor at "pos"

◆ getInt()

int GMultiChooserEditor::getInt ( int  pos) const

Get the value of editor at "pos"

◆ getObject()

GKObject * GMultiChooserEditor::getObject ( int  pos) const

Get the value of editor at "pos"

◆ getObjects()

QVector< GKObject * > GMultiChooserEditor::getObjects ( int  pos) const

Get the value of editor at "pos"

◆ getString()

QString GMultiChooserEditor::getString ( int  pos) const

Get the value of editor at "pos"

◆ getTime()

QTime GMultiChooserEditor::getTime ( int  pos) const

Get the value of editor at "pos"

◆ getWidget()

QWidget * GMultiChooserEditor::getWidget ( int  pos)

Get widget

◆ setFilterMulti()

void GMultiChooserEditor::setFilterMulti ( int  pos,
GKType objectType 
)

Sets a function filter to know if an object will be added or not. By default (no filter) all the objects of a given type will be added. If groupBy is true (default is false), all the objects are added, but they are listed grouped by its containers. In this case, filterData must internally be an instance of QList<void*> (the list of containers) instead of a void*.

◆ setFilterSingle()

void GMultiChooserEditor::setFilterSingle ( int  pos,
GKType objectType 
)

Equivalent to setList( GK::GetObjectsFromType(type, filterFunction, filterColumn) ). If nullAllowed is true, a NULL element is prepended at the beginning of the object list.

◆ setLimits()

void GMultiChooserEditor::setLimits ( int  pos,
double  min,
double  max 
)

For Int and Double editors the limits

Member Data Documentation

◆ sipRes

MethodCode GMultiChooserEditor::sipRes = sipCpp -> exec()

© Aimsun SLU
Aimsun ®