mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
48e5a49cd5
Added subscribe and auto-download button to channel dialog. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7431 b45a01b8-16f6-495d-af2f-9b41ad6348cc
46 lines
1.4 KiB
C++
46 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include "mainpage.h"
|
|
#include <retroshare/rsgxsifacetypes.h>
|
|
|
|
// This class implement a basic RS functionality which is that widgets displaying info
|
|
// should update regularly. They also should update only when visible, to save CPU time.
|
|
//
|
|
// Using this class simply needs to derive your widget from RsGxsUpdateBroadcastPage
|
|
// and oveload the updateDisplay() function with the actual code that updates the
|
|
// widget.
|
|
//
|
|
|
|
class RsGxsIfaceHelper;
|
|
class RsGxsUpdateBroadcastBase;
|
|
|
|
class RsGxsUpdateBroadcastPage : public MainPage
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
RsGxsUpdateBroadcastPage(RsGxsIfaceHelper* ifaceImpl, QWidget *parent = NULL, Qt::WindowFlags flags = 0);
|
|
virtual ~RsGxsUpdateBroadcastPage();
|
|
|
|
void fillComplete();
|
|
void setUpdateWhenInvisible(bool update);
|
|
const std::list<RsGxsGroupId> &getGrpIds();
|
|
const std::list<RsGxsGroupId> &getGrpIdsMeta();
|
|
void getAllGrpIds(std::list<RsGxsGroupId> &grpIds);
|
|
const std::map<RsGxsGroupId, std::vector<RsGxsMessageId> > &getMsgIds();
|
|
const std::map<RsGxsGroupId, std::vector<RsGxsMessageId> > &getMsgIdsMeta();
|
|
void getAllMsgIds(std::map<RsGxsGroupId, std::vector<RsGxsMessageId> > &msgIds);
|
|
|
|
protected:
|
|
virtual void showEvent(QShowEvent *event);
|
|
|
|
// This is overloaded in subclasses.
|
|
virtual void updateDisplay(bool complete) = 0;
|
|
|
|
private slots:
|
|
void fillDisplay(bool complete);
|
|
|
|
private:
|
|
RsGxsUpdateBroadcastBase *mBase;
|
|
};
|