Smithy Qt 0.1.0-pre
Internal development documentation
Loading...
Searching...
No Matches
ShapeIdPrivate Class Reference

The ShapeIdPrivate class provides private implementation for ShapeId. More...

Collaboration diagram for ShapeIdPrivate:
[legend]

Public Member Functions

 ShapeIdPrivate (ShapeId *const q)
 
void setShapeId (const QString &shapeId)
 Splits shapeId into its components (namespace, shape name and member name) and assigns them to the equivalent object members.
 

Static Protected Member Functions

static Q_LOGGING_CATEGORY (lc, "smithy.ShapeId", QtInfoMsg)
 Logging category for ShapeID.
 

Protected Attributes

ShapeIdq_ptr
 Internal q-pointer.
 

Private Member Functions

 Q_DECLARE_TR_FUNCTIONS (ShapeId)
 

Private Attributes

QString memberName
 
QString nameSpace
 
QString shapeName
 

Detailed Description

The ShapeIdPrivate class provides private implementation for ShapeId.

Definition at line 19 of file shapeid_p.h.

Constructor & Destructor Documentation

◆ ShapeIdPrivate()

ShapeIdPrivate::ShapeIdPrivate ( ShapeId *const q)
explicit

Constructs a new ShapeIdPrivate object with public implementation q.

Definition at line 335 of file shapeid.cpp.

335 : q_ptr(q)
336{
337
338}
ShapeId * q_ptr
Internal q-pointer.
Definition shapeid_p.h:29

References q_ptr.

Member Function Documentation

◆ setShapeId()

void ShapeIdPrivate::setShapeId ( const QString & shapeId)

Splits shapeId into its components (namespace, shape name and member name) and assigns them to the equivalent object members.

Both the namespace and member name are optional; their equivalent object members will be set to empty strings if not present in shapeId.

Definition at line 347 of file shapeid.cpp.

348{
349 const int sep1 = shapeId.indexOf(QLatin1Char('#'));
350 const int sep2 = shapeId.lastIndexOf(QLatin1Char('$'));
351 if (sep1 > 0) nameSpace = shapeId.mid(0, sep1);
352 if (sep2 > 0) memberName = shapeId.mid(sep2+1);
353 shapeName = shapeId.mid(sep1+1, sep2-sep1-1);
354}

Member Data Documentation

◆ memberName

QString ShapeIdPrivate::memberName
private

Definition at line 33 of file shapeid_p.h.

◆ nameSpace

QString ShapeIdPrivate::nameSpace
private

Definition at line 34 of file shapeid_p.h.

◆ q_ptr

ShapeId* ShapeIdPrivate::q_ptr
protected

Internal q-pointer.

Definition at line 29 of file shapeid_p.h.

Referenced by ShapeIdPrivate().

◆ shapeName

QString ShapeIdPrivate::shapeName
private

Definition at line 35 of file shapeid_p.h.


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