Fork me on GitHub
2.15.20
FGx
A cross-platform launcher for FlightGear
MainObject Class Reference

The MainObject is an extended QObject, and the main "controller" for FGx. More...

#include <mainobject.h>

Inheritance diagram for MainObject:

Public Slots

void add_log (QString log_name, QString data)
 
void clear_log (QString log_name)
 
void initialize ()
 
void on_about_fgx ()
 
void on_about_qt ()
 
void on_action_open_url (QAction *)
 
void on_browsermap ()
 
void on_launcher ()
 
void on_properties_browser ()
 
void on_quit ()
 
void on_tray_icon (QSystemTrayIcon::ActivationReason reason)
 
void on_upx (QString option, bool enabled, QString value)
 
void on_view_fgx_debug ()
 
void on_view_logs ()
 
void set_debug_mode (bool)
 
void start_all ()
 
void start_fgfs ()
 
void start_terrasync ()
 
void stop_all ()
 

Signals

void on_debug_mode (bool enabled)
 
void reload_paths ()
 
void setx (QString option, bool enabled, QString value)
 
void show_settings (int)
 

Public Member Functions

QString data_file (QString file_name)
 Path to a data file eg data_file("airports.txt") More...
 
QString default_file (QString file_name)
 
QStringList get_env ()
 
QStringList get_fgfs_args ()
 
QString get_fgfs_command ()
 
 MainObject (QObject *parent=0)
 
 ~MainObject ()
 

Static Public Member Functions

static QString log_file_path ()
 Log File. More...
 
static int runningOs ()
 What OS is running. More...
 
static QString temp_dir ()
 location if temp directoty , os specific More...
 
static QString temp_dir (QString append_path)
 location if temp directoty , os specific with appended file/path More...
 

Public Attributes

QAction * actionBrowserMap
 
QWidgetAction * actionCallsign
 
QAction * actionLauncher
 
QAction * actionMpMap
 
QAction * actionPropsBrowser
 
QAction * actionQuit
 
QAction * actionSetupWizard
 
QAction * actionViewFgxDebug
 
QAction * actionViewLogs
 
bool debug_mode
 
FgxDebugWidgetfgxDebugWidget
 
LauncherWindowlauncherWindow
 
QLabellblCallsign
 
QMenu * popupMenu
 
XProcessprocessFgFs
 
XProcessprocessTerraSync
 
PropsTreeWidgetpropertiesBrowser
 
XSettingssettings
 
QSystemTrayIcon * trayIcon
 
ViewLogsWidgetviewLogsWidget
 
XSettingsModelX
 

Detailed Description

The MainObject is an extended QObject, and the main "controller" for FGx.

This was bad naming but a "main object" created when the app starts in the backgound and is passed around as a "state machine" of sorts.

Child "background" in memory containers are

It is only via an icon in the QSystemTrayIcon ie TaskBar All widgets are children to this object and are hidden (at the moment)

MainObject also controls the starting and stopping of processes// TBC

Author
: Peter Morgan
: Yves Sablonier

Definition at line 66 of file mainobject.h.

Constructor & Destructor Documentation

MainObject::MainObject ( QObject parent = 0)
explicit

Definition at line 30 of file mainobject.cpp.

MainObject::~MainObject ( )

Definition at line 207 of file mainobject.cpp.

Member Function Documentation

void MainObject::add_log ( QString  log_name,
QString  data 
)
slot
void MainObject::clear_log ( QString  log_name)
slot

Definition at line 272 of file mainobject.cpp.

Referenced by XProcess::start().

QString MainObject::data_file ( QString  file_name)
QString MainObject::default_file ( QString  file_name)
QStringList MainObject::get_env ( )
QStringList MainObject::get_fgfs_args ( )
QString MainObject::get_fgfs_command ( )
void MainObject::initialize ( )
slot

Definition at line 215 of file mainobject.cpp.

Referenced by MainObject().

QString MainObject::log_file_path ( )
static

Log File.

Returns
Absolute path to log file

Definition at line 388 of file mainobject.cpp.

Referenced by ViewLogsWidget::on_load_fgx_log_file(), and ViewLogWidget::on_load_log_file().

void MainObject::on_about_fgx ( )
slot

Definition at line 454 of file mainobject.cpp.

Referenced by MainObject().

void MainObject::on_about_qt ( )
slot

Definition at line 466 of file mainobject.cpp.

Referenced by MainObject().

void MainObject::on_action_open_url ( QAction *  act)
slot

Definition at line 471 of file mainobject.cpp.

Referenced by MainObject().

void MainObject::on_browsermap ( )
slot

