turned forum name label into a button to allow display of forum info

This commit is contained in:
csoler 2020-12-20 14:41:23 +01:00
parent e8d6632473
commit e417c68d41
3 changed files with 21 additions and 34 deletions

View File

@ -273,6 +273,7 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget
connect(ui->versions_CB, SIGNAL(currentIndexChanged(int)), this, SLOT(changedVersion()));
connect(ui->threadTreeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(threadListCustomPopupMenu(QPoint)));
connect(ui->postText, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenuTextBrowser(QPoint)));
connect(ui->forumName, SIGNAL(clicked()), this, SLOT(showForumInfo()));
ui->subscribeToolButton->hide() ;
connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool)));
@ -396,6 +397,12 @@ void GxsForumThreadWidget::handleEvent_main_thread(std::shared_ptr<const RsEvent
}
}
void GxsForumThreadWidget::showForumInfo()
{
mThreadId.clear();
updateForumDescription(true);
}
void GxsForumThreadWidget::blank()
{
ui->subscribeToolButton->hide();

View File

@ -110,6 +110,7 @@ private slots:
void threadListCustomPopupMenu(QPoint point);
void contextMenuTextBrowser(QPoint point);
void headerContextMenuRequested(const QPoint& pos);
void showForumInfo();
void changedSelection(const QModelIndex &, const QModelIndex &);
void changedThread(QModelIndex index);

View File

@ -112,30 +112,15 @@
</widget>
</item>
<item>
<widget class="ElidedLabel" name="forumName">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>1677215</height>
</size>
<widget class="QPushButton" name="forumName">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Click here to clear current selected thread and display more information about this forum.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string notr="true">Forum name</string>
<string>PushButton</string>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
@ -532,16 +517,16 @@
</action>
</widget>
<customwidgets>
<customwidget>
<class>LineEditClear</class>
<extends>QLineEdit</extends>
<header>gui/common/LineEditClear.h</header>
</customwidget>
<customwidget>
<class>RSTextBrowser</class>
<extends>QTextBrowser</extends>
<header>gui/common/RSTextBrowser.h</header>
</customwidget>
<customwidget>
<class>LineEditClear</class>
<extends>QLineEdit</extends>
<header>gui/common/LineEditClear.h</header>
</customwidget>
<customwidget>
<class>SubscribeToolButton</class>
<extends>QToolButton</extends>
@ -552,12 +537,6 @@
<extends>QLabel</extends>
<header>gui/gxs/GxsIdLabel.h</header>
</customwidget>
<customwidget>
<class>ElidedLabel</class>
<extends>QLabel</extends>
<header location="global">gui/common/ElidedLabel.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>RSImageBlockWidget</class>
<extends>QWidget</extends>
@ -566,8 +545,8 @@
</customwidget>
</customwidgets>
<resources>
<include location="../icons.qrc"/>
<include location="../images.qrc"/>
<include location="../icons.qrc"/>
</resources>
<connections/>
</ui>