void put_dir(const char* task)/*将解析的目录放入工作队列*/ { std::string p_task(task); info->lock(); (info->work_queue).push(p_task); info->unfinished++; info->unlock(); }
void ProjectsTree::createViewActions() { startAction = new QAction(this); startAction->setText("&Start"); startAction->setStatusTip(tr("Change to this project")); startAction->setShortcut(tr("Ctrl+S")); startAction->setShortcutContext( Qt::ApplicationShortcut ); connect(startAction, SIGNAL(triggered()), this, SLOT(startProject())); noteAction = new QAction(this); noteAction->setText("Add &Note"); noteAction->setStatusTip(tr("Change to this project")); noteAction->setShortcut(tr("Ctrl+N")); connect(noteAction, SIGNAL(triggered()), this, SLOT(p_note())); taskAction = new QAction(this); taskAction->setText("Add &Task"); taskAction->setStatusTip(tr("Add a task to this project")); taskAction->setShortcut(tr("Ctrl+T")); connect(taskAction, SIGNAL(triggered()), this, SLOT(p_task())); autoAction = new QAction(this); autoAction->setText("Add &Auto Select"); autoAction->setStatusTip(tr("Set up auto select of project")); autoAction->setShortcut(tr("Ctrl+A")); connect(autoAction, SIGNAL(triggered()), this, SLOT(p_auto())); propAction = new QAction(this); propAction->setText("Prop&erities"); propAction->setStatusTip(tr("Edit Properties of project")); propAction->setShortcut(tr("Ctrl+E")); connect(propAction, SIGNAL(triggered()), this, SLOT(p_prop())); }