ianalyzertool.cpp 2.38 KB
Newer Older
Mike McQuaid's avatar
Mike McQuaid committed
1
2
3
4
/**************************************************************************
**
** This file is part of Qt Creator
**
hjk's avatar
hjk committed
5
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
Mike McQuaid's avatar
Mike McQuaid committed
6
7
8
**
** Author: Nicolas Arnaud-Cormos, KDAB (nicolas.arnaud-cormos@kdab.com)
**
Eike Ziller's avatar
Eike Ziller committed
9
** Contact: http://www.qt-project.org/
Mike McQuaid's avatar
Mike McQuaid committed
10
11
12
13
**
**
** GNU Lesser General Public License Usage
**
hjk's avatar
hjk committed
14
15
16
17
18
19
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this file.
** Please review the following information to ensure the GNU Lesser General
** Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
Mike McQuaid's avatar
Mike McQuaid committed
20
21
**
** In addition, as a special exception, Nokia gives you certain additional
hjk's avatar
hjk committed
22
** rights. These rights are described in the Nokia Qt LGPL Exception
Mike McQuaid's avatar
Mike McQuaid committed
23
24
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
hjk's avatar
hjk committed
25
26
27
28
29
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
Mike McQuaid's avatar
Mike McQuaid committed
30
31
32
33
**
**************************************************************************/

#include "ianalyzertool.h"
34
#include "analyzermanager.h"
Friedemann Kleint's avatar
Friedemann Kleint committed
35

hjk's avatar
hjk committed
36
37
using namespace Core;

Friedemann Kleint's avatar
Friedemann Kleint committed
38
namespace Analyzer {
Mike McQuaid's avatar
Mike McQuaid committed
39

hjk's avatar
hjk committed
40
41
42
43
IAnalyzerTool::IAnalyzerTool(QObject *parent)
    : QObject(parent)
{}

hjk's avatar
hjk committed
44
Id IAnalyzerTool::defaultMenuGroup(StartMode mode)
45
46
{
    if (mode == StartRemote)
hjk's avatar
hjk committed
47
48
        return Constants::G_ANALYZER_REMOTE_TOOLS;
    return Constants::G_ANALYZER_TOOLS;
49
50
}

hjk's avatar
hjk committed
51
Id IAnalyzerTool::defaultActionId(const IAnalyzerTool *tool, StartMode mode)
52
{
hjk's avatar
hjk committed
53
    Id id = tool->id();
54
    switch (mode) {
hjk's avatar
hjk committed
55
    case StartLocal:
56
        return Id(QByteArray("Analyzer." + id.name() + ".Local").data());
hjk's avatar
hjk committed
57
    case StartRemote:
58
        return Id(QByteArray("Analyzer." + id.name() + ".Remote").data());
hjk's avatar
hjk committed
59
    case StartQml:
60
        return Id(QByteArray("Analyzer." + id.name() + ".Qml").data());
61
    }
hjk's avatar
hjk committed
62
    return Id();
63
64
}

65
QString IAnalyzerTool::defaultActionName(const IAnalyzerTool *tool, StartMode mode)
66
{
67
    QString base = tool->displayName();
68
    if (mode == StartRemote)
69
        return base + tr(" (External)");
70
71
72
    return base;
}

73
74
75
76
77
78
79
80
81
82
AbstractAnalyzerSubConfig *IAnalyzerTool::createGlobalSettings()
{
    return 0;
}

AbstractAnalyzerSubConfig *IAnalyzerTool::createProjectSettings()
{
    return 0;
}

Friedemann Kleint's avatar
Friedemann Kleint committed
83
} // namespace Analyzer