forked from blue/squawk
some debug, message changing in messageFeed
This commit is contained in:
parent
3a7735b192
commit
48e498be25
10 changed files with 107 additions and 35 deletions
|
@ -37,7 +37,7 @@ QWidget* ComboboxDelegate::createEditor(QWidget *parent, const QStyleOptionViewI
|
|||
{
|
||||
QComboBox *cb = new QComboBox(parent);
|
||||
|
||||
for (const std::pair<QString, QIcon> pair : entries) {
|
||||
for (const std::pair<QString, QIcon>& pair : entries) {
|
||||
cb->addItem(pair.second, pair.first);
|
||||
}
|
||||
|
||||
|
|
|
@ -179,6 +179,9 @@ QSize MessageDelegate::sizeHint(const QStyleOptionViewItem& option, const QModel
|
|||
break;
|
||||
case Models::ready:
|
||||
break;
|
||||
case Models::errorDownload:
|
||||
case Models::errorUpload:
|
||||
break;
|
||||
}
|
||||
|
||||
messageSize.rheight() += nickMetrics.lineSpacing();
|
||||
|
@ -306,10 +309,11 @@ QProgressBar * MessageDelegate::getBar(const Models::FeedItem& data) const
|
|||
|
||||
if (result == 0) {
|
||||
result = new QProgressBar();
|
||||
result->setRange(0, 100);
|
||||
bars->insert(std::make_pair(data.id, result));
|
||||
}
|
||||
|
||||
result->setValue(data.attach.progress);
|
||||
result->setValue(data.attach.progress * 100);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -85,6 +85,8 @@ private:
|
|||
std::map<QString, QProgressBar*>* bars;
|
||||
std::set<QString>* idsToKeep;
|
||||
bool clearingWidgets;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // MESSAGEDELEGATE_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue