gui: Implement 'Delete' button in Indexer tab
This commit is contained in:
부모
ef3f7bc72a
커밋
622916db04
@ -114,6 +114,12 @@ void MainWindow::connectSignals()
|
|||||||
});
|
});
|
||||||
|
|
||||||
connect(this->indexer, &Indexer::finished, this, &MainWindow::finishIndexing);
|
connect(this->indexer, &Indexer::finished, this, &MainWindow::finishIndexing);
|
||||||
|
|
||||||
|
connect(ui->lstPaths->selectionModel(), &QItemSelectionModel::selectionChanged, this,
|
||||||
|
[&](const QItemSelection &selected, const QItemSelection &deselected)
|
||||||
|
{ ui->btnDeletePath->setEnabled(this->ui->lstPaths->selectedItems().count() > 0); });
|
||||||
|
|
||||||
|
connect(ui->btnDeletePath, &QPushButton::clicked, this, [&] { qDeleteAll(ui->lstPaths->selectedItems()); });
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::spinPreviewPageValueChanged(int val)
|
void MainWindow::spinPreviewPageValueChanged(int val)
|
||||||
|
@ -190,7 +190,10 @@
|
|||||||
<widget class="QListWidget" name="lstPaths"/>
|
<widget class="QListWidget" name="lstPaths"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="3">
|
<item row="1" column="3">
|
||||||
<widget class="QToolButton" name="toolButton">
|
<widget class="QToolButton" name="btnDeletePath">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Delete</string>
|
<string>Delete</string>
|
||||||
</property>
|
</property>
|
||||||
|
불러오는 중...
Reference in New Issue
Block a user