parent
9b1651896a
commit
1d92b502b0
|
@ -207,6 +207,7 @@ void TimeLineListWidget::setItem(QList<FileInfo> list)
|
|||
connect(itemWin, &TimeLineItem::sigItemSelectAll, this, &TimeLineListWidget::slotItemSelecAll);
|
||||
connect(itemWin, &TimeLineItem::sigSizeChanged, this, [=](QSize size) {
|
||||
item->setSizeHint(size);
|
||||
autoload();
|
||||
});
|
||||
connect(itemWin, &TimeLineItem::sigCtrlAClicked, this, [=]() {
|
||||
selectAll();
|
||||
|
@ -283,6 +284,17 @@ void TimeLineListWidget::sendDownloadInfo()
|
|||
Q_EMIT sigDownFileInfo(filePath, fileList);
|
||||
}
|
||||
|
||||
void TimeLineListWidget::autoload()
|
||||
{
|
||||
int currentHeight = 0;
|
||||
for (int i = 0; i < count(); i++) {
|
||||
currentHeight += item(i)->sizeHint().height();
|
||||
}
|
||||
if (currentHeight <= height()) {
|
||||
loadItem(2);
|
||||
}
|
||||
}
|
||||
|
||||
void TimeLineListWidget::slotValueChanged(int value)
|
||||
{
|
||||
if (value > (verticalScrollBar()->maximum() * 2 / 3)) {
|
||||
|
|
|
@ -44,6 +44,7 @@ private:
|
|||
QSize getIconSize();
|
||||
void setDownloadBtn(bool isShow);
|
||||
void sendDownloadInfo();
|
||||
void autoload();
|
||||
|
||||
Q_SIGNALS:
|
||||
void sigOpenFile(FileInfo::FileType, QString);
|
||||
|
|
Loading…
Reference in New Issue