Definition at line 237 of file mainobject.cpp.

Referenced by MainObject(), and start_fgfs().

void MainObject::on_debug_mode ( bool  enabled)
signal

Referenced by set_debug_mode().

void MainObject::on_launcher ( )
slot

Definition at line 223 of file mainobject.cpp.

Referenced by initialize(), and MainObject().

void MainObject::on_properties_browser ( )
slot

Definition at line 248 of file mainobject.cpp.

Referenced by MainObject().

void MainObject::on_quit ( )
slot
void MainObject::on_tray_icon ( QSystemTrayIcon::ActivationReason  reason)
slot

Definition at line 256 of file mainobject.cpp.

Referenced by MainObject().

void MainObject::on_upx ( QString  option,
bool  enabled,
QString  value 
)
slot

Definition at line 478 of file mainobject.cpp.

Referenced by MainObject().

void MainObject::on_view_fgx_debug ( )
slot

Definition at line 347 of file mainobject.cpp.

Referenced by MainObject().

void MainObject::on_view_logs ( )
slot

Definition at line 268 of file mainobject.cpp.

Referenced by MainObject().

void MainObject::reload_paths ( )
signal
void MainObject::set_debug_mode ( bool  menu_mode)
slot

Definition at line 353 of file mainobject.cpp.

Referenced by MenuWidget::on_menu_debug_mode().

void MainObject::setx ( QString  option,
bool  enabled,
QString  value 
)
signal
void MainObject::show_settings ( int  )
signal
void MainObject::start_all ( )
slot

Definition at line 284 of file mainobject.cpp.

Referenced by LauncherWindow::on_start_all_clicked().

void MainObject::start_fgfs ( )
slot

Definition at line 309 of file mainobject.cpp.

Referenced by LauncherWindow::on_start_fgfs_clicked(), and start_all().

void MainObject::start_terrasync ( )
slot

Definition at line 316 of file mainobject.cpp.

Referenced by LauncherWindow::on_start_terrasync_clicked(), and start_all().

void MainObject::stop_all ( )
slot

Definition at line 296 of file mainobject.cpp.

Referenced by on_quit().

QString MainObject::temp_dir ( )
static

location if temp directoty , os specific

Shortcut method for Qt's storageLocation()

Returns
Absolute path

Definition at line 414 of file mainobject.cpp.

Referenced by log_file_path(), and temp_dir().

QString MainObject::temp_dir ( QString  append_path)
static

location if temp directoty , os specific with appended file/path

Shortcut method for Qt's storageLocation()

Returns
Absolute path with appended paths.

Definition at line 422 of file mainobject.cpp.

Member Data Documentation

QAction* MainObject::actionBrowserMap

Definition at line 114 of file mainobject.h.

Referenced by MainObject().

QWidgetAction* MainObject::actionCallsign

Definition at line 104 of file mainobject.h.

Referenced by MainObject().

QAction* MainObject::actionLauncher

Definition at line 107 of file mainobject.h.

Referenced by MainObject().

QAction* MainObject::actionMpMap

Definition at line 108 of file mainobject.h.

QAction* MainObject::actionPropsBrowser

Definition at line 109 of file mainobject.h.

Referenced by MainObject().

QAction* MainObject::actionQuit

Definition at line 116 of file mainobject.h.

Referenced by MainObject().

QAction* MainObject::actionSetupWizard

Definition at line 110 of file mainobject.h.

QAction* MainObject::actionViewFgxDebug

Definition at line 113 of file mainobject.h.

Referenced by MainObject().

QAction* MainObject::actionViewLogs

Definition at line 112 of file mainobject.h.

Referenced by MainObject().

FgxDebugWidget* MainObject::fgxDebugWidget
QLabel* MainObject::lblCallsign

Definition at line 105 of file mainobject.h.

Referenced by MainObject(), and on_upx().

QMenu* MainObject::popupMenu

Definition at line 102 of file mainobject.h.

Referenced by MainObject().

XProcess* MainObject::processFgFs

Definition at line 97 of file mainobject.h.

Referenced by LauncherWindow::LauncherWindow(), MainObject(), start_fgfs(), and stop_all().

XProcess* MainObject::processTerraSync

Definition at line 98 of file mainobject.h.

Referenced by LauncherWindow::LauncherWindow(), MainObject(), start_terrasync(), and stop_all().

PropsTreeWidget* MainObject::propertiesBrowser
XSettings* MainObject::settings

Definition at line 85 of file mainobject.h.

