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

#include <addfriendform.h>

Inheritance diagram for AddFriendForm:
Inheritance graph
Collaboration diagram for AddFriendForm:
Collaboration graph

Public Types

enum  Mode { AddFriend = 0, ImportContacts = 1, FriendRequest = 2 }
 

Public Slots

void onUsernameSet (const QString &userName)
 

Signals

void friendRequested (const ToxId &friendAddress, const QString &message)
 
void friendRequestAccepted (const ToxPk &friendAddress)
 
void friendRequestsSeen ()
 

Public Member Functions

 AddFriendForm (ToxId _ownId)
 
 AddFriendForm (const AddFriendForm &)=delete
 
AddFriendFormoperator= (const AddFriendForm &)=delete
 
 ~AddFriendForm ()
 
bool isShown () const
 
void show (ContentLayout *contentLayout)
 
void setMode (Mode mode)
 
bool addFriendRequest (const QString &friendAddress, const QString &message)
 

Private Slots

void onSendTriggered ()
 
void onIdChanged (const QString &id)
 
void onImportSendClicked ()
 
void onImportOpenClicked ()
 
void onFriendRequestAccepted ()
 
void onFriendRequestRejected ()
 
void onCurrentChanged (int index)
 

Private Member Functions

void addFriend (const QString &idText)
 
void retranslateUi ()
 
void addFriendRequestWidget (const QString &friendAddress, const QString &message)
 
void removeFriendRequestWidget (QWidget *friendWidget)
 
void retranslateAcceptButton (QPushButton *acceptButton)
 
void retranslateRejectButton (QPushButton *rejectButton)
 
void deleteFriendRequest (const ToxId &toxId)
 
void setIdFromClipboard ()
 
QString getMessage () const
 
QString getImportMessage () const
 

Private Attributes

QLabel headLabel
 
QLabel toxIdLabel
 
QLabel messageLabel
 
QLabel importFileLabel
 
QLabel importMessageLabel
 
QPushButton sendButton
 
QPushButton importFileButton
 
QPushButton importSendButton
 
QLineEdit toxId
 
QTextEdit message
 
QTextEdit importMessage
 
QVBoxLayout layout
 
QVBoxLayout headLayout
 
QVBoxLayout importContactsLayout
 
QHBoxLayout importFileLine
 
QWidget * head
 
QWidget * main
 
QWidget * importContacts
 
QString lastUsername
 Cached username so we can retranslate the invite message. More...
 
QTabWidget * tabWidget
 
QVBoxLayout * requestsLayout
 
QList< QPushButton * > acceptButtons
 
QList< QPushButton * > rejectButtons
 
QList< QString > contactsToImport
 
ToxId ownId
 

Detailed Description

Definition at line 37 of file addfriendform.h.

Member Enumeration Documentation

◆ Mode

Enumerator
AddFriend 
ImportContacts 
FriendRequest 

Definition at line 41 of file addfriendform.h.

Constructor & Destructor Documentation

◆ AddFriendForm() [1/2]

AddFriendForm::AddFriendForm ( ToxId  _ownId)

Definition at line 64 of file addfriendform.cpp.

◆ AddFriendForm() [2/2]

AddFriendForm::AddFriendForm ( const AddFriendForm )
delete

◆ ~AddFriendForm()

AddFriendForm::~AddFriendForm ( )

Definition at line 132 of file addfriendform.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ addFriend()

void AddFriendForm::addFriend ( const QString &  idText)
private

Definition at line 200 of file addfriendform.cpp.

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

◆ addFriendRequest()

bool AddFriendForm::addFriendRequest ( const QString &  friendAddress,
const QString &  message 
)

Definition at line 181 of file addfriendform.cpp.

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

◆ addFriendRequestWidget()

void AddFriendForm::addFriendRequestWidget ( const QString &  friendAddress,
const QString &  message 
)
private

Definition at line 393 of file addfriendform.cpp.

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

◆ deleteFriendRequest()

void AddFriendForm::deleteFriendRequest ( const ToxId toxId)
private

Definition at line 312 of file addfriendform.cpp.

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

◆ friendRequestAccepted

void AddFriendForm::friendRequestAccepted ( const ToxPk friendAddress)
signal
Here is the caller graph for this function:

◆ friendRequested

void AddFriendForm::friendRequested ( const ToxId friendAddress,
const QString &  message 
)
signal
Here is the caller graph for this function:

◆ friendRequestsSeen

void AddFriendForm::friendRequestsSeen ( )
signal
Here is the caller graph for this function:

◆ getImportMessage()

QString AddFriendForm::getImportMessage ( ) const
private

Definition at line 170 of file addfriendform.cpp.

◆ getMessage()

QString AddFriendForm::getMessage ( ) const
private

Definition at line 164 of file addfriendform.cpp.

Here is the caller graph for this function:

◆ isShown()

bool AddFriendForm::isShown ( ) const

Definition at line 139 of file addfriendform.cpp.

Here is the caller graph for this function:

◆ onCurrentChanged

void AddFriendForm::onCurrentChanged ( int  index)
privateslot

Definition at line 348 of file addfriendform.cpp.

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

◆ onFriendRequestAccepted

void AddFriendForm::onFriendRequestAccepted ( )
privateslot

Definition at line 324 of file addfriendform.cpp.

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

◆ onFriendRequestRejected

void AddFriendForm::onFriendRequestRejected ( )
privateslot

