summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/linkwidget.cpp
blob: 259d6567714f4528fc36fe2613049f2a00038aa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   copyright (C) 2004-2006                                               *
 *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
 ***************************************************************************/

// own header
#include "linkwidget.h"
// qt/kde includes
#include <kdebug.h>
// app includes
#include "umlview.h"
#include "umlobject.h"
#include "classifier.h"
#include "operation.h"
#include "uml.h"

LinkWidget::LinkWidget() {
}

LinkWidget::~LinkWidget() {
}

UMLClassifier *LinkWidget::getOperationOwner() {
    UMLOperation *op = getOperation();
    if (op == NULL)
        return NULL;
    return static_cast<UMLClassifier*>(op->tqparent());
}

TQString LinkWidget::getOperationText(UMLView *view /* = NULL */) {
    UMLOperation *op = getOperation();
    if (op == NULL)
        return getCustomOpText();
    if (view == NULL)
        view = UMLApp::app()->getCurrentView();
    Uml::Signature_Type sigType;
    if (view && view->getShowOpSig())
        sigType = Uml::st_SigNoVis;
    else
        sigType = Uml::st_NoSigNoVis;
    TQString opText = op->toString(sigType);
    return opText;
}

void LinkWidget::resetTextPositions() {
}

bool LinkWidget::showDialog() {
    return true;
}

void LinkWidget::calculateNameTextSegment() {
}