Ejemplo n.º 1
0
void copyRoom( room *a, room *b)
{
    copyPlayer(&(a->PlayerA), &(b->PlayerA));
    copyPlayer(&(a->PlayerB), &(b->PlayerB));
    a->state = b->state;
    copyTable(a->table, b->table);
}
Ejemplo n.º 2
0
void frmMainStateTable::setupUI(bool hasRowLabels_)
{
    ui = createUI();
    ui->setupUI(tableColumns(), hasRowLabels_, static_cast<QWidget*>(this->parent()));

    ui->toolbarDateBeginEdit->setDate(QDate::fromJulianDay(m_portfolio.startDate()));
    ui->toolbarDateEndEdit->setDate(QDate::fromJulianDay(m_portfolio.endDate()));
    setSortDropDown();

    connect(ui->toolbarDateBeginEdit, SIGNAL(dateChanged(QDate)), this, SLOT(refreshTab()));
    connect(ui->toolbarDateEndEdit, SIGNAL(dateChanged(QDate)), this, SLOT(refreshTab()));
    connect(ui->toolbarSortCmb, SIGNAL(activated(int)), this, SLOT(sortIndexChanged(int)));
    connect(ui->toolbarReorder, SIGNAL(triggered()), this, SLOT(modifyColumns()));
    connect(ui->toolbarExport, SIGNAL(triggered()), ui->table, SLOT(exportTable()));
    connect(ui->tableCopy, SIGNAL(activated()), ui->table, SLOT(copyTable()));
	connect(ui->toolbar1D, SIGNAL(triggered()), this, SLOT(dateClicked()));
    connect(ui->toolbar3M, SIGNAL(triggered()), this, SLOT(dateClicked()));
    connect(ui->toolbar6M, SIGNAL(triggered()), this, SLOT(dateClicked()));
    connect(ui->toolbarYTD, SIGNAL(triggered()), this, SLOT(dateClicked()));
    connect(ui->toolbar1Y, SIGNAL(triggered()), this, SLOT(dateClicked()));
    connect(ui->toolbar5Y, SIGNAL(triggered()), this, SLOT(dateClicked()));
    connect(ui->toolbarMax, SIGNAL(triggered()), this, SLOT(dateClicked()));
    refreshTab();

    connect(ui->table,SIGNAL(doubleClicked(const QModelIndex &)),this,SLOT(cellSelected(const QModelIndex &)));

}
void copyAll(char *srcDb, char* destDb)
/* Copy all gbLoadRna tables from database to another. */
{
struct slName *tables, *tbl;
struct sqlConnection *conn;

gbVerbEnter(1, "copyAll");
conn = hAllocConn(srcDb);
gbLockDb(conn, srcDb);
gbLockDb(conn, destDb);

copyChromInfo(conn, destDb);

/* copy each table */
tables = getTableList(conn);
for (tbl = tables; tbl != NULL; tbl = tbl->next)
    {
    copyTable(conn, destDb, tbl->name, tbl->name);
    }
slFreeList(&tables);
gbUnlockDb(conn, destDb);
gbUnlockDb(conn, srcDb);
hFreeConn(&conn);
gbVerbLeave(1, "copyAll");
}
void copyChromInfo(struct sqlConnection *conn, char* destDb)
/* copy the chromInfo into the dest table if it doesn't already exist.
 * Which not a genbank managed table, this is needed to find the alignments
 * for moving/copying tables. */
{
char destDbTable[512];
safef(destDbTable, sizeof(destDbTable), "%s.%s", destDb, "chromInfo");
if (!sqlTableExists(conn, destDbTable))
    copyTable(conn, destDb, "chromInfo", "chromInfo");
}
Ejemplo n.º 5
0
    int DummyTopend::reportDRConflict(int32_t partitionId, int32_t remoteClusterId, int64_t remoteTimestamp, std::string tableName, DRRecordType action,
            DRConflictType deleteConflict, Table *existingMetaTableForDelete, Table *existingTupleTableForDelete,
            Table *expectedMetaTableForDelete, Table *expectedTupleTableForDelete,
            DRConflictType insertConflict, Table *existingMetaTableForInsert, Table *existingTupleTableForInsert,
            Table *newMetaTableForInsert, Table *newTupleTableForInsert) {
        this->actionType = action;
        this->deleteConflictType = deleteConflict;
        this->insertConflictType = insertConflict;
        this->remoteClusterId = remoteClusterId;
        this->remoteTimestamp = remoteTimestamp;
        char signature[20];

        if (existingMetaTableForDelete) {
            this->existingMetaRowsForDelete = boost::shared_ptr<Table>(copyTable("existingMeta",
                                                                                 existingMetaTableForDelete,
                                                                                 signature));
            this->existingTupleRowsForDelete = boost::shared_ptr<Table>(copyTable("existing",
                                                                                  existingTupleTableForDelete,
                                                                                  signature));
        }

        if (expectedMetaTableForDelete) {
            this->expectedMetaRowsForDelete = boost::shared_ptr<Table>(copyTable("expectedMeta",
                                                                                 expectedMetaTableForDelete,
                                                                                 signature));
            this->expectedTupleRowsForDelete = boost::shared_ptr<Table>(copyTable("expected",
                                                                                  expectedTupleTableForDelete,
                                                                                  signature));
        }

        if (existingMetaTableForInsert) {
            this->existingMetaRowsForInsert = boost::shared_ptr<Table>(copyTable("existingMeta",
                                                                                 existingMetaTableForInsert,
                                                                                 signature));
            this->existingTupleRowsForInsert = boost::shared_ptr<Table>(copyTable("existing",
                                                                                  existingTupleTableForInsert,
                                                                                  signature));
        }

        if (newMetaTableForInsert) {
            this->newMetaRowsForInsert = boost::shared_ptr<Table>(copyTable("newMeta",
                                                                            newMetaTableForInsert,
                                                                            signature));
            this->newTupleRowsForInsert = boost::shared_ptr<Table>(copyTable("new",
                                                                             newTupleTableForInsert,
                                                                             signature));
        }

        return 2; /*resolved but not apply remote change*/
    }
