mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
363af69254
commit
af3f9b1dcc
@ -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
|
||||
|
@ -1219,23 +1219,38 @@ border-image: url(:/images/closepressed.png)
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="textVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="progressBarLayOut">
|
||||
<item>
|
||||
<widget class="QLabel" name="progLayOutTxt">
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600;">LOADING</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="textVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
Loading…
Reference in New Issue
Block a user