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

View File

@ -1219,11 +1219,24 @@ border-image: url(:/images/closepressed.png)
</widget>
</item>
<item row="4" column="0">
<layout class="QHBoxLayout" name="progressBarLayOut">
<item>
<widget class="QLabel" name="progLayOutTxt">
<property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt; font-weight:600;&quot;&gt;LOADING&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QProgressBar" name="progressBar">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>10</height>
<height>25</height>
</size>
</property>
<property name="maximum">
@ -1238,6 +1251,8 @@ border-image: url(:/images/closepressed.png)
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QTextBrowser" name="postText">
<property name="sizePolicy">