RetroShare/retroshare-gui/src/gui/Posted/PostedComments.h
chrisparker126 c518bd2f19 Removed references to postedVEG from GxsGroupDialog and associated classes and PostedDialog (GUI does not work now but does not crash)
Removed V2 references: TokenQueueV2 and RsTokReqOptionsV2 are now TokenQueue and RsTokReqOptions and renamed file
Added initialisation of Posted back end service successfully
Added new msg status flags  GXS_SERV::MSG_STATUS_UNPROCESSED and ::MSG_STATUS_UNREAD



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5707 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-10-21 19:45:35 +00:00

124 lines
3.3 KiB
C++

/*
* Retroshare Posted Comments
*
* Copyright 2012-2012 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2.1 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#ifndef MRK_POSTED_COMMENTS_H
#define MRK_POSTED_COMMENTS_H
//#include "gui/mainpage.h"
#include "ui_PostedComments.h"
#include <retroshare/rsposted.h>
#include <map>
//#include "gui/Posted/PostedItem.h"
//#include "gui/PhotoShare/PhotoAddDialog.h"
//#include "gui/PhotoShare/PhotoSlideShow.h"
#include "util/TokenQueueVEG.h"
class PostedComments: public QWidget, public TokenResponseVEG
{
Q_OBJECT
public:
PostedComments(QWidget *parent = 0);
public slots:
void loadComments( std::string );
private:
void loadRequest(const TokenQueueVEG *queue, const TokenRequestVEG &req) { return; }
#if 0
virtual void deletePhotoItem(PhotoItem *, uint32_t type);
virtual void notifySelection(PhotoItem *item, int ptype);
void notifyAlbumSelection(PhotoItem *item);
void notifyPhotoSelection(PhotoItem *item);
private slots:
void checkUpdate();
void OpenOrShowPhotoAddDialog();
void OpenPhotoEditDialog();
void OpenSlideShow();
private:
/* Request Response Functions for loading data */
void requestAlbumList();
void requestAlbumData(const std::list<std::string> &ids);
void requestPhotoList(const std::string &albumId);
void requestPhotoData(const std::list<std::string> &photoIds);
void loadAlbumList(const uint32_t &token);
bool loadAlbumData(const uint32_t &token);
void loadPhotoList(const uint32_t &token);
void loadPhotoData(const uint32_t &token);
void loadRequest(const TokenQueue *queue, const TokenRequest &req);
/* TODO: These functions must be filled in for proper filtering to work
* and tied to the GUI input
*/
bool matchesAlbumFilter(const RsPhotoAlbum &album);
double AlbumScore(const RsPhotoAlbum &album);
bool matchesPhotoFilter(const RsPhotoPhoto &photo);
double PhotoScore(const RsPhotoPhoto &photo);
/* Grunt work of setting up the GUI */
//bool FilterNSortAlbums(const std::list<std::string> &albumIds, std::list<std::string> &filteredAlbumIds, int count);
//bool FilterNSortPhotos(const std::list<std::string> &photoIds, std::list<std::string> &filteredPhotoIds, int count);
//void insertAlbums();
//void insertPhotosForAlbum(const std::list<std::string> &albumIds);
void insertPhotosForSelectedAlbum();
void addAlbum(const RsPhotoAlbum &album);
void addPhoto(const RsPhotoPhoto &photo);
void clearAlbums();
void clearPhotos();
PhotoAddDialog *mAddDialog;
PhotoSlideShow *mSlideShow;
PhotoItem *mAlbumSelected;
PhotoItem *mPhotoSelected;
#endif
TokenQueueVEG *mPhotoQueue;
/* UI - from Designer */
Ui::PostedComments ui;
};
#endif