Pencil2D Animation
Download Community News Docs Contribute
  • Overview
  • Articles
  • Code
  •  
  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • File List
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ToolProperties Struct Reference
+ Collaboration diagram for ToolProperties:
Collaboration graph
[legend]

Public Types

enum  Version { NOT_SET = 0 , VERSION_1 = 1 , VERSION_2 , VERSION_3 }
 

Public Member Functions

void insertProperties (const QHash< int, PropertyInfo > &properties)
 
void loadFrom (const QString &toolIdentifier, QSettings &settings)
 
void storeTo (QSettings &settings)
 
void setBaseValue (int rawType, const PropertyInfo &info)
 
void setVersion (Version version)
 
PropertyInfo getInfo (int rawPropertyType) const
 
void restoreProperties ()
 
bool requireMigration (QSettings &settings, ToolProperties::Version version)
 
bool hasLegacySettings (QSettings &settings) const
 
bool isValidType (int rawType) const
 
void insertIdentifiers (const QHash< int, QString > &identifiers)
 
QString identifier (int rawKey) const
 
void setRanges (const QVector< QPair< int, int > > &ranges)
 
void addRange (QPair< int, int > range)
 
const QVector< QPair< int, int > > & typeRanges () const
 

Private Member Functions

void loadProperty (const QString &settingName, PropertyInfo &info, const QSettings &settings)
 

Private Attributes

QVector< QPair< int, int > > mTypeRanges
 
QHash< int, QString > mIdentifiers
 
QHash< int, PropertyInfo > mProps
 
QString mIdentifier = "undefined"
 
Version mVersion = VERSION_1
 
QString mVersionKey = "ToolProperties_Version"
 

Detailed Description

Definition at line 203 of file toolproperties.h.

Member Enumeration Documentation

◆ Version

enum ToolProperties::Version

Definition at line 205 of file toolproperties.h.

Constructor & Destructor Documentation

◆ ~ToolProperties()

ToolProperties::~ToolProperties ( )
inline

Definition at line 212 of file toolproperties.h.

Member Function Documentation

◆ addRange()

void ToolProperties::addRange ( QPair< int, int >  range)
inline

Definition at line 345 of file toolproperties.h.

◆ getInfo()

PropertyInfo ToolProperties::getInfo ( int  rawPropertyType) const
inline

Definition at line 288 of file toolproperties.h.

◆ hasLegacySettings()

bool ToolProperties::hasLegacySettings ( QSettings &  settings) const
inline

Definition at line 312 of file toolproperties.h.

◆ identifier()

QString ToolProperties::identifier ( int  rawKey) const
inline

Definition at line 336 of file toolproperties.h.

◆ insertIdentifiers()

void ToolProperties::insertIdentifiers ( const QHash< int, QString > &  identifiers)
inline

Definition at line 332 of file toolproperties.h.

◆ insertProperties()

void ToolProperties::insertProperties ( const QHash< int, PropertyInfo > &  properties)
inline

Definition at line 215 of file toolproperties.h.

◆ isValidType()

bool ToolProperties::isValidType ( int  rawType) const
inline

Definition at line 317 of file toolproperties.h.

◆ loadFrom()

void ToolProperties::loadFrom ( const QString &  toolIdentifier,
QSettings &  settings 
)
inline

Definition at line 227 of file toolproperties.h.

◆ loadProperty()

void ToolProperties::loadProperty ( const QString &  settingName,
PropertyInfo &  info,
const QSettings &  settings 
)
inlineprivate

Definition at line 350 of file toolproperties.h.

◆ requireMigration()

bool ToolProperties::requireMigration ( QSettings &  settings,
ToolProperties::Version  version 
)
inline

Definition at line 300 of file toolproperties.h.

◆ restoreProperties()

void ToolProperties::restoreProperties ( )
inline

Definition at line 293 of file toolproperties.h.

◆ setBaseValue()

void ToolProperties::setBaseValue ( int  rawType,
const PropertyInfo &  info 
)
inline

Definition at line 265 of file toolproperties.h.

◆ setRanges()

void ToolProperties::setRanges ( const QVector< QPair< int, int > > &  ranges)
inline

Definition at line 344 of file toolproperties.h.

◆ setVersion()

void ToolProperties::setVersion ( Version  version)
inline

Definition at line 286 of file toolproperties.h.

◆ storeTo()

void ToolProperties::storeTo ( QSettings &  settings)
inline

Definition at line 242 of file toolproperties.h.

◆ typeRanges()

const QVector< QPair< int, int > > & ToolProperties::typeRanges ( ) const
inline

Definition at line 346 of file toolproperties.h.

Member Data Documentation

◆ mIdentifier

QString ToolProperties::mIdentifier = "undefined"
private

Definition at line 381 of file toolproperties.h.

◆ mIdentifiers

QHash<int, QString> ToolProperties::mIdentifiers
private

Definition at line 378 of file toolproperties.h.

◆ mProps

QHash<int, PropertyInfo> ToolProperties::mProps
private

Definition at line 379 of file toolproperties.h.

◆ mTypeRanges

QVector<QPair<int, int> > ToolProperties::mTypeRanges
private

Definition at line 377 of file toolproperties.h.

◆ mVersion

Version ToolProperties::mVersion = VERSION_1
private

Definition at line 382 of file toolproperties.h.

◆ mVersionKey

QString ToolProperties::mVersionKey = "ToolProperties_Version"
private

Definition at line 383 of file toolproperties.h.


The documentation for this struct was generated from the following file:
  • core_lib/src/tool/toolproperties.h
Generated on Tue Dec 23 2025 02:59:18 for Pencil2D by doxygen 1.9.6 based on revision ba57a3de29b42de06bbb5b1757aa7f34e6bc4514