qTox  Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
Nexus Class Reference

#include <nexus.h>

Inheritance diagram for Nexus:
Inheritance graph
Collaboration diagram for Nexus:
Collaboration graph

Public Slots

void onCreateNewProfile (const QString &name, const QString &pass)
 Creates a new profile and replaces the current one. More...
 
void onLoadProfile (const QString &name, const QString &pass)
 
int showLogin (const QString &profileName=QString())
 Hides the main GUI, delete the profile, and shows the login screen. More...
 
void bootstrapWithProfile (Profile *p)
 

Signals

void currentProfileChanged (Profile *Profile)
 
void profileLoaded ()
 
void profileLoadFailed ()
 
void saveGlobal ()
 

Public Member Functions

void start ()
 Sets up invariants and calls showLogin. More...
 
void showMainGUI ()
 
void setSettings (Settings *settings)
 
void setParser (QCommandLineParser *parser)
 

Static Public Member Functions

static NexusgetInstance ()
 Returns the singleton instance. More...
 
static void destroyInstance ()
 
static CoregetCore ()
 Get core instance. More...
 
static ProfilegetProfile ()
 Get current user profile. More...
 
static WidgetgetDesktopGUI ()
 Get desktop GUI widget. More...
 

Private Member Functions

 Nexus (QObject *parent=nullptr)
 
void connectLoginScreen (const LoginScreen &loginScreen)
 
void setProfile (Profile *p)
 
 ~Nexus ()
 

Private Attributes

Profileprofile
 
Settingssettings
 
Widgetwidget
 
std::unique_ptr< IAudioControl > audioControl
 
QCommandLineParser * parser = nullptr
 

Detailed Description

This class is in charge of connecting various systems together and forwarding signals appropriately to the right objects, it is in charge of starting the GUI and the Core.

Definition at line 43 of file nexus.h.

Constructor & Destructor Documentation

◆ Nexus()

Nexus::Nexus ( QObject *  parent = nullptr)
explicitprivate

Definition at line 60 of file nexus.cpp.

◆ ~Nexus()

Nexus::~Nexus ( )
private

Definition at line 66 of file nexus.cpp.

Member Function Documentation

◆ bootstrapWithProfile

void Nexus::bootstrapWithProfile ( Profile p)
slot

Definition at line 180 of file nexus.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ connectLoginScreen()

void Nexus::connectLoginScreen ( const LoginScreen loginScreen)
private

Definition at line 205 of file nexus.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ currentProfileChanged

void Nexus::currentProfileChanged ( Profile Profile)
signal
Here is the caller graph for this function:

◆ destroyInstance()

void Nexus::destroyInstance ( )
static

Definition at line 267 of file nexus.cpp.

Here is the caller graph for this function:

◆ getCore()

Core * Nexus::getCore ( )
static

Get core instance.

Returns
nullptr if not started, core instance otherwise.

Definition at line 277 of file nexus.cpp.

Here is the caller graph for this function:

◆ getDesktopGUI()

Widget * Nexus::getDesktopGUI ( )
static

Get desktop GUI widget.

Returns
nullptr if not started, desktop widget otherwise.

Definition at line 340 of file nexus.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getInstance()

Nexus & Nexus::getInstance ( )
static

Returns the singleton instance.

Definition at line 259 of file nexus.cpp.

Here is the caller graph for this function:

◆ getProfile()

Profile * Nexus::getProfile ( )
static

Get current user profile.

Returns
nullptr if not started, profile otherwise.

Definition at line 290 of file nexus.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onCreateNewProfile

void Nexus::onCreateNewProfile ( const QString &  name,
const QString &  pass 
)
slot

Creates a new profile and replaces the current one.

Parameters
nameNew username
passNew password

Definition at line 300 of file nexus.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onLoadProfile

void Nexus::onLoadProfile ( const QString &  name,
const QString &  pass 
)
slot

Loads an existing profile and replaces the current one.

Definition at line 309 of file nexus.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ profileLoaded

void Nexus::profileLoaded ( )
signal
Here is the caller graph for this function:

◆ profileLoadFailed

void Nexus::profileLoadFailed ( )
signal
Here is the caller graph for this function:

◆ saveGlobal

void Nexus::saveGlobal ( )
signal
Here is the caller graph for this function:

◆ setParser()

void Nexus::setParser ( QCommandLineParser *  parser)

Definition at line 331 of file nexus.cpp.

◆ setProfile()

void Nexus::setProfile ( Profile p)
private

Changes the loaded profile and notifies listeners.

Parameters
p

Definition at line 318 of file nexus.cpp.

Here is the caller graph for this function:

◆ setSettings()

void Nexus::setSettings ( Settings settings)

Definition at line 194 of file nexus.cpp.

Here is the call graph for this function:

◆ showLogin

int Nexus::showLogin ( const QString &  profileName = QString())
slot

Hides the main GUI, delete the profile, and shows the login screen.

Definition at line 153 of file nexus.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ showMainGUI()

void Nexus::showMainGUI ( )

Definition at line 223 of file nexus.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start()

void Nexus::start ( )

Sets up invariants and calls showLogin.

Hides the login screen and shows the GUI for the given profile. Will delete the current GUI, if it exists.

Definition at line 84 of file nexus.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ audioControl

std::unique_ptr<IAudioControl> Nexus::audioControl
private

Definition at line 105 of file nexus.h.

◆ parser

QCommandLineParser* Nexus::parser = nullptr
private

Definition at line 106 of file nexus.h.

◆ profile

Profile* Nexus::profile
private

Definition at line 102 of file nexus.h.

◆ settings

Settings* Nexus::settings
private

Definition at line 103 of file nexus.h.

◆ widget

Widget* Nexus::widget
private

Definition at line 104 of file nexus.h.


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