Referenced by AircraftWidget::AircraftWidget(), ViewLogWidget::closeEvent(), SettingsDialog::closeEvent(), ViewLogsWidget::closeEvent(), MpMapWidget::closeEvent(), MpMapXWidget::closeEvent(), PropsTreeWidget::closeEvent(), LauncherWindow::closeEvent(), OpenLayerWidget::closeEvent(), FgxDebugWidget::FgxDebugWidget(), LauncherWindow::initialize(), ConfirmPage::initializePage(), LauncherWindow::LauncherWindow(), AircraftWidget::load_custom_aircraft(), AircraftWidget::load_custom_dir_buttons(), MainObject(), LauncherWindow::moveEvent(), MpMapWidget::MpMapWidget(), MpMapXWidget::MpMapXWidget(), AircraftWidget::on_add_custom_dir(), PilotsWidget::on_check_autorefresh(), PilotsWidget::on_combo_changed(), MpMapWidget::on_combo_server(), OpenLayerWidget::on_display_layer(), FgxDebugWidget::on_open_at_startup(), on_quit(), AircraftWidget::on_remove_custom_dir(), PilotsWidget::on_show_cols(), MpMapXWidget::on_splitter_moved(), AircraftWidget::on_splitter_moved(), FgxDebugWidget::on_tab(), LauncherWindow::on_tab_changed(), AirportsWidget::on_update_airports_filter(), OpenLayerWidget::OpenLayerWidget(), PilotsWidget::PilotsWidget(), XCommandPrevieWidget::preview(), PropEditWidget::PropEditWidget(), PropsTreeWidget::PropsTreeWidget(), LauncherWindow::save_settings(), set_debug_mode(), SettingsDialog::SettingsDialog(), ConfirmPage::validatePage(), ViewLogsWidget::ViewLogsWidget(), ViewLogWidget::ViewLogWidget(), and XCommandPrevieWidget::XCommandPrevieWidget().

QSystemTrayIcon* MainObject::trayIcon

Definition at line 101 of file mainobject.h.

Referenced by MainObject(), and on_tray_icon().

ViewLogsWidget* MainObject::viewLogsWidget
XSettingsModel* MainObject::X

Definition at line 86 of file mainobject.h.

Referenced by AircraftWidget::AircraftWidget(), AirportsWidget::AirportsWidget(), FgExePage::check_paths(), FgRootPage::check_paths(), LauncherWindow::closeEvent(), ConfirmPage::ConfirmPage(), CoreSettingsWidget::CoreSettingsWidget(), ExpertOptionsWidget::ExpertOptionsWidget(), XSettingsModel::get_fgfs_env(), AirportsData::import(), AircraftData::import(), LauncherWindow::initialize(), AirportsWidget::initialize(), FgExePage::initializePage(), FgRootPage::initializePage(), TerraSyncPage::initializePage(), ConfirmPage::initializePage(), LauncherWindow::LauncherWindow(), AircraftWidget::load_aircraft(), AirportsWidget::load_airports_tree(), AirportsWidget::load_info_tree(), CoreSettingsWidget::load_joysticks(), MetarWidget::load_metar(), AirportsWidget::load_parking_node(), LauncherWindow::load_profile(), MainObject(), NetworkWidget::NetworkWidget(), AirportsWidget::on_airport_info_selection_changed(), on_browsermap(), XCommandPrevieWidget::on_command_help(), XCommandPrevieWidget::on_command_version(), NetworkWidget::on_dns_lookup_callback(), NetworkWidget::on_fgcom_path(), CoreSettingsWidget::on_fgfs_path(), AirportsWidget::on_loadaptdat_done(), AirportsWidget::on_map_double_clicked(), MenuWidget::on_menu_default_profile(), MenuWidget::on_menu_load_profile(), MenuWidget::on_menu_reset_profile(), MenuWidget::on_menu_save_profile(), XDebugTreeWidget::on_select_a_node(), AircraftWidget::on_tree_selection_changed(), RenderingWidget::on_upx(), NetworkWidget::on_upx(), CoreSettingsWidget::on_upx(), LauncherWindow::on_upx(), AirportsWidget::on_upx(), OpenLayerWidget::OpenLayerWidget(), XCommandPrevieWidget::preview(), RenderingWidget::RenderingWidget(), LauncherWindow::reset_profile(), LauncherWindow::save_profile(), LauncherWindow::save_settings(), start_all(), start_fgfs(), start_terrasync(), stop_all(), TimeWeatherWidget::TimeWeatherWidget(), FgExePage::validatePage(), ConfirmPage::validatePage(), XCommandPrevieWidget::XCommandPrevieWidget(), and XDebugTreeWidget::XDebugTreeWidget().


The documentation for this class was generated from the following files: