bool CmdInstrument::onServer(DebuggerProxy *proxy) {
  m_instPoints = &m_ips;
  m_enabled = true;
  if (m_type == ActionRead) {
    readFromTable(proxy);
  } else if (m_type == ActionWrite) {
    validateAndWriteToTable(proxy);
  }
  return proxy->sendToClient(this);
}
bool CmdInstrument::onServerVM(DebuggerProxy *proxy) {
  m_instPoints = &m_ips;
  m_enabled = true;
  DebuggerProxyVM* proxyVM = static_cast<DebuggerProxyVM*>(proxy);
  if (m_type == ActionRead) {
    readFromTable(proxyVM);
  } else if (m_type == ActionWrite) {
    validateAndWriteToTable(proxyVM);
  }
  return proxy->send(this);
}
Exemple #3
0
TableEditor::TableEditor( QWidget* parent,  QWidget *editWidget, FormWindow *fw, const char* name, bool modal, WFlags fl )
    : TableEditorBase( parent, name, modal, fl ),
#ifndef QT_NO_TABLE
    editTable( (QTable*)editWidget ),
#endif
    formWindow( fw )
{
    connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) );
#ifndef QT_NO_TABLE
    labelColumnPixmap->setText( "" );
    labelRowPixmap->setText( "" );

#ifndef QT_NO_SQL
    if ( !::qt_cast<QDataTable*>(editTable) ) 
#endif
    {
	labelFields->hide();
	comboFields->hide();
	labelTable->hide();
	labelTableValue->hide();
    }
#ifndef QT_NO_SQL
    if ( ::qt_cast<QDataTable*>(editTable) ) {
	// ## why does this behave weird?
	//	TabWidget->removePage( rows_tab );
	//	rows_tab->hide();
	// ## do this in the meantime...
	TabWidget->setTabEnabled( rows_tab, FALSE );
    }

    if ( formWindow->project() && ::qt_cast<QDataTable*>(editTable) ) {
	QStringList lst = MetaDataBase::fakeProperty( editTable, "database" ).toStringList();
	if ( lst.count() == 2 && !lst[ 0 ].isEmpty() && !lst[ 1 ].isEmpty() ) {
	    QStringList fields;
	    fields << "<no field>";
	    fields += formWindow->project()->databaseFieldList( lst[ 0 ], lst[ 1 ] );
	    comboFields->insertStringList( fields );
	}
	if ( !lst[ 1 ].isEmpty() )
	    labelTableValue->setText( lst[ 1 ] );
    }
#endif

    readFromTable();
#endif
}