Ejemplo n.º 1
0
APP_NAMESPACE_START

ProjectDock::ProjectDock(QWidget *p)
    : QDockWidget(__("project", "docks"), p)
{
    _connections << connect(this, SIGNAL(fileOpen(QString)), p, SLOT(onFileOpen(QString)));
    _connections << connect(p, SIGNAL(projectOpen(QString)), this, SLOT(onProjectOpen(QString)));
    _connections << connect(p, SIGNAL(projectReload()), this, SLOT(onProjectReload()));
    _tree = new QTreeWidget(this);
    _tree->header()->hide();
    _tree->setContextMenuPolicy(Qt::CustomContextMenu);
    _tree->setEditTriggers(QAbstractItemView::NoEditTriggers);
    _tree->setSelectionBehavior(QAbstractItemView::SelectItems);
    _tree->setSelectionMode(QAbstractItemView::SingleSelection);
    _tree->setSortingEnabled(false);
    _connections << connect(_tree, &QTreeWidget::doubleClicked, this, &ProjectDock::onDoubleClicked);
    setObjectName("ProjectDock");
    setWidget(_tree);
}
Ejemplo n.º 2
0
void Ide::onMenuBarProjectReload()
{
    emit projectReload();
}