mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 02:55:44 +08:00
refs #883, launcher improvements
* check if core is running before starting pilot client DBus UI * avoid starting pilot client when already running * save UI state (cache) * made lauchner BlackMisc::CIdentifiable
This commit is contained in:
committed by
Mathew Sutcliffe
parent
5d81b23386
commit
3b3cdf4566
@@ -12,6 +12,7 @@
|
|||||||
#include "blackconfig/buildconfig.h"
|
#include "blackconfig/buildconfig.h"
|
||||||
#include "blackgui/guiapplication.h"
|
#include "blackgui/guiapplication.h"
|
||||||
#include "blackgui/stylesheetutility.h"
|
#include "blackgui/stylesheetutility.h"
|
||||||
|
#include "blackcore/context/contextapplicationproxy.h"
|
||||||
#include "blackcore/setupreader.h"
|
#include "blackcore/setupreader.h"
|
||||||
#include "blackmisc/dbusserver.h"
|
#include "blackmisc/dbusserver.h"
|
||||||
#include "blackmisc/network/networkutils.h"
|
#include "blackmisc/network/networkutils.h"
|
||||||
@@ -29,6 +30,8 @@
|
|||||||
using namespace BlackConfig;
|
using namespace BlackConfig;
|
||||||
using namespace BlackGui;
|
using namespace BlackGui;
|
||||||
using namespace BlackCore;
|
using namespace BlackCore;
|
||||||
|
using namespace BlackCore::Application;
|
||||||
|
using namespace BlackCore::Context;
|
||||||
using namespace BlackCore::Data;
|
using namespace BlackCore::Data;
|
||||||
using namespace BlackMisc;
|
using namespace BlackMisc;
|
||||||
using namespace BlackMisc::Network;
|
using namespace BlackMisc::Network;
|
||||||
@@ -36,6 +39,7 @@ using namespace BlackMisc::Network;
|
|||||||
CSwiftLauncher::CSwiftLauncher(QWidget *parent) :
|
CSwiftLauncher::CSwiftLauncher(QWidget *parent) :
|
||||||
QDialog(parent, CEnableForFramelessWindow::modeToWindowFlags(CEnableForFramelessWindow::WindowNormal)),
|
QDialog(parent, CEnableForFramelessWindow::modeToWindowFlags(CEnableForFramelessWindow::WindowNormal)),
|
||||||
CEnableForFramelessWindow(CEnableForFramelessWindow::WindowFrameless, true, "framelessMainWindow", this),
|
CEnableForFramelessWindow(CEnableForFramelessWindow::WindowFrameless, true, "framelessMainWindow", this),
|
||||||
|
CIdentifiable(this),
|
||||||
ui(new Ui::CSwiftLauncher)
|
ui(new Ui::CSwiftLauncher)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
@@ -60,16 +64,14 @@ CSwiftLauncher::CSwiftLauncher(QWidget *parent) :
|
|||||||
ui->le_DBusServerPort->setValidator(new QIntValidator(0, 65535, this));
|
ui->le_DBusServerPort->setValidator(new QIntValidator(0, 65535, this));
|
||||||
|
|
||||||
// default from settings
|
// default from settings
|
||||||
const QString dbus(m_dbusServerAddress.getThreadLocal());
|
this->setDefaults();
|
||||||
this->setDefault(dbus);
|
|
||||||
|
|
||||||
// periodically check
|
// periodically check
|
||||||
connect(&m_checkTimer, &QTimer::timeout, this, &CSwiftLauncher::ps_checkRunningApplications);
|
connect(&m_checkTimer, &QTimer::timeout, this, &CSwiftLauncher::ps_checkRunningApplicationsAndCore);
|
||||||
m_checkTimer.setInterval(5000);
|
m_checkTimer.setInterval(2500);
|
||||||
m_checkTimer.start();
|
m_checkTimer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CSwiftLauncher::~CSwiftLauncher()
|
CSwiftLauncher::~CSwiftLauncher()
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
@@ -87,8 +89,8 @@ CEnableForFramelessWindow::WindowMode CSwiftLauncher::getWindowMode() const
|
|||||||
CoreModes::CoreMode CSwiftLauncher::getCoreMode() const
|
CoreModes::CoreMode CSwiftLauncher::getCoreMode() const
|
||||||
{
|
{
|
||||||
if (ui->rb_SwiftStandalone->isChecked()) { return CoreModes::CoreInGuiProcess; }
|
if (ui->rb_SwiftStandalone->isChecked()) { return CoreModes::CoreInGuiProcess; }
|
||||||
if (ui->rb_SwiftCoreAudio->isChecked()) { return CoreModes::CoreExternalCoreAudio; }
|
if (ui->rb_SwiftCoreAudioOnCore->isChecked()) { return CoreModes::CoreExternalCoreAudio; }
|
||||||
if (ui->rb_SwiftCoreGuiAudio->isChecked()) { return CoreModes::CoreExternalAudioGui; }
|
if (ui->rb_SwiftCoreAudioOnGui->isChecked()) { return CoreModes::CoreExternalAudioGui; }
|
||||||
|
|
||||||
Q_ASSERT_X(false, Q_FUNC_INFO, "wrong mode");
|
Q_ASSERT_X(false, Q_FUNC_INFO, "wrong mode");
|
||||||
return CoreModes::CoreInGuiProcess;
|
return CoreModes::CoreInGuiProcess;
|
||||||
@@ -199,6 +201,12 @@ void CSwiftLauncher::initDBusGui()
|
|||||||
connect(ui->rb_DBusP2P, &QRadioButton::clicked, this, &CSwiftLauncher::ps_dbusServerModeSelected);
|
connect(ui->rb_DBusP2P, &QRadioButton::clicked, this, &CSwiftLauncher::ps_dbusServerModeSelected);
|
||||||
connect(ui->rb_DBusSession, &QRadioButton::clicked, this, &CSwiftLauncher::ps_dbusServerModeSelected);
|
connect(ui->rb_DBusSession, &QRadioButton::clicked, this, &CSwiftLauncher::ps_dbusServerModeSelected);
|
||||||
connect(ui->rb_DBusSystem, &QRadioButton::clicked, this, &CSwiftLauncher::ps_dbusServerModeSelected);
|
connect(ui->rb_DBusSystem, &QRadioButton::clicked, this, &CSwiftLauncher::ps_dbusServerModeSelected);
|
||||||
|
|
||||||
|
// normally no system Bus on Windows
|
||||||
|
if (CBuildConfig::isRunningOnWindowsNtPlatform() && CBuildConfig::isShippedVersion())
|
||||||
|
{
|
||||||
|
ui->rb_DBusSystem->setEnabled(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSwiftLauncher::initVersion()
|
void CSwiftLauncher::initVersion()
|
||||||
@@ -218,15 +226,16 @@ void CSwiftLauncher::initLogDisplay()
|
|||||||
|
|
||||||
void CSwiftLauncher::startSwiftCore()
|
void CSwiftLauncher::startSwiftCore()
|
||||||
{
|
{
|
||||||
|
this->saveSetup();
|
||||||
const QString dBus(this->getDBusAddress());
|
const QString dBus(this->getDBusAddress());
|
||||||
m_dbusServerAddress.setAndSave(dBus);
|
|
||||||
QStringList args(
|
QStringList args(
|
||||||
{
|
{
|
||||||
"--start",
|
"--start",
|
||||||
"--dbus", dBus
|
"--dbus", dBus
|
||||||
});
|
});
|
||||||
|
|
||||||
if (ui->rb_SwiftCoreAudio->isChecked())
|
if (ui->rb_SwiftCoreAudioOnCore->isChecked())
|
||||||
{
|
{
|
||||||
args.append("--coreaudio");
|
args.append("--coreaudio");
|
||||||
}
|
}
|
||||||
@@ -252,44 +261,43 @@ void CSwiftLauncher::setSwiftDataExecutable()
|
|||||||
|
|
||||||
bool CSwiftLauncher::setSwiftGuiExecutable()
|
bool CSwiftLauncher::setSwiftGuiExecutable()
|
||||||
{
|
{
|
||||||
QString msg;
|
m_executable.clear();
|
||||||
if (this->isStandaloneGuiSelected() || this->canConnectDBusServer(msg))
|
if (CBuildConfig::isRunningOnUnixPlatform()) { m_executable += "./"; }
|
||||||
|
m_executable += CBuildConfig::swiftGuiExecutableName();
|
||||||
|
QStringList args
|
||||||
{
|
{
|
||||||
m_executable.clear();
|
"--core", CoreModes::coreModeToString(getCoreMode()),
|
||||||
if (CBuildConfig::isRunningOnUnixPlatform()) { m_executable += "./"; }
|
"--window", CEnableForFramelessWindow::windowModeToString(getWindowMode())
|
||||||
m_executable += CBuildConfig::swiftGuiExecutableName();
|
};
|
||||||
QStringList args
|
|
||||||
{
|
|
||||||
"--core", CoreModes::coreModeToString(getCoreMode()),
|
|
||||||
"--window", CEnableForFramelessWindow::windowModeToString(getWindowMode())
|
|
||||||
};
|
|
||||||
if (!this->isStandaloneGuiSelected())
|
|
||||||
{
|
|
||||||
const QString dBus(this->getDBusAddress());
|
|
||||||
m_dbusServerAddress.setAndSave(dBus);
|
|
||||||
|
|
||||||
args.append("--dbus");
|
this->saveSetup();
|
||||||
args.append(dBus); // already converted
|
if (!this->isStandaloneGuiSelected())
|
||||||
}
|
|
||||||
m_executableArgs = args;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
m_executable = CBuildConfig::swiftGuiExecutableName();
|
const QString dBus(this->getDBusAddress());
|
||||||
m_executableArgs.clear();
|
this->saveSetup();
|
||||||
static const CLogCategoryList cats(CLogCategoryList(this).join({ CLogCategory::validation() }));
|
args.append("--dbus");
|
||||||
CStatusMessage m(cats, CStatusMessage::SeverityError,
|
args.append(dBus); // already converted
|
||||||
"DBus server for " + getDBusAddress() + " can not be connected: " + msg);
|
|
||||||
this->ps_showStatusMessage(m);
|
QString msg;
|
||||||
return false;
|
if (!CSwiftLauncher::canConnectSwiftOnDBusServer(dBus, msg))
|
||||||
|
{
|
||||||
|
static const CLogCategoryList cats(CLogCategoryList(this).join({ CLogCategory::validation() }));
|
||||||
|
const CStatusMessage m(cats, CStatusMessage::SeverityError,
|
||||||
|
"DBus server for '" + this->getDBusAddress() + "' can not be connected.\n\n" +
|
||||||
|
"Likely the core is not running or is not reachable.\n\n" +
|
||||||
|
"Details: " + msg);
|
||||||
|
this->ps_showStatusMessage(m);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
m_executableArgs = args;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSwiftLauncher::canConnectDBusServer(QString &msg) const
|
bool CSwiftLauncher::canConnectSwiftOnDBusServer(const QString &dBusAddress, QString &msg) const
|
||||||
{
|
{
|
||||||
if (this->isStandaloneGuiSelected()) { return true; } // do not mind here
|
if (this->isStandaloneGuiSelected()) { return true; } // do not mind here
|
||||||
return CDBusServer::isDBusAvailable(getDBusAddress(), msg);
|
return CContextApplicationProxy::isContextResponsive(dBusAddress, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSwiftLauncher::isStandaloneGuiSelected() const
|
bool CSwiftLauncher::isStandaloneGuiSelected() const
|
||||||
@@ -297,14 +305,15 @@ bool CSwiftLauncher::isStandaloneGuiSelected() const
|
|||||||
return ui->rb_SwiftStandalone->isChecked();
|
return ui->rb_SwiftStandalone->isChecked();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSwiftLauncher::setDefault(const QString &value)
|
void CSwiftLauncher::setDefaults()
|
||||||
{
|
{
|
||||||
QString v(value.toLower().trimmed());
|
const CLauncherSetup setup(m_setup.get());
|
||||||
if (v.isEmpty() || v.startsWith("session"))
|
const QString dbus(setup.getDBusAddress().toLower().trimmed());
|
||||||
|
if (dbus.isEmpty() || dbus.startsWith("session"))
|
||||||
{
|
{
|
||||||
ui->rb_DBusSession->setChecked(true);
|
ui->rb_DBusSession->setChecked(true);
|
||||||
}
|
}
|
||||||
else if (v.startsWith("sys"))
|
else if (dbus.startsWith("sys"))
|
||||||
{
|
{
|
||||||
ui->rb_DBusSystem->setChecked(true);
|
ui->rb_DBusSystem->setChecked(true);
|
||||||
}
|
}
|
||||||
@@ -312,6 +321,40 @@ void CSwiftLauncher::setDefault(const QString &value)
|
|||||||
{
|
{
|
||||||
ui->rb_DBusP2P->setChecked(true);
|
ui->rb_DBusP2P->setChecked(true);
|
||||||
}
|
}
|
||||||
|
if (setup.useFramelessWindow())
|
||||||
|
{
|
||||||
|
ui->rb_WindowFrameless->setChecked(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui->rb_WindowNormal->setChecked(true);
|
||||||
|
}
|
||||||
|
switch (setup.getCoreMode())
|
||||||
|
{
|
||||||
|
case CLauncherSetup::Standalone: ui->rb_SwiftStandalone->setChecked(true); break;
|
||||||
|
case CLauncherSetup::CoreWithAudioOnCore: ui->rb_SwiftCoreAudioOnCore->setChecked(true); break;
|
||||||
|
case CLauncherSetup::CoreWithAudioOnGui: ui->rb_SwiftCoreAudioOnGui->setChecked(true); break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSwiftLauncher::saveSetup()
|
||||||
|
{
|
||||||
|
CLauncherSetup setup = m_setup.get();
|
||||||
|
const QString dBus(this->getDBusAddress());
|
||||||
|
if (!dBus.isEmpty()) { setup.setDBusAddress(dBus); }
|
||||||
|
setup.setFramelessWindow(ui->rb_WindowFrameless->isChecked());
|
||||||
|
setup.setCoreMode(CLauncherSetup::Standalone);
|
||||||
|
if (ui->rb_SwiftCoreAudioOnCore->isChecked())
|
||||||
|
{
|
||||||
|
setup.setCoreMode(CLauncherSetup::CoreWithAudioOnCore);
|
||||||
|
}
|
||||||
|
else if (ui->rb_SwiftCoreAudioOnGui->isChecked())
|
||||||
|
{
|
||||||
|
setup.setCoreMode(CLauncherSetup::CoreWithAudioOnGui);
|
||||||
|
}
|
||||||
|
m_setup.set(setup);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CSwiftLauncher::toCmdLine(const QString &exe, const QStringList &exeArgs)
|
QString CSwiftLauncher::toCmdLine(const QString &exe, const QStringList &exeArgs)
|
||||||
@@ -393,7 +436,7 @@ void CSwiftLauncher::ps_startButtonPressed()
|
|||||||
}
|
}
|
||||||
else if (sender == ui->tb_SwiftCore)
|
else if (sender == ui->tb_SwiftCore)
|
||||||
{
|
{
|
||||||
if (this->isStandaloneGuiSelected()) { ui->rb_SwiftCoreGuiAudio->setChecked(true); }
|
if (this->isStandaloneGuiSelected()) { ui->rb_SwiftCoreAudioOnGui->setChecked(true); }
|
||||||
ui->tb_SwiftCore->setEnabled(false);
|
ui->tb_SwiftCore->setEnabled(false);
|
||||||
m_startCoreWaitCycles = 2;
|
m_startCoreWaitCycles = 2;
|
||||||
this->startSwiftCore();
|
this->startSwiftCore();
|
||||||
@@ -410,7 +453,7 @@ void CSwiftLauncher::ps_dbusServerAddressSelectionChanged(const QString ¤t
|
|||||||
Q_UNUSED(currentText);
|
Q_UNUSED(currentText);
|
||||||
if (this->isStandaloneGuiSelected())
|
if (this->isStandaloneGuiSelected())
|
||||||
{
|
{
|
||||||
ui->rb_SwiftCoreGuiAudio->setChecked(true);
|
ui->rb_SwiftCoreAudioOnGui->setChecked(true);
|
||||||
}
|
}
|
||||||
ui->rb_DBusP2P->setChecked(true);
|
ui->rb_DBusP2P->setChecked(true);
|
||||||
}
|
}
|
||||||
@@ -419,7 +462,7 @@ void CSwiftLauncher::ps_dbusServerModeSelected(bool selected)
|
|||||||
{
|
{
|
||||||
if (!selected) { return; }
|
if (!selected) { return; }
|
||||||
if (!this->isStandaloneGuiSelected()) { return; }
|
if (!this->isStandaloneGuiSelected()) { return; }
|
||||||
ui->rb_SwiftCoreGuiAudio->setChecked(true);
|
ui->rb_SwiftCoreAudioOnGui->setChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSwiftLauncher::ps_showStatusMessage(const CStatusMessage &msg)
|
void CSwiftLauncher::ps_showStatusMessage(const CStatusMessage &msg)
|
||||||
@@ -463,26 +506,19 @@ void CSwiftLauncher::ps_showLogPage()
|
|||||||
ui->sw_SwiftLauncher->setCurrentWidget(ui->pg_SwiftLauncherLog);
|
ui->sw_SwiftLauncher->setCurrentWidget(ui->pg_SwiftLauncherLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSwiftLauncher::ps_checkRunningApplications()
|
void CSwiftLauncher::ps_checkRunningApplicationsAndCore()
|
||||||
{
|
{
|
||||||
const CApplicationInfoList runningApps = sGui->getRunningApplications();
|
// wait some time before buttons are enabled (allows startup)
|
||||||
if (m_startCoreWaitCycles > 0) { m_startCoreWaitCycles--; }
|
if (m_startCoreWaitCycles > 0) { m_startCoreWaitCycles--; }
|
||||||
else { ui->tb_SwiftCore->setEnabled(true); }
|
|
||||||
if (m_startMappingToolWaitCycles > 0) { m_startMappingToolWaitCycles--; }
|
if (m_startMappingToolWaitCycles > 0) { m_startMappingToolWaitCycles--; }
|
||||||
else { ui->tb_SwiftMappingTool->setEnabled(true); }
|
if (m_startGuiWaitCycles > 0) { m_startGuiWaitCycles--; }
|
||||||
|
|
||||||
for (const CApplicationInfo &info : runningApps)
|
const CApplicationInfoList runningApps = sGui->getRunningApplications();
|
||||||
{
|
const bool foundLocalCore = runningApps.containsApplication(CApplicationInfo::PilotClientCore);
|
||||||
switch (info.application())
|
const bool foundLocalMappingTool = runningApps.containsApplication(CApplicationInfo::MappingTool);
|
||||||
{
|
const bool foundLocalPilotClientGui = runningApps.containsApplication(CApplicationInfo::PilotClientGui);
|
||||||
case CApplicationInfo::PilotClientCore :
|
|
||||||
ui->tb_SwiftCore->setEnabled(false);
|
ui->tb_SwiftCore->setEnabled(!foundLocalCore && m_startCoreWaitCycles < 1);
|
||||||
break;
|
ui->tb_SwiftMappingTool->setEnabled(!foundLocalMappingTool && m_startMappingToolWaitCycles < 1);
|
||||||
case CApplicationInfo::MappingTool :
|
ui->tb_SwiftGui->setEnabled(!foundLocalPilotClientGui && m_startGuiWaitCycles < 1);
|
||||||
ui->tb_SwiftMappingTool->setEnabled(false);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,8 +17,9 @@
|
|||||||
#include "blackgui/mainwindowaccess.h"
|
#include "blackgui/mainwindowaccess.h"
|
||||||
#include "blackcore/data/globalsetup.h"
|
#include "blackcore/data/globalsetup.h"
|
||||||
#include "blackcore/data/updateinfo.h"
|
#include "blackcore/data/updateinfo.h"
|
||||||
|
#include "blackcore/data/launchersetup.h"
|
||||||
#include "blackcore/coremodeenums.h"
|
#include "blackcore/coremodeenums.h"
|
||||||
#include "blackcore/application/applicationsettings.h"
|
#include "blackmisc/identifiable.h"
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QScopedPointer>
|
#include <QScopedPointer>
|
||||||
@@ -35,7 +36,8 @@ namespace Ui { class CSwiftLauncher; }
|
|||||||
class CSwiftLauncher :
|
class CSwiftLauncher :
|
||||||
public QDialog,
|
public QDialog,
|
||||||
public BlackGui::CEnableForFramelessWindow,
|
public BlackGui::CEnableForFramelessWindow,
|
||||||
public BlackGui::IMainWindowAccess
|
public BlackGui::IMainWindowAccess,
|
||||||
|
public BlackMisc::CIdentifiable
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(BlackGui::IMainWindowAccess)
|
Q_INTERFACES(BlackGui::IMainWindowAccess)
|
||||||
@@ -56,7 +58,7 @@ public:
|
|||||||
//! Destructor
|
//! Destructor
|
||||||
virtual ~CSwiftLauncher();
|
virtual ~CSwiftLauncher();
|
||||||
|
|
||||||
//! Executable
|
//! Executable (to be started)
|
||||||
const QString &getExecutable() const { return m_executable; }
|
const QString &getExecutable() const { return m_executable; }
|
||||||
|
|
||||||
//! Arguments
|
//! Arguments
|
||||||
@@ -72,19 +74,16 @@ protected:
|
|||||||
//! \copydoc QDialog::mouseMoveEvent
|
//! \copydoc QDialog::mouseMoveEvent
|
||||||
void mouseMoveEvent(QMouseEvent *event) override;
|
void mouseMoveEvent(QMouseEvent *event) override;
|
||||||
|
|
||||||
private slots:
|
|
||||||
//! Display latest news
|
|
||||||
void ps_displayLatestNews(QNetworkReply *reply);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QScopedPointer<Ui::CSwiftLauncher> ui;
|
QScopedPointer<Ui::CSwiftLauncher> ui;
|
||||||
BlackMisc::CData<BlackCore::Data::TUpdateInfo> m_updateInfo { this, &CSwiftLauncher::ps_changedUpdateInfoCache }; //!< version cache
|
BlackMisc::CData<BlackCore::Data::TUpdateInfo> m_updateInfo { this, &CSwiftLauncher::ps_changedUpdateInfoCache }; //!< version cache
|
||||||
BlackMisc::CSetting<BlackCore::Application::TDBusServerAddress> m_dbusServerAddress { this }; //!< DBus address
|
BlackMisc::CData<BlackCore::Data::TLauncherSetup> m_setup { this }; //! setup, ie last user selection
|
||||||
QString m_executable;
|
QString m_executable;
|
||||||
QStringList m_executableArgs;
|
QStringList m_executableArgs;
|
||||||
QTimer m_checkTimer { this };
|
QTimer m_checkTimer { this };
|
||||||
int m_startCoreWaitCycles = 0;
|
int m_startCoreWaitCycles = 0;
|
||||||
int m_startMappingToolWaitCycles = 0;
|
int m_startMappingToolWaitCycles = 0;
|
||||||
|
int m_startGuiWaitCycles = 0;
|
||||||
bool m_updateInfoLoaded = false;
|
bool m_updateInfoLoaded = false;
|
||||||
|
|
||||||
//! Get core mode
|
//! Get core mode
|
||||||
@@ -128,13 +127,16 @@ private:
|
|||||||
bool setSwiftGuiExecutable();
|
bool setSwiftGuiExecutable();
|
||||||
|
|
||||||
//! Can DBus server be connected
|
//! Can DBus server be connected
|
||||||
bool canConnectDBusServer(QString &msg) const;
|
bool canConnectSwiftOnDBusServer(const QString &dbusAddress, QString &msg) const;
|
||||||
|
|
||||||
//! Standalone GUI selected
|
//! Standalone GUI selected
|
||||||
bool isStandaloneGuiSelected() const;
|
bool isStandaloneGuiSelected() const;
|
||||||
|
|
||||||
//! Set default
|
//! Set default
|
||||||
void setDefault(const QString &value);
|
void setDefaults();
|
||||||
|
|
||||||
|
//! Save state
|
||||||
|
void saveSetup();
|
||||||
|
|
||||||
//! Command line
|
//! Command line
|
||||||
static QString toCmdLine(const QString &exe, const QStringList &exeArgs);
|
static QString toCmdLine(const QString &exe, const QStringList &exeArgs);
|
||||||
@@ -146,6 +148,9 @@ private slots:
|
|||||||
//! Loaded latest version
|
//! Loaded latest version
|
||||||
void ps_loadedUpdateInfo(bool success);
|
void ps_loadedUpdateInfo(bool success);
|
||||||
|
|
||||||
|
//! Display latest news
|
||||||
|
void ps_displayLatestNews(QNetworkReply *reply);
|
||||||
|
|
||||||
//! Cache values have been changed
|
//! Cache values have been changed
|
||||||
void ps_changedUpdateInfoCache();
|
void ps_changedUpdateInfoCache();
|
||||||
|
|
||||||
@@ -177,7 +182,7 @@ private slots:
|
|||||||
void ps_showLogPage();
|
void ps_showLogPage();
|
||||||
|
|
||||||
//! Check if applicationas are already running
|
//! Check if applicationas are already running
|
||||||
void ps_checkRunningApplications();
|
void ps_checkRunningApplicationsAndCore();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // guard
|
#endif // guard
|
||||||
|
|||||||
@@ -212,7 +212,7 @@
|
|||||||
<number>4</number>
|
<number>4</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="1" alignment="Qt::AlignHCenter">
|
<item row="0" column="1" alignment="Qt::AlignHCenter">
|
||||||
<widget class="QRadioButton" name="rb_SwiftCoreGuiAudio">
|
<widget class="QRadioButton" name="rb_SwiftCoreAudioOnGui">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>GUI and core</string>
|
<string>GUI and core</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -222,7 +222,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2" alignment="Qt::AlignHCenter">
|
<item row="0" column="2" alignment="Qt::AlignHCenter">
|
||||||
<widget class="QRadioButton" name="rb_SwiftCoreAudio">
|
<widget class="QRadioButton" name="rb_SwiftCoreAudioOnCore">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>GUI and core</string>
|
<string>GUI and core</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -440,6 +440,18 @@
|
|||||||
<string>Check for &updates</string>
|
<string>Check for &updates</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="vl_Updates">
|
<layout class="QVBoxLayout" name="vl_Updates">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="gb_SoftwareUpdates">
|
<widget class="QGroupBox" name="gb_SoftwareUpdates">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@@ -447,16 +459,16 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gl_Version">
|
<layout class="QGridLayout" name="gl_Version">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>2</number>
|
<number>4</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>2</number>
|
<number>4</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="rightMargin">
|
||||||
<number>2</number>
|
<number>4</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>2</number>
|
<number>4</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="3" column="1" colspan="3">
|
<item row="3" column="1" colspan="3">
|
||||||
<widget class="QWidget" name="wi_NoNewVersion" native="true">
|
<widget class="QWidget" name="wi_NoNewVersion" native="true">
|
||||||
@@ -588,16 +600,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QScrollArea" name="sa_DataUpdates">
|
<widget class="QScrollArea" name="sa_DataUpdates">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">border: 0px;</string>
|
<string notr="true">border: 0px; padding: 2px;</string>
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Plain</enum>
|
|
||||||
</property>
|
|
||||||
<property name="lineWidth">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="widgetResizable">
|
<property name="widgetResizable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@@ -607,8 +610,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>368</width>
|
<width>376</width>
|
||||||
<height>185</height>
|
<height>189</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="vl_DataUpdatesScrollArea">
|
<layout class="QVBoxLayout" name="vl_DataUpdatesScrollArea">
|
||||||
@@ -642,7 +645,6 @@
|
|||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<zorder>comp_InfoBar</zorder>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
Reference in New Issue
Block a user