Definition at line 337 of file addfriendform.cpp.

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

◆ onIdChanged

void AddFriendForm::onIdChanged ( const QString &  id)
privateslot

Definition at line 279 of file addfriendform.cpp.

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

◆ onImportOpenClicked

void AddFriendForm::onImportOpenClicked ( )
privateslot

Definition at line 240 of file addfriendform.cpp.

Here is the call graph for this function:

◆ onImportSendClicked

void AddFriendForm::onImportSendClicked ( )
privateslot

Definition at line 229 of file addfriendform.cpp.

Here is the call graph for this function:

◆ onSendTriggered

void AddFriendForm::onSendTriggered ( )
privateslot

Definition at line 220 of file addfriendform.cpp.

Here is the call graph for this function:

◆ onUsernameSet

void AddFriendForm::onUsernameSet ( const QString &  userName)
slot

Definition at line 194 of file addfriendform.cpp.

Here is the call graph for this function:

◆ operator=()

AddFriendForm& AddFriendForm::operator= ( const AddFriendForm )
delete

◆ removeFriendRequestWidget()

void AddFriendForm::removeFriendRequestWidget ( QWidget *  friendWidget)
private

Definition at line 428 of file addfriendform.cpp.

Here is the caller graph for this function:

◆ retranslateAcceptButton()

void AddFriendForm::retranslateAcceptButton ( QPushButton *  acceptButton)
private

Definition at line 437 of file addfriendform.cpp.

Here is the caller graph for this function:

◆ retranslateRejectButton()

void AddFriendForm::retranslateRejectButton ( QPushButton *  rejectButton)
private

Definition at line 442 of file addfriendform.cpp.

Here is the caller graph for this function:

◆ retranslateUi()

void AddFriendForm::retranslateUi ( )
private

Definition at line 357 of file addfriendform.cpp.

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

◆ setIdFromClipboard()

void AddFriendForm::setIdFromClipboard ( )
private

Definition at line 301 of file addfriendform.cpp.

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

◆ setMode()

void AddFriendForm::setMode ( Mode  mode)

Definition at line 176 of file addfriendform.cpp.

Here is the caller graph for this function:

◆ show()

void AddFriendForm::show ( ContentLayout contentLayout)

Definition at line 149 of file addfriendform.cpp.

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

Member Data Documentation

◆ acceptButtons

QList<QPushButton*> AddFriendForm::acceptButtons
private

Definition at line 111 of file addfriendform.h.

◆ contactsToImport

QList<QString> AddFriendForm::contactsToImport
private

Definition at line 113 of file addfriendform.h.

◆ head

QWidget* AddFriendForm::head
private

Definition at line 105 of file addfriendform.h.

◆ headLabel

QLabel AddFriendForm::headLabel
private

Definition at line 89 of file addfriendform.h.

◆ headLayout

QVBoxLayout AddFriendForm::headLayout
private

Definition at line 102 of file addfriendform.h.

◆ importContacts

QWidget* AddFriendForm::importContacts
private

Definition at line 107 of file addfriendform.h.

◆ importContactsLayout

QVBoxLayout AddFriendForm::importContactsLayout
private

Definition at line 103 of file addfriendform.h.

◆ importFileButton

QPushButton AddFriendForm::importFileButton
private

Definition at line 96 of file addfriendform.h.

◆ importFileLabel

QLabel AddFriendForm::importFileLabel
private

Definition at line 92 of file addfriendform.h.

◆ importFileLine

QHBoxLayout AddFriendForm::importFileLine
private

Definition at line 104 of file addfriendform.h.

◆ importMessage

QTextEdit AddFriendForm::importMessage
private

Definition at line 100 of file addfriendform.h.

◆ importMessageLabel

QLabel AddFriendForm::importMessageLabel
private

Definition at line 93 of file addfriendform.h.

◆ importSendButton

QPushButton AddFriendForm::importSendButton
private

Definition at line 97 of file addfriendform.h.

◆ lastUsername

QString AddFriendForm::lastUsername
private

Cached username so we can retranslate the invite message.

Definition at line 108 of file addfriendform.h.

◆ layout

QVBoxLayout AddFriendForm::layout
private

Definition at line 101 of file addfriendform.h.

◆ main

QWidget* AddFriendForm::main
private

Definition at line 106 of file addfriendform.h.

◆ message

QTextEdit AddFriendForm::message
private

Definition at line 99 of file addfriendform.h.

◆ messageLabel

QLabel AddFriendForm::messageLabel
private

Definition at line 91 of file addfriendform.h.

◆ ownId

ToxId AddFriendForm::ownId
private

Definition at line 115 of file addfriendform.h.

◆ rejectButtons

QList<QPushButton*> AddFriendForm::rejectButtons
private

Definition at line 112 of file addfriendform.h.

◆ requestsLayout

QVBoxLayout* AddFriendForm::requestsLayout
private

Definition at line 110 of file addfriendform.h.

◆ sendButton

QPushButton AddFriendForm::sendButton
private

Definition at line 95 of file addfriendform.h.

◆ tabWidget

QTabWidget* AddFriendForm::tabWidget
private

Definition at line 109 of file addfriendform.h.

◆ toxId

QLineEdit AddFriendForm::toxId
private

Definition at line 98 of file addfriendform.h.

◆ toxIdLabel

QLabel AddFriendForm::toxIdLabel
private

Definition at line 90 of file addfriendform.h.


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