/***************************************************************************
 *                                                                         *
 *   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 code generated by:
 *      Author : thomas
 *      Date   : Thu Nov 20 2003
 */

#include <kfiledialog.h>
#include <kdebug.h>
#include <klocale.h>
#include <kcombobox.h>
#include <qlabel.h>
#include <qregexp.h>
#include "cppcodegenerationform.h"

CPPCodeGenerationForm::CPPCodeGenerationForm( QWidget *parent, const char *name )
	: CPPCodeGenerationFormBase (parent,name)
{

}

CPPCodeGenerationForm::~CPPCodeGenerationForm()
{
}

void CPPCodeGenerationForm::browseClicked()
{

	QString button = sender()->name();
	QString file = KFileDialog::getOpenFileName( QString::null, "*.h", this, "Get Header File");

        if(file.isEmpty())
                return;

        if(button=="m_browseStringButton")
	{
		// search for match in history list, if absent, then add it
		m_stringIncludeFileHistoryCombo->setCurrentItem(file, true);
	}
        else if(button=="m_browseListButton")
	{
		// search for match in history list, if absent, then add it
		m_listIncludeFileHistoryCombo->setCurrentItem(file, true);
	}
}

#include "cppcodegenerationform.moc"
