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

An item in a Database. More...

#include <database.h>

Public Member Functions

 DatabaseItem (const QString &path, DatabaseItem *parentItem=nullptr)
 Construct a database item. More...
 
QImage getIcon () const
 Return the icon used to represent the item in the component browser. More...
 
void setPath (QString path)
 Set the path of this database item.
 
void setName (const QString &name)
 Set the friendly name of the item. More...
 

Detailed Description

An item in a Database.

Constructor & Destructor Documentation

◆ DatabaseItem()

DatabaseItem::DatabaseItem ( const QString &  path,
DatabaseItem parentItem = nullptr 
)
explicit

Construct a database item.

Parameters
pathThe path of the symbol represented by this item.
parentItemThe parent of this item in the tree.

This will automatically resolve whether path points to a directory, symbol file, or a !meta file.

Member Function Documentation

◆ getIcon()

QImage DatabaseItem::getIcon ( ) const

Return the icon used to represent the item in the component browser.

The icon is dynamically allocated only when it is to be displayed to the user, and persists subsequently.

◆ setName()

void DatabaseItem::setName ( const QString &  name)

Set the friendly name of the item.

This will normally be loaded from the symbol file (or !meta file for directories), but it can be changed manually as well.


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