SeExpr
|
#include <ExprCompletionModel.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 ExprCompletionModel &otherModel) |
ExprCompletionModel (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 30 of file ExprCompletionModel.h.
ExprCompletionModel::ExprCompletionModel | ( | QObject * | parent = 0 | ) |
Definition at line 28 of file ExprCompletionModel.cpp.
References builtins, and SeExpr2::ExprFunc::getFunctionNames().
void ExprCompletionModel::addFunction | ( | const QString & | function, |
const QString & | docString | ||
) |
Definition at line 53 of file ExprCompletionModel.cpp.
References functionNameToFunction, functions, and functions_comment.
Referenced by ExprShortEdit::registerExtraFunction(), and ExprEditor::registerExtraFunction().
void ExprCompletionModel::addVariable | ( | const QString & | str, |
const QString & | comment | ||
) |
Definition at line 43 of file ExprCompletionModel.cpp.
References variables, and variables_comment.
Referenced by ExprShortEdit::registerExtraVariable(), and ExprEditor::registerExtraVariable().
void ExprCompletionModel::clearFunctions | ( | ) |
Definition at line 48 of file ExprCompletionModel.cpp.
References functionNameToFunction, functions, and functions_comment.
Referenced by ExprShortEdit::clearExtraCompleters(), and ExprEditor::clearExtraCompleters().
void ExprCompletionModel::clearVariables | ( | ) |
Definition at line 38 of file ExprCompletionModel.cpp.
References variables, and variables_comment.
Referenced by ExprShortEdit::clearExtraCompleters(), and ExprEditor::clearExtraCompleters().
|
inline |
Definition at line 59 of file ExprCompletionModel.h.
QVariant ExprCompletionModel::data | ( | const QModelIndex & | index, |
int | role = Qt::DisplayRole |
||
) | const |
Definition at line 69 of file ExprCompletionModel.cpp.
References builtins, functions, functions_comment, SeExpr2::ExprFunc::getDocString(), getFirstLine(), local_variables, variables, and variables_comment.
QString ExprCompletionModel::getDocString | ( | const QString & | s | ) |
Definition at line 121 of file ExprCompletionModel.cpp.
References functionNameToFunction, functions_comment, and SeExpr2::ExprFunc::getDocString().
Referenced by ExprTextEdit::keyPressEvent(), and ExprShortTextEdit::keyPressEvent().
|
inline |
Definition at line 62 of file ExprCompletionModel.h.
Referenced by data().
|
inline |
Definition at line 71 of file ExprCompletionModel.h.
|
inline |
Definition at line 46 of file ExprCompletionModel.h.
|
inline |
Definition at line 49 of file ExprCompletionModel.h.
Referenced by rowCount().
|
inline |
Definition at line 52 of file ExprCompletionModel.h.
References builtins, functions, local_variables, parent(), and variables.
void ExprCompletionModel::syncExtras | ( | const ExprCompletionModel & | otherModel | ) |
Definition at line 60 of file ExprCompletionModel.cpp.
References functionNameToFunction, functions, functions_comment, variables, and variables_comment.
Referenced by ExprEditor::replaceExtras().
|
staticprivate |
Definition at line 84 of file ExprCompletionModel.h.
Referenced by data(), ExprCompletionModel(), and rowCount().
|
private |
Definition at line 86 of file ExprCompletionModel.h.
Referenced by addFunction(), clearFunctions(), getDocString(), and syncExtras().
|
private |
Definition at line 85 of file ExprCompletionModel.h.
Referenced by addFunction(), clearFunctions(), data(), rowCount(), and syncExtras().
|
private |
Definition at line 85 of file ExprCompletionModel.h.
Referenced by addFunction(), clearFunctions(), data(), getDocString(), and syncExtras().
std::vector<QString> ExprCompletionModel::local_variables |
Definition at line 80 of file ExprCompletionModel.h.
Referenced by data(), ExprEditor::rebuildControls(), ExprShortEdit::rebuildControls(), and rowCount().
|
private |
Definition at line 87 of file ExprCompletionModel.h.
Referenced by addVariable(), clearVariables(), data(), rowCount(), and syncExtras().
|
private |
Definition at line 87 of file ExprCompletionModel.h.
Referenced by addVariable(), clearVariables(), data(), and syncExtras().