mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-20 23:10:39 -04:00
Fixed picture show
This commit is contained in:
parent
9442d87644
commit
dcc4242ae6
2 changed files with 60 additions and 9 deletions
|
@ -29,10 +29,10 @@ PulseMessage::PulseMessage(QWidget *parent)
|
||||||
{
|
{
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
|
||||||
connect(label_image1, SIGNAL(clicked()), this, SLOT(viewPicture()));
|
connect(label_image1, SIGNAL(clicked()), this, SLOT(viewPictureOne()));
|
||||||
connect(label_image2, SIGNAL(clicked()), this, SLOT(viewPicture()));
|
connect(label_image2, SIGNAL(clicked()), this, SLOT(viewPictureTwo()));
|
||||||
connect(label_image3, SIGNAL(clicked()), this, SLOT(viewPicture()));
|
connect(label_image3, SIGNAL(clicked()), this, SLOT(viewPictureThree()));
|
||||||
connect(label_image4, SIGNAL(clicked()), this, SLOT(viewPicture()));
|
connect(label_image4, SIGNAL(clicked()), this, SLOT(viewPictureFour()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PulseMessage::setup(RsWirePulseSPtr pulse)
|
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);
|
PhotoView *photoView = new PhotoView(this);
|
||||||
|
|
||||||
|
@ -159,6 +159,22 @@ void PulseMessage::viewPicture()
|
||||||
photoView->setPixmap(pixmap);
|
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()) {
|
if (!mPulse->mImage2.empty()) {
|
||||||
// install image.
|
// install image.
|
||||||
QPixmap pixmap;
|
QPixmap pixmap;
|
||||||
|
@ -166,6 +182,22 @@ void PulseMessage::viewPicture()
|
||||||
photoView->setPixmap(pixmap);
|
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()) {
|
if (!mPulse->mImage3.empty()) {
|
||||||
// install image.
|
// install image.
|
||||||
QPixmap pixmap;
|
QPixmap pixmap;
|
||||||
|
@ -173,6 +205,22 @@ void PulseMessage::viewPicture()
|
||||||
photoView->setPixmap(pixmap);
|
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()) {
|
if (!mPulse->mImage4.empty()) {
|
||||||
// install image.
|
// install image.
|
||||||
QPixmap pixmap;
|
QPixmap pixmap;
|
||||||
|
|
|
@ -37,7 +37,10 @@ public:
|
||||||
void setRefImageCount(uint32_t count);
|
void setRefImageCount(uint32_t count);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void viewPicture();
|
void viewPictureOne();
|
||||||
|
void viewPictureTwo();
|
||||||
|
void viewPictureThree();
|
||||||
|
void viewPictureFour();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RsWirePulseSPtr mPulse;
|
RsWirePulseSPtr mPulse;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue