qTox  Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
Public Member Functions | Private Member Functions | List of all members
ProfileImporter Class Reference

This class provides the ability to import profile. More...

#include <profileimporter.h>

Inheritance diagram for ProfileImporter:
Inheritance graph
Collaboration diagram for ProfileImporter:
Collaboration graph

Public Member Functions

 ProfileImporter (QWidget *parent=nullptr)
 
bool importProfile (const QString &path)
 Try to import Tox profile. More...
 
bool importProfile ()
 Show a file dialog. Selected file will be imported as Tox profile. More...
 

Private Member Functions

bool askQuestion (QString title, QString message)
 Asks the user a question with Yes/No choices. More...
 

Detailed Description

This class provides the ability to import profile.

Note
This class can be used before Nexus instance will be created, consequently it can't use GUI class. Therefore it should use QMessageBox to create dialog forms.

Definition at line 24 of file profileimporter.h.

Constructor & Destructor Documentation

◆ ProfileImporter()

ProfileImporter::ProfileImporter ( QWidget *  parent = nullptr)
explicit

Definition at line 38 of file profileimporter.cpp.

Member Function Documentation

◆ askQuestion()

bool ProfileImporter::askQuestion ( QString  title,
QString  message 
)
private

Asks the user a question with Yes/No choices.

Parameters
titleTitle of question window.
messageText in question window.
Returns
True if the answer is positive, false otherwise.

Definition at line 67 of file profileimporter.cpp.

Here is the caller graph for this function:

◆ importProfile() [1/2]

bool ProfileImporter::importProfile ( )

Show a file dialog. Selected file will be imported as Tox profile.

Returns
True, if the import was succesful. False otherwise.

Definition at line 47 of file profileimporter.cpp.

◆ importProfile() [2/2]

bool ProfileImporter::importProfile ( const QString &  path)

Try to import Tox profile.

Parameters
pathPath to Tox profile.
Returns
True, if the import was succesful. False otherwise.

Definition at line 85 of file profileimporter.cpp.

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

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