removing junk
This commit is contained in:
parent
a80cad73eb
commit
903cee065b
1 changed files with 0 additions and 74 deletions
|
@ -728,32 +728,6 @@ SongSqlModel *SongProxyModel::songModel() {
|
||||||
return m_songModel;
|
return m_songModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
// QVariant SongProxyModel::data(const QModelIndex &index, int role) const {
|
|
||||||
// if (role == Qt::UserRole + 13)
|
|
||||||
// return selected(index.row());
|
|
||||||
// return m_songModel->data(index, role);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// QHash<int, QByteArray> SongProxyModel::roleNames() const
|
|
||||||
// {
|
|
||||||
// QHash<int, QByteArray> names;
|
|
||||||
// names[Qt::UserRole] = "id";
|
|
||||||
// names[Qt::UserRole + 1] = "title";
|
|
||||||
// names[Qt::UserRole + 2] = "lyrics";
|
|
||||||
// names[Qt::UserRole + 3] = "author";
|
|
||||||
// names[Qt::UserRole + 4] = "ccli";
|
|
||||||
// names[Qt::UserRole + 5] = "audio";
|
|
||||||
// names[Qt::UserRole + 6] = "vorder";
|
|
||||||
// names[Qt::UserRole + 7] = "background";
|
|
||||||
// names[Qt::UserRole + 8] = "backgroundType";
|
|
||||||
// names[Qt::UserRole + 9] = "horizontalTextAlignment";
|
|
||||||
// names[Qt::UserRole + 10] = "verticalTextAlignment";
|
|
||||||
// names[Qt::UserRole + 11] = "font";
|
|
||||||
// names[Qt::UserRole + 12] = "fontSize";
|
|
||||||
// names[Qt::UserRole + 13] = "selected";
|
|
||||||
// return names;
|
|
||||||
// }
|
|
||||||
|
|
||||||
QModelIndex SongProxyModel::idx(int row) {
|
QModelIndex SongProxyModel::idx(int row) {
|
||||||
QModelIndex idx = index(row, 0);
|
QModelIndex idx = index(row, 0);
|
||||||
// qDebug() << idx;
|
// qDebug() << idx;
|
||||||
|
@ -776,51 +750,3 @@ void SongProxyModel::deleteSong(const int &row) {
|
||||||
auto model = qobject_cast<SongSqlModel *>(sourceModel());
|
auto model = qobject_cast<SongSqlModel *>(sourceModel());
|
||||||
model->deleteSong(row);
|
model->deleteSong(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
// bool SongProxyModel::selected(const int &row) {
|
|
||||||
// QModelIndex idx = index(row, 0);
|
|
||||||
// return m_selectionModel->isSelected(idx);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// bool SongProxyModel::setSelected(const int &row, const bool &select) {
|
|
||||||
// if (selected(row) == select)
|
|
||||||
// return false;
|
|
||||||
// QModelIndex idx = index(row, 0);
|
|
||||||
// if (select)
|
|
||||||
// m_selectionModel->select(idx, QItemSelectionModel::SelectCurrent);
|
|
||||||
// else
|
|
||||||
// m_selectionModel->select(idx, QItemSelectionModel::Deselect);
|
|
||||||
// emit selectedChanged(select);
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// void SongProxyModel::select(int id) {
|
|
||||||
// QModelIndex idx = index(id, 0);
|
|
||||||
// //check to make sure this item isn't already selected
|
|
||||||
// if (m_selectionModel->isSelected(idx))
|
|
||||||
// return;
|
|
||||||
|
|
||||||
// // deselect all items
|
|
||||||
// QModelIndex first = index(0, 0);
|
|
||||||
// QModelIndex last = index(rowCount() - 1, 0);
|
|
||||||
// QItemSelection all(first, last);
|
|
||||||
// m_selectionModel->select(all, QItemSelectionModel::Deselect);
|
|
||||||
|
|
||||||
// m_selectionModel->select(idx, QItemSelectionModel::SelectCurrent);
|
|
||||||
// emit selectedChanged(true);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// void SongProxyModel::selectSongs(int row) {
|
|
||||||
// auto model = qobject_cast<QItemSelectionModel *>(m_selectionModel);
|
|
||||||
// // deselect all items
|
|
||||||
// QModelIndex first = index(0, 0);
|
|
||||||
// QModelIndex last = index(rowCount() - 1, 0);
|
|
||||||
// QItemSelection all(first, last);
|
|
||||||
// m_selectionModel->select(all, QItemSelectionModel::Deselect);
|
|
||||||
|
|
||||||
// emit selectedChanged(true);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// bool SongProxyModel::hasSelection() {
|
|
||||||
// return m_selectionModel->hasSelection();
|
|
||||||
// }
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue