Added loading text to forumsdialog and enabled percentage numbers to be

shown also


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4627 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2011-10-01 15:19:19 +00:00
parent 363af69254
commit af3f9b1dcc
2 changed files with 47 additions and 18 deletions

View file

@ -163,7 +163,7 @@ ForumsDialog::ForumsDialog(QWidget *parent)
/* Set initial size the splitter */
QList<int> sizes;
sizes << 300 << width(); // Qt calculates the right sizes
ui.splitter->setSizes(sizes);
//ui.splitter->setSizes(sizes);
/* Set own item delegate */
RSItemDelegate *itemDelegate = new RSItemDelegate(this);
@ -207,7 +207,12 @@ ForumsDialog::ForumsDialog(QWidget *parent)
ttheader->setResizeMode (COLUMN_THREAD_READ, QHeaderView::Fixed);
ttheader->hideSection (COLUMN_THREAD_CONTENT);
ui.progressBar->setTextVisible(true);
ui.progressBar->hide();
ui.progLayOutTxt->hide();
ui.progressBarLayOut->setEnabled(false);
fillThread = NULL;
insertThreads();
@ -723,6 +728,8 @@ void ForumsDialog::fillThreadFinished()
if (thread == fillThread) {
// current thread has finished, hide progressbar and release thread
ui.progressBar->hide();
ui.progLayOutTxt->hide();
ui.progressBarLayOut->setEnabled(false);
fillThread = NULL;
}
@ -803,6 +810,7 @@ void ForumsDialog::fillThreadProgress(int current, int count)
if (count) {
ui.progressBar->setValue(current * ui.progressBar->maximum() / count);
}
}
void ForumsDialog::insertThreads()
@ -860,6 +868,12 @@ void ForumsDialog::insertThreads()
subscribeFlags = fi.subscribeFlags;
ui.forumName->setText(QString::fromStdWString(fi.forumName));
ui.progressBarLayOut->setEnabled(true);
ui.progLayOutTxt->show();
ui.progressBar->show();
// create fill thread