QgsSearchQueryBuilder::QgsSearchQueryBuilder( QgsVectorLayer* layer,
    QWidget *parent, const Qt::WindowFlags& fl )
    : QDialog( parent, fl ), mLayer( layer )
{
  setupUi( this );
  setupListViews();

  setWindowTitle( tr( "Search query builder" ) );

  QPushButton *pbn = new QPushButton( tr( "&Test" ) );
  buttonBox->addButton( pbn, QDialogButtonBox::ActionRole );
  connect( pbn, SIGNAL( clicked() ), this, SLOT( on_btnTest_clicked() ) );

  pbn = new QPushButton( tr( "&Clear" ) );
  buttonBox->addButton( pbn, QDialogButtonBox::ActionRole );
  connect( pbn, SIGNAL( clicked() ), this, SLOT( on_btnClear_clicked() ) );

  pbn = new QPushButton( tr( "&Save..." ) );
  buttonBox->addButton( pbn, QDialogButtonBox::ActionRole );
  pbn->setToolTip( tr( "Save query to an xml file" ) );
  connect( pbn, SIGNAL( clicked() ), this, SLOT( saveQuery() ) );

  pbn = new QPushButton( tr( "&Load..." ) );
  buttonBox->addButton( pbn, QDialogButtonBox::ActionRole );
  pbn->setToolTip( tr( "Load query from xml file" ) );
  connect( pbn, SIGNAL( clicked() ), this, SLOT( loadQuery() ) );

  if ( layer )
    lblDataUri->setText( layer->name() );
  populateFields();
}
QWidget* yandexnarodPlugin::options()
{
	if(!enabled) {
		return 0;
	}

	settingswidget = new yandexnarodSettings();
	connect(settingswidget, SIGNAL(testclick()), this,  SLOT(on_btnTest_clicked()));
	connect(settingswidget, SIGNAL(startManager()), this, SLOT(manage_clicked()));

	return settingswidget;
}