Strider
4 years ago
10 changed files with 165 additions and 44 deletions
@ -0,0 +1,5 @@ |
|||||
|
Compiling SilentDragonLite 1.2.2 with 4 threads... |
||||
|
g++ -c -include bin/SilentDragonLite -pipe -g -std=gnu++1y -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQAPPLICATION_CLASS=QApplication -D_FORTIFY_SOURCE=2 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Isrc/3rdparty -Isrc -Isingleapplication -Ires -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebSockets -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Ibin -Isrc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o bin/mainwindow.o src/mainwindow.cpp |
||||
|
g++ -c -include bin/SilentDragonLite -pipe -g -std=gnu++1y -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQAPPLICATION_CLASS=QApplication -D_FORTIFY_SOURCE=2 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Isrc/3rdparty -Isrc -Isingleapplication -Ires -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebSockets -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Ibin -Isrc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o bin/sendtab.o src/sendtab.cpp |
||||
|
g++ -c -include bin/SilentDragonLite -pipe -g -std=gnu++1y -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQAPPLICATION_CLASS=QApplication -D_FORTIFY_SOURCE=2 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Isrc/3rdparty -Isrc -Isingleapplication -Ires -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebSockets -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Ibin -Isrc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o bin/addressbook.o src/addressbook.cpp |
||||
|
g++ -c -include bin/SilentDragonLite -pipe -g -std=gnu++1y -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQAPPLICATION_CLASS=QApplication -D_FORTIFY_SOURCE=2 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Isrc/3rdparty -Isrc -Isingleapplication -Ires -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebSockets -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Ibin -Isrc -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o bin/addresscombo.o src/addresscombo.cpp |
@ -0,0 +1,9 @@ |
|||||
|
#include "contactmodel.h" |
||||
|
|
||||
|
void ContactModel::renderContactList(QListWidget* view) |
||||
|
{ |
||||
|
for(auto &c : this->_contacts) |
||||
|
{ |
||||
|
view->addItem(c.getName()); |
||||
|
} |
||||
|
} |
@ -0,0 +1,68 @@ |
|||||
|
#ifndef CONTACTMODEL_H |
||||
|
#define CONTACTMODEL_H |
||||
|
|
||||
|
#include <vector> |
||||
|
#include <QString> |
||||
|
#include <QListWidget> |
||||
|
|
||||
|
class ContactItem |
||||
|
{ |
||||
|
private: |
||||
|
QString _myAddress; |
||||
|
QString _partnerAddress; |
||||
|
QString _name; |
||||
|
|
||||
|
public: |
||||
|
ContactItem(); |
||||
|
ContactItem(QString myAddress, QString partnerAddress, QString name) |
||||
|
{ |
||||
|
_myAddress = myAddress; |
||||
|
_partnerAddress = partnerAddress; |
||||
|
_name = name; |
||||
|
} |
||||
|
|
||||
|
QString getName() const |
||||
|
{ |
||||
|
return _name; |
||||
|
} |
||||
|
|
||||
|
QString getMyAddress() const |
||||
|
{ |
||||
|
return _myAddress; |
||||
|
} |
||||
|
|
||||
|
QString getPartnerAddress() const |
||||
|
{ |
||||
|
return _partnerAddress; |
||||
|
} |
||||
|
|
||||
|
void setName(QString name) |
||||
|
{ |
||||
|
_name = name; |
||||
|
} |
||||
|
|
||||
|
void setMyAddress(QString myAddress) |
||||
|
{ |
||||
|
_myAddress = myAddress; |
||||
|
} |
||||
|
|
||||
|
void setPartnerAddress(QString partnerAddress) |
||||
|
{ |
||||
|
_partnerAddress = partnerAddress; |
||||
|
} |
||||
|
|
||||
|
QString toQTString() |
||||
|
{ |
||||
|
return _name + "|" + _partnerAddress + "|" + _myAddress; |
||||
|
} |
||||
|
|
||||
|
}; |
||||
|
|
||||
|
class ContactModel |
||||
|
{ |
||||
|
public: |
||||
|
ContactModel() {} |
||||
|
void renderContactList(QListWidget* view); |
||||
|
}; |
||||
|
|
||||
|
#endif |
Loading…
Reference in new issue