mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-17 17:43:59 -05:00
added list of files for the whole channel
This commit is contained in:
parent
591ffc2fa7
commit
944c5b3592
7 changed files with 67 additions and 34 deletions
|
|
@ -255,8 +255,11 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI
|
|||
ui->channelPostFiles_TV->setPlaceholderText(tr("Post files"));
|
||||
|
||||
ui->channelFiles_TV->setPlaceholderText(tr("All files in the channel"));
|
||||
ui->channelFiles_TV->setModel(mChannelFilesModel = new RsGxsChannelPostFilesModel());
|
||||
ui->channelFiles_TV->setItemDelegate(new ChannelPostFilesDelegate());
|
||||
|
||||
connect(ui->postsTree->selectionModel(),SIGNAL(selectionChanged(const QItemSelection&,const QItemSelection&)),this,SLOT(showPostDetails()));
|
||||
connect(mChannelPostsModel,SIGNAL(channelLoaded()),this,SLOT(updateChannelFiles()));
|
||||
|
||||
QFontMetricsF fm(font());
|
||||
|
||||
|
|
@ -416,6 +419,20 @@ void GxsChannelPostsWidgetWithModel::showPostDetails()
|
|||
ui->channelPostFiles_TV->resizeColumnToContents(RsGxsChannelPostFilesModel::COLUMN_FILES_SIZE);
|
||||
ui->channelPostFiles_TV->resizeColumnToContents(RsGxsChannelPostFilesModel::COLUMN_FILES_NAME);
|
||||
ui->channelPostFiles_TV->setAutoSelect(true);
|
||||
|
||||
}
|
||||
|
||||
void GxsChannelPostsWidgetWithModel::updateChannelFiles()
|
||||
{
|
||||
std::list<RsGxsFile> files;
|
||||
|
||||
mChannelPostsModel->getFilesList(files);
|
||||
mChannelFilesModel->setFiles(files);
|
||||
|
||||
ui->channelFiles_TV->resizeColumnToContents(RsGxsChannelPostFilesModel::COLUMN_FILES_FILE);
|
||||
ui->channelFiles_TV->resizeColumnToContents(RsGxsChannelPostFilesModel::COLUMN_FILES_SIZE);
|
||||
ui->channelFiles_TV->resizeColumnToContents(RsGxsChannelPostFilesModel::COLUMN_FILES_NAME);
|
||||
ui->channelFiles_TV->setAutoSelect(true);
|
||||
}
|
||||
|
||||
void GxsChannelPostsWidgetWithModel::updateGroupData()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue