mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:06:51 +00:00
20 lines
484 B
C++
20 lines
484 B
C++
![]() |
#include "diskcontrolwidget.h"
|
||
|
|
||
|
DiskControlWidget::DiskControlWidget(QWidget *parent)
|
||
|
: QWidget(parent),
|
||
|
|
||
|
m_diskInter(new DBusDiskMount(this))
|
||
|
{
|
||
|
|
||
|
connect(m_diskInter, &DBusDiskMount::DiskListChanged, this, &DiskControlWidget::diskListChanged);
|
||
|
|
||
|
QMetaObject::invokeMethod(this, "diskListChanged", Qt::QueuedConnection);
|
||
|
}
|
||
|
|
||
|
void DiskControlWidget::diskListChanged()
|
||
|
{
|
||
|
m_diskInfoList = m_diskInter->diskList();
|
||
|
|
||
|
emit diskCountChanged(m_diskInfoList.count());
|
||
|
}
|