AdminMainControl::AdminMainControl(Admin &admin) :
    _admin(admin), _view(*this)
{
    getProjectList();
    _view.setName(admin.getDisplayName());
    _view.setModal(true);
    _view.exec();
}
Example #2
0
ParserTreeItem::ConstPtr Parser::parse()
{
    QTime time;
    if (debug)
        time.start();

    ParserTreeItem::Ptr rootItem(new ParserTreeItem());

    // check all projects
    QList<ProjectExplorer::Project *> projects = getProjectList();
    foreach (const ProjectExplorer::Project *prj, projects) {
        if (!prj)
            continue;

        ParserTreeItem::Ptr item;
        if (!d->flatMode)
            item = ParserTreeItem::Ptr(new ParserTreeItem());

        QString prjName(prj->displayName());
        QString prjType(prjName);
        if (prj->document())
            prjType = prj->document()->filePath();
        SymbolInformation inf(prjName, prjType);

        QStringList projectList = addProjectNode(item, prj->rootProjectNode());

        if (d->flatMode) {
            // use prj path (prjType) as a project id
//            addProject(item, prj->files(ProjectExplorer::Project::ExcludeGeneratedFiles), prjType);
            //! \todo return back, works too long
            ParserTreeItem::Ptr flatItem = createFlatTree(projectList);
            item.swap(flatItem);
        }
        item->setIcon(prj->rootProjectNode()->icon());
        rootItem->appendChild(item, inf);
    }

    if (debug)
        qDebug() << "Class View:" << QDateTime::currentDateTime().toString()
            << "Parsed in " << time.elapsed() << "msecs.";

    return rootItem;
}
void AdminMainControl::createProject() {
    CreateProjectControl createProjectControl;
    getProjectList();
    _view.show();
}