mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-03 07:35:53 +08:00
refs #507, adjustments for launcher
* renamed GUI enum to reflect where audio runs * removed assumpted position, this is no longer possible as launcher is independet application
This commit is contained in:
committed by
Mathew Sutcliffe
parent
30e6831bf8
commit
746985fa3c
@@ -20,8 +20,8 @@ public:
|
||||
enum CoreMode
|
||||
{
|
||||
CoreInGuiProcess,
|
||||
CoreExternal,
|
||||
CoreExternalAudioLocal
|
||||
CoreExternalCoreAudio,
|
||||
CoreExternalAudioGui
|
||||
};
|
||||
|
||||
//! String to core mode
|
||||
@@ -29,14 +29,14 @@ public:
|
||||
{
|
||||
QString cm(m.toLower().trimmed());
|
||||
if (cm.isEmpty()) { return CoreInGuiProcess; }
|
||||
if (m == coreModeToString(CoreExternal)) { return CoreExternal; }
|
||||
if (m == coreModeToString(CoreExternalCoreAudio)) { return CoreExternalCoreAudio; }
|
||||
if (m == coreModeToString(CoreInGuiProcess)) { return CoreInGuiProcess; }
|
||||
if (m == coreModeToString(CoreExternalAudioLocal)) { return CoreExternalAudioLocal; }
|
||||
if (m == coreModeToString(CoreExternalAudioGui)) { return CoreExternalAudioGui; }
|
||||
|
||||
// some alternative names
|
||||
if (cm.contains("audiolocal")) { return CoreExternalAudioLocal; }
|
||||
if (cm.contains("localaudio")) { return CoreExternalAudioLocal; }
|
||||
if (cm.contains("external")) { return CoreExternal; }
|
||||
if (cm.contains("audiolocal")) { return CoreExternalAudioGui; }
|
||||
if (cm.contains("localaudio")) { return CoreExternalAudioGui; }
|
||||
if (cm.contains("external")) { return CoreExternalCoreAudio; }
|
||||
if (cm.contains("gui")) { return CoreInGuiProcess; }
|
||||
return CoreInGuiProcess;
|
||||
}
|
||||
@@ -47,8 +47,8 @@ public:
|
||||
switch (mode)
|
||||
{
|
||||
case CoreInGuiProcess: return "coreinguiprocess";
|
||||
case CoreExternal: return "coreexternal";
|
||||
case CoreExternalAudioLocal: return "coreexternalaudiolocal";
|
||||
case CoreExternalCoreAudio: return "coreexternal";
|
||||
case CoreExternalAudioGui: return "coreexternalaudiogui";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -130,13 +130,13 @@ int main(int argc, char *argv[])
|
||||
BlackCore::CRuntimeConfig runtimeConfig;
|
||||
switch (coreMode)
|
||||
{
|
||||
case GuiModes::CoreExternal:
|
||||
case GuiModes::CoreExternalCoreAudio:
|
||||
runtimeConfig = CRuntimeConfig::remote(dBusAddress);
|
||||
break;
|
||||
case GuiModes::CoreInGuiProcess:
|
||||
runtimeConfig = CRuntimeConfig::local(dBusAddress);
|
||||
break;
|
||||
case GuiModes::CoreExternalAudioLocal:
|
||||
case GuiModes::CoreExternalAudioGui:
|
||||
runtimeConfig = CRuntimeConfig::remoteLocalAudio(dBusAddress);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ SwiftGuiStd::~SwiftGuiStd()
|
||||
|
||||
void SwiftGuiStd::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
if (!handleMousePressEvent(event)) { QMainWindow::mouseMoveEvent(event); }
|
||||
if (!handleMouseMoveEvent(event)) { QMainWindow::mouseMoveEvent(event); }
|
||||
}
|
||||
|
||||
void SwiftGuiStd::mousePressEvent(QMouseEvent *event)
|
||||
|
||||
@@ -41,8 +41,6 @@ void SwiftGuiStd::init(const CRuntimeConfig &runtimeConfig)
|
||||
this->setWindowTitle(CProject::versionStringDevBetaInfo());
|
||||
this->setObjectName("SwiftGuiStd");
|
||||
this->initStyleSheet();
|
||||
QPoint pos = CGuiUtility::introWindowPosition();
|
||||
this->move(pos);
|
||||
|
||||
// with frameless window, we shift menu and statusbar into central widget
|
||||
// http://stackoverflow.com/questions/18316710/frameless-and-transparent-window-qt5
|
||||
|
||||
Reference in New Issue
Block a user