KSeExpr 6.0.0.0
Public Slots | Public Member Functions | Private Slots | Private Attributes | List of all members
ExprBrowser Class Reference

#include <ExprBrowser.h>

Inheritance diagram for ExprBrowser:

Public Slots

void handleSelection (const QModelIndex &current, const QModelIndex &previous)
 
void update ()
 
void clear ()
 
void clearSelection ()
 
void saveExpression ()
 
void saveLocalExpressionAs ()
 
void saveExpressionAs ()
 

Public Member Functions

 ExprBrowser (QWidget *parent, ExprEditor *editor)
 
 ~ExprBrowser () override
 
void addPath (const std::string &name, const std::string &path)
 
std::string getSelectedPath ()
 
void selectPath (const char *path)
 
void addUserExpressionPath (const std::string &context)
 
bool getExpressionDirs ()
 
bool getExpressionDirs (const std::string &context)
 
void setSearchPath (const QString &context, const QString &path)
 
void expandAll ()
 
void expandToDepth (int depth)
 
void setApplyOnSelect (bool on)
 

Private Slots

void clearFilter ()
 
void filterChanged (const QString &str)
 

Private Attributes

ExprEditoreditor
 
QList< QString > labels
 
QList< QString > paths
 
ExprTreeModeltreeModel
 
ExprTreeFilterModelproxyModel
 
QTreeView * treeNew
 
QLineEdit * exprFilter
 
std::string _userExprDir
 
std::string _localExprDir
 
QString _context
 
QString _searchPath
 
bool _applyOnSelect
 

Detailed Description

Definition at line 32 of file ExprBrowser.h.

Constructor & Destructor Documentation

◆ ExprBrowser()

ExprBrowser::ExprBrowser ( QWidget *  parent,
ExprEditor editor 
)

◆ ~ExprBrowser()

ExprBrowser::~ExprBrowser ( )
override

Definition at line 279 of file ExprBrowser.cpp.

References treeModel.

Member Function Documentation

◆ addPath()

void ExprBrowser::addPath ( const std::string &  name,
const std::string &  path 
)

Definition at line 319 of file ExprBrowser.cpp.

References ExprTreeModel::addPath(), labels, paths, and treeModel.

Referenced by addUserExpressionPath(), and getExpressionDirs().

◆ addUserExpressionPath()

void ExprBrowser::addUserExpressionPath ( const std::string &  context)

Definition at line 468 of file ExprBrowser.cpp.

References _userExprDir, and addPath().

Referenced by getExpressionDirs().

◆ clear

void ExprBrowser::clear ( )
slot

Definition at line 372 of file ExprBrowser.cpp.

References ExprTreeModel::clear(), clearSelection(), labels, paths, and treeModel.

Referenced by getExpressionDirs().

◆ clearFilter

void ExprBrowser::clearFilter ( )
privateslot

Definition at line 386 of file ExprBrowser.cpp.

References exprFilter.

Referenced by ExprBrowser().

◆ clearSelection

void ExprBrowser::clearSelection ( )
slot

Definition at line 381 of file ExprBrowser.cpp.

References treeNew.

Referenced by clear().

◆ expandAll()

void ExprBrowser::expandAll ( )

Definition at line 457 of file ExprBrowser.cpp.

References treeNew.

◆ expandToDepth()

void ExprBrowser::expandToDepth ( int  depth)

Definition at line 462 of file ExprBrowser.cpp.

References treeNew.

◆ filterChanged

void ExprBrowser::filterChanged ( const QString &  str)
privateslot

Definition at line 391 of file ExprBrowser.cpp.

References proxyModel, and treeNew.

Referenced by ExprBrowser().

◆ getExpressionDirs() [1/2]

bool ExprBrowser::getExpressionDirs ( )

◆ getExpressionDirs() [2/2]

bool ExprBrowser::getExpressionDirs ( const std::string &  context)

◆ getSelectedPath()

std::string ExprBrowser::getSelectedPath ( )

Definition at line 332 of file ExprBrowser.cpp.

References proxyModel, and treeNew.

Referenced by saveExpression().

◆ handleSelection

void ExprBrowser::handleSelection ( const QModelIndex &  current,
const QModelIndex &  previous 
)
slot

Definition at line 355 of file ExprBrowser.cpp.

References _applyOnSelect, editor, proxyModel, and ExprEditor::setExpr().

Referenced by ExprBrowser().

◆ saveExpression

void ExprBrowser::saveExpression ( )
slot

Definition at line 440 of file ExprBrowser.cpp.

References editor, ExprEditor::getExpr(), getSelectedPath(), and saveExpressionAs().

◆ saveExpressionAs

void ExprBrowser::saveExpressionAs ( )
slot

Definition at line 402 of file ExprBrowser.cpp.

References _userExprDir, editor, ExprEditor::getExpr(), selectPath(), and update().

Referenced by saveExpression().

◆ saveLocalExpressionAs

void ExprBrowser::saveLocalExpressionAs ( )
slot

Definition at line 421 of file ExprBrowser.cpp.

References _localExprDir, editor, ExprEditor::getExpr(), selectPath(), and update().

◆ selectPath()

void ExprBrowser::selectPath ( const char *  path)

Definition at line 343 of file ExprBrowser.cpp.

References ExprTreeModel::find(), proxyModel, treeModel, and treeNew.

Referenced by saveExpressionAs(), and saveLocalExpressionAs().

◆ setApplyOnSelect()

void ExprBrowser::setApplyOnSelect ( bool  on)
inline

Definition at line 61 of file ExprBrowser.h.

References _applyOnSelect.

◆ setSearchPath()

void ExprBrowser::setSearchPath ( const QString &  context,
const QString &  path 
)

Definition at line 326 of file ExprBrowser.cpp.

References _context, and _searchPath.

◆ update

void ExprBrowser::update ( )
slot

Member Data Documentation

◆ _applyOnSelect

bool ExprBrowser::_applyOnSelect
private

Definition at line 47 of file ExprBrowser.h.

Referenced by handleSelection(), and setApplyOnSelect().

◆ _context

QString ExprBrowser::_context
private

Definition at line 45 of file ExprBrowser.h.

Referenced by getExpressionDirs(), and setSearchPath().

◆ _localExprDir

std::string ExprBrowser::_localExprDir
private

Definition at line 44 of file ExprBrowser.h.

Referenced by getExpressionDirs(), and saveLocalExpressionAs().

◆ _searchPath

QString ExprBrowser::_searchPath
private

Definition at line 46 of file ExprBrowser.h.

Referenced by getExpressionDirs(), and setSearchPath().

◆ _userExprDir

std::string ExprBrowser::_userExprDir
private

Definition at line 43 of file ExprBrowser.h.

Referenced by addUserExpressionPath(), and saveExpressionAs().

◆ editor

ExprEditor* ExprBrowser::editor
private

◆ exprFilter

QLineEdit* ExprBrowser::exprFilter
private

Definition at line 42 of file ExprBrowser.h.

Referenced by clearFilter(), and ExprBrowser().

◆ labels

QList<QString> ExprBrowser::labels
private

Definition at line 37 of file ExprBrowser.h.

Referenced by addPath(), and clear().

◆ paths

QList<QString> ExprBrowser::paths
private

Definition at line 38 of file ExprBrowser.h.

Referenced by addPath(), and clear().

◆ proxyModel

ExprTreeFilterModel* ExprBrowser::proxyModel
private

◆ treeModel

ExprTreeModel* ExprBrowser::treeModel
private

Definition at line 39 of file ExprBrowser.h.

Referenced by addPath(), clear(), ExprBrowser(), selectPath(), update(), and ~ExprBrowser().

◆ treeNew

QTreeView* ExprBrowser::treeNew
private

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