making items select and activate so as to follow the presentation
This commit is contained in:
parent
91bb08fbf2
commit
b154cca3ed
3 changed files with 16 additions and 1 deletions
|
@ -157,6 +157,7 @@ Controls.Page {
|
|||
print(item);
|
||||
|
||||
presentation.stopVideo();
|
||||
pWindow.stopVideo();
|
||||
/* presentation.itemType = item.type; */
|
||||
print("Time to start changing");
|
||||
|
||||
|
@ -169,7 +170,7 @@ Controls.Page {
|
|||
/* } */
|
||||
|
||||
presentation.textIndex = 0;
|
||||
serviceItemModel.select(index);
|
||||
/* serviceItemModel.select(index); */
|
||||
/* presentation.changeSlide(); */
|
||||
|
||||
print("Slide changed to: " + item.name);
|
||||
|
|
|
@ -209,6 +209,12 @@ Item {
|
|||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
|
||||
|
||||
/* Connections { */
|
||||
/* target: serviceItemModel */
|
||||
/* onDataChanged: previewSlidesList.positionViewAtIndex(index, */
|
||||
/* ListView.Center) */
|
||||
/* } */
|
||||
}
|
||||
Kirigami.WheelHandler {
|
||||
id: wheelHandler
|
||||
|
|
|
@ -373,6 +373,14 @@ QVariantMap ServiceItemModel::getItem(int index) const {
|
|||
}
|
||||
|
||||
bool ServiceItemModel::select(int id) {
|
||||
for (int i = 0; i < m_items.length(); i++) {
|
||||
QModelIndex idx = index(i);
|
||||
ServiceItem *item = m_items[idx.row()];
|
||||
item->setSelected(false);
|
||||
qDebug() << "################";
|
||||
qDebug() << "deselected" << item->name();
|
||||
qDebug() << "################";
|
||||
}
|
||||
QModelIndex idx = index(id);
|
||||
ServiceItem *item = m_items[idx.row()];
|
||||
item->setSelected(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue