/***************************************************************************
 *   Copyright (C) 2005 by xavier helluy   *
 *   xavier.helluy@web.de   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA.             *
 ***************************************************************************/

#include "queryfieldmanager.h"

#include <kdebug.h>

  
QueryFieldManager::QueryFieldManager(
	QWidget* parent,  const char* name, WFlags fl )
	: QWidget(parent, name, fl )
{
	KGuiItem kg("","cr16-action-pmaddpoint","add search field","add search field");
	kg.iconSet(KIcon::Toolbar);
	addQueryFieldBelow = new KPushButton(kg,this,"add");
	addQueryFieldBelow->setAccel( QKeySequence( tr2i18n( "Ctrl+N" ) ) );
// 	addQueryFieldBelow->setEnabled(FALSE);
	
	removeQueryField = new KPushButton(
			KGuiItem(
			QString::null,
	"cr16-action-pmremovepoint",
	"remove field",
	QString::null),
	this,
	"del");
	
	kdDebug() << "SIZE MINI:"  << 	removeQueryField->minimumSize()
			<< endl;
	removeQueryField->setSizePolicy(
			QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding,1,1,TRUE)
				       );
	addQueryFieldBelow->setSizePolicy(
			QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding,1,1,TRUE)
					 );
	layoutA = new QHBoxLayout(this);
	layoutA->addSpacing(10);
	layoutA->addWidget(removeQueryField);
	layoutA->addWidget(addQueryFieldBelow);
	kdDebug() << "QueryFieldManager::QueryFieldManager END"  << endl;

}

QueryFieldManager::~QueryFieldManager()
{
}

#include "queryfieldmanager.moc"
