Exemplo n.º 1
0
void BoxWidget::OnClickListView(const QModelIndex & index)
{
    if(index.row() == 0)
    {
        sessionProxy->runApp("ubuntu-kylin-software-center");
    }
    else if(index.row() == 1) {
        emit this->sendSubIndex(0);
    }
    else if(index.row() == 2) {
        emit this->sendSubIndex(1);
    }
    else
    {
//        QString guid = pluginModel.getGuid(index.row() - 1);
        QString guid = pluginModel.getGuid(index.row() - 3);
        PluginInterface* interface = PluginManager::Instance()->getInterfaceByGuid<PluginInterface>(guid);
        interface->doAction();
    }
}