|
|
|
@ -109,13 +109,13 @@ void TokenDialog::setupStackPage2()
|
|
|
|
|
TQVButtonGroup* group = new TQVButtonGroup( i18n("What do you want to insert?"), stackPage2 );
|
|
|
|
|
|
|
|
|
|
radioVariable = new TQRadioButton( i18n("Insert a custom &variable"), group );
|
|
|
|
|
radioSTQLQuery = new TQRadioButton( i18n("Insert a &SQL query"), group );
|
|
|
|
|
radioSQLQuery = new TQRadioButton( i18n("Insert a &SQL query"), group );
|
|
|
|
|
radioJavaScript = new TQRadioButton( i18n("Insert a &JavaScript function"), group );
|
|
|
|
|
|
|
|
|
|
radioVariable->setChecked( true );
|
|
|
|
|
|
|
|
|
|
connect( radioVariable, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableControls() ) );
|
|
|
|
|
connect( radioSTQLQuery, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableControls() ) );
|
|
|
|
|
connect( radioSQLQuery, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableControls() ) );
|
|
|
|
|
connect( radioJavaScript, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableControls() ) );
|
|
|
|
|
|
|
|
|
|
page2->addWidget( stackPage2 );
|
|
|
|
@ -265,7 +265,7 @@ void TokenDialog::accept()
|
|
|
|
|
else if( radioVariableExisting->isChecked() )
|
|
|
|
|
m_result = listVariable->currentText();
|
|
|
|
|
}
|
|
|
|
|
else if( radioSTQLQuery->isChecked() )
|
|
|
|
|
else if( radioSQLQuery->isChecked() )
|
|
|
|
|
m_result = TQString( "sqlquery:%2").tqarg( editQuery->text() );
|
|
|
|
|
else if( radioJavaScript->isChecked() )
|
|
|
|
|
m_result = TQString( "js:%2").tqarg( editJavaScript->text() );
|
|
|
|
@ -301,7 +301,7 @@ void TokenDialog::showPage( TQWidget* w )
|
|
|
|
|
{
|
|
|
|
|
if( radioVariable->isChecked() )
|
|
|
|
|
page3->raiseWidget( stack2Page3 );
|
|
|
|
|
else if( radioSTQLQuery->isChecked() )
|
|
|
|
|
else if( radioSQLQuery->isChecked() )
|
|
|
|
|
page3->raiseWidget( stack2Page4 );
|
|
|
|
|
else if( radioJavaScript->isChecked() )
|
|
|
|
|
{
|
|
|
|
@ -448,8 +448,8 @@ void TokenDialog::enableControls()
|
|
|
|
|
listVariable->isEnabled() && listVariable->currentItem() != -1 )
|
|
|
|
|
setFinishEnabled( page3, true );
|
|
|
|
|
|
|
|
|
|
buttonQuery->setEnabled( radioSTQLQuery->isChecked() && !editQuery->text().isEmpty() && SqlTables::isConnected() );
|
|
|
|
|
if( radioSTQLQuery->isChecked() && !editQuery->text().isEmpty() )
|
|
|
|
|
buttonQuery->setEnabled( radioSQLQuery->isChecked() && !editQuery->text().isEmpty() && SqlTables::isConnected() );
|
|
|
|
|
if( radioSQLQuery->isChecked() && !editQuery->text().isEmpty() )
|
|
|
|
|
setFinishEnabled( page3, true );
|
|
|
|
|
|
|
|
|
|
if( radioJavaScript->isChecked() && !editJavaScript->text().isEmpty() )
|
|
|
|
|