mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 04:25:42 +08:00
refs #445, prepared for data entry GUI
* unified init of GUIs * used CProject::swiftVersionString()
This commit is contained in:
committed by
Mathew Sutcliffe
parent
13df4302d7
commit
a2527e69e3
@@ -38,8 +38,8 @@ CSwiftCore::CSwiftCore(const SetupInfo &info, QWidget *parent) :
|
|||||||
setWindowTitle(name);
|
setWindowTitle(name);
|
||||||
setWindowIcon(CIcons::swiftNova24());
|
setWindowIcon(CIcons::swiftNova24());
|
||||||
setWindowIconText(name);
|
setWindowIconText(name);
|
||||||
setupLogDisplay();
|
initLogDisplay();
|
||||||
connectSlots();
|
initSlots();
|
||||||
initStyleSheet();
|
initStyleSheet();
|
||||||
startCore(info);
|
startCore(info);
|
||||||
}
|
}
|
||||||
@@ -94,7 +94,7 @@ void CSwiftCore::ps_onStyleSheetsChanged()
|
|||||||
this->initStyleSheet();
|
this->initStyleSheet();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSwiftCore::connectSlots()
|
void CSwiftCore::initSlots()
|
||||||
{
|
{
|
||||||
connect(ui->pb_StartCore, &QPushButton::clicked, this, &CSwiftCore::ps_startCorePressed);
|
connect(ui->pb_StartCore, &QPushButton::clicked, this, &CSwiftCore::ps_startCorePressed);
|
||||||
connect(ui->pb_StopCore, &QPushButton::clicked, this, &CSwiftCore::ps_stopCorePressed);
|
connect(ui->pb_StopCore, &QPushButton::clicked, this, &CSwiftCore::ps_stopCorePressed);
|
||||||
@@ -102,7 +102,7 @@ void CSwiftCore::connectSlots()
|
|||||||
connect(&CStyleSheetUtility::instance(), &CStyleSheetUtility::styleSheetsChanged, this, &CSwiftCore::ps_onStyleSheetsChanged);
|
connect(&CStyleSheetUtility::instance(), &CStyleSheetUtility::styleSheetsChanged, this, &CSwiftCore::ps_onStyleSheetsChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSwiftCore::setupLogDisplay()
|
void CSwiftCore::initLogDisplay()
|
||||||
{
|
{
|
||||||
CLogHandler::instance()->install(true);
|
CLogHandler::instance()->install(true);
|
||||||
CLogHandler::instance()->enableConsoleOutput(false); // default disable
|
CLogHandler::instance()->enableConsoleOutput(false); // default disable
|
||||||
|
|||||||
@@ -58,12 +58,12 @@ private slots:
|
|||||||
virtual void ps_onStyleSheetsChanged();
|
virtual void ps_onStyleSheetsChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void connectSlots();
|
void initSlots();
|
||||||
void setupLogDisplay();
|
void initLogDisplay();
|
||||||
|
void initStyleSheet();
|
||||||
void startCore(const SetupInfo &setup);
|
void startCore(const SetupInfo &setup);
|
||||||
void stopCore();
|
void stopCore();
|
||||||
QString getDBusAddress() const;
|
QString getDBusAddress() const;
|
||||||
void initStyleSheet();
|
|
||||||
|
|
||||||
QScopedPointer<Ui::CSwiftCore> ui;
|
QScopedPointer<Ui::CSwiftCore> ui;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ CIntroWindow::CIntroWindow(QWidget *parent) :
|
|||||||
ui(new Ui::CIntroWindow)
|
ui(new Ui::CIntroWindow)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
this->setWindowTitle(BlackMisc::CProject::systemNameAndVersion());
|
this->setWindowTitle(BlackMisc::CProject::swiftVersionString());
|
||||||
this->layout()->setSizeConstraint(QLayout::SetFixedSize);
|
this->layout()->setSizeConstraint(QLayout::SetFixedSize);
|
||||||
this->ui->cb_DBusServer->addItem(BlackCore::CDBusServer::sessionDBusServer());
|
this->ui->cb_DBusServer->addItem(BlackCore::CDBusServer::sessionDBusServer());
|
||||||
this->ui->cb_DBusServer->addItem(BlackCore::CDBusServer::systemDBusServer());
|
this->ui->cb_DBusServer->addItem(BlackCore::CDBusServer::systemDBusServer());
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ macx {
|
|||||||
DEPENDPATH += . $$SourceRoot/src/blackmisc \
|
DEPENDPATH += . $$SourceRoot/src/blackmisc \
|
||||||
$$SourceRoot/src/blacksound \
|
$$SourceRoot/src/blacksound \
|
||||||
$$SourceRoot/src/blackcore \
|
$$SourceRoot/src/blackcore \
|
||||||
|
$$SourceRoot/src/blackgui \
|
||||||
$$SourceRoot/src/blackinput
|
$$SourceRoot/src/blackinput
|
||||||
|
|
||||||
INCLUDEPATH += . $$SourceRoot/src
|
INCLUDEPATH += . $$SourceRoot/src
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ void SwiftGuiStd::init(const CRuntimeConfig &runtimeConfig)
|
|||||||
if (this->m_init) { return; }
|
if (this->m_init) { return; }
|
||||||
this->setVisible(false); // hide all, so no flashing windows during init
|
this->setVisible(false); // hide all, so no flashing windows during init
|
||||||
|
|
||||||
// icon, initial position where intro was before
|
// init window
|
||||||
this->setWindowIcon(CIcons::swift24());
|
this->setWindowIcon(CIcons::swift24());
|
||||||
this->setWindowTitle(CProject::systemNameAndVersion());
|
this->setWindowTitle(CProject::swiftVersionString());
|
||||||
this->setObjectName("SwiftGuiStd");
|
this->setObjectName("SwiftGuiStd");
|
||||||
this->initStyleSheet();
|
this->initStyleSheet();
|
||||||
QPoint pos = CGuiUtility::introWindowPosition();
|
QPoint pos = CGuiUtility::introWindowPosition();
|
||||||
@@ -121,9 +121,8 @@ void SwiftGuiStd::init(const CRuntimeConfig &runtimeConfig)
|
|||||||
this->initDynamicMenus();
|
this->initDynamicMenus();
|
||||||
this->initMenuIcons();
|
this->initMenuIcons();
|
||||||
|
|
||||||
|
|
||||||
// info
|
// info
|
||||||
this->ui->comp_MainInfoArea->getLogComponent()->appendPlainTextToConsole(CProject::systemNameAndVersion());
|
this->ui->comp_MainInfoArea->getLogComponent()->appendPlainTextToConsole(CProject::swiftVersionString());
|
||||||
this->ui->comp_MainInfoArea->getLogComponent()->appendPlainTextToConsole(CProject::compiledInfo());
|
this->ui->comp_MainInfoArea->getLogComponent()->appendPlainTextToConsole(CProject::compiledInfo());
|
||||||
|
|
||||||
// hotkeys
|
// hotkeys
|
||||||
|
|||||||
19
swift.pro
19
swift.pro
@@ -16,14 +16,17 @@ contains(BLACK_CONFIG, BlackInput) {
|
|||||||
|
|
||||||
contains(BLACK_CONFIG, BlackCore) {
|
contains(BLACK_CONFIG, BlackCore) {
|
||||||
SUBDIRS += src/blackcore
|
SUBDIRS += src/blackcore
|
||||||
}
|
contains(BLACK_CONFIG, BlackGui) {
|
||||||
|
SUBDIRS += src/blackgui
|
||||||
contains(BLACK_CONFIG, BlackGui) {
|
contains(BLACK_CONFIG, SwiftGui) {
|
||||||
SUBDIRS += src/blackgui
|
SUBDIRS += src/swiftgui_standard/swiftgui_standard.pro
|
||||||
SUBDIRS += src/swiftgui_standard/swiftgui_standard.pro
|
}
|
||||||
|
contains(BLACK_CONFIG, SwiftCore) {
|
||||||
contains(BLACK_CONFIG, BlackCore) {
|
SUBDIRS += src/swiftcore/swiftcore.pro
|
||||||
SUBDIRS += src/swiftcore/swiftcore.pro
|
}
|
||||||
|
contains(BLACK_CONFIG, SwiftData) {
|
||||||
|
SUBDIRS += src/swiftdata/swiftdata.pro
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user