void Merit::createActions() { // meritTab = new MeritTab; // welcome = new Welcome; // connect(welcome->startButton, SIGNAL(clicked()), this, SLOT(aboutMerit())); connect(ui.actionAbout_Merit, SIGNAL(triggered()), this, SLOT(aboutMerit())); // connect(ui.actionNew_project, SIGNAL(triggered()), this, SLOT(addSubWin())); connect(ui.actionWeather, SIGNAL(triggered()), this, SLOT(importProfile())); }
void Profile::scanProfiles() { profiles.clear(); QVector<QString> toxfiles = getFilesByExt("tox"), inifiles = getFilesByExt("ini"); for (QString toxfile : toxfiles) { if (!inifiles.contains(toxfile)) importProfile(toxfile); profiles.append(toxfile); } }
void UmlPackage::appliedProfile(FileIn & in, Token & token, UmlItem *) { if (! token.closed()) { WrapperStr k = token.what(); const char * kstr = k; while (in.read(), !token.close(kstr)) { if (token.what() == "appliedprofile") { WrapperStr s = token.valueOf("href"); importProfile(in, s); } if (! token.closed()) in.finish(token.what()); } } }
void UmlPackage::packageImport(FileIn & in, Token & tk) { if (! tk.closed()) { WrapperStr id = tk.xmiId(); WrapperStr k = tk.what(); const char * kstr = k; while (in.read(), !tk.close(kstr)) { if (tk.what() == "importedpackage") { if (tk.xmiType() == "uml:Model") { WrapperStr v; if (propertyValue("metamodelReference", v) && (v == id)) { WrapperStr href = tk.valueOf("href"); int index = href.find('#'); set_PropertyValue("metamodelReference", (index == -1) ? href : href.left(index)); } } else if (tk.xmiType() == "uml:Profile") { WrapperStr s = tk.xmiIdref(); UmlPackage * pf = 0; if (!s.isEmpty()) { QMap<WrapperStr, UmlItem *>::Iterator it = All.find(s); if (it == All.end()) UnresolvedRelation::add(4, this->id(), s, "", ""); else if ((*it)->kind() == aPackage) pf = (UmlPackage *) *it; } else pf = importProfile(in, tk.valueOf("href")); if (pf != 0) { UmlNcRelation * ncr = UmlNcRelation::create(aDependency, this, pf); if (ncr != 0) ncr->set_Stereotype("import"); } } } else if (tk.what() == "importedelement") { WrapperStr v; if (propertyValue("metaclassReference", v) && (v == id)) { WrapperStr href = tk.valueOf("href"); int index = href.find('#'); set_PropertyValue("metaclassReference", (index == -1) ? href : href.left(index)); } } if (! tk.closed()) in.finish(tk.what()); } } }