2018-11-17 08:10:08 -05:00
|
|
|
/*******************************************************************************
|
|
|
|
* retroshare-gui/src/gui/PhotoShare/PhotoSlideShow.h *
|
|
|
|
* *
|
|
|
|
* Copyright (C) 2012 by Retroshare Team <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/>. *
|
|
|
|
* *
|
|
|
|
*******************************************************************************/
|
2012-06-21 11:52:49 -04:00
|
|
|
|
|
|
|
#ifndef MRK_PHOTO_SLIDE_SHOW_H
|
|
|
|
#define MRK_PHOTO_SLIDE_SHOW_H
|
|
|
|
|
|
|
|
#include "ui_PhotoSlideShow.h"
|
|
|
|
|
2012-11-24 14:49:23 -05:00
|
|
|
#include <retroshare/rsphoto.h>
|
2012-10-21 15:45:35 -04:00
|
|
|
#include "util/TokenQueue.h"
|
2012-10-13 17:10:42 -04:00
|
|
|
#include "AlbumItem.h"
|
2012-06-21 11:52:49 -04:00
|
|
|
|
2012-10-21 15:45:35 -04:00
|
|
|
class PhotoSlideShow : public QWidget, public TokenResponse
|
2012-06-21 11:52:49 -04:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2012-10-13 17:10:42 -04:00
|
|
|
PhotoSlideShow(const RsPhotoAlbum& mAlbum, QWidget *parent = 0);
|
2012-08-03 02:39:50 -04:00
|
|
|
virtual ~PhotoSlideShow();
|
2012-06-21 11:52:49 -04:00
|
|
|
|
2012-10-21 15:45:35 -04:00
|
|
|
void loadRequest(const TokenQueue *queue, const TokenRequest &req);
|
2012-06-21 11:52:49 -04:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void showPhotoDetails();
|
|
|
|
void moveLeft();
|
|
|
|
void moveRight();
|
|
|
|
void StartStop();
|
|
|
|
void timerEvent();
|
|
|
|
void closeShow();
|
2012-10-30 13:10:19 -04:00
|
|
|
void setFullScreen();
|
2012-06-21 11:52:49 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2012-10-13 17:10:42 -04:00
|
|
|
void requestPhotos();
|
2012-06-21 11:52:49 -04:00
|
|
|
void loadImage();
|
|
|
|
void updateMoveButtons(uint32_t status);
|
|
|
|
|
2012-10-13 17:10:42 -04:00
|
|
|
bool loadPhotoData(const uint32_t &token);
|
2012-06-21 11:52:49 -04:00
|
|
|
|
2012-10-13 17:10:42 -04:00
|
|
|
private:
|
2012-06-21 11:52:49 -04:00
|
|
|
|
2014-03-17 16:56:06 -04:00
|
|
|
std::map<RsGxsMessageId, RsPhotoPhoto *> mPhotos;
|
|
|
|
std::map<int, RsGxsMessageId> mPhotoOrder;
|
2012-06-21 11:52:49 -04:00
|
|
|
|
|
|
|
bool mRunning;
|
|
|
|
int mImageIdx;
|
|
|
|
bool mShotActive;
|
|
|
|
|
2012-10-13 17:10:42 -04:00
|
|
|
RsPhotoAlbum mAlbum;
|
|
|
|
|
2012-10-21 15:45:35 -04:00
|
|
|
TokenQueue *mPhotoQueue;
|
2012-06-21 11:52:49 -04:00
|
|
|
|
|
|
|
Ui::PhotoSlideShow ui;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|