mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
little layout changes, to not stretch the labels
display the comments on right side of the PhotoDialog git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5661 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b5cadf357b
commit
87856b2c9e
@ -91,6 +91,19 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -6,14 +6,17 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>411</width>
|
<width>392</width>
|
||||||
<height>84</height>
|
<height>63</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="expandFrame">
|
<widget class="QFrame" name="expandFrame">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -13,7 +13,7 @@ PhotoDialog::PhotoDialog(RsPhotoV2 *rs_photo, const RsPhotoPhoto &photo, QWidget
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setAttribute ( Qt::WA_DeleteOnClose, true );
|
setAttribute ( Qt::WA_DeleteOnClose, true );
|
||||||
connect(ui->toolButton_AddComment, SIGNAL(clicked()), this, SLOT(addComment()));
|
connect(ui->toolButton_AddComment, SIGNAL(clicked()), this, SLOT(createComment()));
|
||||||
setUp();
|
setUp();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -31,7 +31,7 @@ void PhotoDialog::setUp()
|
|||||||
ui->label_Photo->setPixmap(qtn);
|
ui->label_Photo->setPixmap(qtn);
|
||||||
ui->lineEdit_Title->setText(QString::fromStdString(mPhotoDetails.mMeta.mMsgName));
|
ui->lineEdit_Title->setText(QString::fromStdString(mPhotoDetails.mMeta.mMsgName));
|
||||||
|
|
||||||
ui->scrollAreaWidgetContents->setLayout(new QVBoxLayout());
|
//ui->scrollAreaWidgetContents->setLayout(new QVBoxLayout());
|
||||||
|
|
||||||
requestComments();
|
requestComments();
|
||||||
}
|
}
|
||||||
@ -49,12 +49,12 @@ void PhotoDialog::addComment()
|
|||||||
|
|
||||||
void PhotoDialog::clearComments()
|
void PhotoDialog::clearComments()
|
||||||
{
|
{
|
||||||
QLayout* l = ui->scrollAreaWidgetContents->layout();
|
//QLayout* l = ui->scrollAreaWidgetContents->layout();
|
||||||
QSetIterator<PhotoCommentItem*> sit(mComments);
|
QSetIterator<PhotoCommentItem*> sit(mComments);
|
||||||
while(sit.hasNext())
|
while(sit.hasNext())
|
||||||
{
|
{
|
||||||
PhotoCommentItem* item = sit.next();
|
PhotoCommentItem* item = sit.next();
|
||||||
l->removeWidget(item);
|
ui->verticalLayout->removeWidget(item);
|
||||||
item->setParent(NULL);
|
item->setParent(NULL);
|
||||||
delete item;
|
delete item;
|
||||||
}
|
}
|
||||||
@ -65,11 +65,11 @@ void PhotoDialog::clearComments()
|
|||||||
void PhotoDialog::resetComments()
|
void PhotoDialog::resetComments()
|
||||||
{
|
{
|
||||||
QSetIterator<PhotoCommentItem*> sit(mComments);
|
QSetIterator<PhotoCommentItem*> sit(mComments);
|
||||||
QLayout* l = ui->scrollAreaWidgetContents->layout();
|
//QLayout* l = ui->scrollAreaWidgetContents->layout();
|
||||||
while(sit.hasNext())
|
while(sit.hasNext())
|
||||||
{
|
{
|
||||||
PhotoCommentItem* item = sit.next();
|
PhotoCommentItem* item = sit.next();
|
||||||
l->addWidget(item);
|
ui->verticalLayout->insertWidget(0,item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,11 +89,9 @@ void PhotoDialog::requestComments()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PhotoDialog::createComment()
|
void PhotoDialog::createComment()
|
||||||
{
|
|
||||||
if(mCommentDialog)
|
|
||||||
{
|
{
|
||||||
RsPhotoComment comment;
|
RsPhotoComment comment;
|
||||||
QString commentString = mCommentDialog->getComment();
|
QString commentString = ui->lineEdit->text();
|
||||||
|
|
||||||
comment.mComment = commentString.toStdString();
|
comment.mComment = commentString.toStdString();
|
||||||
|
|
||||||
@ -103,10 +101,7 @@ void PhotoDialog::createComment()
|
|||||||
mRsPhoto->submitComment(token, comment);
|
mRsPhoto->submitComment(token, comment);
|
||||||
mPhotoQueue->queueRequest(token, TOKENREQ_MSGINFO, RS_TOKREQ_ANSTYPE_ACK, 0);
|
mPhotoQueue->queueRequest(token, TOKENREQ_MSGINFO, RS_TOKREQ_ANSTYPE_ACK, 0);
|
||||||
|
|
||||||
mCommentDialog->close();
|
ui->lineEdit->clear();
|
||||||
delete mCommentDialog;
|
|
||||||
mCommentDialog = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,22 +6,18 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>516</width>
|
<width>615</width>
|
||||||
<height>460</height>
|
<height>566</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Dialog</string>
|
<string>Dialog</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item>
|
<item row="0" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="albumGroup">
|
<widget class="QGroupBox" name="albumGroup">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Minimum">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>1</verstretch>
|
<verstretch>1</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
@ -52,10 +48,40 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1" rowspan="2" colspan="2">
|
||||||
|
<widget class="QScrollArea" name="scrollArea">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="widgetResizable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>325</width>
|
||||||
|
<height>18</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout"/>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" rowspan="2">
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
@ -63,7 +89,7 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>50</width>
|
<width>50</width>
|
||||||
<height>200</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -153,64 +179,16 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="2" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="2" column="2">
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="toolButton_AddComment">
|
<widget class="QToolButton" name="toolButton_AddComment">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Add Comment</string>
|
<string>Comment</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QScrollArea" name="scrollArea">
|
|
||||||
<property name="widgetResizable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>496</width>
|
|
||||||
<height>69</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>253</width>
|
<width>253</width>
|
||||||
<height>222</height>
|
<height>233</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -79,8 +79,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lineEdit_PhotoGrapher">
|
<widget class="QLineEdit" name="lineEdit_PhotoGrapher"/>
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
@ -88,6 +87,19 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user