moved the "new topic" button to the groupTreeWidget

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6670 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2013-09-02 00:44:19 +00:00
parent 0416a0d888
commit f143ff3525
4 changed files with 9 additions and 26 deletions

View File

@ -76,6 +76,13 @@ PostedListDialog::PostedListDialog(QWidget *parent)
mPostIndex = 0; mPostIndex = 0;
mPostShow = POSTED_DEFAULT_LISTING_LENGTH; mPostShow = POSTED_DEFAULT_LISTING_LENGTH;
/* Initialize group tree */
QToolButton *newTopicButton = new QToolButton(this);
newTopicButton->setIcon(QIcon(":/images/posted_add_24.png"));
newTopicButton->setToolTip(tr("Create New Topic"));
connect(newTopicButton, SIGNAL(clicked()), this, SLOT(newTopic()));
ui.groupTreeWidget->addToolButton(newTopicButton);
/* create posted tree */ /* create posted tree */
yourTopics = ui.groupTreeWidget->addCategoryItem(tr("My Topics"), QIcon(IMAGE_FOLDER), true); yourTopics = ui.groupTreeWidget->addCategoryItem(tr("My Topics"), QIcon(IMAGE_FOLDER), true);
subscribedTopics = ui.groupTreeWidget->addCategoryItem(tr("Subscribed Topics"), QIcon(IMAGE_FOLDERRED), true); subscribedTopics = ui.groupTreeWidget->addCategoryItem(tr("Subscribed Topics"), QIcon(IMAGE_FOLDERRED), true);
@ -84,7 +91,6 @@ PostedListDialog::PostedListDialog(QWidget *parent)
ui.hotSortButton->setChecked(true); ui.hotSortButton->setChecked(true);
connect(ui.newTopicButton, SIGNAL(clicked()), this, SLOT(newTopic()));
connect(ui.submitPostButton, SIGNAL(clicked()), this, SLOT(newPost())); connect(ui.submitPostButton, SIGNAL(clicked()), this, SLOT(newPost()));
} }

View File

@ -24,31 +24,7 @@
</property> </property>
<widget class="QWidget" name="layoutWidget"> <widget class="QWidget" name="layoutWidget">
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0"> <item row="0" column="0" colspan="2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>36</width>
<height>21</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1" colspan="2">
<widget class="QPushButton" name="newTopicButton">
<property name="text">
<string>New Topic</string>
</property>
<property name="icon">
<iconset resource="Posted_images.qrc">
<normaloff>:/images/posted_add_32.png</normaloff>:/images/posted_add_32.png</iconset>
</property>
</widget>
</item>
<item row="1" column="0" colspan="3">
<widget class="GroupTreeWidget" name="groupTreeWidget" native="true"> <widget class="GroupTreeWidget" name="groupTreeWidget" native="true">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">

View File

@ -5,6 +5,7 @@
<file>images/posted_32.png</file> <file>images/posted_32.png</file>
<file>images/posted_48.png</file> <file>images/posted_48.png</file>
<file>images/posted_64.png</file> <file>images/posted_64.png</file>
<file>images/posted_add_24.png</file>
<file>images/posted_add_32.png</file> <file>images/posted_add_32.png</file>
<file>images/posted_add_64.png</file> <file>images/posted_add_64.png</file>
<file>images/hot_24.png</file> <file>images/hot_24.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB