MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / addProjectProperty

Method addProjectProperty

src/plugins/project/projectcore.cpp:151–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151void ProjectCore::addProjectProperty(WindowService *windowService, DToolButton *projectProperty)
152{
153 projectProperty->setIcon(QIcon::fromTheme("settings"));
154 projectProperty->setToolTip(tr("Open activted project`s property dialog"));
155
156 connect(projectProperty, &DToolButton::clicked, this, [=]() {
157 project.openProjectPropertys(ProjectKeeper::instance()->treeView()->getActiveProjectInfo());
158 },
159 Qt::DirectConnection);
160 // todo(zta :temp only supprt cmake project do other kit later
161 connect(ProjectProxy::instance(), &ProjectProxy::projectActivated, this, [=](const ProjectInfo &prjInfo) {
162 if (prjInfo.kitName() != "cmake")
163 projectProperty->setEnabled(false);
164 else
165 projectProperty->setEnabled(true);
166 },
167 Qt::DirectConnection);
168}
169
170void ProjectCore::initLocator(dpf::PluginServiceContext &ctx)
171{

Callers

nothing calls this directly

Calls 6

connectFunction · 0.85
setIconMethod · 0.45
getActiveProjectInfoMethod · 0.45
treeViewMethod · 0.45
kitNameMethod · 0.45
setEnabledMethod · 0.45

Tested by

no test coverage detected