mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-06 21:58:57 -04:00
update posts when navigating with arrows
This commit is contained in:
parent
55022432ef
commit
4423600073
2 changed files with 11 additions and 3 deletions
|
@ -343,6 +343,7 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget
|
||||||
ui->newthreadButton->setText(tr("New thread"));
|
ui->newthreadButton->setText(tr("New thread"));
|
||||||
|
|
||||||
connect(ui->threadTreeWidget, SIGNAL(clicked(QModelIndex)), this, SLOT(clickedThread(QModelIndex)));
|
connect(ui->threadTreeWidget, SIGNAL(clicked(QModelIndex)), this, SLOT(clickedThread(QModelIndex)));
|
||||||
|
connect(ui->threadTreeWidget->selectionModel(), SIGNAL(currentChanged(const QModelIndex&,const QModelIndex&)), this, SLOT(changedSelection(const QModelIndex&,const QModelIndex&)));
|
||||||
connect(ui->viewBox, SIGNAL(currentIndexChanged(int)), this, SLOT(changedViewBox()));
|
connect(ui->viewBox, SIGNAL(currentIndexChanged(int)), this, SLOT(changedViewBox()));
|
||||||
|
|
||||||
connect(ui->expandButton, SIGNAL(clicked()), this, SLOT(togglethreadview()));
|
connect(ui->expandButton, SIGNAL(clicked()), this, SLOT(togglethreadview()));
|
||||||
|
@ -497,6 +498,11 @@ void GxsForumThreadWidget::processSettings(bool load)
|
||||||
Settings->endGroup();
|
Settings->endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GxsForumThreadWidget::changedSelection(const QModelIndex& current,const QModelIndex&)
|
||||||
|
{
|
||||||
|
changedThread(current);
|
||||||
|
}
|
||||||
|
|
||||||
void GxsForumThreadWidget::groupIdChanged()
|
void GxsForumThreadWidget::groupIdChanged()
|
||||||
{
|
{
|
||||||
ui->forumName->setText(groupId().isNull () ? "" : tr("Loading..."));
|
ui->forumName->setText(groupId().isNull () ? "" : tr("Loading..."));
|
||||||
|
@ -628,12 +634,12 @@ QModelIndex GxsForumThreadWidget::GxsForumThreadWidget::getCurrentIndex() const
|
||||||
}
|
}
|
||||||
bool GxsForumThreadWidget::getCurrentPost(ForumModelPostEntry& fmpe) const
|
bool GxsForumThreadWidget::getCurrentPost(ForumModelPostEntry& fmpe) const
|
||||||
{
|
{
|
||||||
QModelIndex index = getCurrentIndex() ;
|
QModelIndex indx = getCurrentIndex() ;
|
||||||
|
|
||||||
if(!index.isValid())
|
if(!indx.isValid())
|
||||||
return false ;
|
return false ;
|
||||||
|
|
||||||
return mThreadModel->getPostData(mThreadProxyModel->mapToSource(index),fmpe);
|
return mThreadModel->getPostData(mThreadProxyModel->mapToSource(indx),fmpe);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GxsForumThreadWidget::threadListCustomPopupMenu(QPoint /*point*/)
|
void GxsForumThreadWidget::threadListCustomPopupMenu(QPoint /*point*/)
|
||||||
|
|
|
@ -32,6 +32,7 @@ class QTreeWidgetItem;
|
||||||
class RSTreeWidgetItemCompareRole;
|
class RSTreeWidgetItemCompareRole;
|
||||||
class RsGxsForumMsg;
|
class RsGxsForumMsg;
|
||||||
class GxsForumsFillThread;
|
class GxsForumsFillThread;
|
||||||
|
class QItemSelection;
|
||||||
class RsGxsForumGroup;
|
class RsGxsForumGroup;
|
||||||
class RsGxsForumModel;
|
class RsGxsForumModel;
|
||||||
class RsGxsForumMsg;
|
class RsGxsForumMsg;
|
||||||
|
@ -97,6 +98,7 @@ private slots:
|
||||||
void threadListCustomPopupMenu(QPoint point);
|
void threadListCustomPopupMenu(QPoint point);
|
||||||
void contextMenuTextBrowser(QPoint point);
|
void contextMenuTextBrowser(QPoint point);
|
||||||
|
|
||||||
|
void changedSelection(const QModelIndex &, const QModelIndex &);
|
||||||
void changedThread(QModelIndex index);
|
void changedThread(QModelIndex index);
|
||||||
void changedVersion();
|
void changedVersion();
|
||||||
void clickedThread (QModelIndex index);
|
void clickedThread (QModelIndex index);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue