From e929423fc9d0118deccd2759d71d7af5e536d492 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Sun, 28 Sep 2014 01:51:08 +0200 Subject: [PATCH] Some GUI finetuning * tabBar expanding * removed setDocumentMode * Flight plan in scroll area --- src/blackgui/components/aircraftcomponent.cpp | 1 + src/blackgui/components/aircraftcomponent.ui | 2 +- .../components/atcstationcomponent.cpp | 1 + .../components/atcstationcomponent.ui | 8 +- .../components/flightplancomponent.cpp | 2 + .../components/flightplancomponent.ui | 1531 +++++++++-------- src/blackgui/components/settingscomponent.cpp | 5 +- src/blackgui/components/settingscomponent.ui | 2 +- .../components/settingssimulatorcomponent.cpp | 3 +- .../components/textmessagecomponent.ui | 6 + src/blackgui/components/usercomponent.cpp | 1 + src/blackgui/components/usercomponent.ui | 6 + src/blackgui/infoarea.cpp | 1 - src/blackgui/qss/mainwindow.qss | 15 +- 14 files changed, 893 insertions(+), 691 deletions(-) diff --git a/src/blackgui/components/aircraftcomponent.cpp b/src/blackgui/components/aircraftcomponent.cpp index edfe4d03e..a60b10264 100644 --- a/src/blackgui/components/aircraftcomponent.cpp +++ b/src/blackgui/components/aircraftcomponent.cpp @@ -27,6 +27,7 @@ namespace BlackGui ui(new Ui::CAircraftComponent), m_timerComponent(nullptr) { ui->setupUi(this); + this->tabBar()->setExpanding(false); this->ui->tvp_AirportsInRange->setResizeMode(CAirportView::ResizingOnce); m_timerComponent = new CTimerBasedComponent(SLOT(update()), this); diff --git a/src/blackgui/components/aircraftcomponent.ui b/src/blackgui/components/aircraftcomponent.ui index 35dfe346e..99e6e5f93 100644 --- a/src/blackgui/components/aircraftcomponent.ui +++ b/src/blackgui/components/aircraftcomponent.ui @@ -11,7 +11,7 @@ - + 0 0 diff --git a/src/blackgui/components/atcstationcomponent.cpp b/src/blackgui/components/atcstationcomponent.cpp index df5a97974..b21b3f5ec 100644 --- a/src/blackgui/components/atcstationcomponent.cpp +++ b/src/blackgui/components/atcstationcomponent.cpp @@ -33,6 +33,7 @@ namespace BlackGui ui(new Ui::CAtcStationComponent), m_timerComponent(nullptr) { ui->setupUi(this); + this->tabBar()->setExpanding(false); this->m_timerComponent = new CTimerBasedComponent(SLOT(update()), this); // some icons diff --git a/src/blackgui/components/atcstationcomponent.ui b/src/blackgui/components/atcstationcomponent.ui index c9f5b3037..650931ad6 100644 --- a/src/blackgui/components/atcstationcomponent.ui +++ b/src/blackgui/components/atcstationcomponent.ui @@ -10,8 +10,14 @@ 462 + + + 0 + 0 + + - TabWidget + ATC stations 0 diff --git a/src/blackgui/components/flightplancomponent.cpp b/src/blackgui/components/flightplancomponent.cpp index 08ba3377f..59eaa3e5e 100644 --- a/src/blackgui/components/flightplancomponent.cpp +++ b/src/blackgui/components/flightplancomponent.cpp @@ -23,6 +23,8 @@ namespace BlackGui QTabWidget(parent), CRuntimeBasedComponent(nullptr, false), ui(new Ui::CFlightPlanComponent) { ui->setupUi(this); + this->tabBar()->setExpanding(false); + connect(this->ui->pb_Send, &QPushButton::pressed, this, &CFlightPlanComponent::sendFlightPlan); connect(this->ui->pb_Load, &QPushButton::pressed, this, &CFlightPlanComponent::loadFlightPlanFromNetwork); connect(this->ui->pb_Reset, &QPushButton::pressed, this, &CFlightPlanComponent::resetFlightPlan); diff --git a/src/blackgui/components/flightplancomponent.ui b/src/blackgui/components/flightplancomponent.ui index 1c068ac7b..db54d003c 100644 --- a/src/blackgui/components/flightplancomponent.ui +++ b/src/blackgui/components/flightplancomponent.ui @@ -6,8 +6,8 @@ 0 0 - 555 - 477 + 400 + 400 @@ -23,411 +23,499 @@ 0 + + + 0 + 0 + + Flight plan - + - 3 + 2 - 3 + 2 - 3 + 2 - 3 + 2 - 3 + 2 - - - - - Load plan + + + + 0 + 0 + + + + QFrame::NoFrame + + + 0 + + + true + + + + + 0 + 0 + 373 + 431 + + + + + 0 + 0 + + + + + 2 - - - - - - - - 11. Remarks + + 2 + + + 2 + + + 2 + + + 2 + + + + + 2 - - - - - - Qt::Vertical + + 2 - - - 20 - 40 - + + 2 - - - - - - QPushButton { + + 2 + + + 6 + + + + + true + + + + + + + >AAAA + + + ICAO + + + + + + + + + + + + + 40 + + + true + + + + + + + + + + 40 + + + + + + + Send plan + + + + + + + 10. Estimated time enroute + + + true + + + + + + + Sent + + + + + + + 4. True airspeed + + + true + + + + + + + 6. Departure time + + + true + + + + + + + Load plan + + + + + + + 9.Destination airport + + + true + + + + + + + Reset plan + + + + + + + + + 11. Remarks + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + QPushButton { background-color: transparent; border: none; text-align: left; text-decoration: underline; } - - - Qt::ImhNone - - - Generator - - + + + Qt::ImhNone + + + Generator + + + + + + + + + 13. Alternate airport + + + true + + + + + + + 7. Cruising altitude + + + true + + + + + + + true + + + + + + + >AAAA + + + ICAO + + + + + + + 14. Pilots name / homebase + + + true + + + + + + + + 0 + 0 + + + + + 16777215 + 75 + + + + 1 + + + + + + + 99:99 + + + 00:00 + + + 5 + + + + + + + 5. Departure airport + + + true + + + + + + + 99:99 + + + 00:00 + + + + + + + 2. Callsign + + + false + + + true + + + + + + + Validate + + + + + + + + + + true + + + + 2 + + + 4 + + + 2 + + + 2 + + + 2 + + + + + VFR + + + + + + + IFR + + + true + + + + + + + + + + >AAAA + + + ICAO + + + 4 + + + + + + + 12. Fuel on board + + + true + + + + + + + 0 kts + + + 40 + + + + + + + + + + 3. Aircraft type + + + false + + + true + + + + + + + 8. Route + + + + + + + 99:99 + + + 00:00 + + + 5 + + + + + + + 1. Type + + + + + + + + 0 + 0 + + + + + 16777215 + 75 + + + + + - - - - - Reset plan - - - - - - - 99:99 - - - 00:00 - - - - - - - 0 kts - - - 40 - - - - - - - 3. Aircraft type - - - false - - - true - - - - - - - 8. Route - - - - - - - 12. Fuel on board - - - true - - - - - - - >AAAA - - - ICAO - - - 4 - - - - - - - - - - 99:99 - - - 00:00 - - - 5 - - - - - - - >AAAA - - - ICAO - - - - - - - 13. Alternate airport - - - true - - - - - - - 1 - - - - - - - 99:99 - - - 00:00 - - - 5 - - - - - - - 7. Cruising altitude - - - true - - - - - - - 6. Departure time - - - true - - - - - - - - - - >AAAA - - - ICAO - - - - - - - 4. True airspeed - - - true - - - - - - - Send plan - - - - - - - 40 - - - - - - - 2. Callsign - - - false - - - true - - - - - - - true - - - - - - - 10. Estimated time enroute - - - true - - - - - - - 14. Pilots name / homebase - - - true - - - - - - - 9.Destination airport - - - true - - - - - - - 5. Departure airport - - - true - - - - - - - - - - - - - 40 - - - true - - - - - - - - - - Sent - - - - - - - true - - - - - - - Validate - - - - - - - - - - true - - - - 2 - - - 4 - - - 2 - - - 2 - - - 2 - - - - - VFR - - - - - - - IFR - - - true - - - - - - - - - - 1. Type - - - - + + @@ -437,321 +525,404 @@ - 3 + 2 - 3 + 2 - 3 + 2 - 3 + 2 - 3 + 2 - - - - - QFrame::StyledPanel + + + QFrame::NoFrame + + + 0 + + + true + + + + + 0 + 0 + 373 + 455 + + + + + 2 - - QFrame::Raised + + 2 - - - - - Parse - - - - - - - Copy over - - - - - - - - - - Remarks + + 2 - - - - - - Required Navigation Performance + + 2 - - true - - - - - - - true - - - - - - - - - - - P0 - unrated - - - - - P1 - - - - - P2 - - - - - P3 - - - - - P4 - - - - - P5 - - - - - - - - Performance category - - - true - - - - - - - - VFR - not required - - - - - 10 miles radius - - - - - 4 miles radius - - - - - - - - Aircraft registration - - - false - - - - - - - Airline operator - - - true - - - - - - - Pilot rating - - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - - Navigation equipment - - - true - - - - - - - - - - - Full voice - - - - - Text only - - - - - Receive voice - - - - - - - - - - - SELCAL - - - - - - - Final Approach Speed + + 2 - - VFR - not required - + + + 2 + + + 2 + + + 2 + + + 2 + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + Parse + + + + + + + Copy over + + + + + + + + + + Remarks + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + Required Navigation Performance + + + true + + + + + + + + 0 + 0 + + + + + 16777215 + 75 + + + + true + + + + + + + + + + + P0 - unrated + + + + + P1 + + + + + P2 + + + + + P3 + + + + + P4 + + + + + P5 + + + + + + + + Performance category + + + true + + + + + + + + VFR - not required + + + + + 10 miles radius + + + + + 4 miles radius + + + + + + + + Aircraft registration + + + false + + + + + + + Airline operator + + + true + + + + + + + Pilot rating + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + Navigation equipment + + + true + + + + + + + + 0 + 0 + + + + + 16777215 + 75 + + + + + + + + + Full voice + + + + + Text only + + + + + Receive voice + + + + + + + + + + + SELCAL + + + + + + + Final Approach Speed + + + + VFR - not required + + + + + A: below 91kts + + + + + B: 91-120kts + + + + + C: 121-140kts + + + + + D: 141-165kts + + + + + E: 166-210kts + + + + + + + + How will you be navigating? + + + + VFR flying visually + + + + + Direct VORs and NDBs + + + + + Default GPS + + + + + GPS or FMC capable of SIDs/STARs + + + + + GPS oceantic certified + + + + + + + + Additional remarks + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + false + + + + + + + Voice capabilities + + + true + + + + + + + no SIDs / STARs + + + + + + + SIDs / STARs + + + + - - - A: below 91kts - - - - - B: 91-120kts - - - - - C: 121-140kts - - - - - D: 141-165kts - - - - - E: 166-210kts - - - - - - - - How will you be navigating? - - - - VFR flying visually - - - - - Direct VORs and NDBs - - - - - Default GPS - - - - - GPS or FMC capable of SIDs/STARs - - - - - GPS oceantic certified - - - - - - - - Additional remarks - - - false - - - - - - - Voice capabilities - - - true - - - - - - - no SIDs / STARs - - - - - - - SIDs / STARs - - - - + + + diff --git a/src/blackgui/components/settingscomponent.cpp b/src/blackgui/components/settingscomponent.cpp index 3e95201fd..c34c6b9ba 100644 --- a/src/blackgui/components/settingscomponent.cpp +++ b/src/blackgui/components/settingscomponent.cpp @@ -38,10 +38,13 @@ namespace BlackGui * Constructor */ CSettingsComponent::CSettingsComponent(QWidget *parent) : - QTabWidget(parent), CRuntimeBasedComponent(nullptr, false), ui(new Ui::CSettingsComponent), + QTabWidget(parent), + CRuntimeBasedComponent(nullptr, false), + ui(new Ui::CSettingsComponent), m_audioTestRunning(NoAudioTest) { ui->setupUi(this); + this->tabBar()->setExpanding(false); this->ui->prb_SettingsAudioTestProgress->setVisible(false); this->m_timerAudioTests = new QTimer(this); } diff --git a/src/blackgui/components/settingscomponent.ui b/src/blackgui/components/settingscomponent.ui index 890adce84..10b1dcbb6 100644 --- a/src/blackgui/components/settingscomponent.ui +++ b/src/blackgui/components/settingscomponent.ui @@ -20,7 +20,7 @@ Settings - 2 + 0 diff --git a/src/blackgui/components/settingssimulatorcomponent.cpp b/src/blackgui/components/settingssimulatorcomponent.cpp index dc0662af7..7e571be53 100644 --- a/src/blackgui/components/settingssimulatorcomponent.cpp +++ b/src/blackgui/components/settingssimulatorcomponent.cpp @@ -21,7 +21,8 @@ namespace BlackGui namespace Components { CSettingsSimulatorComponent::CSettingsSimulatorComponent(QWidget *parent) : - QFrame(parent), CRuntimeBasedComponent(nullptr, false), + QFrame(parent), + CRuntimeBasedComponent(nullptr, false), ui(new Ui::CSettingsSimulatorComponent) { ui->setupUi(this); diff --git a/src/blackgui/components/textmessagecomponent.ui b/src/blackgui/components/textmessagecomponent.ui index 75282acf2..d2b4f77d9 100644 --- a/src/blackgui/components/textmessagecomponent.ui +++ b/src/blackgui/components/textmessagecomponent.ui @@ -10,6 +10,12 @@ 375 + + + 0 + 0 + + TabWidget diff --git a/src/blackgui/components/usercomponent.cpp b/src/blackgui/components/usercomponent.cpp index 790e7edd8..dba2f4eee 100644 --- a/src/blackgui/components/usercomponent.cpp +++ b/src/blackgui/components/usercomponent.cpp @@ -26,6 +26,7 @@ namespace BlackGui ui(new Ui::CUserComponent), m_timerComponent(nullptr) { ui->setupUi(this); + this->tabBar()->setExpanding(false); this->m_timerComponent = new CTimerBasedComponent(SLOT(update()), this); connect(this->ui->tvp_AllUsers, &CUserView::countChanged, this, &CUserComponent::ps_countChanged); diff --git a/src/blackgui/components/usercomponent.ui b/src/blackgui/components/usercomponent.ui index 0009f4417..c15c0192b 100644 --- a/src/blackgui/components/usercomponent.ui +++ b/src/blackgui/components/usercomponent.ui @@ -10,6 +10,12 @@ 300 + + + 0 + 0 + + TabWidget diff --git a/src/blackgui/infoarea.cpp b/src/blackgui/infoarea.cpp index a433916f0..c66c430d4 100644 --- a/src/blackgui/infoarea.cpp +++ b/src/blackgui/infoarea.cpp @@ -296,7 +296,6 @@ namespace BlackGui this->m_tabBar->setObjectName("comp_MainInfoAreaDockWidgetTab"); this->m_tabBar->setMovable(false); this->m_tabBar->setElideMode(Qt::ElideNone); - this->setDocumentMode(true); // did not notice any effect this->setTabPixmaps(); // East / West does not work (shown, but area itself empty) diff --git a/src/blackgui/qss/mainwindow.qss b/src/blackgui/qss/mainwindow.qss index a68928b11..a63902e55 100644 --- a/src/blackgui/qss/mainwindow.qss +++ b/src/blackgui/qss/mainwindow.qss @@ -198,14 +198,19 @@ QMenuBar::item:selected { /* when selected using mouse or keyboard */ } QMenuBar::item:pressed { - background: black; + background: black; } QMenu { - border: 2px solid darkslategray; /* reserve space for selection border */ - background: lightgray; - color: black; - padding: 2px; + border: 2px solid darkslategray; /* reserve space for selection border */ + background: lightgray; + color: black; + padding: 2px; +} + +QScrollArea { + border: 1px solid green; + border-radius: 5px; } QScrollBar:horizontal {