|
@ -27,40 +27,40 @@ |
|
|
#include <QQmlApplicationEngine> |
|
|
#include <QQmlApplicationEngine> |
|
|
#include <QtCore/QtCore> |
|
|
#include <QtCore/QtCore> |
|
|
#include <QDebug> |
|
|
#include <QDebug> |
|
|
#include "ConstantCompilationControl.h" |
|
|
#include "StatusPane.h" |
|
|
#include "QContractDefinition.h" |
|
|
#include "QContractDefinition.h" |
|
|
#include "AppContext.h" |
|
|
#include "AppContext.h" |
|
|
#include "CodeModel.h" |
|
|
#include "CodeModel.h" |
|
|
|
|
|
|
|
|
using namespace dev::mix; |
|
|
using namespace dev::mix; |
|
|
|
|
|
|
|
|
ConstantCompilationControl::ConstantCompilationControl(AppContext* _context): Extension(_context, ExtensionDisplayBehavior::HeaderView) |
|
|
StatusPane::StatusPane(AppContext* _context): Extension(_context, ExtensionDisplayBehavior::HeaderView) |
|
|
{ |
|
|
{ |
|
|
connect(_context->codeModel(), &CodeModel::compilationComplete, this, &ConstantCompilationControl::update); |
|
|
connect(_context->codeModel(), &CodeModel::compilationComplete, this, &StatusPane::update); |
|
|
_context->appEngine()->rootContext()->setContextProperty("constantCompilation", this); |
|
|
_context->appEngine()->rootContext()->setContextProperty("statusPane", this); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
QString ConstantCompilationControl::contentUrl() const |
|
|
QString StatusPane::contentUrl() const |
|
|
{ |
|
|
{ |
|
|
return QStringLiteral("qrc:/qml/CompilationStatus.qml"); |
|
|
return QStringLiteral("qrc:/qml/StatusPane.qml"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
QString ConstantCompilationControl::title() const |
|
|
QString StatusPane::title() const |
|
|
{ |
|
|
{ |
|
|
return QApplication::tr("compiler"); |
|
|
return QApplication::tr("compiler"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void ConstantCompilationControl::start() const |
|
|
void StatusPane::start() const |
|
|
{ |
|
|
{ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
CompilationResult* ConstantCompilationControl::result() const |
|
|
CompilationResult* StatusPane::result() const |
|
|
{ |
|
|
{ |
|
|
return m_ctx->codeModel()->code(); |
|
|
return m_ctx->codeModel()->code(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void ConstantCompilationControl::update() |
|
|
void StatusPane::update() |
|
|
{ |
|
|
{ |
|
|
QObject* ctrl = m_view->findChild<QObject*>("constantCompilationStatus", Qt::FindChildrenRecursively); |
|
|
QObject* ctrl = m_view->findChild<QObject*>("statusPane", Qt::FindChildrenRecursively); |
|
|
QMetaObject::invokeMethod(ctrl, "update"); |
|
|
QMetaObject::invokeMethod(ctrl, "update"); |
|
|
} |
|
|
} |