Ejemplo n.º 6
0
tChyba PROM() {
	int analyza;
	int ret;
	//TItem *pt;
	//PROM->id TERM2
	if(token.stav == s_identifikator) {
		if(byla_funkce == false) {
			//pokud nejsme v definici funkce vytvori se lokalni ramec
			ret = pushFrame();
			if(ret != S_BEZ_CHYB) {
				return ret;
			}
		}
		
		

		if(byla_funkce == false) {
			//ukazatel na id v tabulce
			TFunction *tmp = searchFuncTable( token.data );
			if( !tmp ){
				return S_SEMANTICKA_CHYBA_NEDEF;
			}
			//kopirovani dat z tabulky definice funkce do nove vznikleho lokalniho ramce
			ret = copyTable( tmp);//, ptrhtLocal );
			if(ret != S_BEZ_CHYB) {
				return ret;
			}
		}

		token = getNextToken();
		if(token.stav == s_lex_error) {
			return S_LEXIKALNI_CHYBA;
		}
			//volani funkce na zpracovani argumentu
			analyza = TERM2();
			if(analyza != S_BEZ_CHYB) {
				return analyza;
			}
			else {
				if(byla_funkce == false) {
					//pokud nejsme v definici funkce musime na konci vypopnout ukazatel na lokalni ramec
					popFrame();
				}	
				
				return S_BEZ_CHYB;
			}
			return S_SYNTAKTICKA_CHYBA;
	}
	return S_SYNTAKTICKA_CHYBA;		
}
void TableListWidget::tableCopyActionTriggered()
{
	emit copyTable( this->currentItem()->text());
}