Package::Package(Package * parent, UmlPackage * pk) : BrowserNode(parent, pk->name()) { //if (text(0) == "unknown") // unknown = this; uml = pk; QDir d_root(RootSDir); h_path = force_final_slash(pk->cppHDir()); if (h_path.isEmpty()) h_path = RootCDir; else if (QDir::isRelativePath(h_path)) { if (RootCDir.isEmpty()) { WrapperStr err = "<font face=helvetica><b>root path not set in <i>generation settings</i>, " "don't know where is <i>" + h_path + "<i></b></font><br>"; UmlCom::trace(err); } else h_path = force_final_slash(d_root.filePath(h_path)); } src_path = force_final_slash(pk->cppSrcDir()); if (src_path.isEmpty()) src_path = RootCDir; else if (QDir::isRelativePath(src_path)) { if (RootCDir.isEmpty()) { WrapperStr err = "<font face=helvetica><b>root path not set in <i>generation settings</i>, " "don't know where is <i>" + src_path + "<i></b></font><br>"; UmlCom::trace(err); } else src_path = force_final_slash(d_root.filePath(src_path)); } namespace_ = pk->cppNamespace(); if (!h_path.isEmpty()) Pack_From_Path.replace(h_path, this); if ((h_path != src_path) && !src_path.isEmpty()) Pack_From_Path.replace(src_path, this); }
void UmlPackage::getAuxFiles(Q3Dict<void> & files) { static const char * aux[] = { "cpp_includes", "generation_settings", "idl_includes", "java_imports", "stereotypes", "tools", 0 }; const char ** p = aux; QFileInfo prjpath(supportFile()); QString dir = prjpath.dirPath(TRUE) + "/"; while(*p != 0) { QFileInfo fi(dir + *p); if (fi.exists()) files.replace(*p, (void *) 1); p += 1; } }
/** * CustomLoginFlagEditor::fillTable() * * Fills the table with the flags and values for the user. */ void CustomLoginFlagEditor::fillTable() { ADB db; long loginType; Q3Dict<QString> flagDict; // Get the login type. db.query("select LoginType from Logins where LoginID = '%s'", myLoginID); if (!db.rowCount) return; db.getrow(); loginType = atoi(db.curRow["LoginType"]); // Get the available login flags for this login type db.query("select Tag, Value from LoginTypeFlags where LoginTypeID = %ld", loginType); if (!db.rowCount) return; // Load the dictionary while(db.getrow()) { flagDict.insert(db.curRow["Tag"], new QString(db.curRow["Value"])); } // Get whatever data is in the LoginFlagValues that is custom for this user. db.query("select * from LoginFlagValues where LoginID = '%s'", myLoginID); if (db.rowCount) while (db.getrow()) { flagDict.replace(db.curRow["LoginFlag"], new QString(db.curRow["FlagValue"])); } // Now put the stuff from our flagDict into the grid Q3DictIterator<QString> it(flagDict); for( ; it.current(); ++it ) { flagTable->insertRows(flagTable->numRows(), 1); flagTable->setText(flagTable->numRows()-1, 0, it.currentKey()); flagTable->setText(flagTable->numRows()-1, 1, it.current()->ascii()); } // Set column 0(1) to be read only flagTable->setColumnReadOnly(0, true); flagTable->adjustColumn(1); }