2018-11-15 21:49:12 +01:00
|
|
|
/*******************************************************************************
|
|
|
|
* retroshare-gui/src/gui/gxschannels/GxsChannelDialog.h *
|
|
|
|
* *
|
|
|
|
* Copyright 2013 by Robert Fernie <retroshare.project@gmail.com> *
|
|
|
|
* *
|
|
|
|
* This program is free software: you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU Affero General Public License as *
|
|
|
|
* published by the Free Software Foundation, either version 3 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 Affero General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU Affero General Public License *
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
|
|
|
* *
|
|
|
|
*******************************************************************************/
|
2013-03-11 20:53:15 +00:00
|
|
|
|
|
|
|
#ifndef _GXS_CHANNEL_DIALOG_H
|
|
|
|
#define _GXS_CHANNEL_DIALOG_H
|
|
|
|
|
2014-05-04 22:59:06 +00:00
|
|
|
#include "gui/gxs/GxsGroupFrameDialog.h"
|
2013-03-11 20:53:15 +00:00
|
|
|
|
2019-10-09 18:06:30 +02:00
|
|
|
#define IMAGE_GXSCHANNELS ":/icons/png/channel.png"
|
2014-05-10 02:38:47 +00:00
|
|
|
|
2014-05-08 00:00:21 +00:00
|
|
|
class GxsChannelDialog : public GxsGroupFrameDialog
|
2013-03-11 20:53:15 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
/** Default Constructor */
|
|
|
|
GxsChannelDialog(QWidget *parent = 0);
|
|
|
|
/** Default Destructor */
|
|
|
|
~GxsChannelDialog();
|
|
|
|
|
2014-05-10 02:38:47 +00:00
|
|
|
virtual QIcon iconPixmap() const { return QIcon(IMAGE_GXSCHANNELS) ; } //MainPage
|
|
|
|
virtual QString pageName() const { return tr("Channels") ; } //MainPage
|
|
|
|
virtual QString helpText() const { return ""; } //MainPage
|
|
|
|
|
2017-10-21 21:23:40 +02:00
|
|
|
void shareOnChannel(const RsGxsGroupId& channel_id, const QList<RetroShareLink>& file_link) ;
|
|
|
|
|
2014-05-27 21:14:05 +00:00
|
|
|
protected:
|
2014-09-11 22:07:06 +00:00
|
|
|
/* GxsGroupFrameDialog */
|
2014-07-24 14:54:23 +00:00
|
|
|
virtual RetroShareLink::enumType getLinkType() { return RetroShareLink::TYPE_CHANNEL; }
|
|
|
|
virtual GroupFrameSettings::Type groupFrameSettingsType() { return GroupFrameSettings::Channel; }
|
2014-09-10 21:38:43 +00:00
|
|
|
virtual QString getHelpString() const ;
|
2014-09-11 22:07:06 +00:00
|
|
|
virtual void groupInfoToGroupItemInfo(const RsGroupMetaData &groupInfo, GroupItemInfo &groupItemInfo, const RsUserdata *userdata);
|
2018-06-24 16:55:38 +02:00
|
|
|
virtual bool getDistantSearchResults(TurtleRequestId id, std::map<RsGxsGroupId,RsGxsGroupSummary>& group_infos);
|
2020-02-06 19:57:23 +01:00
|
|
|
virtual const std::set<TurtleRequestId> getSearchRequests() const override { return mSearchResults ; }
|
2014-07-24 14:54:23 +00:00
|
|
|
|
2018-06-20 22:30:44 +02:00
|
|
|
virtual TurtleRequestId distantSearch(const QString& search_string) ;
|
2018-07-04 21:42:09 +02:00
|
|
|
virtual void checkRequestGroup(const RsGxsGroupId& grpId) ;
|
|
|
|
|
2020-01-26 23:19:20 +01:00
|
|
|
virtual UserNotify *createUserNotify(QObject *parent) override;
|
2013-03-11 20:53:15 +00:00
|
|
|
private slots:
|
|
|
|
void toggleAutoDownload();
|
2015-07-07 00:52:52 +00:00
|
|
|
void setDefaultDirectory();
|
|
|
|
void setDownloadDirectory();
|
|
|
|
void specifyDownloadDirectory();
|
2013-03-11 20:53:15 +00:00
|
|
|
|
|
|
|
private:
|
2014-05-04 22:59:06 +00:00
|
|
|
/* GxsGroupFrameDialog */
|
|
|
|
virtual QString text(TextType type);
|
|
|
|
virtual QString icon(IconType type);
|
2014-07-24 16:52:11 +00:00
|
|
|
virtual QString settingsGroupName() { return "ChannelDialog"; }
|
2014-05-04 22:59:06 +00:00
|
|
|
virtual GxsGroupDialog *createNewGroupDialog(TokenQueue *tokenQueue);
|
|
|
|
virtual GxsGroupDialog *createGroupDialog(TokenQueue *tokenQueue, RsTokenService *tokenService, GxsGroupDialog::Mode mode, RsGxsGroupId groupId);
|
|
|
|
virtual int shareKeyType();
|
|
|
|
virtual GxsMessageFrameWidget *createMessageFrameWidget(const RsGxsGroupId &groupId);
|
|
|
|
virtual void groupTreeCustomActions(RsGxsGroupId grpId, int subscribeFlags, QList<QAction*> &actions);
|
2014-05-08 00:00:21 +00:00
|
|
|
virtual RsGxsCommentService *getCommentService();
|
|
|
|
virtual QWidget *createCommentHeaderWidget(const RsGxsGroupId &grpId, const RsGxsMessageId &msgId);
|
2014-09-11 22:07:06 +00:00
|
|
|
virtual uint32_t requestGroupSummaryType() { return GXS_REQUEST_TYPE_GROUP_DATA; } // request complete group data
|
|
|
|
virtual void loadGroupSummaryToken(const uint32_t &token, std::list<RsGroupMetaData> &groupInfo, RsUserdata* &userdata);
|
2019-12-16 22:44:37 +01:00
|
|
|
|
|
|
|
void handleEvent_main_thread(std::shared_ptr<const RsEvent> event);
|
|
|
|
|
2020-02-03 21:39:05 +01:00
|
|
|
std::set<TurtleRequestId> mSearchResults;
|
|
|
|
|
2019-12-16 22:44:37 +01:00
|
|
|
RsEventsHandlerId_t mEventHandlerId;
|
2013-03-11 20:53:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|