Пример #1
0
static void ccdsMkTables(char *ccdsDb, char *hgDb, int ccdsBuildId, char *ccdsInfoOut, char *ccdsNotesOut, char *ccdsGeneOut)
/* create tables for hg db from imported CCDS database */
{
if (verboseLevel() >= 2)
    sqlMonitorEnable(JKSQL_TRACE);
struct sqlConnection *ccdsConn = ccdsSqlConn(ccdsDb);
struct genomeInfo *genome = getGenomeInfo(hgDb, ccdsBuildId);
struct hash *infoCcds = hashNew(20);
struct hash *geneCcds = hashNew(20);
struct hash* ignoreTbl = buildIgnoreTbl(ccdsConn, genome);

char ccdsInfoFile[PATH_LEN], ccdsInfoTbl[PATH_LEN];
ccdsGetTblFileNames(ccdsInfoOut, ccdsInfoTbl, ccdsInfoFile);
createCcdsInfo(ccdsConn, ccdsInfoFile, genome, ignoreTbl, infoCcds);

char ccdsNotesFile[PATH_LEN], ccdsNotesTbl[PATH_LEN];
ccdsGetTblFileNames(ccdsNotesOut, ccdsNotesTbl, ccdsNotesFile);
createCcdsNotes(ccdsConn, ccdsNotesFile, genome, infoCcds);

char ccdsGeneFile[PATH_LEN], ccdsGeneTbl[PATH_LEN];
ccdsGetTblFileNames(ccdsGeneOut, ccdsGeneTbl, ccdsGeneFile);
createCcdsGene(ccdsConn, ccdsGeneFile, genome, ignoreTbl, geneCcds);

sqlDisconnect(&ccdsConn);
sqlMonitorDisable();

gotCcdsValidate(infoCcds, geneCcds);

if (loadDb)
    loadTables(hgDb, ccdsInfoTbl, ccdsInfoFile, ccdsGeneTbl, ccdsGeneFile, ccdsNotesTbl, ccdsNotesFile);
}
Пример #2
0
ATbool TS_loadSnapshot(const char* file)
{
  ATerm s = ATreadFromNamedFile(file);

  if (s != NULL) {
    SS_Snapshot snapshot = SS_SnapshotFromTerm(s);

    if (SS_isValidSnapshot(snapshot)) {
      loadTables(SS_getSnapshotTables(snapshot));
      return ATtrue;
    }
  }
  return ATfalse;
}
Пример #3
0
void TpccStoredProceduresTest::SetUp() {
  io::ResourceManager::getInstance().clear();
  loadTables();

  i_customer_size = getTable(Customer)->size();
  i_orders_size = getTable(Orders)->size();
  i_orderLine_size = getTable(OrderLine)->size();
  i_warehouse_size = getTable(Warehouse)->size();
  i_newOrder_size = getTable(NewOrder)->size();
  i_district_size = getTable(District)->size();
  i_item_size = getTable(Item)->size();
  i_stock_size = getTable(Stock)->size();
  i_history_size = getTable(History)->size();
}
Пример #4
0
void FLManager::cleanupMetaData()
{
#ifndef FL_QUICK_CLIENT
  if (!existsTable("flfiles") || !existsTable("flmetadata"))
    return;

  QSqlQuery q(QString::null, db_->dbAux());
  QSqlCursor c("flmetadata", true, db_->dbAux());
  QSqlRecord *buffer;
  QString table;

  q.setForwardOnly(true);
  c.setForwardOnly(true);

  if (!dictKeyMetaData_) {
    dictKeyMetaData_ = new QDict<QString> (277);
    dictKeyMetaData_->setAutoDelete(true);
  } else
    dictKeyMetaData_->clear();

  loadTables();
  db_->managerModules()->loadKeyFiles();
  db_->managerModules()->loadAllIdModules();
  db_->managerModules()->loadIdAreas();

  q.exec("SELECT tabla,xml FROM flmetadata");
  while (q.next())
    dictKeyMetaData_->replace(q.value(0).toString(), new QString(q.value(1).toString()));

  q.exec("SELECT nombre,sha FROM flfiles WHERE nombre LIKE '%.mtd'");
  while (q.next()) {
    table = q.value(0).toString();
    table = table.replace(".mtd", "");
    if (!existsTable(table))
      createTable(table);
    FLTableMetaData *tmd = metadata(table);
    if (!tmd)
      qWarning("FLManager::cleanupMetaData "
               + QApplication::tr("No se ha podido crear los metadatos para la tabla %1").arg(table));
    c.select("tabla='" + table + "'");
    if (c.next()) {
      buffer = c.primeUpdate();
      buffer->setValue("xml", q.value(1).toString());
      c.update();
    }
    dictKeyMetaData_->replace(table, new QString(q.value(1).toString()));
  }
#endif
}
Пример #5
0
void TalkManager::addTable(const Common::UString &nameMale, const Common::UString &nameFemale,
                           bool isAlt, uint32 priority, Common::ChangeID *changeID) {

	TalkTable *tableMale = 0, *tableFemale = 0;
	loadTables(nameMale, nameFemale, tableMale, tableFemale, LangMan.getCurrentEncoding());

	if (!tableMale && !tableFemale)
		throw Common::Exception("No such talk table \"%s\"/\"%s\"", nameMale.c_str(), nameFemale.c_str());

	Tables *tables = &_tablesMain;
	if (isAlt)
		tables = &_tablesAlt;

	const uint32 id = Common::generateIDNumber();

	tables->push_back(Table(tableMale, tableFemale, priority, id));
	tables->sort();

	if (changeID)
		changeID->setContent(new Change(id, isAlt));
}
Пример #6
0
void UserForm:: on_user_logined()
{
    loadTables();
}
Пример #7
0
void SociContainer::refreshTables(StdString const &oSelection, bool bNotify)
{
	std::vector<StdString> l = loadTables();
	setTables(l, oSelection, bNotify);
}
Пример #8
0
void TransitionTriangulation::init()
{
	loadTables();
	loadBuffers();
	loadPrograms();
}
Пример #9
0
DatabaseIteratorPtr DatabaseDictionary::getIterator(const Context & /*context*/)
{
    return std::make_unique<DatabaseSnapshotIterator>(loadTables());
}
Пример #10
0
HighScore::HighScore
(
	QWidget* parent,
	const char* name
)
	:
	QDialog( parent, name, true, 0 )
{

	// form the target name


	filename = locateLocal("appdata", highScoreFilename);

	QFont fnt;
	// Number
	QLabel* qtarch_Label_3;
	qtarch_Label_3 = new QLabel( this, "Label_3" );
	qtarch_Label_3->setGeometry( 10, 45, 30, 30 );
	qtarch_Label_3->setFrameStyle( 50 );
	qtarch_Label_3->setText( i18n("Pos") );
	qtarch_Label_3->setAlignment( AlignCenter );
	fnt = qtarch_Label_3->font();
	fnt.setBold(true);
	qtarch_Label_3->setFont(fnt);


	// name

	QLabel* qtarch_Label_4;
	qtarch_Label_4 = new QLabel( this, "Label_4" );
	qtarch_Label_4->setGeometry( 40, 45, 150, 30 );
	qtarch_Label_4->setFrameStyle( 50 );
	qtarch_Label_4->setText( i18n("Name") );
	qtarch_Label_4->setFont(fnt);


	// board number
	QLabel* boardTitle;
	boardTitle= new QLabel( this, "" );
	boardTitle->setGeometry( 190, 45, 80, 30 );
	boardTitle->setFrameStyle( 50 );
	boardTitle->setText( i18n("Board") );
	boardTitle->setFont(fnt);

	// score
	QLabel* qtarch_Label_5;
	qtarch_Label_5 = new QLabel( this, "Label_5" );
	qtarch_Label_5->setGeometry( 270, 45, 70, 30 );
	qtarch_Label_5->setFrameStyle( 50 );
	qtarch_Label_5->setText( i18n("Score") );
	qtarch_Label_5->setFont(fnt);

        // time
        QLabel* qtarch_Label_6;
        qtarch_Label_6 = new QLabel( this, "Label_6" );
        qtarch_Label_6->setGeometry( 340, 45, 70, 30 );
        qtarch_Label_6->setFrameStyle( 50 );
        qtarch_Label_6->setText( i18n("Time") );
        qtarch_Label_6->setFont(fnt); 



	for (int row=0; row<numScores; row++)
		addRow(row);

	QPushButton* qtarch_PushButton_1;
	qtarch_PushButton_1 = new KPushButton( KStdGuiItem::ok(), this, "PushButton_1" );
	qtarch_PushButton_1->setGeometry( 110+35, 340+50, 100, 30 );
	qtarch_PushButton_1->setMinimumSize( 0, 0 );
	qtarch_PushButton_1->setMaximumSize( 32767, 32767 );
	qtarch_PushButton_1->setFocusPolicy( QWidget::TabFocus );
	qtarch_PushButton_1->setAutoRepeat( false );
        qtarch_PushButton_1->setAutoResize( false );
        qtarch_PushButton_1->setDefault(true);

	QPushButton* resetBtn;
	resetBtn= new QPushButton( this, "resetBtn" );
	resetBtn->setGeometry( 10, 5, 25, 25);
	resetBtn->setMinimumSize( 0, 0 );
	resetBtn->setMaximumSize( 32767, 32767 );
	resetBtn->setFocusPolicy( QWidget::TabFocus );
	//resetBtn->setText(i18n( "Reset" ));
	resetBtn->setAutoRepeat( false );
	resetBtn->setAutoResize( false );

 	KIconLoader *loader = KGlobal::iconLoader();
        resetBtn->setPixmap(loader->loadIcon("editdelete", KIcon::Toolbar));
       


	/* We create the ediat area for the hi score name entry and move it */
	/* off screen. it is moved over and placed in position when a */
	/* new name is added */

	lineEdit = new QLineEdit(this, "");
	lineEdit->setGeometry( 50, 40+(20*30), 190, 30 );
	lineEdit->setFocusPolicy(QWidget::StrongFocus);
	lineEdit->setFrame(true);
	lineEdit->setEchoMode(QLineEdit::Normal);
	lineEdit->setText("");

	// the drop down for the board names

        combo = new QComboBox( false, this, "combo" );
        combo->setGeometry( 65, 5, 220, 25 );
        combo->setMinimumSize( 0, 0 );
        combo->setMaximumSize( 32767, 32767 );
        combo->setFocusPolicy( QWidget::StrongFocus );
        combo->setSizeLimit( 10 );
        combo->setAutoResize( false );
        connect( combo, SIGNAL(activated(int)), SLOT(selectionChanged(int)) );


	resize( 350+70,390+45 );
	setFixedSize(350+70,390+45);

	tables = NULL; 
	loadTables();
	currTable = tables;

	setCaption(kapp->makeStdCaption(i18n("Scores")));

	selectedLine = -1;	

	connect(lineEdit, SIGNAL( textChanged(const QString &)),
					  SLOT( nameChanged(const QString &)));


	connect(qtarch_PushButton_1, SIGNAL(clicked()), SLOT(reject()));
	connect(resetBtn, SIGNAL(clicked()), SLOT(reset()));
}