From 1ca6f135b38574172dce89f5041e2ad2fc9d5726 Mon Sep 17 00:00:00 2001 From: defnax Date: Tue, 12 Aug 2008 12:40:49 +0000 Subject: [PATCH] -update PhotoView with fixes for header -added icons git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@678 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/PhotoDialog.cpp | 34 ++++++-------------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/retroshare-gui/src/gui/PhotoDialog.cpp b/retroshare-gui/src/gui/PhotoDialog.cpp index 1b78b6cfd..5d99d1319 100644 --- a/retroshare-gui/src/gui/PhotoDialog.cpp +++ b/retroshare-gui/src/gui/PhotoDialog.cpp @@ -49,6 +49,7 @@ /* Images for Status icons */ #define IMAGE_ONLINE ":/images/donline.png" #define IMAGE_OFFLINE ":/images/dhidden.png" +#define IMAGE_PEER ":/images/user/identity16.png" #define PHOTO_ICON_SIZE 90 @@ -96,32 +97,12 @@ PhotoDialog::PhotoDialog(QWidget *parent) QSize iconSize(PHOTO_ICON_SIZE,PHOTO_ICON_SIZE); ui.photoTreeWidget->setIconSize(iconSize); - /* Set header resize modes and initial section sizes */ -// QHeaderView * _header = ui.peertreeWidget->header () ; -// _header->setResizeMode (0, QHeaderView::Custom); -// _header->setResizeMode (1, QHeaderView::Interactive); -// _header->setResizeMode (2, QHeaderView::Interactive); -// _header->setResizeMode (3, QHeaderView::Interactive); -// _header->setResizeMode (4, QHeaderView::Interactive); -// _header->setResizeMode (5, QHeaderView::Interactive); -// _header->setResizeMode (6, QHeaderView::Interactive); -// _header->setResizeMode (7, QHeaderView::Interactive); -// _header->setResizeMode (8, QHeaderView::Interactive); -// _header->setResizeMode (9, QHeaderView::Interactive); -// _header->setResizeMode (10, QHeaderView::Interactive); -// _header->setResizeMode (11, QHeaderView::Interactive); -// -// _header->resizeSection ( 0, 25 ); -// _header->resizeSection ( 1, 100 ); -// _header->resizeSection ( 2, 100 ); -// _header->resizeSection ( 3, 100 ); -// _header->resizeSection ( 4, 100 ); -// _header->resizeSection ( 5, 200 ); -// _header->resizeSection ( 6, 100 ); -// _header->resizeSection ( 7, 100 ); -// _header->resizeSection ( 8, 100 ); -// _header->resizeSection ( 9, 100 ); -// _header->resizeSection ( 10, 100 ); + /* Set header resize modes and initial section sizes */ + QHeaderView * ptw_header = ui.peerTreeWidget->header () ; + ptw_header->setResizeMode (0, QHeaderView::Interactive); + + ptw_header->resizeSection ( 0, 175 ); + /* Set a GUI update timer - much cleaner than @@ -212,6 +193,7 @@ void PhotoDialog::addShows(std::string id) peerItem->setText(PHOTO_PEER_COL_PID, QString::fromStdString(id)); peerItem->setText(PHOTO_PEER_COL_SID, ""); peerItem->setText(PHOTO_PEER_COL_PHOTOID, ""); + peerItem->setIcon(0,(QIcon(IMAGE_PEER))); ui.peerTreeWidget->insertTopLevelItem(0, peerItem);