Schim
Public Member Functions | List of all members
Database Class Reference

A database of symbols. More...

#include <database.h>

Inheritance diagram for Database:
[legend]
Collaboration diagram for Database:
[legend]

Public Member Functions

QVariant data (const QModelIndex &index, int role) const override
 Used by the view to display each item's data. More...
 
void update ()
 Update the database from the file system.
 
bool iterateLeaves (const QModelIndex &index, std::function< bool(const QModelIndex &)> fun)
 Iterate through all leaves of the database tree. More...
 

Detailed Description

A database of symbols.

The database is represented by a tree model.

Member Function Documentation

◆ data()

QVariant Database::data ( const QModelIndex &  index,
int  role 
) const
override

Used by the view to display each item's data.

Each item is displayed only with a preview icon and a name.

◆ iterateLeaves()

bool Database::iterateLeaves ( const QModelIndex &  index,
std::function< bool(const QModelIndex &)>  fun 
)

Iterate through all leaves of the database tree.

Parameters
indexThe index from which to start
funFunction to execute for each leaf
Returns
If the method is called recursively, this determines if the recursion should be terminated immediately after processing the first leaf.

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