mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
744a78b140
disabled msg synchronisation by default through compilation #define (use GXS_ENABLE_MSG_SYNC to enable message sync) Finally removed v2 suffix from all photo components and filenames (please edit your libretroshare.pro file accordingly) git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5883 b45a01b8-16f6-495d-af2f-9b41ad6348cc
53 lines
1.1 KiB
C++
53 lines
1.1 KiB
C++
#ifndef PHOTOITEM_H
|
|
#define PHOTOITEM_H
|
|
|
|
#include <QWidget>
|
|
#include <QLabel>
|
|
#include "PhotoShareItemHolder.h"
|
|
#include "retroshare/rsphoto.h"
|
|
|
|
namespace Ui {
|
|
class PhotoItem;
|
|
}
|
|
|
|
class PhotoItem : public QWidget, public PhotoShareItem
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
PhotoItem(PhotoShareItemHolder *holder, const RsPhotoPhoto& photo, QWidget* parent = 0);
|
|
PhotoItem(PhotoShareItemHolder *holder, const QString& path, QWidget* parent = 0); // for new photos.
|
|
~PhotoItem();
|
|
void setSelected(bool selected);
|
|
bool isSelected(){ return mSelected; }
|
|
const RsPhotoPhoto& getPhotoDetails();
|
|
bool getPhotoThumbnail(RsPhotoThumbnail &nail);
|
|
|
|
protected:
|
|
void mousePressEvent(QMouseEvent *event);
|
|
|
|
private:
|
|
void updateImage(const RsPhotoThumbnail &thumbnail);
|
|
void setUp();
|
|
|
|
private slots:
|
|
void setTitle();
|
|
void setPhotoGrapher();
|
|
|
|
private:
|
|
Ui::PhotoItem *ui;
|
|
|
|
QPixmap mThumbNail;
|
|
|
|
QPixmap getPixmap() { return mThumbNail; }
|
|
|
|
bool mSelected;
|
|
RsPhotoPhoto mPhotoDetails;
|
|
PhotoShareItemHolder* mHolder;
|
|
|
|
QLabel *mTitleLabel, *mPhotoGrapherLabel;
|
|
};
|
|
|
|
#endif // PHOTOITEM_H
|