mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-16 21:12:31 -04:00
added taskGraphPainterWidet
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1828 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e18167a07a
commit
e26c14573f
10 changed files with 608 additions and 87 deletions
|
@ -174,9 +174,19 @@ TransfersDialog::TransfersDialog(QWidget *parent)
|
|||
|
||||
connect(upheader, SIGNAL(sortIndicatorChanged(int, Qt::SortOrder)), this, SLOT(saveSortIndicatorUpl(int, Qt::SortOrder)));
|
||||
|
||||
// set default column and sort order for upload
|
||||
_sortColUpl = 0;
|
||||
_sortOrderUpl = Qt::AscendingOrder;
|
||||
// set default column and sort order for upload
|
||||
_sortColUpl = 0;
|
||||
_sortOrderUpl = Qt::AscendingOrder;
|
||||
|
||||
createTaskGraphPainterWidget();
|
||||
|
||||
/*
|
||||
taskGraphDetailLayout = new QHBoxLayout();
|
||||
taskGraphDetailLayout->addWidget(taskGraphWidget);
|
||||
ui.tab_2->setLayout(taskGraphDetailLayout);
|
||||
taskGraphDetailLayout->setSpacing( 0 );
|
||||
taskGraphDetailLayout->setMargin( 0 );*/
|
||||
|
||||
|
||||
|
||||
/* Hide platform specific features */
|
||||
|
@ -1295,6 +1305,36 @@ void TransfersDialog::saveSortIndicatorUpl(int logicalIndex, Qt::SortOrder order
|
|||
_sortOrderUpl = order;
|
||||
}
|
||||
|
||||
void TransfersDialog::createTaskGraphPainterWidget()
|
||||
{
|
||||
taskGraphPainterWidget = new TaskGraphPainterWidget();
|
||||
//taskGraphWidget = new QScrollArea();
|
||||
ui.taskGraphWidget->setWidget(taskGraphPainterWidget);
|
||||
ui.taskGraphWidget->setWidgetResizable(true);
|
||||
ui.taskGraphWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
ui.taskGraphWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||
ui.taskGraphWidget->viewport()->setBackgroundRole(QPalette::NoRole);
|
||||
ui.taskGraphWidget->setFrameStyle(QFrame::NoFrame);
|
||||
ui.taskGraphWidget->setFocusPolicy(Qt::NoFocus);
|
||||
}
|
||||
|
||||
/*void TransfersDialog::setTaskGraphPainterWidget (const QModelIndex& index)
|
||||
{
|
||||
Download *dl = (Download *) (index.model ()->
|
||||
data (index.model ()->index (index.row (), DLListDelegate::PTR)).value <quintptr > ());
|
||||
|
||||
if (!dl)
|
||||
return;
|
||||
|
||||
// call takeWidget before setWidget to avoid destruction of the widget
|
||||
QWidget* lastWidget = taskGraphWidget->takeWidget ();
|
||||
|
||||
QWidget* currentWidget = dl->getTaskGraphicWidget ();
|
||||
taskGraphWidget->setWidget (currentWidget);
|
||||
|
||||
taskGraphWidget->show ();
|
||||
}*/
|
||||
|
||||
double TransfersDialog::getProgress(int row, QStandardItemModel *model)
|
||||
{
|
||||
return model->data(model->index(row, PROGRESS), Qt::DisplayRole).toDouble();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue