Esempio n. 1
0
/**
 * Add C++ stereotypes.
 */
void createCppStereotypes()
{
    UMLDoc *umldoc = UMLApp::app()->document();
    umldoc->findOrCreateStereotype("constructor");
    // declares an operation as friend
    umldoc->findOrCreateStereotype("friend");
    // to use in methods that aren't abstract
    umldoc->findOrCreateStereotype("virtual");
}
Esempio n. 2
0
void UMLObject::setStereotypeCmd(const QString& name)
{
    if (name.isEmpty()) {
        setUMLStereotype(NULL);
        return;
    }
    UMLDoc *pDoc = UMLApp::app()->document();
    UMLStereotype *s = pDoc->findOrCreateStereotype(name);
    setUMLStereotype(s);
}
Esempio n. 3
0
/**
 * Sets the classes stereotype name.
 * Internally uses setUMLStereotype().
 *
 * @param _name     Sets the classes stereotype name.
 */
void UMLObject::setStereotype(const QString &_name)
{
    // UMLDoc* pDoc = UMLApp::app()->document();
    // pDoc->executeCommand(new cmdSetStereotype(this,_name));
    if (_name.isEmpty()) {
        setUMLStereotype(NULL);
        return;
    }
    UMLDoc *pDoc = UMLApp::app()->document();
    UMLStereotype *s = pDoc->findOrCreateStereotype(_name);
    setUMLStereotype(s);
}