| 7 | #include "interface/item/AppItemStyleDelegate.h" |
| 8 | |
| 9 | AppManagerFragment::AppManagerFragment(IAppManager* appMgr, QWidget *parent) : |
| 10 | BaseFragment(parent), |
| 11 | ui(new Ui::AppManagerFragment), |
| 12 | appMgr(appMgr) |
| 13 | { |
| 14 | ui->setupUi(this); |
| 15 | |
| 16 | model = new AppItemModel(appMgr, this); |
| 17 | |
| 18 | ui->apps->setEmptyViewEnabled(true); |
| 19 | ui->apps->setEmptyViewTitle(tr("No apps are playing audio")); |
| 20 | ui->apps->setFocusPolicy(Qt::FocusPolicy::NoFocus); |
| 21 | ui->apps->setModel(model); |
| 22 | ui->apps->setItemDelegate(new AppItemStyleDelegate(ui->apps)); |
| 23 | |
| 24 | connect(model, &AppItemModel::rowsInserted, this, &AppManagerFragment::rowsInserted); |
| 25 | connect(model, &AppItemModel::rowsAboutToBeRemoved, this, &AppManagerFragment::rowsAboutToBeRemoved); |
| 26 | |
| 27 | connect(ui->close, &QPushButton::clicked, this, &AppManagerFragment::closePressed); |
| 28 | } |
| 29 | |
| 30 | AppManagerFragment::~AppManagerFragment() |
| 31 | { |
nothing calls this directly
no test coverage detected