/* * 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 #include //#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 &ids); void requestPhotoList(const std::string &albumId); void requestPhotoData(const std::list &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 &albumIds, std::list &filteredAlbumIds, int count); //bool FilterNSortPhotos(const std::list &photoIds, std::list &filteredPhotoIds, int count); //void insertAlbums(); //void insertPhotosForAlbum(const std::list &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