How to get selectedGraph's index?

I want to search in the ui->plot->selectedGraphs() to find where i can get the index, but i don't know how to get