mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-13 16:39:43 -05:00
Fixed picture show
This commit is contained in:
parent
9442d87644
commit
dcc4242ae6
@ -29,10 +29,10 @@ PulseMessage::PulseMessage(QWidget *parent)
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
connect(label_image1, SIGNAL(clicked()), this, SLOT(viewPicture()));
|
||||
connect(label_image2, SIGNAL(clicked()), this, SLOT(viewPicture()));
|
||||
connect(label_image3, SIGNAL(clicked()), this, SLOT(viewPicture()));
|
||||
connect(label_image4, SIGNAL(clicked()), this, SLOT(viewPicture()));
|
||||
connect(label_image1, SIGNAL(clicked()), this, SLOT(viewPictureOne()));
|
||||
connect(label_image2, SIGNAL(clicked()), this, SLOT(viewPictureTwo()));
|
||||
connect(label_image3, SIGNAL(clicked()), this, SLOT(viewPictureThree()));
|
||||
connect(label_image4, SIGNAL(clicked()), this, SLOT(viewPictureFour()));
|
||||
}
|
||||
|
||||
void PulseMessage::setup(RsWirePulseSPtr pulse)
|
||||
@ -148,7 +148,7 @@ void PulseMessage::setRefImageCount(uint32_t count)
|
||||
}
|
||||
}
|
||||
|
||||
void PulseMessage::viewPicture()
|
||||
void PulseMessage::viewPictureOne()
|
||||
{
|
||||
PhotoView *photoView = new PhotoView(this);
|
||||
|
||||
@ -159,6 +159,22 @@ void PulseMessage::viewPicture()
|
||||
photoView->setPixmap(pixmap);
|
||||
}
|
||||
|
||||
QString timestamp = misc::timeRelativeToNow(mPulse->mRefPublishTs);
|
||||
|
||||
photoView->setTitle(QString::fromStdString(mPulse->mPulseText));
|
||||
photoView->setGroupNameString(QString::fromStdString(mPulse->mRefGroupName));
|
||||
photoView->setTime(timestamp);
|
||||
//photoView->setGroupId(mPulse->mRefGroupId);
|
||||
|
||||
photoView->show();
|
||||
|
||||
/* window will destroy itself! */
|
||||
}
|
||||
|
||||
void PulseMessage::viewPictureTwo()
|
||||
{
|
||||
PhotoView *photoView = new PhotoView(this);
|
||||
|
||||
if (!mPulse->mImage2.empty()) {
|
||||
// install image.
|
||||
QPixmap pixmap;
|
||||
@ -166,6 +182,22 @@ void PulseMessage::viewPicture()
|
||||
photoView->setPixmap(pixmap);
|
||||
}
|
||||
|
||||
QString timestamp = misc::timeRelativeToNow(mPulse->mRefPublishTs);
|
||||
|
||||
photoView->setTitle(QString::fromStdString(mPulse->mPulseText));
|
||||
photoView->setGroupNameString(QString::fromStdString(mPulse->mRefGroupName));
|
||||
photoView->setTime(timestamp);
|
||||
//photoView->setGroupId(mPulse->mRefGroupId);
|
||||
|
||||
photoView->show();
|
||||
|
||||
/* window will destroy itself! */
|
||||
}
|
||||
|
||||
void PulseMessage::viewPictureThree()
|
||||
{
|
||||
PhotoView *photoView = new PhotoView(this);
|
||||
|
||||
if (!mPulse->mImage3.empty()) {
|
||||
// install image.
|
||||
QPixmap pixmap;
|
||||
@ -173,6 +205,22 @@ void PulseMessage::viewPicture()
|
||||
photoView->setPixmap(pixmap);
|
||||
}
|
||||
|
||||
QString timestamp = misc::timeRelativeToNow(mPulse->mRefPublishTs);
|
||||
|
||||
photoView->setTitle(QString::fromStdString(mPulse->mPulseText));
|
||||
photoView->setGroupNameString(QString::fromStdString(mPulse->mRefGroupName));
|
||||
photoView->setTime(timestamp);
|
||||
//photoView->setGroupId(mPulse->mRefGroupId);
|
||||
|
||||
photoView->show();
|
||||
|
||||
/* window will destroy itself! */
|
||||
}
|
||||
|
||||
void PulseMessage::viewPictureFour()
|
||||
{
|
||||
PhotoView *photoView = new PhotoView(this);
|
||||
|
||||
if (!mPulse->mImage4.empty()) {
|
||||
// install image.
|
||||
QPixmap pixmap;
|
||||
|
@ -37,7 +37,10 @@ public:
|
||||
void setRefImageCount(uint32_t count);
|
||||
|
||||
private slots:
|
||||
void viewPicture();
|
||||
void viewPictureOne();
|
||||
void viewPictureTwo();
|
||||
void viewPictureThree();
|
||||
void viewPictureFour();
|
||||
|
||||
private:
|
||||
RsWirePulseSPtr mPulse;
|
||||
|
Loading…
Reference in New Issue
Block a user