qmlprofilerengine.h 2.5 KB
Newer Older
Kai Koehne's avatar
Kai Koehne 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).
Kai Koehne's avatar
Kai Koehne committed
6
**
7
** Contact: Nokia Corporation (qt-info@nokia.com)
Kai Koehne's avatar
Kai Koehne committed
8 9 10 11
**
**
** GNU Lesser General Public License Usage
**
Thomas Murach's avatar
Thomas Murach committed
12 13 14 15 16 17
** 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.
Kai Koehne's avatar
Kai Koehne committed
18 19
**
** In addition, as a special exception, Nokia gives you certain additional
Thomas Murach's avatar
Thomas Murach committed
20
** rights. These rights are described in the Nokia Qt LGPL Exception
Kai Koehne's avatar
Kai Koehne committed
21 22
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
Thomas Murach's avatar
Thomas Murach committed
23 24 25 26 27
** 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.
**
Kai Koehne's avatar
Kai Koehne committed
28
** If you have questions regarding the use of this file, please contact
29
** Nokia at qt-info@nokia.com.
Kai Koehne's avatar
Kai Koehne committed
30 31 32
**
**************************************************************************/

Christiaan Janssen's avatar
Christiaan Janssen committed
33 34 35
#ifndef QMLPROFILERENGINE_H
#define QMLPROFILERENGINE_H

Kai Koehne's avatar
Kai Koehne committed
36
#include <analyzerbase/ianalyzerengine.h>
con's avatar
con committed
37
#include <utils/outputformat.h>
Christiaan Janssen's avatar
Christiaan Janssen committed
38

Kai Koehne's avatar
Kai Koehne committed
39
namespace QmlProfiler {
Christiaan Janssen's avatar
Christiaan Janssen committed
40 41
namespace Internal {

Kai Koehne's avatar
Kai Koehne committed
42
class QmlProfilerEngine : public Analyzer::IAnalyzerEngine
Christiaan Janssen's avatar
Christiaan Janssen committed
43 44
{
    Q_OBJECT
45

Christiaan Janssen's avatar
Christiaan Janssen committed
46
public:
47
    QmlProfilerEngine(Analyzer::IAnalyzerTool *tool,
48 49
                      const Analyzer::AnalyzerStartParameters &sp,
                      ProjectExplorer::RunConfiguration *runConfiguration);
Christiaan Janssen's avatar
Christiaan Janssen committed
50 51
    ~QmlProfilerEngine();

52
    static void showNonmodalWarning(const QString &warningMsg);
Christiaan Janssen's avatar
Christiaan Janssen committed
53
signals:
54
    void processRunning(int port);
Christiaan Janssen's avatar
Christiaan Janssen committed
55
    void stopRecording();
56
    void timeUpdate();
57
    void recordingChanged(bool recording);
58
    void applicationDied();
Christiaan Janssen's avatar
Christiaan Janssen committed
59 60

public slots:
61
    bool start();
Christiaan Janssen's avatar
Christiaan Janssen committed
62
    void stop();
63 64

private slots:
65
    void stopped();
Christiaan Janssen's avatar
Christiaan Janssen committed
66

67
    void setFetchingData(bool);
68
    void dataReceived();
69
    void finishProcess();
con's avatar
con committed
70
    void logApplicationMessage(const QString &msg, Utils::OutputFormat format);
71
    void wrongSetupMessageBox(const QString &errorMessage);
72
    void wrongSetupMessageBoxFinished(int);
73
    void processIsRunning(quint16 port = 0);
Christiaan Janssen's avatar
Christiaan Janssen committed
74 75 76 77 78 79

private:
    class QmlProfilerEnginePrivate;
    QmlProfilerEnginePrivate *d;
};

Kai Koehne's avatar
Kai Koehne committed
80 81
} // namespace Internal
} // namespace QmlProfiler
Christiaan Janssen's avatar
Christiaan Janssen committed
82 83

#endif // QMLPROFILERENGINE_H