refs #273, encapsulated settings GUI into own component

This removed a considerable amount of code from mainwindow
This commit is contained in:
Klaus Basan
2014-06-25 19:23:31 +02:00
parent 42db1fe9ae
commit 6c6bcb4e08
10 changed files with 1363 additions and 1194 deletions

View File

@@ -83,20 +83,12 @@ protected:
MainPageSimulator = 8
};
//! Audio test modes
enum AudioTest
{
NoAudioTest,
SquelchTest,
MicrophoneTest
};
private:
QScopedPointer<Ui::MainWindow> ui;
BlackGui::CInfoWindowComponent *m_compInfoWindow;
bool m_init;
GuiModes::WindowMode m_windowMode;
AudioTest m_audioTestRunning;
BlackInput::IKeyboard *m_keyboard; //!< hotkeys
// contexts
bool m_coreAvailable;
@@ -105,7 +97,6 @@ private:
BlackMisc::Aviation::CAircraft m_ownAircraft; /*!< own aircraft's state */
QTimer *m_timerContextWatchdog; /*!< core available? */
QTimer *m_timerStatusBar; /*!< cleaning up status bar */
QTimer *m_timerAudioTests; /*!< audio tests: progress bar, disable/enable buttons */
QTimer *m_timerSimulator; /*!< update simulator data */
// pixmaps
@@ -131,21 +122,9 @@ private:
QLabel *m_statusBarIcon; /*!< status bar icon */
QLabel *m_statusBarLabel; /*!< status bar label */
// Hotkeys
BlackInput::IKeyboard *m_keyboard;
//! GUI status update
void updateGuiStatusInformation();
/*!
* \brief Update the selected server textboxes
* \param server to be displayed
*/
void updateGuiSelectedServerTextboxes(const BlackMisc::Network::CServer &server);
//! Selected server from textboxes
BlackMisc::Network::CServer selectedServerFromTextboxes() const;
//! 1st data reads
void initialDataReads();
@@ -194,18 +173,12 @@ private:
*/
void stopAllTimers(bool disconnect);
//! Audio test updates (timer) for progressbar and fetching results
void audioTestUpdate();
//! Play notifcation sound
void playNotifcationSound(BlackSound::CNotificationSounds::Notification notification) const;
//! Update simulator page with latest user aircraft data
void updateSimulatorData();
//! Set the hotkeys
void setHotkeys();
//! Originator for aircraft context
static const QString &sampleBlackGuiOriginator()
{
@@ -223,13 +196,16 @@ private slots:
bool reloadOwnAircraft();
//! Display status message
void displayStatusMessage(const BlackMisc::CStatusMessage &statusMessage);
void displayStatusMessage(const BlackMisc::CStatusMessage &sendStatusMessage);
//! Display status messages
void displayStatusMessages(const BlackMisc::CStatusMessageList &messages);
//! Redirected output
void displayRedirectedOutput(const BlackMisc::CStatusMessage &statusMessage, qint64 contextId);
void displayRedirectedOutput(const BlackMisc::CStatusMessage &sendStatusMessage, qint64 contextId);
//! Settings have been changed
void changedSetttings(uint typeValue);
/*!
* \brief Connection status changed
@@ -238,9 +214,6 @@ private slots:
*/
void connectionStatusChanged(uint from, uint to, const QString &message);
//! Reload settings
void reloadSettings();
//! Simulator available
void simulatorConnectionChanged(bool isAvailable);
@@ -269,27 +242,9 @@ private slots:
//! Terminated connection
void connectionTerminated();
/*!
* \brief Network server selected
* \param index
*/
void networkServerSelected(QModelIndex index);
//! Alter traffic server
void alterTrafficServer();
//! Settings have been changed
void changedSettings(uint typeValue);
//! Update timer
void timerBasedUpdates();
/*!
* \brief Audio device selected
* \param index audio device index (COM1, COM2)
*/
void audioDeviceSelected(int index);
//! Audio volume handling and mute
void audioVolumes();
@@ -302,18 +257,11 @@ private slots:
//! Context menu for audio
void audioIconContextMenu(const QPoint &position);
//! start the MIC tests (Squelch)
void startAudioTest();
//! Save the Hotkeys
void saveHotkeys();
//! Clear single hotkey
void clearHotkey();
//! Toogle Windows stay on top
void toogleWindowStayOnTop();
//! Set the hotkeys
void registerHotkeys();
};
#pragma pop_macro("interface")