Aimsun Next Scripting
22
|
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) |
GKObject * | getObject (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() |
GMultiChooserEditor::GMultiChooserEditor | ( | QWidget * | parent = 0 , |
Qt::WindowFlags | fl = Qt::WindowFlags() |
||
) |
GMultiChooserEditor::~GMultiChooserEditor | ( | ) |
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
int GMultiChooserEditor::execDialog | ( | ) |
It opens the dialog as a modal dialog and returns either QDialog::Accepted (1) or QDialog::Rejected (0)
bool GMultiChooserEditor::getBool | ( | int | pos | ) | const |
Get the value of editor at "pos"
QComboBox * GMultiChooserEditor::getComboBox | ( | int | pos | ) |
Get comboBox
QDate GMultiChooserEditor::getDate | ( | int | pos | ) | const |
Get the value of editor at "pos"
QDateTime GMultiChooserEditor::getDateTime | ( | int | pos | ) | const |
Get the value of editor at "pos"
double GMultiChooserEditor::getDouble | ( | int | pos | ) | const |
Get the value of editor at "pos"
GKTimeDuration GMultiChooserEditor::getDuration | ( | int | pos | ) | const |
Get the value of editor at "pos"
int GMultiChooserEditor::getInt | ( | int | pos | ) | const |
Get the value of editor at "pos"
GKObject * GMultiChooserEditor::getObject | ( | int | pos | ) | const |
Get the value of editor at "pos"
QVector< GKObject * > GMultiChooserEditor::getObjects | ( | int | pos | ) | const |
Get the value of editor at "pos"
QString GMultiChooserEditor::getString | ( | int | pos | ) | const |
Get the value of editor at "pos"
QTime GMultiChooserEditor::getTime | ( | int | pos | ) | const |
Get the value of editor at "pos"
QWidget * GMultiChooserEditor::getWidget | ( | int | pos | ) |
Get widget
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*.
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.
void GMultiChooserEditor::setLimits | ( | int | pos, |
double | min, | ||
double | max | ||
) |
For Int and Double editors the limits
MethodCode GMultiChooserEditor::sipRes = sipCpp -> exec() |