void ErrDialog::setSrcTables(QList<MdiSubWindow *> tables)
{
	if (tables.isEmpty())
		return;
	
	srcTables = tables;
	tableNamesBox->clear();

    foreach(MdiSubWindow *w, tables)
		tableNamesBox->insertItem(w->objectName());

	selectSrcTable(tableNamesBox->currentIndex());
}
void ErrDialog::setSrcTables(QWidgetList* tables)
{
	srcTables = tables;
	tableNamesBox->clear();

	QList<QWidget *>::const_iterator i;
    for (i = srcTables->begin(); i != srcTables->end(); i++)
		tableNamesBox->insertItem((*i)->name());

	if (!nameLabel->currentText().contains("="))
		tableNamesBox->setCurrentIndex(tableNamesBox->findText(nameLabel->currentText().split("_", QString::SkipEmptyParts)[0]));
	selectSrcTable(tableNamesBox->currentIndex());
}
Beispiel #3
0
void ErrDialog::setSrcTables(QList<MdiSubWindow *> tables)
{
  if (tables.isEmpty())
    return;

  srcTables = tables;
  tableNamesBox->clear();

  foreach(MdiSubWindow *w, tables)
    tableNamesBox->insertItem(w->objectName());

  if (!nameLabel->currentText().contains("="))
    tableNamesBox->setCurrentIndex(tableNamesBox->findText(nameLabel->currentText().split("_", QString::SkipEmptyParts)[0]));
  if (tableNamesBox->currentIndex() != -1) selectSrcTable(tableNamesBox->currentIndex());
}