forked from qt-creator/qt-creator
QmlObserver: Add 'show app on top' switch to creator + qmlobserver
This is convenient especially in the observer mode. Reviewed-by: Christiaan Janssen
This commit is contained in:
@@ -107,6 +107,10 @@ void QmlJSObserverClient::messageReceived(const QByteArray &message)
|
||||
bool inDesignMode;
|
||||
ds >> inDesignMode;
|
||||
emit designModeBehaviorChanged(inDesignMode);
|
||||
} else if (type == "SHOW_APP_ON_TOP") {
|
||||
bool showAppOnTop;
|
||||
ds >> showAppOnTop;
|
||||
emit showAppOnTopChanged(showAppOnTop);
|
||||
} else if (type == "RELOADED") {
|
||||
emit reloaded();
|
||||
} else if (type == "COLOR_CHANGED") {
|
||||
@@ -337,6 +341,23 @@ void QmlJSObserverClient::changeToZoomTool()
|
||||
sendMessage(message);
|
||||
}
|
||||
|
||||
void QmlJSObserverClient::showAppOnTop(bool showOnTop)
|
||||
{
|
||||
if (!m_connection || !m_connection->isConnected())
|
||||
return;
|
||||
|
||||
QByteArray message;
|
||||
QDataStream ds(&message, QIODevice::WriteOnly);
|
||||
|
||||
ds << QByteArray("SHOW_APP_ON_TOP")
|
||||
<< showOnTop;
|
||||
|
||||
if (debug)
|
||||
qDebug() << "QmlJSObserverClient: Sending" <<"SHOWONTOP" << showOnTop;
|
||||
|
||||
sendMessage(message);
|
||||
}
|
||||
|
||||
void QmlJSObserverClient::createQmlObject(const QString &qmlText, int parentDebugId,
|
||||
const QStringList &imports, const QString &filename)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user