#include <SeExprEdCompletionModel.h>
Public Member Functions | |
void | clearFunctions () |
void | addFunction (const QString &function, const QString &docString) |
void | clearVariables () |
void | addVariable (const QString &str, const QString &comment) |
void | syncExtras (const SeExprEdCompletionModel &otherModel) |
SeExprEdCompletionModel (QObject *parent=0) | |
QModelIndex | index (int row, int column, const QModelIndex &) const |
QModelIndex | parent (const QModelIndex &) const |
int | rowCount (const QModelIndex &parent=QModelIndex()) const |
int | columnCount (const QModelIndex &parent) const |
QString | getFirstLine (const std::string &all) const |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
QString | getDocString (const QString &s) |
Public Attributes | |
std::vector< QString > | local_variables |
Private Attributes | |
std::vector< QString > | functions |
std::vector< QString > | functions_comment |
std::map< QString, int > | functionNameToFunction |
std::vector< QString > | variables |
std::vector< QString > | variables_comment |
Static Private Attributes | |
static std::vector< QString > | builtins |
Definition at line 23 of file SeExprEdCompletionModel.h.
SeExprEdCompletionModel::SeExprEdCompletionModel | ( | QObject * | parent = 0 |
) |
Definition at line 21 of file SeExprEdCompletionModel.cpp.
References builtins, and SeExprFunc::getFunctionNames().
void SeExprEdCompletionModel::addFunction | ( | const QString & | function, | |
const QString & | docString | |||
) |
Definition at line 46 of file SeExprEdCompletionModel.cpp.
References functionNameToFunction, functions, and functions_comment.
Referenced by SeExprEdShortEdit::registerExtraFunction(), and SeExprEditor::registerExtraFunction().
void SeExprEdCompletionModel::addVariable | ( | const QString & | str, | |
const QString & | comment | |||
) |
Definition at line 36 of file SeExprEdCompletionModel.cpp.
References variables, and variables_comment.
Referenced by SeExprEdShortEdit::registerExtraVariable(), and SeExprEditor::registerExtraVariable().
void SeExprEdCompletionModel::clearFunctions | ( | ) |
Definition at line 41 of file SeExprEdCompletionModel.cpp.
References functionNameToFunction, functions, and functions_comment.
Referenced by SeExprEdShortEdit::clearExtraCompleters(), and SeExprEditor::clearExtraCompleters().
void SeExprEdCompletionModel::clearVariables | ( | ) |
Definition at line 31 of file SeExprEdCompletionModel.cpp.
References variables, and variables_comment.
Referenced by SeExprEdShortEdit::clearExtraCompleters(), and SeExprEditor::clearExtraCompleters().
int SeExprEdCompletionModel::columnCount | ( | const QModelIndex & | parent | ) | const [inline] |
Definition at line 52 of file SeExprEdCompletionModel.h.
QVariant SeExprEdCompletionModel::data | ( | const QModelIndex & | index, | |
int | role = Qt::DisplayRole | |||
) | const |
Definition at line 62 of file SeExprEdCompletionModel.cpp.
References builtins, functions, functions_comment, SeExprFunc::getDocString(), getFirstLine(), local_variables, variables, and variables_comment.
QString SeExprEdCompletionModel::getDocString | ( | const QString & | s | ) |
Definition at line 114 of file SeExprEdCompletionModel.cpp.
References functionNameToFunction, and functions_comment.
Referenced by SeExprEdShortTextEdit::keyPressEvent(), and SeExprEdExpressionTextEdit::keyPressEvent().
QString SeExprEdCompletionModel::getFirstLine | ( | const std::string & | all | ) | const [inline] |
Definition at line 55 of file SeExprEdCompletionModel.h.
Referenced by data().
QVariant SeExprEdCompletionModel::headerData | ( | int | section, | |
Qt::Orientation | orientation, | |||
int | role = Qt::DisplayRole | |||
) | const [inline] |
Definition at line 64 of file SeExprEdCompletionModel.h.
QModelIndex SeExprEdCompletionModel::index | ( | int | row, | |
int | column, | |||
const QModelIndex & | ||||
) | const [inline] |
Definition at line 39 of file SeExprEdCompletionModel.h.
QModelIndex SeExprEdCompletionModel::parent | ( | const QModelIndex & | ) | const [inline] |
Definition at line 42 of file SeExprEdCompletionModel.h.
Referenced by rowCount().
int SeExprEdCompletionModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const [inline] |
Definition at line 45 of file SeExprEdCompletionModel.h.
References builtins, functions, local_variables, parent(), and variables.
void SeExprEdCompletionModel::syncExtras | ( | const SeExprEdCompletionModel & | otherModel | ) |
Definition at line 53 of file SeExprEdCompletionModel.cpp.
References functionNameToFunction, functions, functions_comment, variables, and variables_comment.
Referenced by SeExprEditor::replaceExtras().
std::vector< QString > SeExprEdCompletionModel::builtins [static, private] |
Definition at line 77 of file SeExprEdCompletionModel.h.
Referenced by data(), rowCount(), and SeExprEdCompletionModel().
std::map<QString,int> SeExprEdCompletionModel::functionNameToFunction [private] |
Definition at line 79 of file SeExprEdCompletionModel.h.
Referenced by addFunction(), clearFunctions(), getDocString(), and syncExtras().
std::vector<QString> SeExprEdCompletionModel::functions [private] |
Definition at line 78 of file SeExprEdCompletionModel.h.
Referenced by addFunction(), clearFunctions(), data(), rowCount(), and syncExtras().
std::vector<QString> SeExprEdCompletionModel::functions_comment [private] |
Definition at line 78 of file SeExprEdCompletionModel.h.
Referenced by addFunction(), clearFunctions(), data(), getDocString(), and syncExtras().
std::vector<QString> SeExprEdCompletionModel::local_variables |
Definition at line 73 of file SeExprEdCompletionModel.h.
Referenced by data(), SeExprEdShortEdit::rebuildControls(), SeExprEditor::rebuildControls(), and rowCount().
std::vector<QString> SeExprEdCompletionModel::variables [private] |
Definition at line 80 of file SeExprEdCompletionModel.h.
Referenced by addVariable(), clearVariables(), data(), rowCount(), and syncExtras().
std::vector<QString> SeExprEdCompletionModel::variables_comment [private] |
Definition at line 80 of file SeExprEdCompletionModel.h.
Referenced by addVariable(), clearVariables(), data(), and syncExtras().