diff --git a/libretroshare/src/retroshare/rsplugin.h b/libretroshare/src/retroshare/rsplugin.h index afa8daae6..7d93310f7 100644 --- a/libretroshare/src/retroshare/rsplugin.h +++ b/libretroshare/src/retroshare/rsplugin.h @@ -62,6 +62,7 @@ class RsPQIService ; class RsAutoUpdatePage ; class SoundEvents; class FeedNotify; +class ToasterNotify; class ChatWidget; class ChatWidgetHolder; // for gxs based plugins @@ -178,6 +179,7 @@ class RsPlugin //================================== Notify ==================================// // virtual FeedNotify *qt_feedNotify() { return NULL; } + virtual ToasterNotify *qt_toasterNotify() { return NULL; } // //========================== Plugin Description ==============================// diff --git a/plugins/VOIP/VOIP.pro b/plugins/VOIP/VOIP.pro index c54bd9347..31bb958da 100644 --- a/plugins/VOIP/VOIP.pro +++ b/plugins/VOIP/VOIP.pro @@ -45,7 +45,9 @@ SOURCES = VOIPPlugin.cpp \ gui/QVideoDevice.cpp \ gui/VOIPChatWidgetHolder.cpp \ gui/VOIPGUIHandler.cpp \ - gui/VOIPNotify.cpp + gui/VOIPNotify.cpp \ + gui/VOIPToasterItem.cpp \ + gui/VOIPToasterNotify.cpp HEADERS = VOIPPlugin.h \ services/p3VOIP.h \ @@ -60,11 +62,14 @@ HEADERS = VOIPPlugin.h \ gui/VOIPChatWidgetHolder.h \ gui/VOIPGUIHandler.h \ gui/VOIPNotify.h \ + gui/VOIPToasterItem.h \ + gui/VOIPToasterNotify.h \ interface/rsVOIP.h FORMS = gui/AudioInputConfig.ui \ gui/AudioStats.ui \ - gui/AudioWizard.ui + gui/AudioWizard.ui \ + gui/VOIPToasterItem.ui TARGET = VOIP diff --git a/plugins/VOIP/VOIPPlugin.cpp b/plugins/VOIP/VOIPPlugin.cpp index b37b3225a..eebfa6167 100644 --- a/plugins/VOIP/VOIPPlugin.cpp +++ b/plugins/VOIP/VOIPPlugin.cpp @@ -78,20 +78,22 @@ void VOIPPlugin::getPluginVersion(int& major, int& minor, int& build, int& svn_r VOIPPlugin::VOIPPlugin() { + qRegisterMetaType("RsPeerId"); mVOIP = NULL ; mPlugInHandler = NULL; mPeers = NULL; config_page = NULL ; mIcon = NULL ; + mVOIPToasterNotify = NULL ; mVOIPGUIHandler = new VOIPGUIHandler ; mVOIPNotify = new VOIPNotify ; - QObject::connect(mVOIPNotify,SIGNAL(voipInvitationReceived(const QString&)),mVOIPGUIHandler,SLOT(ReceivedInvitation(const QString&)),Qt::QueuedConnection) ; - QObject::connect(mVOIPNotify,SIGNAL(voipDataReceived(const QString&)),mVOIPGUIHandler,SLOT(ReceivedVoipData(const QString&)),Qt::QueuedConnection) ; - QObject::connect(mVOIPNotify,SIGNAL(voipAcceptReceived(const QString&)),mVOIPGUIHandler,SLOT(ReceivedVoipAccept(const QString&)),Qt::QueuedConnection) ; - QObject::connect(mVOIPNotify,SIGNAL(voipHangUpReceived(const QString&)),mVOIPGUIHandler,SLOT(ReceivedVoipHangUp(const QString&)),Qt::QueuedConnection) ; - QObject::connect(mVOIPNotify,SIGNAL(voipBandwidthInfoReceived(const QString&,int)),mVOIPGUIHandler,SLOT(ReceivedVoipBandwidthInfo(const QString&,int)),Qt::QueuedConnection) ; + QObject::connect(mVOIPNotify,SIGNAL(voipInvitationReceived(const RsPeerId&)),mVOIPGUIHandler,SLOT(ReceivedInvitation(const RsPeerId&)),Qt::QueuedConnection) ; + QObject::connect(mVOIPNotify,SIGNAL(voipDataReceived(const RsPeerId&)),mVOIPGUIHandler,SLOT(ReceivedVoipData(const RsPeerId&)),Qt::QueuedConnection) ; + QObject::connect(mVOIPNotify,SIGNAL(voipAcceptReceived(const RsPeerId&)),mVOIPGUIHandler,SLOT(ReceivedVoipAccept(const RsPeerId&)),Qt::QueuedConnection) ; + QObject::connect(mVOIPNotify,SIGNAL(voipHangUpReceived(const RsPeerId&)),mVOIPGUIHandler,SLOT(ReceivedVoipHangUp(const RsPeerId&)),Qt::QueuedConnection) ; + QObject::connect(mVOIPNotify,SIGNAL(voipBandwidthInfoReceived(const RsPeerId&,int)),mVOIPGUIHandler,SLOT(ReceivedVoipBandwidthInfo(const RsPeerId&,int)),Qt::QueuedConnection) ; } void VOIPPlugin::setInterfaces(RsPlugInInterfaces &interfaces) @@ -135,7 +137,7 @@ ChatWidgetHolder *VOIPPlugin::qt_get_chat_widget_holder(ChatWidget *chatWidget) { switch (chatWidget->chatType()) { case ChatWidget::CHATTYPE_PRIVATE: - return new VOIPChatWidgetHolder(chatWidget); + return new VOIPChatWidgetHolder(chatWidget, mVOIPNotify); case ChatWidget::CHATTYPE_UNKNOWN: case ChatWidget::CHATTYPE_LOBBY: case ChatWidget::CHATTYPE_DISTANT: @@ -201,3 +203,10 @@ void VOIPPlugin::qt_sound_events(SoundEvents &/*events*/) const { // events.addEvent(QApplication::translate("VOIP", "VOIP"), QApplication::translate("VOIP", "Incoming call"), VOIP_SOUND_INCOMING_CALL); } + +ToasterNotify *VOIPPlugin::qt_toasterNotify(){ + if (!mVOIPToasterNotify) { + mVOIPToasterNotify = new VOIPToasterNotify(mVOIP, mVOIPNotify); + } + return mVOIPToasterNotify; +} diff --git a/plugins/VOIP/VOIPPlugin.h b/plugins/VOIP/VOIPPlugin.h index a6776622d..5350588e8 100644 --- a/plugins/VOIP/VOIPPlugin.h +++ b/plugins/VOIP/VOIPPlugin.h @@ -20,9 +20,13 @@ ****************************************************************/ #pragma once -#include +/*VOIP*/ +#include "gui/VOIPToasterNotify.h" #include "services/p3VOIP.h" +/*libretroshare"*/ +#include + class VOIPGUIHandler ; class VOIPNotify ; @@ -51,6 +55,9 @@ class VOIPPlugin: public RsPlugin virtual std::string getPluginName() const; virtual void setInterfaces(RsPlugInInterfaces& interfaces); + //================================== RsPlugin Notify ==================================// + virtual ToasterNotify *qt_toasterNotify(); + private: mutable p3VOIP *mVOIP ; mutable RsPluginHandler *mPlugInHandler; @@ -60,5 +67,6 @@ class VOIPPlugin: public RsPlugin VOIPNotify *mVOIPNotify ; VOIPGUIHandler *mVOIPGUIHandler ; + VOIPToasterNotify *mVOIPToasterNotify ; }; diff --git a/plugins/VOIP/gui/CallToaster.cpp b/plugins/VOIP/gui/CallToaster.cpp deleted file mode 100644 index d9f9cb600..000000000 --- a/plugins/VOIP/gui/CallToaster.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * RetroShare - * Copyright (C) 2012 RetroShare Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "CallToaster.h" -#include "gui/chat/ChatDialog.h" - -#include - -CallToaster::CallToaster(const RsPeerId &peerId) : QWidget(NULL) -{ - /* Invoke the Qt Designer generated object setup routine */ - ui.setupUi(this); - - this->peerId = peerId; - - /* connect buttons */ - connect(ui.toasterButton, SIGNAL(clicked()), SLOT(chatButtonSlot())); - connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide())); - - /* set informations */ - ui.textLabel->setText(QString::fromUtf8(rsPeers->getPeerName(peerId).c_str())); - ui.avatarWidget->setFrameType(AvatarWidget::STATUS_FRAME); - ui.avatarWidget->setId(peerId); -} - -void CallToaster::chatButtonSlot() -{ - ChatDialog::chatFriend(peerId); - hide(); -} diff --git a/plugins/VOIP/gui/CallToaster.h b/plugins/VOIP/gui/CallToaster.h deleted file mode 100644 index 89e3b448c..000000000 --- a/plugins/VOIP/gui/CallToaster.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * RetroShare - * Copyright (C) 2013 RetroShare Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef CALLTOASTER_H -#define CALLTOASTER_H - -#include "ui_CallToaster.h" - -/** - * Shows a toaster when friend is Calling you . - * - * - */ -class CallToaster : public QWidget -{ - Q_OBJECT - -public: - CallToaster(const RsPeerId &peerId); - -private slots: - void chatButtonSlot(); - -private: - RsPeerId peerId; - - /** Qt Designer generated object */ - Ui::CallToaster ui; -}; - -#endif //MESSAGETOASTER_H diff --git a/plugins/VOIP/gui/VOIPChatWidgetHolder.cpp b/plugins/VOIP/gui/VOIPChatWidgetHolder.cpp index 83e629e86..6a8a5a983 100644 --- a/plugins/VOIP/gui/VOIPChatWidgetHolder.cpp +++ b/plugins/VOIP/gui/VOIPChatWidgetHolder.cpp @@ -41,8 +41,8 @@ #define CALL_HOLD ":/images/call-hold.png" -VOIPChatWidgetHolder::VOIPChatWidgetHolder(ChatWidget *chatWidget) - : QObject(), ChatWidgetHolder(chatWidget) +VOIPChatWidgetHolder::VOIPChatWidgetHolder(ChatWidget *chatWidget, VOIPNotify *notify) + : QObject(), ChatWidgetHolder(chatWidget), mVOIPNotify(notify) { QIcon icon ; icon.addPixmap(QPixmap(":/images/audio-volume-muted.png")) ; @@ -284,12 +284,11 @@ void VOIPChatWidgetHolder::toggleVideoCapture() } } -void VOIPChatWidgetHolder::addVideoData(const QString name, QByteArray* array) +void VOIPChatWidgetHolder::addVideoData(const RsPeerId &peer_id, QByteArray* array) { - outputVideoProcessor->receiveEncodedData((unsigned char *)array->data(),array->size()) ; if (!videoCaptureToggleButton->isChecked()) { if (mChatWidget) { - QString buttonName = name; + QString buttonName = QString::fromStdString(peer_id.toStdString()); if (buttonName.isEmpty()) buttonName = "VoIP";//TODO maybe change all with GxsId button_map::iterator it = buttonMapTakeVideo.find(buttonName); if (it == buttonMapTakeVideo.end()){ @@ -315,6 +314,13 @@ void VOIPChatWidgetHolder::addVideoData(const QString name, QByteArray* array) buttonMapTakeVideo.insert(buttonName, button); } } + + //TODO make a sound for the incoming call +// soundManager->play(VOIP_SOUND_INCOMING_CALL); + if (mVOIPNotify) mVOIPNotify->notifyReceivedVoipVideoCall(peer_id); + + } else { + outputVideoProcessor->receiveEncodedData((unsigned char *)array->data(),array->size()) ; } } @@ -350,12 +356,12 @@ void VOIPChatWidgetHolder::botMouseLeave() } } -void VOIPChatWidgetHolder::setAcceptedBandwidth(const QString name, uint32_t bytes_per_sec) +void VOIPChatWidgetHolder::setAcceptedBandwidth(uint32_t bytes_per_sec) { inputVideoProcessor->setMaximumFrameRate(bytes_per_sec) ; } -void VOIPChatWidgetHolder::addAudioData(const QString name, QByteArray* array) +void VOIPChatWidgetHolder::addAudioData(const RsPeerId &peer_id, QByteArray* array) { if (!audioCaptureToggleButton->isChecked()) { //launch an animation. Don't launch it if already animating @@ -374,7 +380,7 @@ void VOIPChatWidgetHolder::addAudioData(const QString name, QByteArray* array) } if (mChatWidget) { - QString buttonName = name; + QString buttonName = QString::fromStdString(peer_id.toStdString()); if (buttonName.isEmpty()) buttonName = "VoIP";//TODO maybe change all with GxsId button_map::iterator it = buttonMapTakeVideo.find(buttonName); if (it == buttonMapTakeVideo.end()){ @@ -402,11 +408,12 @@ void VOIPChatWidgetHolder::addAudioData(const QString name, QByteArray* array) } } -// soundManager->play(VOIP_SOUND_INCOMING_CALL); - audioCaptureToggleButton->setToolTip(tr("Answer")); - //TODO make a toaster and a sound for the incoming call + //TODO make a sound for the incoming call +// soundManager->play(VOIP_SOUND_INCOMING_CALL); + if (mVOIPNotify) mVOIPNotify->notifyReceivedVoipAudioCall(peer_id); + return; } @@ -432,7 +439,7 @@ void VOIPChatWidgetHolder::addAudioData(const QString name, QByteArray* array) outputAudioDevice->setBufferSize(20); outputAudioDevice->start(outputAudioProcessor); } - outputAudioProcessor->putNetworkPacket(name, *array); + outputAudioProcessor->putNetworkPacket(QString::fromStdString(peer_id.toStdString()), *array); //check the input device for errors if (inputAudioDevice && inputAudioDevice->error() != QAudio::NoError) { diff --git a/plugins/VOIP/gui/VOIPChatWidgetHolder.h b/plugins/VOIP/gui/VOIPChatWidgetHolder.h index ae1c16a07..791a2dcf8 100644 --- a/plugins/VOIP/gui/VOIPChatWidgetHolder.h +++ b/plugins/VOIP/gui/VOIPChatWidgetHolder.h @@ -21,6 +21,8 @@ #pragma once +#include "gui/VOIPNotify.h" + #include #include #include @@ -42,29 +44,29 @@ class VOIPChatWidgetHolder : public QObject, public ChatWidgetHolder Q_OBJECT public: - VOIPChatWidgetHolder(ChatWidget *chatWidget); + VOIPChatWidgetHolder(ChatWidget *chatWidget, VOIPNotify *notify); virtual ~VOIPChatWidgetHolder(); virtual void updateStatus(int status); - void addAudioData(const QString name, QByteArray* array) ; - void addVideoData(const QString name, QByteArray* array) ; - void setAcceptedBandwidth(const QString name, uint32_t bytes_per_sec) ; + void addAudioData(const RsPeerId &peer_id, QByteArray* array) ; + void addVideoData(const RsPeerId &peer_id, QByteArray* array) ; + void setAcceptedBandwidth(uint32_t bytes_per_sec) ; + +public slots: + void sendAudioData(); + void sendVideoData(); + void startAudioCapture(); + void startVideoCapture(); private slots: void toggleAudioListen(); void toggleAudioCapture(); void toggleVideoCapture(); - void startVideoCapture(); - void startAudioCapture(); void hangupCall() ; void botMouseEnter(); void botMouseLeave(); -public slots: - void sendAudioData(); - void sendVideoData(); - protected: // Audio input/output QAudioInput* inputAudioDevice; @@ -91,5 +93,7 @@ protected: typedef QMap button_map; button_map buttonMapTakeVideo; + + VOIPNotify *mVOIPNotify; }; diff --git a/plugins/VOIP/gui/VOIPGUIHandler.cpp b/plugins/VOIP/gui/VOIPGUIHandler.cpp index 4563f0d3e..03703d71a 100644 --- a/plugins/VOIP/gui/VOIPGUIHandler.cpp +++ b/plugins/VOIP/gui/VOIPGUIHandler.cpp @@ -21,31 +21,29 @@ #include #include #include -#include #include "VOIPGUIHandler.h" #include #include #include "gui/chat/ChatWidget.h" #include "gui/settings/rsharesettings.h" -void VOIPGUIHandler::ReceivedInvitation(const QString& /*peer_id*/) +void VOIPGUIHandler::ReceivedInvitation(const RsPeerId &/*peer_id*/) { std::cerr << "****** VOIPGUIHandler: received Invitation!" << std::endl; } -void VOIPGUIHandler::ReceivedVoipHangUp(const QString& /*peer_id*/) +void VOIPGUIHandler::ReceivedVoipHangUp(const RsPeerId &/*peer_id*/) { std::cerr << "****** VOIPGUIHandler: received HangUp!" << std::endl; } -void VOIPGUIHandler::ReceivedVoipAccept(const QString& /*peer_id*/) +void VOIPGUIHandler::ReceivedVoipAccept(const RsPeerId &/*peer_id*/) { std::cerr << "****** VOIPGUIHandler: received VoipAccept!" << std::endl; } -void VOIPGUIHandler::ReceivedVoipData(const QString& qpeer_id) +void VOIPGUIHandler::ReceivedVoipData(const RsPeerId &peer_id) { - RsPeerId peer_id(qpeer_id.toStdString()) ; std::vector chunks ; if(!rsVOIP->getIncomingData(peer_id,chunks)) @@ -70,9 +68,9 @@ void VOIPGUIHandler::ReceivedVoipData(const QString& qpeer_id) QByteArray qb(reinterpret_cast(chunks[chunkIndex].data),chunks[chunkIndex].size); if(chunks[chunkIndex].type == RsVOIPDataChunk::RS_VOIP_DATA_TYPE_AUDIO) - acwh->addAudioData(QString::fromStdString(peer_id.toStdString()),&qb); + acwh->addAudioData(peer_id, &qb); else if(chunks[chunkIndex].type == RsVOIPDataChunk::RS_VOIP_DATA_TYPE_VIDEO) - acwh->addVideoData(QString::fromStdString(peer_id.toStdString()),&qb); + acwh->addVideoData(peer_id, &qb); else std::cerr << "VOIPGUIHandler: Unknown data type received. type=" << chunks[chunkIndex].type << std::endl; } @@ -89,13 +87,11 @@ void VOIPGUIHandler::ReceivedVoipData(const QString& qpeer_id) } } -void VOIPGUIHandler::ReceivedVoipBandwidthInfo(const QString& qpeer_id,int bytes_per_sec) +void VOIPGUIHandler::ReceivedVoipBandwidthInfo(const RsPeerId &peer_id, int bytes_per_sec) { - RsPeerId peer_id(qpeer_id.toStdString()) ; - ChatDialog *di = ChatDialog::getExistingChat(ChatId(peer_id)) ; - std::cerr << "VOIPGUIHandler::received bw info for peer " << qpeer_id.toStdString() << ": " << bytes_per_sec << " Bps" << std::endl; + std::cerr << "VOIPGUIHandler::received bw info for peer " << peer_id.toStdString() << ": " << bytes_per_sec << " Bps" << std::endl; if(!di) { std::cerr << "VOIPGUIHandler Error: received bandwidth info for a chat dialog that does not stand VOIP (Peer id = " << peer_id.toStdString() << "!" << std::endl; @@ -115,6 +111,50 @@ void VOIPGUIHandler::ReceivedVoipBandwidthInfo(const QString& qpeer_id,int bytes VOIPChatWidgetHolder *acwh = dynamic_cast(chatWidgetHolder) ; if (acwh) - acwh->setAcceptedBandwidth(QString::fromStdString(peer_id.toStdString()),bytes_per_sec); + acwh->setAcceptedBandwidth(bytes_per_sec); } } + +void VOIPGUIHandler::AnswerAudioCall(const RsPeerId &peer_id) +{ + ChatDialog *di = ChatDialog::getExistingChat(ChatId(peer_id)) ; + if (di) { + ChatWidget *cw = di->getChatWidget(); + if(cw) { + const QList &chatWidgetHolderList = cw->chatWidgetHolderList(); + + foreach (ChatWidgetHolder *chatWidgetHolder, chatWidgetHolderList) + { + VOIPChatWidgetHolder *acwh = dynamic_cast(chatWidgetHolder) ; + + if (acwh) + acwh->startAudioCapture(); + } + } + } else { + std::cerr << "VOIPGUIHandler Error: answer audio call for a chat dialog that does not stand VOIP (Peer id = " << peer_id.toStdString() << "!" << std::endl; + } + +} + +void VOIPGUIHandler::AnswerVideoCall(const RsPeerId &peer_id) +{ + ChatDialog *di = ChatDialog::getExistingChat(ChatId(peer_id)) ; + if (di) { + ChatWidget *cw = di->getChatWidget(); + if(cw) { + const QList &chatWidgetHolderList = cw->chatWidgetHolderList(); + + foreach (ChatWidgetHolder *chatWidgetHolder, chatWidgetHolderList) + { + VOIPChatWidgetHolder *acwh = dynamic_cast(chatWidgetHolder) ; + + if (acwh) + acwh->startVideoCapture(); + } + } + } else { + std::cerr << "VOIPGUIHandler Error: answer video call for a chat dialog that does not stand VOIP (Peer id = " << peer_id.toStdString() << "!" << std::endl; + } + +} diff --git a/plugins/VOIP/gui/VOIPGUIHandler.h b/plugins/VOIP/gui/VOIPGUIHandler.h index 86eed36e2..69396a084 100644 --- a/plugins/VOIP/gui/VOIPGUIHandler.h +++ b/plugins/VOIP/gui/VOIPGUIHandler.h @@ -28,17 +28,22 @@ #pragma once +#include + #include #include class VOIPGUIHandler: public QObject { Q_OBJECT +public: + static void AnswerAudioCall(const RsPeerId &peer_id) ; + static void AnswerVideoCall(const RsPeerId &peer_id) ; public slots: - void ReceivedInvitation(const QString& peer_id) ; - void ReceivedVoipData(const QString& peer_id) ; - void ReceivedVoipHangUp(const QString& peer_id) ; - void ReceivedVoipAccept(const QString& peer_id) ; - void ReceivedVoipBandwidthInfo(const QString& peer_id,int) ; + void ReceivedInvitation(const RsPeerId &peer_id) ; + void ReceivedVoipData(const RsPeerId &peer_id) ; + void ReceivedVoipHangUp(const RsPeerId &peer_id) ; + void ReceivedVoipAccept(const RsPeerId &peer_id) ; + void ReceivedVoipBandwidthInfo(const RsPeerId &peer_id, int) ; }; diff --git a/plugins/VOIP/gui/VOIPNotify.cpp b/plugins/VOIP/gui/VOIPNotify.cpp index ef5754686..3e954ea70 100644 --- a/plugins/VOIP/gui/VOIPNotify.cpp +++ b/plugins/VOIP/gui/VOIPNotify.cpp @@ -21,23 +21,33 @@ #include "VOIPNotify.h" -void VOIPNotify::notifyReceivedVoipInvite(const RsPeerId& peer_id) -{ - emit voipInvitationReceived(QString::fromStdString(peer_id.toStdString())) ; -} -void VOIPNotify::notifyReceivedVoipData(const RsPeerId &peer_id) -{ - emit voipDataReceived(QString::fromStdString(peer_id.toStdString())) ; -} +//Call qRegisterMetaType("RsPeerId"); to enable these SIGNALs + void VOIPNotify::notifyReceivedVoipAccept(const RsPeerId& peer_id) { - emit voipAcceptReceived(QString::fromStdString(peer_id.toStdString())) ; -} -void VOIPNotify::notifyReceivedVoipHangUp(const RsPeerId &peer_id) -{ - emit voipHangUpReceived(QString::fromStdString(peer_id.toStdString())) ; + emit voipAcceptReceived(peer_id) ; } void VOIPNotify::notifyReceivedVoipBandwidth(const RsPeerId &peer_id,uint32_t bytes_per_sec) { - emit voipBandwidthInfoReceived(QString::fromStdString(peer_id.toStdString()),bytes_per_sec) ; + emit voipBandwidthInfoReceived(peer_id, bytes_per_sec) ; +} +void VOIPNotify::notifyReceivedVoipData(const RsPeerId &peer_id) +{ + emit voipDataReceived(peer_id) ; +} +void VOIPNotify::notifyReceivedVoipHangUp(const RsPeerId &peer_id) +{ + emit voipHangUpReceived(peer_id) ; +} +void VOIPNotify::notifyReceivedVoipInvite(const RsPeerId& peer_id) +{ + emit voipInvitationReceived(peer_id) ; +} +void VOIPNotify::notifyReceivedVoipAudioCall(const RsPeerId &peer_id) +{ + emit voipAudioCallReceived(peer_id) ; +} +void VOIPNotify::notifyReceivedVoipVideoCall(const RsPeerId &peer_id) +{ + emit voipVideoCallReceived(peer_id) ; } diff --git a/plugins/VOIP/gui/VOIPNotify.h b/plugins/VOIP/gui/VOIPNotify.h index 7f55db42c..4ee1e9e1f 100644 --- a/plugins/VOIP/gui/VOIPNotify.h +++ b/plugins/VOIP/gui/VOIPNotify.h @@ -28,25 +28,32 @@ #pragma once -#include +/*libretroshare*/ #include +#include + class VOIPNotify: public QObject { Q_OBJECT public: - void notifyReceivedVoipData(const RsPeerId& peer_id) ; - void notifyReceivedVoipInvite(const RsPeerId &peer_id) ; - void notifyReceivedVoipHangUp(const RsPeerId& peer_id) ; - void notifyReceivedVoipAccept(const RsPeerId &peer_id) ; - void notifyReceivedVoipBandwidth(const RsPeerId &peer_id,uint32_t bytes_per_sec) ; + void notifyReceivedVoipAccept(const RsPeerId &peer_id) ; + void notifyReceivedVoipBandwidth(const RsPeerId &peer_id, uint32_t bytes_per_sec) ; + void notifyReceivedVoipData(const RsPeerId &peer_id) ; + void notifyReceivedVoipHangUp(const RsPeerId &peer_id) ; + void notifyReceivedVoipInvite(const RsPeerId &peer_id) ; + void notifyReceivedVoipAudioCall(const RsPeerId &peer_id) ; + void notifyReceivedVoipVideoCall(const RsPeerId &peer_id) ; signals: - void voipInvitationReceived(const QString&) ; // signal emitted when an invitation has been received - void voipDataReceived(const QString&) ; // signal emitted when some voip data has been received - void voipHangUpReceived(const QString& peer_id) ; // emitted when the peer closes the call (i.e. hangs up) - void voipAcceptReceived(const QString& peer_id) ; // emitted when the peer accepts the call - void voipBandwidthInfoReceived(const QString& peer_id,int bytes_per_sec) ; // emitted when measured bandwidth info is received by the peer. + void voipAcceptReceived(const RsPeerId &peer_id) ; // emitted when the peer accepts the call + void voipBandwidthInfoReceived(const RsPeerId &peer_id, int bytes_per_sec) ; // emitted when measured bandwidth info is received by the peer. + void voipDataReceived(const RsPeerId &peer_id) ; // signal emitted when some voip data has been received + void voipHangUpReceived(const RsPeerId &peer_id) ; // emitted when the peer closes the call (i.e. hangs up) + void voipInvitationReceived(const RsPeerId &peer_id) ; // signal emitted when an invitation has been received + + void voipAudioCallReceived(const RsPeerId &peer_id) ; // emitted when the peer is calling and own don't send audio + void voipVideoCallReceived(const RsPeerId &peer_id) ; // emitted when the peer is calling and own don't send video }; diff --git a/plugins/VOIP/gui/VOIPToasterItem.cpp b/plugins/VOIP/gui/VOIPToasterItem.cpp new file mode 100644 index 000000000..adc048247 --- /dev/null +++ b/plugins/VOIP/gui/VOIPToasterItem.cpp @@ -0,0 +1,107 @@ +/**************************************************************** + * RetroShare is distributed under the following license: + * + * Copyright (C) 2015 RetroShare Team + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + ****************************************************************/ + +/*VOIP*/ +#include "VOIPToasterItem.h" +#include "VOIPGUIHandler.h" + +/*libRetroshare*/ +#include + +/*Retroshare-Gui*/ +#include "gui/chat/ChatDialog.h" +#include "gui/notifyqt.h" +#include "util/HandleRichText.h" + +VOIPToasterItem::VOIPToasterItem(const RsPeerId &peer_id, const QString &msg, const voipToasterItem_Type type) + : QWidget(NULL), mPeerId(peer_id), mMsg(msg), mType(type) +{ + /* Invoke the Qt Designer generated object setup routine */ + setupUi(this); + + switch (mType){ + case AudioCall: + toasterButton->setIcon(QIcon("://images/call-start.png")); + break; + case VideoCall: + toasterButton->setIcon(QIcon("://images/video-icon-on.png")); + break; + default: + ChatDialog::chatFriend(ChatId(mPeerId)); + } + + connect(toasterButton, SIGNAL(clicked()), SLOT(chatButtonSlot())); + connect(closeButton, SIGNAL(clicked()), SLOT(hide())); + + /* set informations */ + textLabel->setText(RsHtml().formatText(NULL, msg, RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS | RSHTML_FORMATTEXT_CLEANSTYLE)); + toasterLabel->setText(QString::fromUtf8(rsPeers->getPeerName(mPeerId).c_str())); + avatarWidget->setFrameType(AvatarWidget::STATUS_FRAME); + avatarWidget->setId(ChatId(mPeerId)); +} + +VOIPToasterItem::~VOIPToasterItem() +{ +} + +void VOIPToasterItem::chatButtonSlot() +{ + switch (mType){ + case AudioCall: + VOIPGUIHandler::AnswerAudioCall(mPeerId); + break; + case VideoCall: + VOIPGUIHandler::AnswerVideoCall(mPeerId); + break; + default: + ChatDialog::chatFriend(ChatId(mPeerId)); + } + hide(); +} + +void VOIPToasterItem::voipAcceptReceived(const RsPeerId &) +{ +} + +void VOIPToasterItem::voipBandwidthInfoReceived(const RsPeerId &, int ) +{ +} + +void VOIPToasterItem::voipDataReceived(const RsPeerId &) +{ +} + +void VOIPToasterItem::voipHangUpReceived(const RsPeerId &) +{ +} + +void VOIPToasterItem::voipInvitationReceived(const RsPeerId &) +{ +} + +void VOIPToasterItem::voipAudioCallReceived(const RsPeerId &) +{ +} + +void VOIPToasterItem::voipVideoCallReceived(const RsPeerId &) +{ +} + diff --git a/plugins/VOIP/gui/VOIPToasterItem.h b/plugins/VOIP/gui/VOIPToasterItem.h new file mode 100644 index 000000000..dc43bd41c --- /dev/null +++ b/plugins/VOIP/gui/VOIPToasterItem.h @@ -0,0 +1,61 @@ +/**************************************************************** + * RetroShare is distributed under the following license: + * + * Copyright (C) 2015 RetroShare Team + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + ****************************************************************/ + +#pragma once + +#include "ui_VOIPToasterItem.h" + +#include + +class VOIPToasterItem : public QWidget, private Ui::VOIPToasterItem +{ + Q_OBJECT + +public: + typedef enum{ Accept + , BandwidthInfo + , Data + , HangUp + , Invitation + , AudioCall + , VideoCall + } voipToasterItem_Type; + + VOIPToasterItem(const RsPeerId &peer_id, const QString &msg, const voipToasterItem_Type type); + ~VOIPToasterItem(); + +private slots: + void chatButtonSlot(); + + void voipAcceptReceived(const RsPeerId &peer_id) ; // emitted when the peer accepts the call + void voipBandwidthInfoReceived(const RsPeerId &peer_id, int bytes_per_sec) ; // emitted when measured bandwidth info is received by the peer. + void voipDataReceived(const RsPeerId &peer_id) ; // signal emitted when some voip data has been received + void voipHangUpReceived(const RsPeerId &peer_id) ; // emitted when the peer closes the call (i.e. hangs up) + void voipInvitationReceived(const RsPeerId &peer_id) ; // signal emitted when an invitation has been received + void voipAudioCallReceived(const RsPeerId &peer_id) ; // emitted when the peer is calling and own don't send audio + void voipVideoCallReceived(const RsPeerId &peer_id) ; // emitted when the peer is calling and own don't send video + +private: + RsPeerId mPeerId; + QString mMsg; + voipToasterItem_Type mType; +}; + diff --git a/plugins/VOIP/gui/CallToaster.ui b/plugins/VOIP/gui/VOIPToasterItem.ui similarity index 64% rename from plugins/VOIP/gui/CallToaster.ui rename to plugins/VOIP/gui/VOIPToasterItem.ui index 4889e0100..fc0987fd5 100644 --- a/plugins/VOIP/gui/CallToaster.ui +++ b/plugins/VOIP/gui/VOIPToasterItem.ui @@ -1,7 +1,7 @@ - CallToaster - + VOIPToasterItem + 0 @@ -22,27 +22,27 @@ 100 - - - 0 - + 0 - + + 0 + + - QFrame::NoFrame + QFrame::WinPanel - QFrame::Plain + QFrame::Raised - + - 1 + 2 - 1 + 2 @@ -70,7 +70,7 @@ - :/images/rstray3.png + :/images/logo/logo_16.png true @@ -79,13 +79,6 @@ - - - 9 - 75 - true - - Name @@ -119,7 +112,7 @@ - + :/images/closenormal.png:/images/closenormal.png @@ -130,24 +123,18 @@ - - - - - - 70 - 70 - - - - - 70 - 70 - + + + 2 + + + + + Show Chat - + @@ -160,48 +147,18 @@ - - - - - 0 - 0 - - - - Answer - - - - :/images/call-start-22.png:/images/call-start-22.png - - + + + - 22 - 22 + 70 + 70 - - false - - - false - - - - - - - Decline - - - - :/images/call-stop-22.png:/images/call-stop-22.png - - + - 22 - 22 + 70 + 70 @@ -222,7 +179,8 @@ - + + diff --git a/plugins/VOIP/gui/VOIPToasterNotify.cpp b/plugins/VOIP/gui/VOIPToasterNotify.cpp new file mode 100644 index 000000000..ebefc1217 --- /dev/null +++ b/plugins/VOIP/gui/VOIPToasterNotify.cpp @@ -0,0 +1,401 @@ +/**************************************************************** + * RetroShare is distributed under the following license: + * + * Copyright (C) 2015 + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + ****************************************************************/ + +/*VOIP*/ +#include "gui/VOIPToasterNotify.h" +#include "gui/VOIPToasterItem.h" + +/*retroshare-gui*/ +#include "gui/settings/rsharesettings.h" +#include "gui/toaster/ToasterItem.h" + +/*libretroshare*/ +#include "retroshare/rspeers.h" + +VOIPToasterNotify::VOIPToasterNotify(RsVOIP *VOIP, VOIPNotify *notify, QObject *parent) + : ToasterNotify(parent), mVOIP(VOIP), mVOIPNotify(notify) +{ + mMutex = new QMutex(); + +#ifdef VOIPTOASTERNOTIFY_ALL + connect(mVOIPNotify, SIGNAL(voipAcceptReceived(const RsPeerId&)), this, SLOT(voipAcceptReceived(const RsPeerId&)), Qt::QueuedConnection); + connect(mVOIPNotify, SIGNAL(voipBandwidthInfoReceived(const RsPeerId&, int)), this, SLOT(voipBandwidthInfoReceived(RsPeerId&, int)), Qt::QueuedConnection); + connect(mVOIPNotify, SIGNAL(voipDataReceived(const RsPeerId&)), this, SLOT(voipDataReceived(const RsPeerId&)), Qt::QueuedConnection); + connect(mVOIPNotify, SIGNAL(voipHangUpReceived(const RsPeerId&)), this, SLOT(voipHangUpReceived(const RsPeerId&)), Qt::QueuedConnection); + connect(mVOIPNotify, SIGNAL(voipInvitationReceived(const RsPeerId&)), this, SLOT(voipInvitationReceived(const RsPeerId&)), Qt::QueuedConnection); +#endif + connect(mVOIPNotify, SIGNAL(voipAudioCallReceived(const RsPeerId&)), this, SLOT(voipAudioCallReceived(const RsPeerId&)), Qt::QueuedConnection); + connect(mVOIPNotify, SIGNAL(voipVideoCallReceived(const RsPeerId&)), this, SLOT(voipVideoCallReceived(const RsPeerId&)), Qt::QueuedConnection); +} + +VOIPToasterNotify::~VOIPToasterNotify() +{ + delete(mMutex); +} + +bool VOIPToasterNotify::hasSettings(QString &mainName, QMap &tagAndTexts) +{ + mainName = tr("VOIP"); + //gAndTexts.insert("Tag" , tr("Text")); +#ifdef VOIPTOASTERNOTIFY_ALL + tagAndTexts.insert("Accept" , tr("Accept")); + tagAndTexts.insert("BandwidthInfo", tr("Bandwidth Information")); + tagAndTexts.insert("Data" , tr("Audio or Video Data")); + tagAndTexts.insert("HangUp" , tr("HangUp")); + tagAndTexts.insert("Invitation" , tr("Invitation")); +#endif + tagAndTexts.insert("AudioCall" , tr("Audio Call")); + tagAndTexts.insert("VideoCall" , tr("Video Call")); + return true; +} + +bool VOIPToasterNotify::notifyEnabled(QString tag) +{ + return Settings->valueFromGroup("VOIP", QString("ToasterNotifyEnable").append(tag), false).toBool(); +} + +void VOIPToasterNotify::setNotifyEnabled(QString tag, bool enabled) +{ + Settings->setValueToGroup("VOIP", QString("ToasterNotifyEnable").append(tag), enabled); + + if (!enabled) { + /* remove pending Toaster items */ + mMutex->lock(); + +#ifdef VOIPTOASTERNOTIFY_ALL + if(tag == "Accept") mPendingToasterAccept.clear(); + if(tag == "BandwidthInfo") mPendingToasterBandwidthInfo.clear(); + if(tag == "Data") mPendingToasterData.clear(); + if(tag == "HangUp") mPendingToasterHangUp.clear(); + if(tag == "Invitation") mPendingToasterInvitation.clear(); +#endif + if(tag == "AudioCall") mPendingToasterAudioCall.clear(); + if(tag == "VideoCall") mPendingToasterVideoCall.clear(); + + mMutex->unlock(); + } +} + +ToasterItem *VOIPToasterNotify::toasterItem() +{ + ToasterItem *toasterItem = NULL; + +#ifdef VOIPTOASTERNOTIFY_ALL + if (!mPendingToasterAccept.empty() && !toasterItem) { + mMutex->lock(); + ToasterItemData toasterItemData = mPendingToasterAccept.takeFirst(); + VOIPToasterItem *voipToasterItem = new VOIPToasterItem(toasterItemData.mPeerId, toasterItemData.mMsg, VOIPToasterItem::Accept); + toasterItem= new ToasterItem(voipToasterItem); + connect(toasterItem, SIGNAL(toasterItemDestroyed(ToasterItem*)), this, SLOT(toasterItemDestroyedAccept(ToasterItem*))); + mToasterAccept.insert(toasterItemData.mPeerId, toasterItem); + mMutex->unlock(); + } + if (!mPendingToasterBandwidthInfo.empty() && !toasterItem) { + mMutex->lock(); + ToasterItemData toasterItemData = mPendingToasterBandwidthInfo.takeFirst(); + VOIPToasterItem *voipToasterItem = new VOIPToasterItem(toasterItemData.mPeerId, toasterItemData.mMsg, VOIPToasterItem::BandwidthInfo); + toasterItem = new ToasterItem(voipToasterItem); + connect(toasterItem, SIGNAL(toasterItemDestroyed(ToasterItem*)), this, SLOT(toasterItemDestroyedBandwidthInfo(ToasterItem*))); + mToasterBandwidthInfo.insert(toasterItemData.mPeerId, toasterItem); + mMutex->unlock(); + } + if (!mPendingToasterData.empty() && !toasterItem) { + mMutex->lock(); + ToasterItemData toasterItemData = mPendingToasterData.takeFirst(); + VOIPToasterItem *voipToasterItem = new VOIPToasterItem(toasterItemData.mPeerId, toasterItemData.mMsg, VOIPToasterItem::Data); + toasterItem = new ToasterItem(voipToasterItem); + toasterItem->timeToLive = 10000; + connect(toasterItem, SIGNAL(toasterItemDestroyed(ToasterItem*)), this, SLOT(toasterItemDestroyedData(ToasterItem*))); + mToasterData.insert(toasterItemData.mPeerId, toasterItem); + mMutex->unlock(); + } + if (!mPendingToasterHangUp.empty() && !toasterItem) { + mMutex->lock(); + ToasterItemData toasterItemData = mPendingToasterHangUp.takeFirst(); + VOIPToasterItem *voipToasterItem = new VOIPToasterItem(toasterItemData.mPeerId, toasterItemData.mMsg, VOIPToasterItem::HangUp); + toasterItem = new ToasterItem(voipToasterItem); + connect(toasterItem, SIGNAL(toasterItemDestroyed(ToasterItem*)), this, SLOT(toasterItemDestroyedHangUp(ToasterItem*))); + mToasterHangUp.insert(toasterItemData.mPeerId, toasterItem); + mMutex->unlock(); + } + if (!mPendingToasterInvitation.empty() && !toasterItem) { + mMutex->lock(); + ToasterItemData toasterItemData = mPendingToasterInvitation.takeFirst(); + VOIPToasterItem *voipToasterItem = new VOIPToasterItem(toasterItemData.mPeerId, toasterItemData.mMsg, VOIPToasterItem::Invitation); + toasterItem = new ToasterItem(voipToasterItem); + connect(toasterItem, SIGNAL(toasterItemDestroyed(ToasterItem*)), this, SLOT(toasterItemDestroyedInvitation(ToasterItem*))); + mToasterInvitation.insert(toasterItemData.mPeerId, toasterItem); + mMutex->unlock(); + } +#endif + if (!mPendingToasterAudioCall.empty() && !toasterItem) { + mMutex->lock(); + ToasterItemData toasterItemData = mPendingToasterAudioCall.takeFirst(); + VOIPToasterItem *voipToasterItem = new VOIPToasterItem(toasterItemData.mPeerId, toasterItemData.mMsg, VOIPToasterItem::AudioCall); + toasterItem = new ToasterItem(voipToasterItem); + connect(toasterItem, SIGNAL(toasterItemDestroyed(ToasterItem*)), this, SLOT(toasterItemDestroyedAudioCall(ToasterItem*))); + mToasterAudioCall.insert(toasterItemData.mPeerId, toasterItem); + mMutex->unlock(); + } + if (!mPendingToasterVideoCall.empty() && !toasterItem) { + mMutex->lock(); + ToasterItemData toasterItemData = mPendingToasterVideoCall.takeFirst(); + VOIPToasterItem *voipToasterItem = new VOIPToasterItem(toasterItemData.mPeerId, toasterItemData.mMsg, VOIPToasterItem::VideoCall); + toasterItem = new ToasterItem(voipToasterItem); + connect(toasterItem, SIGNAL(toasterItemDestroyed(ToasterItem*)), this, SLOT(toasterItemDestroyedVideoCall(ToasterItem*))); + mToasterVideoCall.insert(toasterItemData.mPeerId, toasterItem); + mMutex->unlock(); + } + + return toasterItem; +} + +ToasterItem* VOIPToasterNotify::testToasterItem(QString tag) +{ + ToasterItem* toaster = NULL; + RsPeerId ownId = rsPeers->getOwnId(); +#ifdef VOIPTOASTERNOTIFY_ALL + if (tag == "Accept") toaster = new ToasterItem(new VOIPToasterItem(ownId, tr("Test VOIP Accept"), VOIPToasterItem::Accept)); + if (tag == "BandwidthInfo") toaster = new ToasterItem(new VOIPToasterItem(ownId, tr("Test VOIP BandwidthInfo"), VOIPToasterItem::BandwidthInfo)); + if (tag == "Data") toaster = new ToasterItem(new VOIPToasterItem(ownId, tr("Test VOIP Data"), VOIPToasterItem::Data)); + if (tag == "HangUp") toaster = new ToasterItem(new VOIPToasterItem(ownId, tr("Test VOIP HangUp"), VOIPToasterItem::HangUp)); + if (tag == "Invitation") toaster = new ToasterItem(new VOIPToasterItem(ownId, tr("Test VOIP Invitation"), VOIPToasterItem::Invitation)); +#endif + if (tag == "AudioCall") toaster = new ToasterItem(new VOIPToasterItem(ownId, tr("Test VOIP Audio Call"), VOIPToasterItem::AudioCall)); + if (tag == "VideoCall") toaster = new ToasterItem(new VOIPToasterItem(ownId, tr("Test VOIP Video Call"), VOIPToasterItem::VideoCall)); + + return toaster; +} + +#ifdef VOIPTOASTERNOTIFY_ALL +void VOIPToasterNotify::voipAcceptReceived(const RsPeerId &peer_id) +{ + if (peer_id.isNull()) { + return; + } + + if (!notifyEnabled("Accept")) { + return; + } + + mMutex->lock(); + + if (!mToasterAccept.contains(peer_id)){ + ToasterItemData toasterItemData; + toasterItemData.mPeerId = peer_id; + toasterItemData.mMsg = tr("Accept received from this peer."); + + mPendingToasterAccept.push_back(toasterItemData); + mToasterAccept.insert(peer_id, NULL); + } + + mMutex->unlock(); +} + +void VOIPToasterNotify::voipBandwidthInfoReceived(const RsPeerId &peer_id,int bytes_per_sec) +{ + if (peer_id.isNull()) { + return; + } + + if (!notifyEnabled("BandwidthInfo")) { + return; + } + + mMutex->lock(); + + if (!mToasterBandwidthInfo.contains(peer_id)){ + ToasterItemData toasterItemData; + toasterItemData.mPeerId = peer_id; + toasterItemData.mMsg = tr("Bandwidth Info received from this peer:%1").arg(bytes_per_sec); + + mPendingToasterBandwidthInfo.push_back(toasterItemData); + mToasterBandwidthInfo.insert(peer_id, NULL); + } + + mMutex->unlock(); +} + +void VOIPToasterNotify::voipDataReceived(const RsPeerId &peer_id) +{ + if (peer_id.isNull()) { + return; + } + + if (!notifyEnabled("Data")) { + return; + } + + mMutex->lock(); + + if (!mToasterData.contains(peer_id)){ + ToasterItemData toasterItemData; + toasterItemData.mPeerId = peer_id; + toasterItemData.mMsg = tr("Audio or Video Data received from this peer."); + + mPendingToasterData.push_back(toasterItemData); + mToasterData.insert(peer_id, NULL); + } + + mMutex->unlock(); +} + +void VOIPToasterNotify::voipHangUpReceived(const RsPeerId &peer_id) +{ + if (peer_id.isNull()) { + return; + } + + if (!notifyEnabled("HangUp")) { + return; + } + + mMutex->lock(); + + if (!mToasterHangUp.contains(peer_id)){ + ToasterItemData toasterItemData; + toasterItemData.mPeerId = peer_id; + toasterItemData.mMsg = tr("HangUp received from this peer."); + + mPendingToasterHangUp.push_back(toasterItemData); + mToasterHangUp.insert(peer_id, NULL); + } + + mMutex->unlock(); +} + +void VOIPToasterNotify::voipInvitationReceived(const RsPeerId &peer_id) +{ + if (peer_id.isNull()) { + return; + } + + if (!notifyEnabled("Invitation")) { + return; + } + + mMutex->lock(); + + if (!mToasterInvitation.contains(peer_id)){ + ToasterItemData toasterItemData; + toasterItemData.mPeerId = peer_id; + toasterItemData.mMsg = tr("Invitation received from this peer."); + + mPendingToasterInvitation.push_back(toasterItemData); + mToasterInvitation.insert(peer_id, NULL); + } + + mMutex->unlock(); +} +#endif + +void VOIPToasterNotify::voipAudioCallReceived(const RsPeerId &peer_id) +{ + if (peer_id.isNull()) { + return; + } + + if (!notifyEnabled("AudioCall")) { + return; + } + + mMutex->lock(); + + if (!mToasterAudioCall.contains(peer_id)){ + ToasterItemData toasterItemData; + toasterItemData.mPeerId = peer_id; + toasterItemData.mMsg = tr("Audio Call received from this peer."); + + mPendingToasterAudioCall.push_back(toasterItemData); + mToasterAudioCall.insert(peer_id, NULL); + } + + mMutex->unlock(); +} + +void VOIPToasterNotify::voipVideoCallReceived(const RsPeerId &peer_id) +{ + if (peer_id.isNull()) { + return; + } + + if (!notifyEnabled("VideoCall")) { + return; + } + + mMutex->lock(); + + if (!mToasterVideoCall.contains(peer_id)){ + ToasterItemData toasterItemData; + toasterItemData.mPeerId = peer_id; + toasterItemData.mMsg = tr("Video Call received from this peer."); + + mPendingToasterVideoCall.push_back(toasterItemData); + mToasterVideoCall.insert(peer_id, NULL); + } + + mMutex->unlock(); +} + +#ifdef VOIPTOASTERNOTIFY_ALL +void VOIPToasterNotify::toasterItemDestroyedAccept(ToasterItem *toasterItem) +{ + RsPeerId key = mToasterAccept.key(toasterItem, RsPeerId()); + if (!key.isNull()) mToasterAccept.remove(key); +} + +void VOIPToasterNotify::toasterItemDestroyedBandwidthInfo(ToasterItem *toasterItem) +{ + RsPeerId key = mToasterBandwidthInfo.key(toasterItem, RsPeerId()); + if (!key.isNull()) mToasterBandwidthInfo.remove(key); +} + +void VOIPToasterNotify::toasterItemDestroyedData(ToasterItem *toasterItem) +{ + RsPeerId key = mToasterData.key(toasterItem, RsPeerId()); + if (!key.isNull()) mToasterData.remove(key); +} + +void VOIPToasterNotify::toasterItemDestroyedHangUp(ToasterItem *toasterItem) +{ + RsPeerId key = mToasterHangUp.key(toasterItem, RsPeerId()); + if (!key.isNull()) mToasterHangUp.remove(key); +} + +void VOIPToasterNotify::toasterItemDestroyedInvitation(ToasterItem *toasterItem) +{ + RsPeerId key = mToasterInvitation.key(toasterItem, RsPeerId()); + if (!key.isNull()) mToasterInvitation.remove(key); +} +#endif + +void VOIPToasterNotify::toasterItemDestroyedAudioCall(ToasterItem *toasterItem) +{ + RsPeerId key = mToasterAudioCall.key(toasterItem, RsPeerId()); + if (!key.isNull()) mToasterAudioCall.remove(key); +} + +void VOIPToasterNotify::toasterItemDestroyedVideoCall(ToasterItem *toasterItem) +{ + RsPeerId key = mToasterVideoCall.key(toasterItem, RsPeerId()); + if (!key.isNull()) mToasterVideoCall.remove(key); +} + diff --git a/plugins/VOIP/gui/VOIPToasterNotify.h b/plugins/VOIP/gui/VOIPToasterNotify.h new file mode 100644 index 000000000..7b24a28fb --- /dev/null +++ b/plugins/VOIP/gui/VOIPToasterNotify.h @@ -0,0 +1,112 @@ +/**************************************************************** + * RetroShare is distributed under the following license: + * + * Copyright (C) 2015 + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + ****************************************************************/ + + +#pragma once + +#include "gui/VOIPNotify.h" +#include "gui/VOIPToasterItem.h" +#include "interface/rsVOIP.h" + +#include "gui/common/ToasterNotify.h" + +#include + +//#define VOIPTOASTERNOTIFY_ALL //To get all notification + +class VOIPToasterNotify : public ToasterNotify +{ + Q_OBJECT + +protected: + class ToasterItemData + { + public: + ToasterItemData() {} + + public: + RsPeerId mPeerId; + QString mMsg; + }; + +public: + VOIPToasterNotify(RsVOIP *VOIP, VOIPNotify *notify, QObject *parent = 0); + ~VOIPToasterNotify(); + + /// From ToasterNotify /// + virtual bool hasSettings(QString &mainName, QMap &tagAndTexts); + virtual bool notifyEnabled(QString tag); + virtual void setNotifyEnabled(QString tag, bool enabled); + virtual ToasterItem *toasterItem(); + virtual ToasterItem *testToasterItem(QString tag); + +private slots: +#ifdef VOIPTOASTERNOTIFY_ALL + void voipAcceptReceived(const RsPeerId &peer_id) ; // emitted when the peer accepts the call + void voipBandwidthInfoReceived(const RsPeerId &peer_id, int bytes_per_sec) ; // emitted when measured bandwidth info is received by the peer. + void voipDataReceived(const RsPeerId &peer_id) ; // signal emitted when some voip data has been received + void voipHangUpReceived(const RsPeerId &peer_id) ; // emitted when the peer closes the call (i.e. hangs up) + void voipInvitationReceived(const RsPeerId &peer_id) ; // signal emitted when an invitation has been received +#endif + void voipAudioCallReceived(const RsPeerId &peer_id) ; // emitted when the peer is calling and own don't send audio + void voipVideoCallReceived(const RsPeerId &peer_id) ; // emitted when the peer is calling and own don't send video + +#ifdef VOIPTOASTERNOTIFY_ALL + void toasterItemDestroyedAccept(ToasterItem *toasterItem) ; + void toasterItemDestroyedBandwidthInfo(ToasterItem *toasterItem) ; + void toasterItemDestroyedData(ToasterItem *toasterItem) ; + void toasterItemDestroyedHangUp(ToasterItem *toasterItem) ; + void toasterItemDestroyedInvitation(ToasterItem *toasterItem) ; +#endif + void toasterItemDestroyedAudioCall(ToasterItem *toasterItem) ; + void toasterItemDestroyedVideoCall(ToasterItem *toasterItem) ; + +private: + RsVOIP *mVOIP; + VOIPNotify *mVOIPNotify; + + // comment electron: i don't think the mutex is needed, because everything happens in the GUI thread + // (Qt signals are send to slots in the gui thread) + // i'm leaving it here to no destroy something + // note: FeedReaderFeedNotify has a similar mutex + // maybe it has historic reasons. NotifyQt still contains commented lines QMutexLocker lock(&waitingToasterMutex); + QMutex *mMutex; +#ifdef VOIPTOASTERNOTIFY_ALL + QList mPendingToasterAccept; + QList mPendingToasterBandwidthInfo; + QList mPendingToasterData; + QList mPendingToasterHangUp; + QList mPendingToasterInvitation; +#endif + QList mPendingToasterAudioCall; + QList mPendingToasterVideoCall; + +#ifdef VOIPTOASTERNOTIFY_ALL + QMap mToasterAccept; + QMap mToasterBandwidthInfo; + QMap mToasterData; + QMap mToasterHangUp; + QMap mToasterInvitation; +#endif + QMap mToasterAudioCall; + QMap mToasterVideoCall; +}; + diff --git a/plugins/VOIP/gui/VideoProcessor.h b/plugins/VOIP/gui/VideoProcessor.h index 7e62ea4cb..56894bcea 100644 --- a/plugins/VOIP/gui/VideoProcessor.h +++ b/plugins/VOIP/gui/VideoProcessor.h @@ -13,6 +13,7 @@ class VideoDecoder { public: VideoDecoder() ; + virtual ~VideoDecoder() {} // Gets the next image to be displayed. Once returned, the image should // be cleared from the incoming queue. @@ -49,6 +50,7 @@ class VideoEncoder { public: VideoEncoder() {} + virtual ~VideoEncoder() {} // Takes the next image to be encoded. // diff --git a/retroshare-gui/src/gui/common/ToasterNotify.cpp b/retroshare-gui/src/gui/common/ToasterNotify.cpp new file mode 100644 index 000000000..e964bf7d2 --- /dev/null +++ b/retroshare-gui/src/gui/common/ToasterNotify.cpp @@ -0,0 +1,74 @@ +/**************************************************************** + * RetroShare is distributed under the following license: + * + * Copyright (C) 2015 RetroShare Team + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + ****************************************************************/ + +#include "ToasterNotify.h" + +ToasterNotify::ToasterNotify(QObject *parent) : + QObject(parent) +{ +} + +ToasterNotify::~ToasterNotify() +{ +} + +bool ToasterNotify::hasSetting(QString &/*name*/) +{ + return false; +} + +bool ToasterNotify::notifyEnabled() +{ + return false; +} + +void ToasterNotify::setNotifyEnabled(bool /*enabled*/) +{ +} + +ToasterItem *ToasterNotify::toasterItem() +{ + return NULL; +} + +ToasterItem *ToasterNotify::testToasterItem() +{ + return NULL; +} + +bool ToasterNotify::hasSettings(QString &/*name*/, QMap &/*tagAndTexts*/) +{ + return false; +} + +bool ToasterNotify::notifyEnabled(QString /*tag*/) +{ + return false; +} + +void ToasterNotify::setNotifyEnabled(QString /*tag*/, bool /*enabled*/) +{ +} + +ToasterItem *ToasterNotify::testToasterItem(QString /*tag*/) +{ + return NULL; +} diff --git a/retroshare-gui/src/gui/common/ToasterNotify.h b/retroshare-gui/src/gui/common/ToasterNotify.h new file mode 100644 index 000000000..062d6fbac --- /dev/null +++ b/retroshare-gui/src/gui/common/ToasterNotify.h @@ -0,0 +1,51 @@ +/**************************************************************** + * RetroShare is distributed under the following license: + * + * Copyright (C) 2015 RetroShare Team + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + ****************************************************************/ + +#ifndef TOASTERNOTIFY_H +#define TOASTERNOTIFY_H + +#include +#include + +class ToasterItem; + +class ToasterNotify : public QObject +{ + Q_OBJECT + +public: + ToasterNotify(QObject *parent = 0); + ~ToasterNotify(); + + virtual bool hasSetting(QString &/*name*/); + virtual bool notifyEnabled(); + virtual void setNotifyEnabled(bool /*enabled*/); + virtual ToasterItem *toasterItem(); + virtual ToasterItem *testToasterItem(); + + //For Plugin with differents Toasters + virtual bool hasSettings(QString &/*mainName*/, QMap &/*tagAndTexts*/); + virtual bool notifyEnabled(QString /*tag*/); + virtual void setNotifyEnabled(QString /*tag*/, bool /*enabled*/); + virtual ToasterItem *testToasterItem(QString /*tag*/); +}; + +#endif // TOASTERNOTIFY_H diff --git a/retroshare-gui/src/gui/notifyqt.cpp b/retroshare-gui/src/gui/notifyqt.cpp index 0522f910b..40ce63545 100644 --- a/retroshare-gui/src/gui/notifyqt.cpp +++ b/retroshare-gui/src/gui/notifyqt.cpp @@ -41,6 +41,8 @@ #include "toaster/GroupChatToaster.h" #include "toaster/ChatLobbyToaster.h" #include "toaster/FriendRequestToaster.h" +#include "toaster/ToasterItem.h" +#include "common/ToasterNotify.h" #include "chat/ChatDialog.h" #include "chat/ChatLobbyDialog.h" @@ -49,53 +51,12 @@ #include "gui/settings/rsharesettings.h" #include "SoundManager.h" +#include "retroshare/rsplugin.h" + /***** * #define NOTIFY_DEBUG ****/ -class Toaster -{ -public: - Toaster(QWidget *widget) - { - this->widget = widget; - - /* Values from settings */ - position = Settings->getToasterPosition(); - Settings->getToasterMargin(); - - - /* Standard values */ - timeToShow = 500; - timeToLive = 3000; - timeToHide = 500; - - /* Calculated values */ - elapsedTimeToShow = 0; - elapsedTimeToLive = 0; - elapsedTimeToHide = 0; - } - -public: - QWidget *widget; - - /* Values from settings */ - RshareSettings::enumToasterPosition position; - QPoint margin; - - /* Standard values */ - int timeToShow; - int timeToLive; - int timeToHide; - - /* Calculated values */ - QPoint startPos; - QPoint endPos; - int elapsedTimeToShow; - int elapsedTimeToLive; - int elapsedTimeToHide; -}; - /*static*/ NotifyQt *NotifyQt::_instance = NULL; /*static*/ bool NotifyQt::_disableAllToaster = false; @@ -820,13 +781,12 @@ void NotifyQt::UpdateGUI() uint32_t type; std::string title, id, msg; + /* You can set timeToShow, timeToLive and timeToHide or can leave the standard */ + ToasterItem *toaster = NULL; if (rsNotify->NotifyPopupMessage(type, id, title, msg)) { uint popupflags = Settings->getNotifyFlags(); - /* You can set timeToShow, timeToLive and timeToHide or can leave the standard */ - Toaster *toaster = NULL; - switch(type) { case RS_POPUP_ENCRYPTED_MSG: @@ -834,7 +794,7 @@ void NotifyQt::UpdateGUI() if ((popupflags & RS_POPUP_MSG) && !_disableAllToaster) { - toaster = new Toaster(new MessageToaster("", tr("Encrypted message"), QString("[%1]").arg(tr("Encrypted message")))); + toaster = new ToasterItem(new MessageToaster("", tr("Encrypted message"), QString("[%1]").arg(tr("Encrypted message")))); } break; case RS_POPUP_MSG: @@ -842,7 +802,7 @@ void NotifyQt::UpdateGUI() if ((popupflags & RS_POPUP_MSG) && !_disableAllToaster) { - toaster = new Toaster(new MessageToaster(id, QString::fromUtf8(title.c_str()), QString::fromUtf8(msg.c_str()))); + toaster = new ToasterItem(new MessageToaster(id, QString::fromUtf8(title.c_str()), QString::fromUtf8(msg.c_str()))); } break; case RS_POPUP_CONNECT: @@ -850,7 +810,7 @@ void NotifyQt::UpdateGUI() if ((popupflags & RS_POPUP_CONNECT) && !_disableAllToaster) { - toaster = new Toaster(new OnlineToaster(RsPeerId(id))); + toaster = new ToasterItem(new OnlineToaster(RsPeerId(id))); } break; case RS_POPUP_DOWNLOAD: @@ -859,7 +819,7 @@ void NotifyQt::UpdateGUI() if ((popupflags & RS_POPUP_DOWNLOAD) && !_disableAllToaster) { /* id = file hash */ - toaster = new Toaster(new DownloadToaster(RsFileHash(id), QString::fromUtf8(title.c_str()))); + toaster = new ToasterItem(new DownloadToaster(RsFileHash(id), QString::fromUtf8(title.c_str()))); } break; case RS_POPUP_CHAT: @@ -872,7 +832,7 @@ void NotifyQt::UpdateGUI() // do not show when active break; } - toaster = new Toaster(new ChatToaster(RsPeerId(id), QString::fromUtf8(msg.c_str()))); + toaster = new ToasterItem(new ChatToaster(RsPeerId(id), QString::fromUtf8(msg.c_str()))); } break; case RS_POPUP_GROUPCHAT: @@ -887,7 +847,7 @@ void NotifyQt::UpdateGUI() } } } - toaster = new Toaster(new GroupChatToaster(RsPeerId(id), QString::fromUtf8(msg.c_str()))); + toaster = new ToasterItem(new GroupChatToaster(RsPeerId(id), QString::fromUtf8(msg.c_str()))); } break; case RS_POPUP_CHATLOBBY: @@ -914,7 +874,7 @@ void NotifyQt::UpdateGUI() if (!chatLobbyDialog || chatLobbyDialog->isParticipantMuted(RsGxsId(title))) break; // participant is muted - toaster = new Toaster(new ChatLobbyToaster(lobby_id, QString::fromUtf8(title.c_str()), QString::fromUtf8(msg.c_str()))); + toaster = new ToasterItem(new ChatLobbyToaster(lobby_id, QString::fromUtf8(title.c_str()), QString::fromUtf8(msg.c_str()))); } break; case RS_POPUP_CONNECT_ATTEMPT: @@ -923,21 +883,36 @@ void NotifyQt::UpdateGUI() // id = gpgid // title = ssl name // msg = peer id - toaster = new Toaster(new FriendRequestToaster(RsPgpId(id), QString::fromUtf8(title.c_str()), RsPeerId(msg))); + toaster = new ToasterItem(new FriendRequestToaster(RsPgpId(id), QString::fromUtf8(title.c_str()), RsPeerId(msg))); } break; } + } - if (toaster) { - /* init attributes */ - toaster->widget->setWindowFlags(Qt::ToolTip | Qt::WindowStaysOnTopHint); - - /* add toaster to waiting list */ - //QMutexLocker lock(&waitingToasterMutex); - waitingToasterList.push_back(toaster); + /*Now check Plugins*/ + if (!toaster) { + int pluginCount = rsPlugins->nbPlugins(); + for (int i = 0; i < pluginCount; ++i) { + RsPlugin *rsPlugin = rsPlugins->plugin(i); + if (rsPlugin) { + ToasterNotify *toasterNotify = rsPlugin->qt_toasterNotify(); + if (toasterNotify) { + toaster = toasterNotify->toasterItem(); + continue; + } + } } } + if (toaster) { + /* init attributes */ + toaster->widget->setWindowFlags(Qt::ToolTip | Qt::WindowStaysOnTopHint); + + /* add toaster to waiting list */ + //QMutexLocker lock(&waitingToasterMutex); + waitingToasterList.push_back(toaster); + } + if (rsNotify->NotifySysMessage(sysid, type, title, msg)) { /* make a warning message */ @@ -980,7 +955,7 @@ void NotifyQt::UpdateGUI() startWaitingToasters(); } -void NotifyQt::testToaster(uint notifyFlags, /*RshareSettings::enumToasterPosition*/ int position, QPoint margin) +void NotifyQt::testToasters(uint notifyFlags, /*RshareSettings::enumToasterPosition*/ int position, QPoint margin) { QString title = tr("Test"); QString message = tr("This is a test."); @@ -995,33 +970,33 @@ void NotifyQt::testToaster(uint notifyFlags, /*RshareSettings::enumToasterPositi notifyFlags &= ~(1 << pos); ++pos; - Toaster *toaster = NULL; + ToasterItem *toaster = NULL; switch(type) { case RS_POPUP_ENCRYPTED_MSG: - toaster = new Toaster(new MessageToaster(std::string(), tr("Unknown title"), QString("[%1]").arg(tr("Encrypted message")))); + toaster = new ToasterItem(new MessageToaster(std::string(), tr("Unknown title"), QString("[%1]").arg(tr("Encrypted message")))); break; case RS_POPUP_MSG: - toaster = new Toaster(new MessageToaster(id.toStdString(), title, message)); + toaster = new ToasterItem(new MessageToaster(id.toStdString(), title, message)); break; case RS_POPUP_CONNECT: - toaster = new Toaster(new OnlineToaster(id)); + toaster = new ToasterItem(new OnlineToaster(id)); break; case RS_POPUP_DOWNLOAD: - toaster = new Toaster(new DownloadToaster(RsFileHash::random(), title)); + toaster = new ToasterItem(new DownloadToaster(RsFileHash::random(), title)); break; case RS_POPUP_CHAT: - toaster = new Toaster(new ChatToaster(id, message)); + toaster = new ToasterItem(new ChatToaster(id, message)); break; case RS_POPUP_GROUPCHAT: - toaster = new Toaster(new GroupChatToaster(id, message)); + toaster = new ToasterItem(new GroupChatToaster(id, message)); break; case RS_POPUP_CHATLOBBY: - toaster = new Toaster(new ChatLobbyToaster(0, title, message)); + toaster = new ToasterItem(new ChatLobbyToaster(0, title, message)); break; case RS_POPUP_CONNECT_ATTEMPT: - toaster = new Toaster(new FriendRequestToaster(pgpid, title, id)); + toaster = new ToasterItem(new FriendRequestToaster(pgpid, title, id)); break; } @@ -1038,6 +1013,48 @@ void NotifyQt::testToaster(uint notifyFlags, /*RshareSettings::enumToasterPositi } } +void NotifyQt::testToaster(ToasterNotify *toasterNotify, /*RshareSettings::enumToasterPosition*/ int position, QPoint margin) +{ + + if (!toasterNotify) { + return; + } + + ToasterItem *toaster = toasterNotify->testToasterItem(); + + if (toaster) { + /* init attributes */ + toaster->widget->setWindowFlags(Qt::ToolTip | Qt::WindowStaysOnTopHint); + toaster->position = (RshareSettings::enumToasterPosition) position; + toaster->margin = margin; + + /* add toaster to waiting list */ + //QMutexLocker lock(&waitingToasterMutex); + waitingToasterList.push_back(toaster); + } +} + +void NotifyQt::testToaster(QString tag, ToasterNotify *toasterNotify, /*RshareSettings::enumToasterPosition*/ int position, QPoint margin) +{ + + if (!toasterNotify) { + return; + } + + ToasterItem *toaster = toasterNotify->testToasterItem(tag); + + if (toaster) { + /* init attributes */ + toaster->widget->setWindowFlags(Qt::ToolTip | Qt::WindowStaysOnTopHint); + toaster->position = (RshareSettings::enumToasterPosition) position; + toaster->margin = margin; + + /* add toaster to waiting list */ + //QMutexLocker lock(&waitingToasterMutex); + waitingToasterList.push_back(toaster); + } +} + void NotifyQt::notifyChatFontChanged() { { @@ -1084,7 +1101,7 @@ void NotifyQt::startWaitingToasters() } } - Toaster *toaster = NULL; + ToasterItem *toaster = NULL; { //QMutexLocker lock(&waitingToasterMutex); @@ -1149,9 +1166,9 @@ void NotifyQt::runningTick() int interval = runningToasterTimer->interval(); QPoint diff; - QList::iterator it = runningToasterList.begin(); + QList::iterator it = runningToasterList.begin(); while (it != runningToasterList.end()) { - Toaster *toaster = *it; + ToasterItem *toaster = *it; bool visible = true; if (toaster->elapsedTimeToShow) { @@ -1192,7 +1209,7 @@ void NotifyQt::runningTick() } else { /* Toaster is hidden, delete it */ it = runningToasterList.erase(it); - delete(toaster->widget); + //delete(toaster->widget); delete(toaster); continue; } diff --git a/retroshare-gui/src/gui/notifyqt.h b/retroshare-gui/src/gui/notifyqt.h index add37fcdf..d8ed513e5 100644 --- a/retroshare-gui/src/gui/notifyqt.h +++ b/retroshare-gui/src/gui/notifyqt.h @@ -21,7 +21,8 @@ class ChatDialog; class MessagesDialog; class ChannelsDialog; class MessengerWindow; -class Toaster; +class ToasterItem; +class ToasterNotify; class SignatureEventData ; struct TurtleFileInfo; @@ -90,7 +91,9 @@ class NotifyQt: public QObject, public NotifyClient void notifyChatFontChanged(); void notifyChatStyleChanged(int /*ChatStyle::enumStyleType*/ styleType); - void testToaster(uint notifyFlags, /*RshareSettings::enumToasterPosition*/ int position, QPoint margin); + void testToasters(uint notifyFlags, /*RshareSettings::enumToasterPosition*/ int position, QPoint margin); + void testToaster(ToasterNotify *toasterNotify, /*RshareSettings::enumToasterPosition*/ int position, QPoint margin); + void testToaster(QString tag, ToasterNotify *toasterNotify, /*RshareSettings::enumToasterPosition*/ int position, QPoint margin); void notifySettingsChanged(); @@ -169,10 +172,10 @@ class NotifyQt: public QObject, public NotifyClient void startWaitingToasters(); // QMutex waitingToasterMutex; // for lock of the waiting toaster list - QList waitingToasterList; + QList waitingToasterList; QTimer *runningToasterTimer; - QList runningToasterList; + QList runningToasterList; bool _enabled ; QMutex _mutex ; diff --git a/retroshare-gui/src/gui/settings/NotifyPage.cpp b/retroshare-gui/src/gui/settings/NotifyPage.cpp index af91d10c9..d0bc1f87e 100755 --- a/retroshare-gui/src/gui/settings/NotifyPage.cpp +++ b/retroshare-gui/src/gui/settings/NotifyPage.cpp @@ -29,6 +29,7 @@ #include "gui/MainWindow.h" #include "gui/common/UserNotify.h" #include "gui/common/FeedNotify.h" +#include "gui/common/ToasterNotify.h" #include "gui/notifyqt.h" #include "gui/NewsFeed.h" @@ -39,8 +40,8 @@ NotifyPage::NotifyPage(QWidget * parent, Qt::WindowFlags flags) /* Invoke the Qt Designer generated object setup routine */ ui.setupUi(this); - connect(ui.notifyButton, SIGNAL(clicked()), this, SLOT(testNotify())); - connect(ui.toasterButton, SIGNAL(clicked()), this, SLOT(testToaster())); + connect(ui.testFeedButton, SIGNAL(clicked()), this, SLOT(testFeed())); + connect(ui.testToasterButton, SIGNAL(clicked()), this, SLOT(testToaster())); connect(ui.pushButtonDisableAll,SIGNAL(toggled(bool)), NotifyQt::getInstance(), SLOT(SetDisableAll(bool))); connect(NotifyQt::getInstance(),SIGNAL(disableAllChanged(bool)), ui.pushButtonDisableAll, SLOT(setChecked(bool))); connect(ui.chatLobbies_CountFollowingText,SIGNAL(toggled(bool)),ui.chatLobbies_TextToNotify,SLOT(setEnabled(bool))) ; @@ -49,8 +50,9 @@ NotifyPage::NotifyPage(QWidget * parent, Qt::WindowFlags flags) QFont font = ui.notify_Peers->font(); // use font from existing checkbox - /* add feed notify */ - int row = 0; + /* add feed and Toaster notify */ + int rowFeed = 0; + int rowToaster = 0; int pluginCount = rsPlugins->nbPlugins(); for (int i = 0; i < pluginCount; ++i) { RsPlugin *rsPlugin = rsPlugins->plugin(i); @@ -58,15 +60,48 @@ NotifyPage::NotifyPage(QWidget * parent, Qt::WindowFlags flags) FeedNotify *feedNotify = rsPlugin->qt_feedNotify(); if (feedNotify) { QString name; - if (!feedNotify->hasSetting(name)) { - continue; + if (feedNotify->hasSetting(name)) { + + QCheckBox *enabledCheckBox = new QCheckBox(name, this); + enabledCheckBox->setFont(font); + ui.feedLayout->addWidget(enabledCheckBox, rowFeed++); + + mFeedNotifySettingList.push_back(FeedNotifySetting(feedNotify, enabledCheckBox)); + } + } + + ToasterNotify *toasterNotify = rsPlugin->qt_toasterNotify(); + if (toasterNotify) { + QString name; + if (toasterNotify->hasSetting(name)) { + + QCheckBox *enabledCheckBox = new QCheckBox(name, this); + enabledCheckBox->setFont(font); + ui.toasterLayout->addWidget(enabledCheckBox, rowToaster++); + + mToasterNotifySettingList.push_back(ToasterNotifySetting(toasterNotify, enabledCheckBox)); } - QCheckBox *enabledCheckBox = new QCheckBox(name, this); - enabledCheckBox->setFont(font); - ui.feedLayout->addWidget(enabledCheckBox, row++); - - mFeedNotifySettingList.push_back(FeedNotifySetting(feedNotify, enabledCheckBox)); + QMap map; + if (toasterNotify->hasSettings(name, map)) { + if (!map.empty()){ + QWidget* widget = new QWidget(); + QVBoxLayout* vbLayout = new QVBoxLayout(widget); + QLabel *label = new QLabel(name, this); + QFont fontBold = QFont(font); + fontBold.setBold(true); + label->setFont(fontBold); + vbLayout->addWidget(label); + for (QMap::const_iterator it = map.begin(); it != map.end(); ++it){ + QCheckBox *enabledCheckBox = new QCheckBox(it.value(), this); + enabledCheckBox->setAccessibleName(it.key()); + enabledCheckBox->setFont(font); + vbLayout->addWidget(enabledCheckBox); + mToasterNotifySettingList.push_back(ToasterNotifySetting(toasterNotify, enabledCheckBox)); + } + ui.toasterLayout->addWidget(widget, rowToaster++); + } + } } } } @@ -74,7 +109,7 @@ NotifyPage::NotifyPage(QWidget * parent, Qt::WindowFlags flags) /* add user notify */ const QList &userNotifyList = MainWindow::getInstance()->getUserNotifyList(); QList::const_iterator it; - row = 0; + rowFeed = 0; mChatLobbyUserNotify = 0; for (it = userNotifyList.begin(); it != userNotifyList.end(); ++it) { UserNotify *userNotify = *it; @@ -86,16 +121,16 @@ NotifyPage::NotifyPage(QWidget * parent, Qt::WindowFlags flags) QCheckBox *enabledCheckBox = new QCheckBox(name, this); enabledCheckBox->setFont(font); - ui.notifyLayout->addWidget(enabledCheckBox, row, 0, 0); + ui.notifyLayout->addWidget(enabledCheckBox, rowFeed, 0, 0); connect(enabledCheckBox, SIGNAL(toggled(bool)), this, SLOT(notifyToggled())); QCheckBox *combinedCheckBox = new QCheckBox(tr("Combined"), this); combinedCheckBox->setFont(font); - ui.notifyLayout->addWidget(combinedCheckBox, row, 1); + ui.notifyLayout->addWidget(combinedCheckBox, rowFeed, 1); QCheckBox *blinkCheckBox = new QCheckBox(tr("Blink"), this); blinkCheckBox->setFont(font); - ui.notifyLayout->addWidget(blinkCheckBox, row++, 2); + ui.notifyLayout->addWidget(blinkCheckBox, rowFeed++, 2); mUserNotifySettingList.push_back(UserNotifySetting(userNotify, enabledCheckBox, combinedCheckBox, blinkCheckBox)); @@ -188,6 +223,16 @@ NotifyPage::save(QString &/*errmsg*/) feedNotifyIt->mFeedNotify->setNotifyEnabled(feedNotifyIt->mEnabledCheckBox->isChecked()); } + /* save toaster notify */ + QList::iterator toasterNotifyIt; + for (toasterNotifyIt = mToasterNotifySettingList.begin(); toasterNotifyIt != mToasterNotifySettingList.end(); ++toasterNotifyIt) { + if(toasterNotifyIt->mEnabledCheckBox->accessibleName().isEmpty()){ + toasterNotifyIt->mToasterNotify->setNotifyEnabled(toasterNotifyIt->mEnabledCheckBox->isChecked()) ; + } else { + toasterNotifyIt->mToasterNotify->setNotifyEnabled(toasterNotifyIt->mEnabledCheckBox->accessibleName(), toasterNotifyIt->mEnabledCheckBox->isChecked()) ; + } + } + /* save user notify */ QList::iterator notifyIt; for (notifyIt = mUserNotifySettingList.begin(); notifyIt != mUserNotifySettingList.end(); ++notifyIt) { @@ -284,6 +329,16 @@ void NotifyPage::load() feedNotifyIt->mEnabledCheckBox->setChecked(feedNotifyIt->mFeedNotify->notifyEnabled()); } + /* load toaster notify */ + QList::iterator toasterNotifyIt; + for (toasterNotifyIt = mToasterNotifySettingList.begin(); toasterNotifyIt != mToasterNotifySettingList.end(); ++toasterNotifyIt) { + if (toasterNotifyIt->mEnabledCheckBox->accessibleName().isEmpty()) { + toasterNotifyIt->mEnabledCheckBox->setChecked(toasterNotifyIt->mToasterNotify->notifyEnabled()) ; + } else { + toasterNotifyIt->mEnabledCheckBox->setChecked(toasterNotifyIt->mToasterNotify->notifyEnabled(toasterNotifyIt->mEnabledCheckBox->accessibleName())) ; + } + } + /* load user notify */ QList::iterator userNotifyIt; for (userNotifyIt = mUserNotifySettingList.begin(); userNotifyIt != mUserNotifySettingList.end(); ++userNotifyIt) { @@ -321,7 +376,7 @@ void NotifyPage::notifyToggled() } } -void NotifyPage::testNotify() +void NotifyPage::testFeed() { NewsFeed::testFeeds(getNewsFlags()); @@ -336,5 +391,19 @@ void NotifyPage::testNotify() void NotifyPage::testToaster() { - NotifyQt::getInstance()->testToaster(getNotifyFlags(), (RshareSettings::enumToasterPosition) ui.comboBoxToasterPosition->itemData(ui.comboBoxToasterPosition->currentIndex()).toInt(), QPoint(ui.spinBoxToasterXMargin->value(), ui.spinBoxToasterYMargin->value())); + RshareSettings::enumToasterPosition pos = (RshareSettings::enumToasterPosition) ui.comboBoxToasterPosition->itemData(ui.comboBoxToasterPosition->currentIndex()).toInt(); + QPoint margin = QPoint(ui.spinBoxToasterXMargin->value(), ui.spinBoxToasterYMargin->value()); + NotifyQt::getInstance()->testToasters(getNotifyFlags(), pos, margin); + + /* notify of plugins */ + QList::iterator toasterNotifyIt; + for (toasterNotifyIt = mToasterNotifySettingList.begin(); toasterNotifyIt != mToasterNotifySettingList.end(); ++toasterNotifyIt) { + if (toasterNotifyIt->mEnabledCheckBox->isChecked()){ + if (toasterNotifyIt->mEnabledCheckBox->accessibleName().isEmpty()){ + NotifyQt::getInstance()->testToaster(toasterNotifyIt->mToasterNotify, pos, margin) ; + } else { + NotifyQt::getInstance()->testToaster(toasterNotifyIt->mEnabledCheckBox->accessibleName(), toasterNotifyIt->mToasterNotify, pos, margin) ; + } + } + } } diff --git a/retroshare-gui/src/gui/settings/NotifyPage.h b/retroshare-gui/src/gui/settings/NotifyPage.h index 69d52fc5a..408bd7cfe 100755 --- a/retroshare-gui/src/gui/settings/NotifyPage.h +++ b/retroshare-gui/src/gui/settings/NotifyPage.h @@ -25,10 +25,11 @@ #include #include "ui_NotifyPage.h" -#include "gui/chat/ChatLobbyUserNotify.h" - +#include "gui/chat/ChatLobbyUserNotify.h" + class UserNotify; class FeedNotify; +class ToasterNotify; class UserNotifySetting { @@ -54,6 +55,17 @@ public: : mFeedNotify(feedNotify), mEnabledCheckBox(enabledCheckBox) {} }; +class ToasterNotifySetting +{ +public: + ToasterNotify *mToasterNotify; + QCheckBox *mEnabledCheckBox; + +public: + ToasterNotifySetting(ToasterNotify *toasterNotify, QCheckBox *enabledCheckBox) + : mToasterNotify(toasterNotify), mEnabledCheckBox(enabledCheckBox) {} +}; + class NotifyPage : public ConfigPage { Q_OBJECT @@ -76,14 +88,15 @@ public: private slots: void notifyToggled(); void testToaster(); - void testNotify(); + void testFeed(); private: uint getNewsFlags(); uint getNotifyFlags(); - ChatLobbyUserNotify* mChatLobbyUserNotify; + ChatLobbyUserNotify* mChatLobbyUserNotify; QList mFeedNotifySettingList; + QList mToasterNotifySettingList; QList mUserNotifySettingList; /** Qt Designer generated object */ diff --git a/retroshare-gui/src/gui/settings/NotifyPage.ui b/retroshare-gui/src/gui/settings/NotifyPage.ui index d2109e678..4eaa2ce79 100755 --- a/retroshare-gui/src/gui/settings/NotifyPage.ui +++ b/retroshare-gui/src/gui/settings/NotifyPage.ui @@ -14,7 +14,7 @@ - 3 + 1 @@ -99,7 +99,7 @@ - + Test @@ -237,12 +237,15 @@ + + + - + Test diff --git a/retroshare-gui/src/gui/toaster/ToasterItem.cpp b/retroshare-gui/src/gui/toaster/ToasterItem.cpp new file mode 100644 index 000000000..46bbf400f --- /dev/null +++ b/retroshare-gui/src/gui/toaster/ToasterItem.cpp @@ -0,0 +1,49 @@ +/**************************************************************** + * RetroShare is distributed under the following license: + * + * Copyright (C) 2015 RetroShare Team + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + ****************************************************************/ + +#include "ToasterItem.h" + +/** Constructor */ +ToasterItem::ToasterItem(QWidget *child) : QObject(NULL) +{ + /* Set widget */ + widget = child; + + /* Values from settings */ + position = Settings->getToasterPosition(); + margin = Settings->getToasterMargin(); + + /* Standard values */ + timeToShow = 500; + timeToLive = 3000; + timeToHide = 500; + + /* Calculated values */ + elapsedTimeToShow = 0; + elapsedTimeToLive = 0; + elapsedTimeToHide = 0; +} + +ToasterItem::~ToasterItem() +{ + emit toasterItemDestroyed(this); + delete widget; +} diff --git a/retroshare-gui/src/gui/toaster/ToasterItem.h b/retroshare-gui/src/gui/toaster/ToasterItem.h new file mode 100644 index 000000000..12c963f2c --- /dev/null +++ b/retroshare-gui/src/gui/toaster/ToasterItem.h @@ -0,0 +1,61 @@ +/**************************************************************** + * RetroShare is distributed under the following license: + * + * Copyright (C) 2015 RetroShare Team + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + ****************************************************************/ + +#ifndef _TOASTER_ITEM_H +#define _TOASTER_ITEM_H + +#include "gui/settings/rsharesettings.h" + +#include + +class ToasterItem : public QObject +{ + Q_OBJECT + +public: + /** Default Constructor */ + ToasterItem(QWidget *child = 0); + /** Default Destructor */ + virtual ~ToasterItem(); + + QWidget *widget; + + /* Values from settings */ + RshareSettings::enumToasterPosition position; + QPoint margin; + + /* Standard values */ + int timeToShow; + int timeToLive; + int timeToHide; + + /* Calculated values */ + QPoint startPos; + QPoint endPos; + int elapsedTimeToShow; + int elapsedTimeToLive; + int elapsedTimeToHide; + +signals: + void toasterItemDestroyed(ToasterItem *toasterItem);//Can't use QObject::detroyed() signal as it's emitted after this class was destroyed. +}; + +#endif //_TOASTER_ITEM_H diff --git a/retroshare-gui/src/retroshare-gui.pro b/retroshare-gui/src/retroshare-gui.pro index 72bf35fb2..6892a6988 100644 --- a/retroshare-gui/src/retroshare-gui.pro +++ b/retroshare-gui/src/retroshare-gui.pro @@ -1,1365 +1,1369 @@ -QT += network xml script -CONFIG += qt gui uic qrc resources idle bitdht - -# Plz never commit the .pro with these flags enabled. -# Use this flag when developping new features only. -# -#CONFIG += unfinished -#CONFIG += debug - -#QMAKE_CFLAGS += -fmudflap -#LIBS *= /usr/lib/gcc/x86_64-linux-gnu/4.4/libmudflap.a /usr/lib/gcc/x86_64-linux-gnu/4.4/libmudflapth.a - -greaterThan(QT_MAJOR_VERSION, 4) { - # Qt 5 - QT += uitools widgets multimedia printsupport - linux-* { - QT += x11extras - } -} else { - # Qt 4 - CONFIG += uitools -} - -CONFIG += identities -CONFIG += gxsforums -CONFIG += gxschannels -CONFIG += posted -CONFIG += gxsgui - -# Gxs is always enabled now. - -DEFINES += RS_ENABLE_GXS - -unfinished { - CONFIG += gxscircles - CONFIG += gxsthewire - CONFIG += gxsphotoshare - CONFIG += wikipoos -} - -# Other Disabled Bits. -#CONFIG += framecatcher -#CONFIG += blogs - -TEMPLATE = app -TARGET = RetroShare - -DEFINES += RS_RELEASE_VERSION -RCC_DIR = temp/qrc -UI_DIR = temp/ui -MOC_DIR = temp/moc - -#CONFIG += debug -debug { - QMAKE_CFLAGS += -g - QMAKE_CXXFLAGS -= -O2 - QMAKE_CXXFLAGS += -O0 - QMAKE_CFLAGS -= -O2 - QMAKE_CFLAGS += -O0 -} - -DEPENDPATH *= retroshare-gui -INCLUDEPATH *= retroshare-gui - -# treat warnings as error for better removing -#QMAKE_CFLAGS += -Werror -#QMAKE_CXXFLAGS += -Werror - -################################# Linux ########################################## -# Put lib dir in QMAKE_LFLAGS so it appears before -L/usr/lib -linux-* { - #CONFIG += version_detail_bash_script - QMAKE_CXXFLAGS *= -D_FILE_OFFSET_BITS=64 - - PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a - PRE_TARGETDEPS *= ../../openpgpsdk/src/lib/libops.a - - LIBS += ../../libretroshare/src/lib/libretroshare.a - LIBS += ../../openpgpsdk/src/lib/libops.a -lbz2 - LIBS += -lssl -lupnp -lixml -lXss -lgnome-keyring - LIBS *= -lcrypto -ldl -lX11 -lz - - LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a - - SQLCIPHER_OK = $$system(pkg-config --exists sqlcipher && echo yes) - isEmpty(SQLCIPHER_OK) { -# We need a explicit path here, to force using the home version of sqlite3 that really encrypts the database. - - exists(../../../lib/sqlcipher/.libs/libsqlcipher.a) { - - LIBS += ../../../lib/sqlcipher/.libs/libsqlcipher.a - DEPENDPATH += ../../../lib/sqlcipher/src/ - INCLUDEPATH += ../../../lib/sqlcipher/src/ - DEPENDPATH += ../../../lib/sqlcipher/tsrc/ - INCLUDEPATH += ../../../lib/sqlcipher/tsrc/ - } else { - message(libsqlcipher.a not found. Compilation will not use SQLCIPHER. Database will be unencrypted.) - DEFINES *= NO_SQLCIPHER - LIBS *= -lsqlite3 - } - - } else { - LIBS += -lsqlcipher - } - - LIBS *= -lglib-2.0 - LIBS *= -rdynamic - DEFINES *= HAVE_XSS # for idle time, libx screensaver extensions - DEFINES *= UBUNTU -} - -linux-g++ { - OBJECTS_DIR = temp/linux-g++/obj -} - -linux-g++-64 { - OBJECTS_DIR = temp/linux-g++-64/obj -} - -version_detail_bash_script { - DEFINES += ADD_LIBRETROSHARE_VERSION_INFO - QMAKE_EXTRA_TARGETS += write_version_detail - PRE_TARGETDEPS = write_version_detail - write_version_detail.commands = ./version_detail.sh -} - -install_rs { - INSTALLS += binary_rs - binary_rs.path = $$(PREFIX)/usr/bin - binary_rs.files = ./RetroShare -} - -#################### Cross compilation for windows under Linux ################### - -win32-x-g++ { - OBJECTS_DIR = temp/win32-x-g++/obj - - LIBS += ../../libretroshare/src/lib.win32xgcc/libretroshare.a - LIBS += ../../../../lib/win32-x-g++-v0.5/libssl.a - LIBS += ../../../../lib/win32-x-g++-v0.5/libcrypto.a - LIBS += ../../../../lib/win32-x-g++-v0.5/libgpgme.dll.a - LIBS += ../../../../lib/win32-x-g++-v0.5/libminiupnpc.a - LIBS += ../../../../lib/win32-x-g++-v0.5/libz.a - LIBS += -L${HOME}/.wine/drive_c/pthreads/lib -lpthreadGCE2 - LIBS += -lQtUiTools - LIBS += -lws2_32 -luuid -lole32 -liphlpapi -lcrypt32 -gdi32 - LIBS += -lole32 -lwinmm - - DEFINES *= WINDOWS_SYS WIN32 WIN32_CROSS_UBUNTU - - INCLUDEPATH += ../../../../gpgme-1.1.8/src/ - INCLUDEPATH += ../../../../libgpg-error-1.7/src/ - - RC_FILE = gui/images/retroshare_win.rc -} - -#################################### Windows ##################################### - -win32 { - debug { - # show console output - CONFIG += console - } - - # Switch on extra warnings - QMAKE_CFLAGS += -Wextra - QMAKE_CXXFLAGS += -Wextra - - # Switch off optimization for release version - QMAKE_CXXFLAGS_RELEASE -= -O2 - QMAKE_CXXFLAGS_RELEASE += -O0 - QMAKE_CFLAGS_RELEASE -= -O2 - QMAKE_CFLAGS_RELEASE += -O0 - - # Switch on optimization for debug version - #QMAKE_CXXFLAGS_DEBUG += -O2 - #QMAKE_CFLAGS_DEBUG += -O2 - - OBJECTS_DIR = temp/obj - #LIBS += -L"D/Qt/2009.03/qt/plugins/imageformats" - #QTPLUGIN += qjpeg - - PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a - PRE_TARGETDEPS *= ../../openpgpsdk/src/lib/libops.a - - LIBS_DIR = $$PWD/../../../libs - - LIBS += ../../libretroshare/src/lib/libretroshare.a - LIBS += ../../openpgpsdk/src/lib/libops.a -lbz2 - LIBS += -L"$$LIBS_DIR/lib" - - LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a - LIBS += -lsqlcipher - - LIBS += -lssl -lcrypto -lpthread -lminiupnpc -lz -# added after bitdht -# LIBS += -lws2_32 - LIBS += -luuid -lole32 -liphlpapi -lcrypt32 -lgdi32 - LIBS += -lole32 -lwinmm - RC_FILE = gui/images/retroshare_win.rc - - # export symbols for the plugins - LIBS += -Wl,--export-all-symbols,--out-implib,lib/libretroshare-gui.a - - # create lib directory - QMAKE_PRE_LINK = $(CHK_DIR_EXISTS) lib $(MKDIR) lib - - DEFINES *= WINDOWS_SYS WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T - - DEPENDPATH += . - INCLUDEPATH += . - - DEPENDPATH += $$LIBS_DIR/include - INCLUDEPATH += $$LIBS_DIR/include - - greaterThan(QT_MAJOR_VERSION, 4) { - # Qt 5 - RC_INCLUDEPATH += $$_PRO_FILE_PWD_/../../libretroshare/src - } else { - # Qt 4 - QMAKE_RC += --include-dir=$$_PRO_FILE_PWD_/../../libretroshare/src - } -} - -##################################### MacOS ###################################### - -macx { - # ENABLE THIS OPTION FOR Univeral Binary BUILD. - CONFIG += ppc x86 - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 - - CONFIG += version_detail_bash_script - LIBS += ../../libretroshare/src/lib/libretroshare.a - LIBS += ../../openpgpsdk/src/lib/libops.a -lbz2 - LIBS += -lssl -lcrypto -lz - #LIBS += -lssl -lcrypto -lz -lgpgme -lgpg-error -lassuan - LIBS += ../../../miniupnpc-1.0/libminiupnpc.a - LIBS += -framework CoreFoundation - LIBS += -framework Security - - LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a - - LIBS += ../../../lib/libsqlcipher.a - #LIBS += -lsqlite3 - - INCLUDEPATH += . - #DEFINES* = MAC_IDLE # for idle feature - CONFIG -= uitools -} - -##################################### FreeBSD ###################################### - -freebsd-* { - INCLUDEPATH *= /usr/local/include/gpgme - LIBS *= ../../libretroshare/src/lib/libretroshare.a - LIBS *= -lssl - LIBS *= -lgpgme - LIBS *= -lupnp - LIBS *= -lgnome-keyring - PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a - - LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a - LIBS += -lsqlite3 -} - -##################################### OpenBSD ###################################### - -openbsd-* { - INCLUDEPATH *= /usr/local/include - - PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a - PRE_TARGETDEPS *= ../../openpgpsdk/src/lib/libops.a - - LIBS *= ../../libretroshare/src/lib/libretroshare.a - LIBS *= ../../openpgpsdk/src/lib/libops.a -lbz2 - LIBS *= -lssl -lcrypto - LIBS *= -lgpgme - LIBS *= -lupnp - LIBS *= -lgnome-keyring - PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a - - LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a - LIBS += -lsqlite3 - - LIBS *= -rdynamic -} - - - -############################## Common stuff ###################################### - -# On Linux systems that alredy have libssl and libcrypto it is advisable -# to rename the patched version of SSL to something like libsslxpgp.a and libcryptoxpg.a - -# ########################################### - -bitdht { - LIBS += ../../libbitdht/src/lib/libbitdht.a - PRE_TARGETDEPS *= ../../libbitdht/src/lib/libbitdht.a -} - -DEPENDPATH += . ../../libretroshare/src/ -INCLUDEPATH += ../../libretroshare/src/ - -# webinterface -DEPENDPATH += ../../libresapi/src -INCLUDEPATH += ../../libresapi/src -PRE_TARGETDEPS *= ../../libresapi/src/lib/libresapi.a -LIBS += ../../libresapi/src/lib/libresapi.a -lmicrohttpd - -win32 { -# must be added after bitdht - LIBS += -lws2_32 -} - -# Input -HEADERS += rshare.h \ - retroshare-gui/configpage.h \ - retroshare-gui/RsAutoUpdatePage.h \ - retroshare-gui/mainpage.h \ - gui/notifyqt.h \ - control/bandwidthevent.h \ - control/eventtype.h \ - gui/QuickStartWizard.h \ - gui/StartDialog.h \ - gui/NetworkDialog.h \ - gui/GenCertDialog.h \ - gui/linetypes.h \ - gui/mainpagestack.h \ - gui/MainWindow.h \ - gui/RSHumanReadableDelegate.h \ - gui/AboutDialog.h \ - gui/NetworkView.h \ - gui/MessengerWindow.h \ - gui/FriendsDialog.h \ - gui/ServicePermissionDialog.h \ - gui/RemoteDirModel.h \ - gui/RetroShareLink.h \ - gui/SearchTreeWidget.h \ - gui/SearchDialog.h \ - gui/SharedFilesDialog.h \ - gui/ShareManager.h \ - gui/ShareDialog.h \ - gui/SFListDelegate.h \ - gui/SoundManager.h \ - gui/HelpDialog.h \ - gui/LogoBar.h \ - gui/common/AvatarDialog.h \ - gui/FileTransfer/xprogressbar.h \ - gui/FileTransfer/DetailsDialog.h \ - gui/FileTransfer/FileTransferInfoWidget.h \ - gui/FileTransfer/DLListDelegate.h \ - gui/FileTransfer/ULListDelegate.h \ - gui/FileTransfer/TransfersDialog.h \ - gui/statistics/TurtleRouterDialog.h \ - gui/statistics/TurtleRouterStatistics.h \ - gui/statistics/dhtgraph.h \ - gui/statistics/bwgraph.h \ - gui/statistics/turtlegraph.h \ - gui/FileTransfer/TransferUserNotify.h \ - gui/plugins/PluginInterface.h \ - gui/im_history/ImHistoryBrowser.h \ - gui/im_history/IMHistoryItemDelegate.h \ - gui/im_history/IMHistoryItemPainter.h \ - lang/languagesupport.h \ - util/RsProtectedTimer.h \ - util/stringutil.h \ - util/DateTime.h \ - util/win32.h \ - util/RetroStyleLabel.h \ - util/dllexport.h \ - util/NonCopyable.h \ - util/rsutildll.h \ - util/dllexport.h \ - util/global.h \ - util/rsqtutildll.h \ - util/Interface.h \ - util/PixmapMerging.h \ - util/MouseEventFilter.h \ - util/EventFilter.h \ - util/EventReceiver.h \ - util/Widget.h \ - util/RsAction.h \ - util/RsUserdata.h \ - util/printpreview.h \ - util/log.h \ - util/misc.h \ - util/HandleRichText.h \ - util/ObjectPainter.h \ - util/QtVersion.h \ - util/RsFile.h \ - gui/bwgraph/BandwidthGraphWindow.h \ - gui/profile/ProfileWidget.h \ - gui/profile/ProfileManager.h \ - gui/profile/StatusMessage.h \ - gui/chat/PopupChatWindow.h \ - gui/chat/PopupChatDialog.h \ - gui/chat/PopupDistantChatDialog.h \ - gui/chat/ChatTabWidget.h \ - gui/chat/ChatWidget.h \ - gui/chat/ChatDialog.h \ - gui/ChatLobbyWidget.h \ - gui/chat/ChatLobbyDialog.h \ - gui/chat/CreateLobbyDialog.h \ - gui/chat/ChatStyle.h \ - gui/chat/ChatUserNotify.h \ - gui/chat/ChatLobbyUserNotify.h \ - gui/connect/ConfCertDialog.h \ - gui/connect/PGPKeyDialog.h \ - gui/msgs/MessageInterface.h \ - gui/msgs/MessageComposer.h \ - gui/msgs/MessageWindow.h \ - gui/msgs/MessageWidget.h \ - gui/msgs/TagsMenu.h \ - gui/msgs/textformat.h \ - gui/msgs/MessageUserNotify.h \ - gui/images/retroshare_win.rc.h \ - gui/settings/RSPermissionMatrixWidget.h \ - gui/settings/rsharesettings.h \ - gui/settings/RsharePeerSettings.h \ - gui/settings/rsettings.h \ - gui/settings/rsettingswin.h \ - gui/settings/GeneralPage.h \ - gui/settings/DirectoriesPage.h \ - gui/settings/ServerPage.h \ - gui/settings/NetworkPage.h \ - gui/settings/NotifyPage.h \ - gui/settings/CryptoPage.h \ - gui/settings/MessagePage.h \ - gui/settings/NewTag.h \ - gui/settings/ForumPage.h \ - gui/settings/PluginsPage.h \ - gui/settings/PluginItem.h \ - gui/settings/AppearancePage.h \ - gui/settings/FileAssociationsPage.h \ - gui/settings/SoundPage.h \ - gui/settings/TransferPage.h \ - gui/settings/ChatPage.h \ - gui/settings/ChannelPage.h \ - gui/settings/PostedPage.h \ - gui/settings/RelayPage.h \ - gui/settings/ServicePermissionsPage.h \ - gui/settings/AddFileAssociationDialog.h \ - gui/settings/GroupFrameSettingsWidget.h \ - gui/toaster/MessageToaster.h \ - gui/toaster/OnlineToaster.h \ - gui/toaster/DownloadToaster.h \ - gui/toaster/ChatToaster.h \ - gui/toaster/GroupChatToaster.h \ - gui/toaster/ChatLobbyToaster.h \ - gui/toaster/FriendRequestToaster.h \ - gui/common/RsButtonOnText.h \ - gui/common/RSGraphWidget.h \ - gui/common/ElidedLabel.h \ - gui/common/vmessagebox.h \ - gui/common/RsUrlHandler.h \ - gui/common/RsCollectionFile.h \ - gui/common/RsCollectionDialog.h \ - gui/common/rwindow.h \ - gui/common/html.h \ - gui/common/AvatarDefs.h \ - gui/common/GroupFlagsWidget.h \ - gui/common/GroupSelectionBox.h \ - gui/common/StatusDefs.h \ - gui/common/TagDefs.h \ - gui/common/GroupDefs.h \ - gui/common/Emoticons.h \ - gui/common/RSListWidgetItem.h \ - gui/common/RSTextEdit.h \ - gui/common/RSPlainTextEdit.h \ - gui/common/RSTreeWidget.h \ - gui/common/RSTreeWidgetItem.h \ - gui/common/RSFeedWidget.h \ - gui/common/RSTabWidget.h \ - gui/common/RSItemDelegate.h \ - gui/common/PeerDefs.h \ - gui/common/FilesDefs.h \ - gui/common/PopularityDefs.h \ - gui/common/GroupTreeWidget.h \ - gui/common/RSTreeView.h \ - gui/common/AvatarWidget.h \ - gui/common/FriendList.h \ - gui/common/FriendSelectionWidget.h \ - gui/common/FriendSelectionDialog.h \ - gui/common/HashBox.h \ - gui/common/LineEditClear.h \ - gui/common/DropLineEdit.h \ - gui/common/RSTextBrowser.h \ - gui/common/RSImageBlockWidget.h \ - gui/common/FeedNotify.h \ - gui/common/UserNotify.h \ - gui/common/HeaderFrame.h \ - gui/common/MimeTextEdit.h \ - gui/common/UIStateHelper.h \ - gui/common/FloatingHelpBrowser.h \ - gui/common/SubscribeToolButton.h \ - gui/common/FlowLayout.h \ - gui/common/PictureFlow.h \ - gui/common/StyledLabel.h \ - gui/common/StyledElidedLabel.h \ - gui/style/RSStyle.h \ - gui/style/StyleDialog.h \ - gui/MessagesDialog.h \ - gui/help/browser/helpbrowser.h \ - gui/help/browser/helptextbrowser.h \ - gui/statusbar/peerstatus.h \ - gui/statusbar/natstatus.h \ - gui/statusbar/dhtstatus.h \ - gui/statusbar/ratesstatus.h \ - gui/statusbar/hashingstatus.h \ - gui/statusbar/discstatus.h \ - gui/statusbar/SoundStatus.h \ - gui/statusbar/OpModeStatus.h \ - gui/statusbar/ToasterDisable.h \ - gui/statusbar/SysTrayStatus.h \ - gui/advsearch/advancedsearchdialog.h \ - gui/advsearch/expressionwidget.h \ - gui/advsearch/guiexprelement.h \ - gui/elastic/graphwidget.h \ - gui/elastic/edge.h \ - gui/elastic/arrow.h \ - gui/elastic/node.h \ - gui/NewsFeed.h \ - gui/feeds/FeedItem.h \ - gui/feeds/FeedHolder.h \ - gui/feeds/PeerItem.h \ - gui/feeds/MsgItem.h \ - gui/feeds/ChatMsgItem.h \ - gui/feeds/SubFileItem.h \ - gui/feeds/AttachFileItem.h \ - gui/feeds/SecurityItem.h \ - gui/feeds/NewsFeedUserNotify.h \ - gui/connect/ConnectFriendWizard.h \ - gui/connect/ConnectProgressDialog.h \ - gui/groups/CreateGroup.h \ - gui/GetStartedDialog.h \ - gui/statistics/DhtWindow.h \ - gui/statistics/GlobalRouterStatistics.h \ - gui/statistics/StatisticsWindow.h \ - gui/statistics/BwCtrlWindow.h \ - gui/statistics/RttStatistics.h \ - gui/statistics/OutQueueStatistics.h \ - gui/settings/WebuiPage.h - -# gui/ForumsDialog.h \ -# gui/forums/ForumDetails.h \ -# gui/forums/EditForumDetails.h \ -# gui/forums/CreateForum.h \ -# gui/forums/CreateForumMsg.h \ -# gui/forums/ForumUserNotify.h \ -# gui/feeds/ForumNewItem.h \ -# gui/feeds/ForumMsgItem.h \ -# gui/ChannelFeed.h \ -# gui/feeds/ChanNewItem.h \ -# gui/feeds/ChanMsgItem.h \ -# gui/channels/CreateChannel.h \ -# gui/channels/ChannelDetails.h \ -# gui/channels/CreateChannelMsg.h \ -# gui/channels/EditChanDetails.h \ -# gui/channels/ChannelUserNotify.h \ - -FORMS += gui/StartDialog.ui \ - gui/GenCertDialog.ui \ - gui/AboutDialog.ui \ - gui/QuickStartWizard.ui \ - gui/NetworkDialog.ui \ - gui/common/AvatarDialog.ui \ - gui/FileTransfer/TransfersDialog.ui \ - gui/FileTransfer/DetailsDialog.ui \ - gui/MainWindow.ui \ - gui/NetworkView.ui \ - gui/MessengerWindow.ui \ - gui/FriendsDialog.ui \ - gui/SearchDialog.ui \ - gui/SharedFilesDialog.ui \ - gui/ShareManager.ui \ - gui/ShareDialog.ui \ - gui/MessagesDialog.ui \ - gui/help/browser/helpbrowser.ui \ - gui/HelpDialog.ui \ - gui/ServicePermissionDialog.ui \ - gui/bwgraph/BandwidthGraphWindow.ui \ - gui/profile/ProfileWidget.ui \ - gui/profile/StatusMessage.ui \ - gui/profile/ProfileManager.ui \ - gui/chat/PopupChatWindow.ui \ - gui/chat/PopupChatDialog.ui \ - gui/chat/ChatTabWidget.ui \ - gui/chat/ChatWidget.ui \ - gui/chat/ChatLobbyDialog.ui \ - gui/chat/CreateLobbyDialog.ui \ - gui/ChatLobbyWidget.ui \ - gui/connect/ConfCertDialog.ui \ - gui/connect/PGPKeyDialog.ui \ - gui/connect/ConnectFriendWizard.ui \ - gui/connect/ConnectProgressDialog.ui \ - gui/msgs/MessageComposer.ui \ - gui/msgs/MessageWindow.ui\ - gui/msgs/MessageWidget.ui\ - gui/settings/settings.ui \ - gui/settings/GeneralPage.ui \ - gui/settings/DirectoriesPage.ui \ - gui/settings/ServerPage.ui \ - gui/settings/NetworkPage.ui \ - gui/settings/NotifyPage.ui \ - gui/settings/CryptoPage.ui \ - gui/settings/MessagePage.ui \ - gui/settings/NewTag.ui \ - gui/settings/ForumPage.ui \ - gui/settings/PluginsPage.ui \ - gui/settings/AppearancePage.ui \ - gui/settings/TransferPage.ui \ - gui/settings/SoundPage.ui \ - gui/settings/ChatPage.ui \ - gui/settings/ChannelPage.ui \ - gui/settings/PostedPage.ui \ - gui/settings/RelayPage.ui \ - gui/settings/ServicePermissionsPage.ui \ - gui/settings/PluginItem.ui \ - gui/settings/GroupFrameSettingsWidget.ui \ - gui/toaster/MessageToaster.ui \ - gui/toaster/OnlineToaster.ui \ - gui/toaster/DownloadToaster.ui \ - gui/toaster/ChatToaster.ui \ - gui/toaster/GroupChatToaster.ui \ - gui/toaster/ChatLobbyToaster.ui \ - gui/toaster/FriendRequestToaster.ui \ - gui/advsearch/AdvancedSearchDialog.ui \ - gui/advsearch/expressionwidget.ui \ - gui/NewsFeed.ui \ - gui/feeds/PeerItem.ui \ - gui/feeds/MsgItem.ui \ - gui/feeds/ChatMsgItem.ui \ - gui/feeds/SubFileItem.ui \ - gui/feeds/AttachFileItem.ui \ - gui/feeds/SecurityItem.ui \ - gui/im_history/ImHistoryBrowser.ui \ - gui/groups/CreateGroup.ui \ - gui/common/GroupTreeWidget.ui \ - gui/common/AvatarWidget.ui \ - gui/common/FriendList.ui \ - gui/common/FriendSelectionWidget.ui \ - gui/common/HashBox.ui \ - gui/common/RSImageBlockWidget.ui \ - gui/common/RsCollectionDialog.ui \ - gui/common/HeaderFrame.ui \ - gui/common/RSFeedWidget.ui \ - gui/style/StyleDialog.ui \ - gui/statistics/DhtWindow.ui \ - gui/statistics/TurtleRouterDialog.ui \ - gui/statistics/TurtleRouterStatistics.ui \ - gui/statistics/GlobalRouterStatistics.ui \ - gui/statistics/StatisticsWindow.ui \ - gui/statistics/BwCtrlWindow.ui \ - gui/statistics/RttStatistics.ui \ - gui/GetStartedDialog.ui \ - gui/settings/WebuiPage.ui - -# gui/ForumsDialog.ui \ -# gui/forums/CreateForum.ui \ -# gui/forums/CreateForumMsg.ui \ -# gui/forums/ForumDetails.ui \ -# gui/forums/EditForumDetails.ui \ -# gui/feeds/ForumNewItem.ui \ -# gui/feeds/ForumMsgItem.ui \ -# gui/ChannelFeed.ui \ -# gui/channels/CreateChannel.ui \ -# gui/channels/CreateChannelMsg.ui \ -# gui/channels/ChannelDetails.ui \ -# gui/channels/EditChanDetails.ui \ -# gui/feeds/ChanNewItem.ui \ -# gui/feeds/ChanMsgItem.ui \ - -SOURCES += main.cpp \ - rshare.cpp \ - gui/notifyqt.cpp \ - gui/AboutDialog.cpp \ - gui/QuickStartWizard.cpp \ - gui/StartDialog.cpp \ - gui/GenCertDialog.cpp \ - gui/NetworkDialog.cpp \ - gui/mainpagestack.cpp \ - gui/MainWindow.cpp \ - gui/NetworkView.cpp \ - gui/MessengerWindow.cpp \ - gui/FriendsDialog.cpp \ - gui/ServicePermissionDialog.cpp \ - gui/RemoteDirModel.cpp \ - gui/RsAutoUpdatePage.cpp \ - gui/RetroShareLink.cpp \ - gui/SearchTreeWidget.cpp \ - gui/SearchDialog.cpp \ - gui/SharedFilesDialog.cpp \ - gui/ShareManager.cpp \ - gui/ShareDialog.cpp \ - gui/SFListDelegate.cpp \ - gui/SoundManager.cpp \ - gui/MessagesDialog.cpp \ - gui/im_history/ImHistoryBrowser.cpp \ - gui/im_history/IMHistoryItemDelegate.cpp \ - gui/im_history/IMHistoryItemPainter.cpp \ - gui/help/browser/helpbrowser.cpp \ - gui/help/browser/helptextbrowser.cpp \ - gui/FileTransfer/TransfersDialog.cpp \ - gui/FileTransfer/FileTransferInfoWidget.cpp \ - gui/FileTransfer/DLListDelegate.cpp \ - gui/FileTransfer/ULListDelegate.cpp \ - gui/FileTransfer/xprogressbar.cpp \ - gui/FileTransfer/DetailsDialog.cpp \ - gui/FileTransfer/TransferUserNotify.cpp \ - gui/MainPage.cpp \ - gui/HelpDialog.cpp \ - gui/LogoBar.cpp \ - lang/languagesupport.cpp \ - util/RsProtectedTimer.cpp \ - util/stringutil.cpp \ - util/DateTime.cpp \ - util/win32.cpp \ - util/RetroStyleLabel.cpp \ - util/WidgetBackgroundImage.cpp \ - util/NonCopyable.cpp \ - util/PixmapMerging.cpp \ - util/MouseEventFilter.cpp \ - util/EventFilter.cpp \ - util/EventReceiver.cpp \ - util/Widget.cpp \ - util/RsAction.cpp \ - util/printpreview.cpp \ - util/log.cpp \ - util/misc.cpp \ - util/HandleRichText.cpp \ - util/ObjectPainter.cpp \ - util/RsFile.cpp \ - gui/bwgraph/BandwidthGraphWindow.cpp \ - gui/profile/ProfileWidget.cpp \ - gui/profile/StatusMessage.cpp \ - gui/profile/ProfileManager.cpp \ - gui/chat/PopupChatWindow.cpp \ - gui/chat/PopupChatDialog.cpp \ - gui/chat/PopupDistantChatDialog.cpp \ - gui/chat/ChatTabWidget.cpp \ - gui/chat/ChatWidget.cpp \ - gui/chat/ChatDialog.cpp \ - gui/ChatLobbyWidget.cpp \ - gui/chat/ChatLobbyDialog.cpp \ - gui/chat/CreateLobbyDialog.cpp \ - gui/chat/ChatStyle.cpp \ - gui/chat/ChatUserNotify.cpp \ - gui/chat/ChatLobbyUserNotify.cpp \ - gui/connect/ConfCertDialog.cpp \ - gui/connect/PGPKeyDialog.cpp \ - gui/msgs/MessageComposer.cpp \ - gui/msgs/MessageWidget.cpp \ - gui/msgs/MessageWindow.cpp \ - gui/msgs/TagsMenu.cpp \ - gui/msgs/MessageUserNotify.cpp \ - gui/common/RsButtonOnText.cpp \ - gui/common/RSGraphWidget.cpp \ - gui/common/ElidedLabel.cpp \ - gui/common/vmessagebox.cpp \ - gui/common/RsCollectionFile.cpp \ - gui/common/RsCollectionDialog.cpp \ - gui/common/RsUrlHandler.cpp \ - gui/common/rwindow.cpp \ - gui/common/html.cpp \ - gui/common/AvatarDefs.cpp \ - gui/common/AvatarDialog.cpp \ - gui/common/GroupFlagsWidget.cpp \ - gui/common/GroupSelectionBox.cpp \ - gui/common/StatusDefs.cpp \ - gui/common/TagDefs.cpp \ - gui/common/GroupDefs.cpp \ - gui/common/Emoticons.cpp \ - gui/common/RSListWidgetItem.cpp \ - gui/common/RSTextEdit.cpp \ - gui/common/RSPlainTextEdit.cpp \ - gui/common/RSTreeWidget.cpp \ - gui/common/RSTreeWidgetItem.cpp \ - gui/common/RSFeedWidget.cpp \ - gui/common/RSTabWidget.cpp \ - gui/common/RSItemDelegate.cpp \ - gui/common/PeerDefs.cpp \ - gui/common/FilesDefs.cpp \ - gui/common/PopularityDefs.cpp \ - gui/common/GroupTreeWidget.cpp \ - gui/common/RSTreeView.cpp \ - gui/common/AvatarWidget.cpp \ - gui/common/FriendList.cpp \ - gui/common/FriendSelectionWidget.cpp \ - gui/common/FriendSelectionDialog.cpp \ - gui/common/HashBox.cpp \ - gui/common/LineEditClear.cpp \ - gui/common/DropLineEdit.cpp \ - gui/common/RSTextBrowser.cpp \ - gui/common/RSImageBlockWidget.cpp \ - gui/common/FeedNotify.cpp \ - gui/common/UserNotify.cpp \ - gui/common/HeaderFrame.cpp \ - gui/common/MimeTextEdit.cpp \ - gui/common/UIStateHelper.cpp \ - gui/common/FloatingHelpBrowser.cpp \ - gui/common/SubscribeToolButton.cpp \ - gui/common/FlowLayout.cpp \ - gui/common/PictureFlow.cpp \ - gui/common/StyledLabel.cpp \ - gui/common/StyledElidedLabel.cpp \ - gui/style/RSStyle.cpp \ - gui/style/StyleDialog.cpp \ - gui/settings/RSPermissionMatrixWidget.cpp \ - gui/settings/rsharesettings.cpp \ - gui/settings/RsharePeerSettings.cpp \ - gui/settings/rsettings.cpp \ - gui/settings/rsettingswin.cpp \ - gui/settings/GeneralPage.cpp \ - gui/settings/DirectoriesPage.cpp \ - gui/settings/ServerPage.cpp \ - gui/settings/NetworkPage.cpp \ - gui/settings/NotifyPage.cpp \ - gui/settings/CryptoPage.cpp \ - gui/settings/MessagePage.cpp \ - gui/settings/NewTag.cpp \ - gui/settings/ForumPage.cpp \ - gui/settings/PluginsPage.cpp \ - gui/settings/PluginItem.cpp \ - gui/settings/AppearancePage.cpp \ - gui/settings/FileAssociationsPage.cpp \ - gui/settings/SoundPage.cpp \ - gui/settings/TransferPage.cpp \ - gui/settings/ChatPage.cpp \ - gui/settings/ChannelPage.cpp \ - gui/settings/PostedPage.cpp \ - gui/settings/RelayPage.cpp \ - gui/settings/ServicePermissionsPage.cpp \ - gui/settings/AddFileAssociationDialog.cpp \ - gui/settings/GroupFrameSettingsWidget.cpp \ - gui/statusbar/peerstatus.cpp \ - gui/statusbar/natstatus.cpp \ - gui/statusbar/dhtstatus.cpp \ - gui/statusbar/ratesstatus.cpp \ - gui/statusbar/hashingstatus.cpp \ - gui/statusbar/discstatus.cpp \ - gui/statusbar/SoundStatus.cpp \ - gui/statusbar/OpModeStatus.cpp \ - gui/statusbar/ToasterDisable.cpp \ - gui/statusbar/SysTrayStatus.cpp \ - gui/toaster/MessageToaster.cpp \ - gui/toaster/DownloadToaster.cpp \ - gui/toaster/OnlineToaster.cpp \ - gui/toaster/ChatToaster.cpp \ - gui/toaster/GroupChatToaster.cpp \ - gui/toaster/ChatLobbyToaster.cpp \ - gui/toaster/FriendRequestToaster.cpp \ - gui/advsearch/advancedsearchdialog.cpp \ - gui/advsearch/expressionwidget.cpp \ - gui/advsearch/guiexprelement.cpp \ - gui/elastic/graphwidget.cpp \ - gui/elastic/edge.cpp \ - gui/elastic/arrow.cpp \ - gui/elastic/node.cpp \ - gui/NewsFeed.cpp \ - gui/feeds/FeedItem.cpp \ - gui/feeds/FeedHolder.cpp \ - gui/feeds/PeerItem.cpp \ - gui/feeds/MsgItem.cpp \ - gui/feeds/ChatMsgItem.cpp \ - gui/feeds/SubFileItem.cpp \ - gui/feeds/AttachFileItem.cpp \ - gui/feeds/SecurityItem.cpp \ - gui/feeds/NewsFeedUserNotify.cpp \ - gui/connect/ConnectFriendWizard.cpp \ - gui/connect/ConnectProgressDialog.cpp \ - gui/groups/CreateGroup.cpp \ - gui/GetStartedDialog.cpp \ - gui/statistics/DhtWindow.cpp \ - gui/statistics/TurtleRouterDialog.cpp \ - gui/statistics/TurtleRouterStatistics.cpp \ - gui/statistics/GlobalRouterStatistics.cpp \ - gui/statistics/OutQueueStatistics.cpp \ - gui/statistics/StatisticsWindow.cpp \ - gui/statistics/BwCtrlWindow.cpp \ - gui/statistics/RttStatistics.cpp \ - gui/settings/WebuiPage.cpp - -# gui/ForumsDialog.cpp \ -# gui/forums/ForumDetails.cpp \ -# gui/forums/EditForumDetails.cpp \ -# gui/forums/CreateForum.cpp \ -# gui/forums/CreateForumMsg.cpp \ -# gui/forums/ForumUserNotify.cpp \ -# gui/feeds/ForumNewItem.cpp \ -# gui/feeds/ForumMsgItem.cpp \ -# gui/ChannelFeed.cpp \ -# gui/channels/CreateChannel.cpp \ -# gui/channels/CreateChannelMsg.cpp \ -# gui/channels/ChannelDetails.cpp \ -# gui/channels/EditChanDetails.cpp \ -# gui/channels/ChannelUserNotify.cpp \ -# gui/feeds/ChanNewItem.cpp \ -# gui/feeds/ChanMsgItem.cpp \ - -RESOURCES += gui/images.qrc lang/lang.qrc gui/help/content/content.qrc - -TRANSLATIONS += \ - lang/retroshare_ca_ES.ts \ - lang/retroshare_cs.ts \ - lang/retroshare_da.ts \ - lang/retroshare_de.ts \ - lang/retroshare_el.ts \ - lang/retroshare_en.ts \ - lang/retroshare_es.ts \ - lang/retroshare_fi.ts \ - lang/retroshare_fr.ts \ - lang/retroshare_hu.ts \ - lang/retroshare_it.ts \ - lang/retroshare_ja_JP.ts \ - lang/retroshare_nl.ts \ - lang/retroshare_ko.ts \ - lang/retroshare_pl.ts \ - lang/retroshare_ru.ts \ - lang/retroshare_sv.ts \ - lang/retroshare_tr.ts \ - lang/retroshare_zh_CN.ts - -unfinishedtranslations { - - TRANSLATIONS += \ - lang/retroshare_bg.ts \ - lang/retroshare_af.ts \ - lang/retroshare_pt.ts \ - lang/retroshare_sl.ts \ - lang/retroshare_sr.ts \ - lang/retroshare_zh_TW.ts - -} - -# Shifted Qt4.4 dependancies to here. -# qmake CONFIG=pluginmgr - -pluginmgr { - - SOURCES += gui/PluginsPage.cpp \ - gui/PluginManagerWidget.cpp \ - gui/PluginManager.cpp - - HEADERS += gui/PluginsPage.h \ - gui/PluginManagerWidget.h \ - gui/PluginManager.h - - DEFINES *= PLUGINMGR - -} - -#blogs { -# -#DEPENDPATH += gui/unfinished \ -# -#HEADERS += gui/unfinished/blogs/BlogsDialog.h \ -# gui/unfinished/blogs/CreateBlog.h \ -# gui/unfinished/blogs/CreateBlogMsg.h \ -# gui/unfinished/blogs/BlogsMsgItem.h \ -# gui/unfinished/blogs/BlogDetails.h \ -# gui/feeds/BlogNewItem.h \ -# gui/feeds/BlogMsgItem.h \ -# -#FORMS += gui/unfinished/blogs/BlogsDialog.ui \ -# gui/unfinished/blogs/CreateBlog.ui \ -# gui/unfinished/blogs/CreateBlogMsg.ui \ -# gui/unfinished/blogs/BlogsMsgItem.ui \ -# gui/unfinished/blogs/BlogDetails.ui \ -# gui/feeds/BlogNewItem.ui \ -# gui/feeds/BlogMsgItem.ui \ -# -#SOURCES += gui/unfinished/blogs/BlogsDialog.cpp \ -# gui/unfinished/blogs/CreateBlog.cpp \ -# gui/unfinished/blogs/CreateBlogMsg.cpp \ -# gui/unfinished/blogs/BlogsMsgItem.cpp \ -# gui/unfinished/blogs/BlogDetails.cpp \ -# gui/feeds/BlogNewItem.cpp \ -# gui/feeds/BlogMsgItem.cpp \ -# -#DEFINES += BLOGS -#} - -# use_links { -# HEADERS += gui/AddLinksDialog.h \ -# gui/LinksDialog.h -# -# FORMS += gui/AddLinksDialog.ui \ -# gui/LinksDialog.ui -# -# SOURCES += gui/AddLinksDialog.cpp \ -# gui/LinksDialog.cpp -# -# DEFINES += RS_USE_LINKS -# } - - -idle { - -HEADERS += idle/idle.h - -SOURCES += idle/idle.cpp \ - idle/idle_platform.cpp -} - -framecatcher { - -HEADERS += util/framecatcher.h - -SOURCES += util/framecatcher.cpp - -LIBS += -lxine - -DEFINES *= CHANNELS_FRAME_CATCHER - -} - - -# BELOW IS GXS Unfinished Services. - -unfinished_services { - - DEPENDPATH += gui/unfinished \ - - HEADERS += gui/unfinished/ApplicationWindow.h \ - -# gui/unfinished/CalDialog.h \ -# gui/unfinished/ExampleDialog.h \ -# gui/unfinished/GamesDialog.h \ -# gui/unfinished/profile/ProfileView.h \ -# gui/unfinished/profile/ProfileEdit.h -# gui/unfinished/StatisticDialog.h \ -# gui/unfinished/PhotoDialog.h \ -# gui/unfinished/PhotoShow.h \ - - FORMS += gui/unfinished/ApplicationWindow.ui \ - -# gui/unfinished/CalDialog.ui \ -# gui/unfinished/ExampleDialog.ui \ -# gui/unfinished/GamesDialog.ui \ -# gui/unfinished/profile/ProfileView.ui \ -# gui/unfinished/profile/ProfileEdit.ui -# gui/unfinished/StatisticDialog.ui \ -# gui/unfinished/PhotoDialog.ui \ -# gui/unfinished/PhotoShow.ui \ - - SOURCES += gui/unfinished/ApplicationWindow.cpp \ - -# gui/unfinished/CalDialog.cpp \ -# gui/unfinished/ExampleDialog.cpp \ -# gui/unfinished/GamesDialog.cpp \ -# gui/unfinished/profile/ProfileView.cpp \ -# gui/unfinished/profile/ProfileEdit.cpp -# gui/unfinished/StatisticDialog.cpp \ -# gui/unfinished/PhotoDialog.cpp \ -# gui/unfinished/PhotoShow.cpp \ - - DEFINES *= UNFINISHED -} - - -gxsphotoshare { - #DEFINES += RS_USE_PHOTOSHARE - - HEADERS += \ - gui/PhotoShare/PhotoDrop.h \ - gui/PhotoShare/AlbumItem.h \ - gui/PhotoShare/AlbumDialog.h \ - gui/PhotoShare/AlbumCreateDialog.h \ - gui/PhotoShare/PhotoItem.h \ - gui/PhotoShare/PhotoShareItemHolder.h \ - gui/PhotoShare/PhotoShare.h \ - gui/PhotoShare/PhotoSlideShow.h \ - gui/PhotoShare/PhotoDialog.h \ - gui/PhotoShare/PhotoCommentItem.h \ - gui/PhotoShare/AddCommentDialog.h - - FORMS += \ - gui/PhotoShare/PhotoItem.ui \ - gui/PhotoShare/PhotoDialog.ui \ - gui/PhotoShare/AlbumItem.ui \ - gui/PhotoShare/AlbumDialog.ui \ - gui/PhotoShare/AlbumCreateDialog.ui \ - gui/PhotoShare/PhotoShare.ui \ - gui/PhotoShare/PhotoSlideShow.ui \ - gui/PhotoShare/PhotoCommentItem.ui \ - gui/PhotoShare/AddCommentDialog.ui - - SOURCES += \ - gui/PhotoShare/PhotoItem.cpp \ - gui/PhotoShare/PhotoDialog.cpp \ - gui/PhotoShare/PhotoDrop.cpp \ - gui/PhotoShare/AlbumItem.cpp \ - gui/PhotoShare/AlbumDialog.cpp \ - gui/PhotoShare/AlbumCreateDialog.cpp \ - gui/PhotoShare/PhotoShareItemHolder.cpp \ - gui/PhotoShare/PhotoShare.cpp \ - gui/PhotoShare/PhotoSlideShow.cpp \ - gui/PhotoShare/PhotoCommentItem.cpp \ - gui/PhotoShare/AddCommentDialog.cpp - - RESOURCES += gui/PhotoShare/Photo_images.qrc - -} - - -wikipoos { - - DEPENDPATH += ../../supportlibs/pegmarkdown - INCLUDEPATH += ../../supportlibs/pegmarkdown - - HEADERS += gui/WikiPoos/WikiDialog.h \ - gui/WikiPoos/WikiAddDialog.h \ - gui/WikiPoos/WikiEditDialog.h \ - - FORMS += gui/WikiPoos/WikiDialog.ui \ - gui/WikiPoos/WikiAddDialog.ui \ - gui/WikiPoos/WikiEditDialog.ui \ - - SOURCES += gui/WikiPoos/WikiDialog.cpp \ - gui/WikiPoos/WikiAddDialog.cpp \ - gui/WikiPoos/WikiEditDialog.cpp \ - - RESOURCES += gui/WikiPoos/Wiki_images.qrc - - DEFINES *= RS_USE_WIKI -} - - - -gxsthewire { - - HEADERS += gui/TheWire/PulseItem.h \ - gui/TheWire/WireDialog.h \ - gui/TheWire/PulseAddDialog.h \ - - FORMS += gui/TheWire/PulseItem.ui \ - gui/TheWire/WireDialog.ui \ - gui/TheWire/PulseAddDialog.ui \ - - SOURCES += gui/TheWire/PulseItem.cpp \ - gui/TheWire/WireDialog.cpp \ - gui/TheWire/PulseAddDialog.cpp \ - -} - -identities { - - HEADERS += \ - gui/Identity/IdDialog.h \ - gui/Identity/IdEditDialog.h \ - gui/Identity/IdDetailsDialog.h \ - - FORMS += gui/Identity/IdDialog.ui \ - gui/Identity/IdEditDialog.ui \ - gui/Identity/IdDetailsDialog.ui \ - - SOURCES += \ - gui/Identity/IdDialog.cpp \ - gui/Identity/IdEditDialog.cpp \ - gui/Identity/IdDetailsDialog.cpp \ - -} - -gxscircles { - DEFINES += RS_USE_CIRCLES - - HEADERS += \ - gui/Circles/CirclesDialog.h \ - gui/Circles/CreateCircleDialog.h \ - - FORMS += gui/Circles/CirclesDialog.ui \ - gui/Circles/CreateCircleDialog.ui \ - - SOURCES += \ - gui/Circles/CirclesDialog.cpp \ - gui/Circles/CreateCircleDialog.cpp \ - - HEADERS += gui/People/PeopleDialog.h - HEADERS += gui/People/CircleWidget.h - HEADERS += gui/People/IdentityWidget.h - - FORMS += gui/People/PeopleDialog.ui - FORMS += gui/People/CircleWidget.ui - FORMS += gui/People/IdentityWidget.ui - - SOURCES += gui/People/PeopleDialog.cpp - SOURCES += gui/People/CircleWidget.cpp - SOURCES += gui/People/IdentityWidget.cpp - -#HEADERS += gui/People/IdentityItem.h -#HEADERS += gui/People/CircleItem.h -#HEADERS += gui/People/GroupListView.h -#SOURCES += gui/People/GroupListView.cpp -#SOURCES += gui/People/IdentityItem.cpp -#SOURCES += gui/People/CircleItem.cpp - - -} - - -gxsforums { - - HEADERS += gui/gxsforums/GxsForumsDialog.h \ - gui/gxsforums/GxsForumGroupDialog.h \ - gui/gxsforums/CreateGxsForumMsg.h \ - gui/gxsforums/GxsForumThreadWidget.h \ - gui/gxsforums/GxsForumsFillThread.h \ - gui/gxsforums/GxsForumUserNotify.h \ - gui/feeds/GxsForumGroupItem.h \ - gui/feeds/GxsForumMsgItem.h - - FORMS += gui/gxsforums/CreateGxsForumMsg.ui \ - gui/gxsforums/GxsForumThreadWidget.ui \ - gui/feeds/GxsForumGroupItem.ui \ - gui/feeds/GxsForumMsgItem.ui - - SOURCES += gui/gxsforums/GxsForumsDialog.cpp \ - gui/gxsforums/GxsForumGroupDialog.cpp \ - gui/gxsforums/CreateGxsForumMsg.cpp \ - gui/gxsforums/GxsForumThreadWidget.cpp \ - gui/gxsforums/GxsForumsFillThread.cpp \ - gui/gxsforums/GxsForumUserNotify.cpp \ - gui/feeds/GxsForumGroupItem.cpp \ - gui/feeds/GxsForumMsgItem.cpp -} - - -gxschannels { - - HEADERS += gui/gxschannels/GxsChannelDialog.h \ - gui/gxschannels/GxsChannelGroupDialog.h \ - gui/gxschannels/CreateGxsChannelMsg.h \ - gui/gxschannels/GxsChannelPostsWidget.h \ - gui/gxschannels/GxsChannelFilesWidget.h \ - gui/gxschannels/GxsChannelFilesStatusWidget.h \ - gui/feeds/GxsChannelGroupItem.h \ - gui/feeds/GxsChannelPostItem.h \ - gui/gxschannels/GxsChannelUserNotify.h - - FORMS += gui/gxschannels/GxsChannelPostsWidget.ui \ - gui/gxschannels/GxsChannelFilesWidget.ui \ - gui/gxschannels/GxsChannelFilesStatusWidget.ui \ - gui/gxschannels/CreateGxsChannelMsg.ui \ - gui/feeds/GxsChannelGroupItem.ui \ - gui/feeds/GxsChannelPostItem.ui - - SOURCES += gui/gxschannels/GxsChannelDialog.cpp \ - gui/gxschannels/GxsChannelPostsWidget.cpp \ - gui/gxschannels/GxsChannelFilesWidget.cpp \ - gui/gxschannels/GxsChannelFilesStatusWidget.cpp \ - gui/gxschannels/GxsChannelGroupDialog.cpp \ - gui/gxschannels/CreateGxsChannelMsg.cpp \ - gui/feeds/GxsChannelGroupItem.cpp \ - gui/feeds/GxsChannelPostItem.cpp \ - gui/gxschannels/GxsChannelUserNotify.cpp -} - - -posted { - - HEADERS += gui/Posted/PostedDialog.h \ - gui/Posted/PostedListWidget.h \ - gui/Posted/PostedItem.h \ - gui/Posted/PostedGroupDialog.h \ - gui/feeds/PostedGroupItem.h \ - gui/Posted/PostedCreatePostDialog.h \ - gui/Posted/PostedUserNotify.h - - #gui/Posted/PostedCreateCommentDialog.h \ - #gui/Posted/PostedComments.h \ - - FORMS += gui/Posted/PostedListWidget.ui \ - gui/feeds/PostedGroupItem.ui \ - gui/Posted/PostedItem.ui \ - gui/Posted/PostedCreatePostDialog.ui \ - - #gui/Posted/PostedDialog.ui \ - #gui/Posted/PostedComments.ui \ - #gui/Posted/PostedCreateCommentDialog.ui - - SOURCES += gui/Posted/PostedDialog.cpp \ - gui/Posted/PostedListWidget.cpp \ - gui/feeds/PostedGroupItem.cpp \ - gui/Posted/PostedItem.cpp \ - gui/Posted/PostedGroupDialog.cpp \ - gui/Posted/PostedCreatePostDialog.cpp \ - gui/Posted/PostedUserNotify.cpp - - #gui/Posted/PostedDialog.cpp \ - #gui/Posted/PostedComments.cpp \ - #gui/Posted/PostedCreateCommentDialog.cpp - - RESOURCES += gui/Posted/Posted_images.qrc -} - -gxsgui { - - HEADERS += gui/gxs/GxsGroupDialog.h \ - gui/gxs/WikiGroupDialog.h \ - gui/gxs/GxsIdDetails.h \ - gui/gxs/GxsIdChooser.h \ - gui/gxs/GxsIdLabel.h \ - gui/gxs/GxsCircleChooser.h \ - gui/gxs/GxsCircleLabel.h \ - gui/gxs/GxsIdTreeWidgetItem.h \ - gui/gxs/GxsCommentTreeWidget.h \ - gui/gxs/GxsCommentContainer.h \ - gui/gxs/GxsCommentDialog.h \ - gui/gxs/GxsCreateCommentDialog.h \ - gui/gxs/GxsGroupFrameDialog.h \ - gui/gxs/GxsMessageFrameWidget.h \ - gui/gxs/GxsMessageFramePostWidget.h \ - gui/gxs/GxsGroupFeedItem.h \ - gui/gxs/GxsFeedItem.h \ - gui/gxs/RsGxsUpdateBroadcastBase.h \ - gui/gxs/RsGxsUpdateBroadcastWidget.h \ - gui/gxs/RsGxsUpdateBroadcastPage.h \ - gui/gxs/GxsGroupShareKey.h \ - gui/gxs/GxsUserNotify.h \ - gui/gxs/GxsFeedWidget.h \ - util/TokenQueue.h \ - util/RsGxsUpdateBroadcast.h \ - -# gui/gxs/GxsMsgDialog.h \ - - FORMS += gui/gxs/GxsGroupDialog.ui \ - gui/gxs/GxsCommentContainer.ui \ - gui/gxs/GxsCommentDialog.ui \ - gui/gxs/GxsCreateCommentDialog.ui \ - gui/gxs/GxsGroupFrameDialog.ui\ - gui/gxs/GxsGroupShareKey.ui -# gui/gxs/GxsMsgDialog.ui \ -# gui/gxs/GxsCommentTreeWidget.ui - - SOURCES += gui/gxs/GxsGroupDialog.cpp \ - gui/gxs/WikiGroupDialog.cpp \ - gui/gxs/GxsIdDetails.cpp \ - gui/gxs/GxsIdChooser.cpp \ - gui/gxs/GxsIdLabel.cpp \ - gui/gxs/GxsCircleChooser.cpp \ - gui/gxs/GxsGroupShareKey.cpp \ - gui/gxs/GxsCircleLabel.cpp \ - gui/gxs/GxsIdTreeWidgetItem.cpp \ - gui/gxs/GxsCommentTreeWidget.cpp \ - gui/gxs/GxsCommentContainer.cpp \ - gui/gxs/GxsCommentDialog.cpp \ - gui/gxs/GxsCreateCommentDialog.cpp \ - gui/gxs/GxsGroupFrameDialog.cpp \ - gui/gxs/GxsMessageFrameWidget.cpp \ - gui/gxs/GxsMessageFramePostWidget.cpp \ - gui/gxs/GxsGroupFeedItem.cpp \ - gui/gxs/GxsFeedItem.cpp \ - gui/gxs/RsGxsUpdateBroadcastBase.cpp \ - gui/gxs/RsGxsUpdateBroadcastWidget.cpp \ - gui/gxs/RsGxsUpdateBroadcastPage.cpp \ - gui/gxs/GxsUserNotify.cpp \ - gui/gxs/GxsFeedWidget.cpp \ - util/TokenQueue.cpp \ - util/RsGxsUpdateBroadcast.cpp \ - -# gui/gxs/GxsMsgDialog.cpp \ - - -} +QT += network xml script +CONFIG += qt gui uic qrc resources idle bitdht + +# Plz never commit the .pro with these flags enabled. +# Use this flag when developping new features only. +# +#CONFIG += unfinished +#CONFIG += debug + +#QMAKE_CFLAGS += -fmudflap +#LIBS *= /usr/lib/gcc/x86_64-linux-gnu/4.4/libmudflap.a /usr/lib/gcc/x86_64-linux-gnu/4.4/libmudflapth.a + +greaterThan(QT_MAJOR_VERSION, 4) { + # Qt 5 + QT += uitools widgets multimedia printsupport + linux-* { + QT += x11extras + } +} else { + # Qt 4 + CONFIG += uitools +} + +CONFIG += identities +CONFIG += gxsforums +CONFIG += gxschannels +CONFIG += posted +CONFIG += gxsgui + +# Gxs is always enabled now. + +DEFINES += RS_ENABLE_GXS + +unfinished { + CONFIG += gxscircles + CONFIG += gxsthewire + CONFIG += gxsphotoshare + CONFIG += wikipoos +} + +# Other Disabled Bits. +#CONFIG += framecatcher +#CONFIG += blogs + +TEMPLATE = app +TARGET = RetroShare + +DEFINES += RS_RELEASE_VERSION +RCC_DIR = temp/qrc +UI_DIR = temp/ui +MOC_DIR = temp/moc + +#CONFIG += debug +debug { + QMAKE_CFLAGS += -g + QMAKE_CXXFLAGS -= -O2 + QMAKE_CXXFLAGS += -O0 + QMAKE_CFLAGS -= -O2 + QMAKE_CFLAGS += -O0 +} + +DEPENDPATH *= retroshare-gui +INCLUDEPATH *= retroshare-gui + +# treat warnings as error for better removing +#QMAKE_CFLAGS += -Werror +#QMAKE_CXXFLAGS += -Werror + +################################# Linux ########################################## +# Put lib dir in QMAKE_LFLAGS so it appears before -L/usr/lib +linux-* { + #CONFIG += version_detail_bash_script + QMAKE_CXXFLAGS *= -D_FILE_OFFSET_BITS=64 + + PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a + PRE_TARGETDEPS *= ../../openpgpsdk/src/lib/libops.a + + LIBS += ../../libretroshare/src/lib/libretroshare.a + LIBS += ../../openpgpsdk/src/lib/libops.a -lbz2 + LIBS += -lssl -lupnp -lixml -lXss -lgnome-keyring + LIBS *= -lcrypto -ldl -lX11 -lz + + LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a + + SQLCIPHER_OK = $$system(pkg-config --exists sqlcipher && echo yes) + isEmpty(SQLCIPHER_OK) { +# We need a explicit path here, to force using the home version of sqlite3 that really encrypts the database. + + exists(../../../lib/sqlcipher/.libs/libsqlcipher.a) { + + LIBS += ../../../lib/sqlcipher/.libs/libsqlcipher.a + DEPENDPATH += ../../../lib/sqlcipher/src/ + INCLUDEPATH += ../../../lib/sqlcipher/src/ + DEPENDPATH += ../../../lib/sqlcipher/tsrc/ + INCLUDEPATH += ../../../lib/sqlcipher/tsrc/ + } else { + message(libsqlcipher.a not found. Compilation will not use SQLCIPHER. Database will be unencrypted.) + DEFINES *= NO_SQLCIPHER + LIBS *= -lsqlite3 + } + + } else { + LIBS += -lsqlcipher + } + + LIBS *= -lglib-2.0 + LIBS *= -rdynamic + DEFINES *= HAVE_XSS # for idle time, libx screensaver extensions + DEFINES *= UBUNTU +} + +linux-g++ { + OBJECTS_DIR = temp/linux-g++/obj +} + +linux-g++-64 { + OBJECTS_DIR = temp/linux-g++-64/obj +} + +version_detail_bash_script { + DEFINES += ADD_LIBRETROSHARE_VERSION_INFO + QMAKE_EXTRA_TARGETS += write_version_detail + PRE_TARGETDEPS = write_version_detail + write_version_detail.commands = ./version_detail.sh +} + +install_rs { + INSTALLS += binary_rs + binary_rs.path = $$(PREFIX)/usr/bin + binary_rs.files = ./RetroShare +} + +#################### Cross compilation for windows under Linux ################### + +win32-x-g++ { + OBJECTS_DIR = temp/win32-x-g++/obj + + LIBS += ../../libretroshare/src/lib.win32xgcc/libretroshare.a + LIBS += ../../../../lib/win32-x-g++-v0.5/libssl.a + LIBS += ../../../../lib/win32-x-g++-v0.5/libcrypto.a + LIBS += ../../../../lib/win32-x-g++-v0.5/libgpgme.dll.a + LIBS += ../../../../lib/win32-x-g++-v0.5/libminiupnpc.a + LIBS += ../../../../lib/win32-x-g++-v0.5/libz.a + LIBS += -L${HOME}/.wine/drive_c/pthreads/lib -lpthreadGCE2 + LIBS += -lQtUiTools + LIBS += -lws2_32 -luuid -lole32 -liphlpapi -lcrypt32 -gdi32 + LIBS += -lole32 -lwinmm + + DEFINES *= WINDOWS_SYS WIN32 WIN32_CROSS_UBUNTU + + INCLUDEPATH += ../../../../gpgme-1.1.8/src/ + INCLUDEPATH += ../../../../libgpg-error-1.7/src/ + + RC_FILE = gui/images/retroshare_win.rc +} + +#################################### Windows ##################################### + +win32 { + debug { + # show console output + CONFIG += console + } + + # Switch on extra warnings + QMAKE_CFLAGS += -Wextra + QMAKE_CXXFLAGS += -Wextra + + # Switch off optimization for release version + QMAKE_CXXFLAGS_RELEASE -= -O2 + QMAKE_CXXFLAGS_RELEASE += -O0 + QMAKE_CFLAGS_RELEASE -= -O2 + QMAKE_CFLAGS_RELEASE += -O0 + + # Switch on optimization for debug version + #QMAKE_CXXFLAGS_DEBUG += -O2 + #QMAKE_CFLAGS_DEBUG += -O2 + + OBJECTS_DIR = temp/obj + #LIBS += -L"D/Qt/2009.03/qt/plugins/imageformats" + #QTPLUGIN += qjpeg + + PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a + PRE_TARGETDEPS *= ../../openpgpsdk/src/lib/libops.a + + LIBS_DIR = $$PWD/../../../libs + + LIBS += ../../libretroshare/src/lib/libretroshare.a + LIBS += ../../openpgpsdk/src/lib/libops.a -lbz2 + LIBS += -L"$$LIBS_DIR/lib" + + LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a + LIBS += -lsqlcipher + + LIBS += -lssl -lcrypto -lpthread -lminiupnpc -lz +# added after bitdht +# LIBS += -lws2_32 + LIBS += -luuid -lole32 -liphlpapi -lcrypt32 -lgdi32 + LIBS += -lole32 -lwinmm + RC_FILE = gui/images/retroshare_win.rc + + # export symbols for the plugins + LIBS += -Wl,--export-all-symbols,--out-implib,lib/libretroshare-gui.a + + # create lib directory + QMAKE_PRE_LINK = $(CHK_DIR_EXISTS) lib $(MKDIR) lib + + DEFINES *= WINDOWS_SYS WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T + + DEPENDPATH += . + INCLUDEPATH += . + + DEPENDPATH += $$LIBS_DIR/include + INCLUDEPATH += $$LIBS_DIR/include + + greaterThan(QT_MAJOR_VERSION, 4) { + # Qt 5 + RC_INCLUDEPATH += $$_PRO_FILE_PWD_/../../libretroshare/src + } else { + # Qt 4 + QMAKE_RC += --include-dir=$$_PRO_FILE_PWD_/../../libretroshare/src + } +} + +##################################### MacOS ###################################### + +macx { + # ENABLE THIS OPTION FOR Univeral Binary BUILD. + CONFIG += ppc x86 + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 + + CONFIG += version_detail_bash_script + LIBS += ../../libretroshare/src/lib/libretroshare.a + LIBS += ../../openpgpsdk/src/lib/libops.a -lbz2 + LIBS += -lssl -lcrypto -lz + #LIBS += -lssl -lcrypto -lz -lgpgme -lgpg-error -lassuan + LIBS += ../../../miniupnpc-1.0/libminiupnpc.a + LIBS += -framework CoreFoundation + LIBS += -framework Security + + LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a + + LIBS += ../../../lib/libsqlcipher.a + #LIBS += -lsqlite3 + + INCLUDEPATH += . + #DEFINES* = MAC_IDLE # for idle feature + CONFIG -= uitools +} + +##################################### FreeBSD ###################################### + +freebsd-* { + INCLUDEPATH *= /usr/local/include/gpgme + LIBS *= ../../libretroshare/src/lib/libretroshare.a + LIBS *= -lssl + LIBS *= -lgpgme + LIBS *= -lupnp + LIBS *= -lgnome-keyring + PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a + + LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a + LIBS += -lsqlite3 +} + +##################################### OpenBSD ###################################### + +openbsd-* { + INCLUDEPATH *= /usr/local/include + + PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a + PRE_TARGETDEPS *= ../../openpgpsdk/src/lib/libops.a + + LIBS *= ../../libretroshare/src/lib/libretroshare.a + LIBS *= ../../openpgpsdk/src/lib/libops.a -lbz2 + LIBS *= -lssl -lcrypto + LIBS *= -lgpgme + LIBS *= -lupnp + LIBS *= -lgnome-keyring + PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a + + LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a + LIBS += -lsqlite3 + + LIBS *= -rdynamic +} + + + +############################## Common stuff ###################################### + +# On Linux systems that alredy have libssl and libcrypto it is advisable +# to rename the patched version of SSL to something like libsslxpgp.a and libcryptoxpg.a + +# ########################################### + +bitdht { + LIBS += ../../libbitdht/src/lib/libbitdht.a + PRE_TARGETDEPS *= ../../libbitdht/src/lib/libbitdht.a +} + +DEPENDPATH += . ../../libretroshare/src/ +INCLUDEPATH += ../../libretroshare/src/ + +# webinterface +DEPENDPATH += ../../libresapi/src +INCLUDEPATH += ../../libresapi/src +PRE_TARGETDEPS *= ../../libresapi/src/lib/libresapi.a +LIBS += ../../libresapi/src/lib/libresapi.a -lmicrohttpd + +win32 { +# must be added after bitdht + LIBS += -lws2_32 +} + +# Input +HEADERS += rshare.h \ + retroshare-gui/configpage.h \ + retroshare-gui/RsAutoUpdatePage.h \ + retroshare-gui/mainpage.h \ + gui/notifyqt.h \ + control/bandwidthevent.h \ + control/eventtype.h \ + gui/QuickStartWizard.h \ + gui/StartDialog.h \ + gui/NetworkDialog.h \ + gui/GenCertDialog.h \ + gui/linetypes.h \ + gui/mainpagestack.h \ + gui/MainWindow.h \ + gui/RSHumanReadableDelegate.h \ + gui/AboutDialog.h \ + gui/NetworkView.h \ + gui/MessengerWindow.h \ + gui/FriendsDialog.h \ + gui/ServicePermissionDialog.h \ + gui/RemoteDirModel.h \ + gui/RetroShareLink.h \ + gui/SearchTreeWidget.h \ + gui/SearchDialog.h \ + gui/SharedFilesDialog.h \ + gui/ShareManager.h \ + gui/ShareDialog.h \ + gui/SFListDelegate.h \ + gui/SoundManager.h \ + gui/HelpDialog.h \ + gui/LogoBar.h \ + gui/common/AvatarDialog.h \ + gui/FileTransfer/xprogressbar.h \ + gui/FileTransfer/DetailsDialog.h \ + gui/FileTransfer/FileTransferInfoWidget.h \ + gui/FileTransfer/DLListDelegate.h \ + gui/FileTransfer/ULListDelegate.h \ + gui/FileTransfer/TransfersDialog.h \ + gui/statistics/TurtleRouterDialog.h \ + gui/statistics/TurtleRouterStatistics.h \ + gui/statistics/dhtgraph.h \ + gui/statistics/bwgraph.h \ + gui/statistics/turtlegraph.h \ + gui/FileTransfer/TransferUserNotify.h \ + gui/plugins/PluginInterface.h \ + gui/im_history/ImHistoryBrowser.h \ + gui/im_history/IMHistoryItemDelegate.h \ + gui/im_history/IMHistoryItemPainter.h \ + lang/languagesupport.h \ + util/RsProtectedTimer.h \ + util/stringutil.h \ + util/DateTime.h \ + util/win32.h \ + util/RetroStyleLabel.h \ + util/dllexport.h \ + util/NonCopyable.h \ + util/rsutildll.h \ + util/dllexport.h \ + util/global.h \ + util/rsqtutildll.h \ + util/Interface.h \ + util/PixmapMerging.h \ + util/MouseEventFilter.h \ + util/EventFilter.h \ + util/EventReceiver.h \ + util/Widget.h \ + util/RsAction.h \ + util/RsUserdata.h \ + util/printpreview.h \ + util/log.h \ + util/misc.h \ + util/HandleRichText.h \ + util/ObjectPainter.h \ + util/QtVersion.h \ + util/RsFile.h \ + gui/bwgraph/BandwidthGraphWindow.h \ + gui/profile/ProfileWidget.h \ + gui/profile/ProfileManager.h \ + gui/profile/StatusMessage.h \ + gui/chat/PopupChatWindow.h \ + gui/chat/PopupChatDialog.h \ + gui/chat/PopupDistantChatDialog.h \ + gui/chat/ChatTabWidget.h \ + gui/chat/ChatWidget.h \ + gui/chat/ChatDialog.h \ + gui/ChatLobbyWidget.h \ + gui/chat/ChatLobbyDialog.h \ + gui/chat/CreateLobbyDialog.h \ + gui/chat/ChatStyle.h \ + gui/chat/ChatUserNotify.h \ + gui/chat/ChatLobbyUserNotify.h \ + gui/connect/ConfCertDialog.h \ + gui/connect/PGPKeyDialog.h \ + gui/msgs/MessageInterface.h \ + gui/msgs/MessageComposer.h \ + gui/msgs/MessageWindow.h \ + gui/msgs/MessageWidget.h \ + gui/msgs/TagsMenu.h \ + gui/msgs/textformat.h \ + gui/msgs/MessageUserNotify.h \ + gui/images/retroshare_win.rc.h \ + gui/settings/RSPermissionMatrixWidget.h \ + gui/settings/rsharesettings.h \ + gui/settings/RsharePeerSettings.h \ + gui/settings/rsettings.h \ + gui/settings/rsettingswin.h \ + gui/settings/GeneralPage.h \ + gui/settings/DirectoriesPage.h \ + gui/settings/ServerPage.h \ + gui/settings/NetworkPage.h \ + gui/settings/NotifyPage.h \ + gui/settings/CryptoPage.h \ + gui/settings/MessagePage.h \ + gui/settings/NewTag.h \ + gui/settings/ForumPage.h \ + gui/settings/PluginsPage.h \ + gui/settings/PluginItem.h \ + gui/settings/AppearancePage.h \ + gui/settings/FileAssociationsPage.h \ + gui/settings/SoundPage.h \ + gui/settings/TransferPage.h \ + gui/settings/ChatPage.h \ + gui/settings/ChannelPage.h \ + gui/settings/PostedPage.h \ + gui/settings/RelayPage.h \ + gui/settings/ServicePermissionsPage.h \ + gui/settings/AddFileAssociationDialog.h \ + gui/settings/GroupFrameSettingsWidget.h \ + gui/toaster/ToasterItem.h \ + gui/toaster/MessageToaster.h \ + gui/toaster/OnlineToaster.h \ + gui/toaster/DownloadToaster.h \ + gui/toaster/ChatToaster.h \ + gui/toaster/GroupChatToaster.h \ + gui/toaster/ChatLobbyToaster.h \ + gui/toaster/FriendRequestToaster.h \ + gui/common/RsButtonOnText.h \ + gui/common/RSGraphWidget.h \ + gui/common/ElidedLabel.h \ + gui/common/vmessagebox.h \ + gui/common/RsUrlHandler.h \ + gui/common/RsCollectionFile.h \ + gui/common/RsCollectionDialog.h \ + gui/common/rwindow.h \ + gui/common/html.h \ + gui/common/AvatarDefs.h \ + gui/common/GroupFlagsWidget.h \ + gui/common/GroupSelectionBox.h \ + gui/common/StatusDefs.h \ + gui/common/TagDefs.h \ + gui/common/GroupDefs.h \ + gui/common/Emoticons.h \ + gui/common/RSListWidgetItem.h \ + gui/common/RSTextEdit.h \ + gui/common/RSPlainTextEdit.h \ + gui/common/RSTreeWidget.h \ + gui/common/RSTreeWidgetItem.h \ + gui/common/RSFeedWidget.h \ + gui/common/RSTabWidget.h \ + gui/common/RSItemDelegate.h \ + gui/common/PeerDefs.h \ + gui/common/FilesDefs.h \ + gui/common/PopularityDefs.h \ + gui/common/GroupTreeWidget.h \ + gui/common/RSTreeView.h \ + gui/common/AvatarWidget.h \ + gui/common/FriendList.h \ + gui/common/FriendSelectionWidget.h \ + gui/common/FriendSelectionDialog.h \ + gui/common/HashBox.h \ + gui/common/LineEditClear.h \ + gui/common/DropLineEdit.h \ + gui/common/RSTextBrowser.h \ + gui/common/RSImageBlockWidget.h \ + gui/common/FeedNotify.h \ + gui/common/UserNotify.h \ + gui/common/HeaderFrame.h \ + gui/common/MimeTextEdit.h \ + gui/common/UIStateHelper.h \ + gui/common/FloatingHelpBrowser.h \ + gui/common/SubscribeToolButton.h \ + gui/common/FlowLayout.h \ + gui/common/PictureFlow.h \ + gui/common/StyledLabel.h \ + gui/common/StyledElidedLabel.h \ + gui/common/ToasterNotify.h \ + gui/style/RSStyle.h \ + gui/style/StyleDialog.h \ + gui/MessagesDialog.h \ + gui/help/browser/helpbrowser.h \ + gui/help/browser/helptextbrowser.h \ + gui/statusbar/peerstatus.h \ + gui/statusbar/natstatus.h \ + gui/statusbar/dhtstatus.h \ + gui/statusbar/ratesstatus.h \ + gui/statusbar/hashingstatus.h \ + gui/statusbar/discstatus.h \ + gui/statusbar/SoundStatus.h \ + gui/statusbar/OpModeStatus.h \ + gui/statusbar/ToasterDisable.h \ + gui/statusbar/SysTrayStatus.h \ + gui/advsearch/advancedsearchdialog.h \ + gui/advsearch/expressionwidget.h \ + gui/advsearch/guiexprelement.h \ + gui/elastic/graphwidget.h \ + gui/elastic/edge.h \ + gui/elastic/arrow.h \ + gui/elastic/node.h \ + gui/NewsFeed.h \ + gui/feeds/FeedItem.h \ + gui/feeds/FeedHolder.h \ + gui/feeds/PeerItem.h \ + gui/feeds/MsgItem.h \ + gui/feeds/ChatMsgItem.h \ + gui/feeds/SubFileItem.h \ + gui/feeds/AttachFileItem.h \ + gui/feeds/SecurityItem.h \ + gui/feeds/NewsFeedUserNotify.h \ + gui/connect/ConnectFriendWizard.h \ + gui/connect/ConnectProgressDialog.h \ + gui/groups/CreateGroup.h \ + gui/GetStartedDialog.h \ + gui/statistics/DhtWindow.h \ + gui/statistics/GlobalRouterStatistics.h \ + gui/statistics/StatisticsWindow.h \ + gui/statistics/BwCtrlWindow.h \ + gui/statistics/RttStatistics.h \ + gui/statistics/OutQueueStatistics.h \ + gui/settings/WebuiPage.h + +# gui/ForumsDialog.h \ +# gui/forums/ForumDetails.h \ +# gui/forums/EditForumDetails.h \ +# gui/forums/CreateForum.h \ +# gui/forums/CreateForumMsg.h \ +# gui/forums/ForumUserNotify.h \ +# gui/feeds/ForumNewItem.h \ +# gui/feeds/ForumMsgItem.h \ +# gui/ChannelFeed.h \ +# gui/feeds/ChanNewItem.h \ +# gui/feeds/ChanMsgItem.h \ +# gui/channels/CreateChannel.h \ +# gui/channels/ChannelDetails.h \ +# gui/channels/CreateChannelMsg.h \ +# gui/channels/EditChanDetails.h \ +# gui/channels/ChannelUserNotify.h \ + +FORMS += gui/StartDialog.ui \ + gui/GenCertDialog.ui \ + gui/AboutDialog.ui \ + gui/QuickStartWizard.ui \ + gui/NetworkDialog.ui \ + gui/common/AvatarDialog.ui \ + gui/FileTransfer/TransfersDialog.ui \ + gui/FileTransfer/DetailsDialog.ui \ + gui/MainWindow.ui \ + gui/NetworkView.ui \ + gui/MessengerWindow.ui \ + gui/FriendsDialog.ui \ + gui/SearchDialog.ui \ + gui/SharedFilesDialog.ui \ + gui/ShareManager.ui \ + gui/ShareDialog.ui \ + gui/MessagesDialog.ui \ + gui/help/browser/helpbrowser.ui \ + gui/HelpDialog.ui \ + gui/ServicePermissionDialog.ui \ + gui/bwgraph/BandwidthGraphWindow.ui \ + gui/profile/ProfileWidget.ui \ + gui/profile/StatusMessage.ui \ + gui/profile/ProfileManager.ui \ + gui/chat/PopupChatWindow.ui \ + gui/chat/PopupChatDialog.ui \ + gui/chat/ChatTabWidget.ui \ + gui/chat/ChatWidget.ui \ + gui/chat/ChatLobbyDialog.ui \ + gui/chat/CreateLobbyDialog.ui \ + gui/ChatLobbyWidget.ui \ + gui/connect/ConfCertDialog.ui \ + gui/connect/PGPKeyDialog.ui \ + gui/connect/ConnectFriendWizard.ui \ + gui/connect/ConnectProgressDialog.ui \ + gui/msgs/MessageComposer.ui \ + gui/msgs/MessageWindow.ui\ + gui/msgs/MessageWidget.ui\ + gui/settings/settings.ui \ + gui/settings/GeneralPage.ui \ + gui/settings/DirectoriesPage.ui \ + gui/settings/ServerPage.ui \ + gui/settings/NetworkPage.ui \ + gui/settings/NotifyPage.ui \ + gui/settings/CryptoPage.ui \ + gui/settings/MessagePage.ui \ + gui/settings/NewTag.ui \ + gui/settings/ForumPage.ui \ + gui/settings/PluginsPage.ui \ + gui/settings/AppearancePage.ui \ + gui/settings/TransferPage.ui \ + gui/settings/SoundPage.ui \ + gui/settings/ChatPage.ui \ + gui/settings/ChannelPage.ui \ + gui/settings/PostedPage.ui \ + gui/settings/RelayPage.ui \ + gui/settings/ServicePermissionsPage.ui \ + gui/settings/PluginItem.ui \ + gui/settings/GroupFrameSettingsWidget.ui \ + gui/toaster/MessageToaster.ui \ + gui/toaster/OnlineToaster.ui \ + gui/toaster/DownloadToaster.ui \ + gui/toaster/ChatToaster.ui \ + gui/toaster/GroupChatToaster.ui \ + gui/toaster/ChatLobbyToaster.ui \ + gui/toaster/FriendRequestToaster.ui \ + gui/advsearch/AdvancedSearchDialog.ui \ + gui/advsearch/expressionwidget.ui \ + gui/NewsFeed.ui \ + gui/feeds/PeerItem.ui \ + gui/feeds/MsgItem.ui \ + gui/feeds/ChatMsgItem.ui \ + gui/feeds/SubFileItem.ui \ + gui/feeds/AttachFileItem.ui \ + gui/feeds/SecurityItem.ui \ + gui/im_history/ImHistoryBrowser.ui \ + gui/groups/CreateGroup.ui \ + gui/common/GroupTreeWidget.ui \ + gui/common/AvatarWidget.ui \ + gui/common/FriendList.ui \ + gui/common/FriendSelectionWidget.ui \ + gui/common/HashBox.ui \ + gui/common/RSImageBlockWidget.ui \ + gui/common/RsCollectionDialog.ui \ + gui/common/HeaderFrame.ui \ + gui/common/RSFeedWidget.ui \ + gui/style/StyleDialog.ui \ + gui/statistics/DhtWindow.ui \ + gui/statistics/TurtleRouterDialog.ui \ + gui/statistics/TurtleRouterStatistics.ui \ + gui/statistics/GlobalRouterStatistics.ui \ + gui/statistics/StatisticsWindow.ui \ + gui/statistics/BwCtrlWindow.ui \ + gui/statistics/RttStatistics.ui \ + gui/GetStartedDialog.ui \ + gui/settings/WebuiPage.ui + +# gui/ForumsDialog.ui \ +# gui/forums/CreateForum.ui \ +# gui/forums/CreateForumMsg.ui \ +# gui/forums/ForumDetails.ui \ +# gui/forums/EditForumDetails.ui \ +# gui/feeds/ForumNewItem.ui \ +# gui/feeds/ForumMsgItem.ui \ +# gui/ChannelFeed.ui \ +# gui/channels/CreateChannel.ui \ +# gui/channels/CreateChannelMsg.ui \ +# gui/channels/ChannelDetails.ui \ +# gui/channels/EditChanDetails.ui \ +# gui/feeds/ChanNewItem.ui \ +# gui/feeds/ChanMsgItem.ui \ + +SOURCES += main.cpp \ + rshare.cpp \ + gui/notifyqt.cpp \ + gui/AboutDialog.cpp \ + gui/QuickStartWizard.cpp \ + gui/StartDialog.cpp \ + gui/GenCertDialog.cpp \ + gui/NetworkDialog.cpp \ + gui/mainpagestack.cpp \ + gui/MainWindow.cpp \ + gui/NetworkView.cpp \ + gui/MessengerWindow.cpp \ + gui/FriendsDialog.cpp \ + gui/ServicePermissionDialog.cpp \ + gui/RemoteDirModel.cpp \ + gui/RsAutoUpdatePage.cpp \ + gui/RetroShareLink.cpp \ + gui/SearchTreeWidget.cpp \ + gui/SearchDialog.cpp \ + gui/SharedFilesDialog.cpp \ + gui/ShareManager.cpp \ + gui/ShareDialog.cpp \ + gui/SFListDelegate.cpp \ + gui/SoundManager.cpp \ + gui/MessagesDialog.cpp \ + gui/im_history/ImHistoryBrowser.cpp \ + gui/im_history/IMHistoryItemDelegate.cpp \ + gui/im_history/IMHistoryItemPainter.cpp \ + gui/help/browser/helpbrowser.cpp \ + gui/help/browser/helptextbrowser.cpp \ + gui/FileTransfer/TransfersDialog.cpp \ + gui/FileTransfer/FileTransferInfoWidget.cpp \ + gui/FileTransfer/DLListDelegate.cpp \ + gui/FileTransfer/ULListDelegate.cpp \ + gui/FileTransfer/xprogressbar.cpp \ + gui/FileTransfer/DetailsDialog.cpp \ + gui/FileTransfer/TransferUserNotify.cpp \ + gui/MainPage.cpp \ + gui/HelpDialog.cpp \ + gui/LogoBar.cpp \ + lang/languagesupport.cpp \ + util/RsProtectedTimer.cpp \ + util/stringutil.cpp \ + util/DateTime.cpp \ + util/win32.cpp \ + util/RetroStyleLabel.cpp \ + util/WidgetBackgroundImage.cpp \ + util/NonCopyable.cpp \ + util/PixmapMerging.cpp \ + util/MouseEventFilter.cpp \ + util/EventFilter.cpp \ + util/EventReceiver.cpp \ + util/Widget.cpp \ + util/RsAction.cpp \ + util/printpreview.cpp \ + util/log.cpp \ + util/misc.cpp \ + util/HandleRichText.cpp \ + util/ObjectPainter.cpp \ + util/RsFile.cpp \ + gui/bwgraph/BandwidthGraphWindow.cpp \ + gui/profile/ProfileWidget.cpp \ + gui/profile/StatusMessage.cpp \ + gui/profile/ProfileManager.cpp \ + gui/chat/PopupChatWindow.cpp \ + gui/chat/PopupChatDialog.cpp \ + gui/chat/PopupDistantChatDialog.cpp \ + gui/chat/ChatTabWidget.cpp \ + gui/chat/ChatWidget.cpp \ + gui/chat/ChatDialog.cpp \ + gui/ChatLobbyWidget.cpp \ + gui/chat/ChatLobbyDialog.cpp \ + gui/chat/CreateLobbyDialog.cpp \ + gui/chat/ChatStyle.cpp \ + gui/chat/ChatUserNotify.cpp \ + gui/chat/ChatLobbyUserNotify.cpp \ + gui/connect/ConfCertDialog.cpp \ + gui/connect/PGPKeyDialog.cpp \ + gui/msgs/MessageComposer.cpp \ + gui/msgs/MessageWidget.cpp \ + gui/msgs/MessageWindow.cpp \ + gui/msgs/TagsMenu.cpp \ + gui/msgs/MessageUserNotify.cpp \ + gui/common/RsButtonOnText.cpp \ + gui/common/RSGraphWidget.cpp \ + gui/common/ElidedLabel.cpp \ + gui/common/vmessagebox.cpp \ + gui/common/RsCollectionFile.cpp \ + gui/common/RsCollectionDialog.cpp \ + gui/common/RsUrlHandler.cpp \ + gui/common/rwindow.cpp \ + gui/common/html.cpp \ + gui/common/AvatarDefs.cpp \ + gui/common/AvatarDialog.cpp \ + gui/common/GroupFlagsWidget.cpp \ + gui/common/GroupSelectionBox.cpp \ + gui/common/StatusDefs.cpp \ + gui/common/TagDefs.cpp \ + gui/common/GroupDefs.cpp \ + gui/common/Emoticons.cpp \ + gui/common/RSListWidgetItem.cpp \ + gui/common/RSTextEdit.cpp \ + gui/common/RSPlainTextEdit.cpp \ + gui/common/RSTreeWidget.cpp \ + gui/common/RSTreeWidgetItem.cpp \ + gui/common/RSFeedWidget.cpp \ + gui/common/RSTabWidget.cpp \ + gui/common/RSItemDelegate.cpp \ + gui/common/PeerDefs.cpp \ + gui/common/FilesDefs.cpp \ + gui/common/PopularityDefs.cpp \ + gui/common/GroupTreeWidget.cpp \ + gui/common/RSTreeView.cpp \ + gui/common/AvatarWidget.cpp \ + gui/common/FriendList.cpp \ + gui/common/FriendSelectionWidget.cpp \ + gui/common/FriendSelectionDialog.cpp \ + gui/common/HashBox.cpp \ + gui/common/LineEditClear.cpp \ + gui/common/DropLineEdit.cpp \ + gui/common/RSTextBrowser.cpp \ + gui/common/RSImageBlockWidget.cpp \ + gui/common/FeedNotify.cpp \ + gui/common/UserNotify.cpp \ + gui/common/HeaderFrame.cpp \ + gui/common/MimeTextEdit.cpp \ + gui/common/UIStateHelper.cpp \ + gui/common/FloatingHelpBrowser.cpp \ + gui/common/SubscribeToolButton.cpp \ + gui/common/FlowLayout.cpp \ + gui/common/PictureFlow.cpp \ + gui/common/StyledLabel.cpp \ + gui/common/StyledElidedLabel.cpp \ + gui/common/ToasterNotify.cpp \ + gui/style/RSStyle.cpp \ + gui/style/StyleDialog.cpp \ + gui/settings/RSPermissionMatrixWidget.cpp \ + gui/settings/rsharesettings.cpp \ + gui/settings/RsharePeerSettings.cpp \ + gui/settings/rsettings.cpp \ + gui/settings/rsettingswin.cpp \ + gui/settings/GeneralPage.cpp \ + gui/settings/DirectoriesPage.cpp \ + gui/settings/ServerPage.cpp \ + gui/settings/NetworkPage.cpp \ + gui/settings/NotifyPage.cpp \ + gui/settings/CryptoPage.cpp \ + gui/settings/MessagePage.cpp \ + gui/settings/NewTag.cpp \ + gui/settings/ForumPage.cpp \ + gui/settings/PluginsPage.cpp \ + gui/settings/PluginItem.cpp \ + gui/settings/AppearancePage.cpp \ + gui/settings/FileAssociationsPage.cpp \ + gui/settings/SoundPage.cpp \ + gui/settings/TransferPage.cpp \ + gui/settings/ChatPage.cpp \ + gui/settings/ChannelPage.cpp \ + gui/settings/PostedPage.cpp \ + gui/settings/RelayPage.cpp \ + gui/settings/ServicePermissionsPage.cpp \ + gui/settings/AddFileAssociationDialog.cpp \ + gui/settings/GroupFrameSettingsWidget.cpp \ + gui/statusbar/peerstatus.cpp \ + gui/statusbar/natstatus.cpp \ + gui/statusbar/dhtstatus.cpp \ + gui/statusbar/ratesstatus.cpp \ + gui/statusbar/hashingstatus.cpp \ + gui/statusbar/discstatus.cpp \ + gui/statusbar/SoundStatus.cpp \ + gui/statusbar/OpModeStatus.cpp \ + gui/statusbar/ToasterDisable.cpp \ + gui/statusbar/SysTrayStatus.cpp \ + gui/toaster/ToasterItem.cpp \ + gui/toaster/MessageToaster.cpp \ + gui/toaster/DownloadToaster.cpp \ + gui/toaster/OnlineToaster.cpp \ + gui/toaster/ChatToaster.cpp \ + gui/toaster/GroupChatToaster.cpp \ + gui/toaster/ChatLobbyToaster.cpp \ + gui/toaster/FriendRequestToaster.cpp \ + gui/advsearch/advancedsearchdialog.cpp \ + gui/advsearch/expressionwidget.cpp \ + gui/advsearch/guiexprelement.cpp \ + gui/elastic/graphwidget.cpp \ + gui/elastic/edge.cpp \ + gui/elastic/arrow.cpp \ + gui/elastic/node.cpp \ + gui/NewsFeed.cpp \ + gui/feeds/FeedItem.cpp \ + gui/feeds/FeedHolder.cpp \ + gui/feeds/PeerItem.cpp \ + gui/feeds/MsgItem.cpp \ + gui/feeds/ChatMsgItem.cpp \ + gui/feeds/SubFileItem.cpp \ + gui/feeds/AttachFileItem.cpp \ + gui/feeds/SecurityItem.cpp \ + gui/feeds/NewsFeedUserNotify.cpp \ + gui/connect/ConnectFriendWizard.cpp \ + gui/connect/ConnectProgressDialog.cpp \ + gui/groups/CreateGroup.cpp \ + gui/GetStartedDialog.cpp \ + gui/statistics/DhtWindow.cpp \ + gui/statistics/TurtleRouterDialog.cpp \ + gui/statistics/TurtleRouterStatistics.cpp \ + gui/statistics/GlobalRouterStatistics.cpp \ + gui/statistics/OutQueueStatistics.cpp \ + gui/statistics/StatisticsWindow.cpp \ + gui/statistics/BwCtrlWindow.cpp \ + gui/statistics/RttStatistics.cpp \ + gui/settings/WebuiPage.cpp + +# gui/ForumsDialog.cpp \ +# gui/forums/ForumDetails.cpp \ +# gui/forums/EditForumDetails.cpp \ +# gui/forums/CreateForum.cpp \ +# gui/forums/CreateForumMsg.cpp \ +# gui/forums/ForumUserNotify.cpp \ +# gui/feeds/ForumNewItem.cpp \ +# gui/feeds/ForumMsgItem.cpp \ +# gui/ChannelFeed.cpp \ +# gui/channels/CreateChannel.cpp \ +# gui/channels/CreateChannelMsg.cpp \ +# gui/channels/ChannelDetails.cpp \ +# gui/channels/EditChanDetails.cpp \ +# gui/channels/ChannelUserNotify.cpp \ +# gui/feeds/ChanNewItem.cpp \ +# gui/feeds/ChanMsgItem.cpp \ + +RESOURCES += gui/images.qrc lang/lang.qrc gui/help/content/content.qrc + +TRANSLATIONS += \ + lang/retroshare_ca_ES.ts \ + lang/retroshare_cs.ts \ + lang/retroshare_da.ts \ + lang/retroshare_de.ts \ + lang/retroshare_el.ts \ + lang/retroshare_en.ts \ + lang/retroshare_es.ts \ + lang/retroshare_fi.ts \ + lang/retroshare_fr.ts \ + lang/retroshare_hu.ts \ + lang/retroshare_it.ts \ + lang/retroshare_ja_JP.ts \ + lang/retroshare_nl.ts \ + lang/retroshare_ko.ts \ + lang/retroshare_pl.ts \ + lang/retroshare_ru.ts \ + lang/retroshare_sv.ts \ + lang/retroshare_tr.ts \ + lang/retroshare_zh_CN.ts + +unfinishedtranslations { + + TRANSLATIONS += \ + lang/retroshare_bg.ts \ + lang/retroshare_af.ts \ + lang/retroshare_pt.ts \ + lang/retroshare_sl.ts \ + lang/retroshare_sr.ts \ + lang/retroshare_zh_TW.ts + +} + +# Shifted Qt4.4 dependancies to here. +# qmake CONFIG=pluginmgr + +pluginmgr { + + SOURCES += gui/PluginsPage.cpp \ + gui/PluginManagerWidget.cpp \ + gui/PluginManager.cpp + + HEADERS += gui/PluginsPage.h \ + gui/PluginManagerWidget.h \ + gui/PluginManager.h + + DEFINES *= PLUGINMGR + +} + +#blogs { +# +#DEPENDPATH += gui/unfinished \ +# +#HEADERS += gui/unfinished/blogs/BlogsDialog.h \ +# gui/unfinished/blogs/CreateBlog.h \ +# gui/unfinished/blogs/CreateBlogMsg.h \ +# gui/unfinished/blogs/BlogsMsgItem.h \ +# gui/unfinished/blogs/BlogDetails.h \ +# gui/feeds/BlogNewItem.h \ +# gui/feeds/BlogMsgItem.h \ +# +#FORMS += gui/unfinished/blogs/BlogsDialog.ui \ +# gui/unfinished/blogs/CreateBlog.ui \ +# gui/unfinished/blogs/CreateBlogMsg.ui \ +# gui/unfinished/blogs/BlogsMsgItem.ui \ +# gui/unfinished/blogs/BlogDetails.ui \ +# gui/feeds/BlogNewItem.ui \ +# gui/feeds/BlogMsgItem.ui \ +# +#SOURCES += gui/unfinished/blogs/BlogsDialog.cpp \ +# gui/unfinished/blogs/CreateBlog.cpp \ +# gui/unfinished/blogs/CreateBlogMsg.cpp \ +# gui/unfinished/blogs/BlogsMsgItem.cpp \ +# gui/unfinished/blogs/BlogDetails.cpp \ +# gui/feeds/BlogNewItem.cpp \ +# gui/feeds/BlogMsgItem.cpp \ +# +#DEFINES += BLOGS +#} + +# use_links { +# HEADERS += gui/AddLinksDialog.h \ +# gui/LinksDialog.h +# +# FORMS += gui/AddLinksDialog.ui \ +# gui/LinksDialog.ui +# +# SOURCES += gui/AddLinksDialog.cpp \ +# gui/LinksDialog.cpp +# +# DEFINES += RS_USE_LINKS +# } + + +idle { + +HEADERS += idle/idle.h + +SOURCES += idle/idle.cpp \ + idle/idle_platform.cpp +} + +framecatcher { + +HEADERS += util/framecatcher.h + +SOURCES += util/framecatcher.cpp + +LIBS += -lxine + +DEFINES *= CHANNELS_FRAME_CATCHER + +} + + +# BELOW IS GXS Unfinished Services. + +unfinished_services { + + DEPENDPATH += gui/unfinished \ + + HEADERS += gui/unfinished/ApplicationWindow.h \ + +# gui/unfinished/CalDialog.h \ +# gui/unfinished/ExampleDialog.h \ +# gui/unfinished/GamesDialog.h \ +# gui/unfinished/profile/ProfileView.h \ +# gui/unfinished/profile/ProfileEdit.h +# gui/unfinished/StatisticDialog.h \ +# gui/unfinished/PhotoDialog.h \ +# gui/unfinished/PhotoShow.h \ + + FORMS += gui/unfinished/ApplicationWindow.ui \ + +# gui/unfinished/CalDialog.ui \ +# gui/unfinished/ExampleDialog.ui \ +# gui/unfinished/GamesDialog.ui \ +# gui/unfinished/profile/ProfileView.ui \ +# gui/unfinished/profile/ProfileEdit.ui +# gui/unfinished/StatisticDialog.ui \ +# gui/unfinished/PhotoDialog.ui \ +# gui/unfinished/PhotoShow.ui \ + + SOURCES += gui/unfinished/ApplicationWindow.cpp \ + +# gui/unfinished/CalDialog.cpp \ +# gui/unfinished/ExampleDialog.cpp \ +# gui/unfinished/GamesDialog.cpp \ +# gui/unfinished/profile/ProfileView.cpp \ +# gui/unfinished/profile/ProfileEdit.cpp +# gui/unfinished/StatisticDialog.cpp \ +# gui/unfinished/PhotoDialog.cpp \ +# gui/unfinished/PhotoShow.cpp \ + + DEFINES *= UNFINISHED +} + + +gxsphotoshare { + #DEFINES += RS_USE_PHOTOSHARE + + HEADERS += \ + gui/PhotoShare/PhotoDrop.h \ + gui/PhotoShare/AlbumItem.h \ + gui/PhotoShare/AlbumDialog.h \ + gui/PhotoShare/AlbumCreateDialog.h \ + gui/PhotoShare/PhotoItem.h \ + gui/PhotoShare/PhotoShareItemHolder.h \ + gui/PhotoShare/PhotoShare.h \ + gui/PhotoShare/PhotoSlideShow.h \ + gui/PhotoShare/PhotoDialog.h \ + gui/PhotoShare/PhotoCommentItem.h \ + gui/PhotoShare/AddCommentDialog.h + + FORMS += \ + gui/PhotoShare/PhotoItem.ui \ + gui/PhotoShare/PhotoDialog.ui \ + gui/PhotoShare/AlbumItem.ui \ + gui/PhotoShare/AlbumDialog.ui \ + gui/PhotoShare/AlbumCreateDialog.ui \ + gui/PhotoShare/PhotoShare.ui \ + gui/PhotoShare/PhotoSlideShow.ui \ + gui/PhotoShare/PhotoCommentItem.ui \ + gui/PhotoShare/AddCommentDialog.ui + + SOURCES += \ + gui/PhotoShare/PhotoItem.cpp \ + gui/PhotoShare/PhotoDialog.cpp \ + gui/PhotoShare/PhotoDrop.cpp \ + gui/PhotoShare/AlbumItem.cpp \ + gui/PhotoShare/AlbumDialog.cpp \ + gui/PhotoShare/AlbumCreateDialog.cpp \ + gui/PhotoShare/PhotoShareItemHolder.cpp \ + gui/PhotoShare/PhotoShare.cpp \ + gui/PhotoShare/PhotoSlideShow.cpp \ + gui/PhotoShare/PhotoCommentItem.cpp \ + gui/PhotoShare/AddCommentDialog.cpp + + RESOURCES += gui/PhotoShare/Photo_images.qrc + +} + + +wikipoos { + + DEPENDPATH += ../../supportlibs/pegmarkdown + INCLUDEPATH += ../../supportlibs/pegmarkdown + + HEADERS += gui/WikiPoos/WikiDialog.h \ + gui/WikiPoos/WikiAddDialog.h \ + gui/WikiPoos/WikiEditDialog.h \ + + FORMS += gui/WikiPoos/WikiDialog.ui \ + gui/WikiPoos/WikiAddDialog.ui \ + gui/WikiPoos/WikiEditDialog.ui \ + + SOURCES += gui/WikiPoos/WikiDialog.cpp \ + gui/WikiPoos/WikiAddDialog.cpp \ + gui/WikiPoos/WikiEditDialog.cpp \ + + RESOURCES += gui/WikiPoos/Wiki_images.qrc + + DEFINES *= RS_USE_WIKI +} + + + +gxsthewire { + + HEADERS += gui/TheWire/PulseItem.h \ + gui/TheWire/WireDialog.h \ + gui/TheWire/PulseAddDialog.h \ + + FORMS += gui/TheWire/PulseItem.ui \ + gui/TheWire/WireDialog.ui \ + gui/TheWire/PulseAddDialog.ui \ + + SOURCES += gui/TheWire/PulseItem.cpp \ + gui/TheWire/WireDialog.cpp \ + gui/TheWire/PulseAddDialog.cpp \ + +} + +identities { + + HEADERS += \ + gui/Identity/IdDialog.h \ + gui/Identity/IdEditDialog.h \ + gui/Identity/IdDetailsDialog.h \ + + FORMS += gui/Identity/IdDialog.ui \ + gui/Identity/IdEditDialog.ui \ + gui/Identity/IdDetailsDialog.ui \ + + SOURCES += \ + gui/Identity/IdDialog.cpp \ + gui/Identity/IdEditDialog.cpp \ + gui/Identity/IdDetailsDialog.cpp \ + +} + +gxscircles { + DEFINES += RS_USE_CIRCLES + + HEADERS += \ + gui/Circles/CirclesDialog.h \ + gui/Circles/CreateCircleDialog.h \ + + FORMS += gui/Circles/CirclesDialog.ui \ + gui/Circles/CreateCircleDialog.ui \ + + SOURCES += \ + gui/Circles/CirclesDialog.cpp \ + gui/Circles/CreateCircleDialog.cpp \ + + HEADERS += gui/People/PeopleDialog.h + HEADERS += gui/People/CircleWidget.h + HEADERS += gui/People/IdentityWidget.h + + FORMS += gui/People/PeopleDialog.ui + FORMS += gui/People/CircleWidget.ui + FORMS += gui/People/IdentityWidget.ui + + SOURCES += gui/People/PeopleDialog.cpp + SOURCES += gui/People/CircleWidget.cpp + SOURCES += gui/People/IdentityWidget.cpp + +#HEADERS += gui/People/IdentityItem.h +#HEADERS += gui/People/CircleItem.h +#HEADERS += gui/People/GroupListView.h +#SOURCES += gui/People/GroupListView.cpp +#SOURCES += gui/People/IdentityItem.cpp +#SOURCES += gui/People/CircleItem.cpp + + +} + + +gxsforums { + + HEADERS += gui/gxsforums/GxsForumsDialog.h \ + gui/gxsforums/GxsForumGroupDialog.h \ + gui/gxsforums/CreateGxsForumMsg.h \ + gui/gxsforums/GxsForumThreadWidget.h \ + gui/gxsforums/GxsForumsFillThread.h \ + gui/gxsforums/GxsForumUserNotify.h \ + gui/feeds/GxsForumGroupItem.h \ + gui/feeds/GxsForumMsgItem.h + + FORMS += gui/gxsforums/CreateGxsForumMsg.ui \ + gui/gxsforums/GxsForumThreadWidget.ui \ + gui/feeds/GxsForumGroupItem.ui \ + gui/feeds/GxsForumMsgItem.ui + + SOURCES += gui/gxsforums/GxsForumsDialog.cpp \ + gui/gxsforums/GxsForumGroupDialog.cpp \ + gui/gxsforums/CreateGxsForumMsg.cpp \ + gui/gxsforums/GxsForumThreadWidget.cpp \ + gui/gxsforums/GxsForumsFillThread.cpp \ + gui/gxsforums/GxsForumUserNotify.cpp \ + gui/feeds/GxsForumGroupItem.cpp \ + gui/feeds/GxsForumMsgItem.cpp +} + + +gxschannels { + + HEADERS += gui/gxschannels/GxsChannelDialog.h \ + gui/gxschannels/GxsChannelGroupDialog.h \ + gui/gxschannels/CreateGxsChannelMsg.h \ + gui/gxschannels/GxsChannelPostsWidget.h \ + gui/gxschannels/GxsChannelFilesWidget.h \ + gui/gxschannels/GxsChannelFilesStatusWidget.h \ + gui/feeds/GxsChannelGroupItem.h \ + gui/feeds/GxsChannelPostItem.h \ + gui/gxschannels/GxsChannelUserNotify.h + + FORMS += gui/gxschannels/GxsChannelPostsWidget.ui \ + gui/gxschannels/GxsChannelFilesWidget.ui \ + gui/gxschannels/GxsChannelFilesStatusWidget.ui \ + gui/gxschannels/CreateGxsChannelMsg.ui \ + gui/feeds/GxsChannelGroupItem.ui \ + gui/feeds/GxsChannelPostItem.ui + + SOURCES += gui/gxschannels/GxsChannelDialog.cpp \ + gui/gxschannels/GxsChannelPostsWidget.cpp \ + gui/gxschannels/GxsChannelFilesWidget.cpp \ + gui/gxschannels/GxsChannelFilesStatusWidget.cpp \ + gui/gxschannels/GxsChannelGroupDialog.cpp \ + gui/gxschannels/CreateGxsChannelMsg.cpp \ + gui/feeds/GxsChannelGroupItem.cpp \ + gui/feeds/GxsChannelPostItem.cpp \ + gui/gxschannels/GxsChannelUserNotify.cpp +} + + +posted { + + HEADERS += gui/Posted/PostedDialog.h \ + gui/Posted/PostedListWidget.h \ + gui/Posted/PostedItem.h \ + gui/Posted/PostedGroupDialog.h \ + gui/feeds/PostedGroupItem.h \ + gui/Posted/PostedCreatePostDialog.h \ + gui/Posted/PostedUserNotify.h + + #gui/Posted/PostedCreateCommentDialog.h \ + #gui/Posted/PostedComments.h \ + + FORMS += gui/Posted/PostedListWidget.ui \ + gui/feeds/PostedGroupItem.ui \ + gui/Posted/PostedItem.ui \ + gui/Posted/PostedCreatePostDialog.ui \ + + #gui/Posted/PostedDialog.ui \ + #gui/Posted/PostedComments.ui \ + #gui/Posted/PostedCreateCommentDialog.ui + + SOURCES += gui/Posted/PostedDialog.cpp \ + gui/Posted/PostedListWidget.cpp \ + gui/feeds/PostedGroupItem.cpp \ + gui/Posted/PostedItem.cpp \ + gui/Posted/PostedGroupDialog.cpp \ + gui/Posted/PostedCreatePostDialog.cpp \ + gui/Posted/PostedUserNotify.cpp + + #gui/Posted/PostedDialog.cpp \ + #gui/Posted/PostedComments.cpp \ + #gui/Posted/PostedCreateCommentDialog.cpp + + RESOURCES += gui/Posted/Posted_images.qrc +} + +gxsgui { + + HEADERS += gui/gxs/GxsGroupDialog.h \ + gui/gxs/WikiGroupDialog.h \ + gui/gxs/GxsIdDetails.h \ + gui/gxs/GxsIdChooser.h \ + gui/gxs/GxsIdLabel.h \ + gui/gxs/GxsCircleChooser.h \ + gui/gxs/GxsCircleLabel.h \ + gui/gxs/GxsIdTreeWidgetItem.h \ + gui/gxs/GxsCommentTreeWidget.h \ + gui/gxs/GxsCommentContainer.h \ + gui/gxs/GxsCommentDialog.h \ + gui/gxs/GxsCreateCommentDialog.h \ + gui/gxs/GxsGroupFrameDialog.h \ + gui/gxs/GxsMessageFrameWidget.h \ + gui/gxs/GxsMessageFramePostWidget.h \ + gui/gxs/GxsGroupFeedItem.h \ + gui/gxs/GxsFeedItem.h \ + gui/gxs/RsGxsUpdateBroadcastBase.h \ + gui/gxs/RsGxsUpdateBroadcastWidget.h \ + gui/gxs/RsGxsUpdateBroadcastPage.h \ + gui/gxs/GxsGroupShareKey.h \ + gui/gxs/GxsUserNotify.h \ + gui/gxs/GxsFeedWidget.h \ + util/TokenQueue.h \ + util/RsGxsUpdateBroadcast.h \ + +# gui/gxs/GxsMsgDialog.h \ + + FORMS += gui/gxs/GxsGroupDialog.ui \ + gui/gxs/GxsCommentContainer.ui \ + gui/gxs/GxsCommentDialog.ui \ + gui/gxs/GxsCreateCommentDialog.ui \ + gui/gxs/GxsGroupFrameDialog.ui\ + gui/gxs/GxsGroupShareKey.ui +# gui/gxs/GxsMsgDialog.ui \ +# gui/gxs/GxsCommentTreeWidget.ui + + SOURCES += gui/gxs/GxsGroupDialog.cpp \ + gui/gxs/WikiGroupDialog.cpp \ + gui/gxs/GxsIdDetails.cpp \ + gui/gxs/GxsIdChooser.cpp \ + gui/gxs/GxsIdLabel.cpp \ + gui/gxs/GxsCircleChooser.cpp \ + gui/gxs/GxsGroupShareKey.cpp \ + gui/gxs/GxsCircleLabel.cpp \ + gui/gxs/GxsIdTreeWidgetItem.cpp \ + gui/gxs/GxsCommentTreeWidget.cpp \ + gui/gxs/GxsCommentContainer.cpp \ + gui/gxs/GxsCommentDialog.cpp \ + gui/gxs/GxsCreateCommentDialog.cpp \ + gui/gxs/GxsGroupFrameDialog.cpp \ + gui/gxs/GxsMessageFrameWidget.cpp \ + gui/gxs/GxsMessageFramePostWidget.cpp \ + gui/gxs/GxsGroupFeedItem.cpp \ + gui/gxs/GxsFeedItem.cpp \ + gui/gxs/RsGxsUpdateBroadcastBase.cpp \ + gui/gxs/RsGxsUpdateBroadcastWidget.cpp \ + gui/gxs/RsGxsUpdateBroadcastPage.cpp \ + gui/gxs/GxsUserNotify.cpp \ + gui/gxs/GxsFeedWidget.cpp \ + util/TokenQueue.cpp \ + util/RsGxsUpdateBroadcast.cpp \ + +# gui/gxs/GxsMsgDialog.cpp \ + + +}