/***************************** LICENSE START ***********************************

 Copyright 2015 ECMWF and INPE. This software is distributed under the terms
 of the Apache License version 2.0. In applying this license, ECMWF does not
 waive the privileges and immunities granted to it by virtue of its status as
 an Intergovernmental Organization or submit itself to any jurisdiction.

 ***************************** LICENSE END *************************************/

#ifndef MvQComboBoxLine_H
#define MvQComboBoxLine_H

#include <QComboBox>
#include <QString>

#include "MvQRequestPanelLine.h"
#include "Parameter.h"

class  Request;
class  RequestPanel;

class  MvQEditorComboBox : public QComboBox
{
public:
  	MvQEditorComboBox(QWidget *parent=0);
protected:  	
	void wheelEvent(QWheelEvent *event); 
	void focusInEvent(QFocusEvent* event);
	void focusOutEvent(QFocusEvent* event);
};


class MvQComboBoxLine : public MvQRequestPanelLine, public ParameterScanner
{
Q_OBJECT  
  
public:
	MvQComboBoxLine(RequestPanel& owner,const Parameter& param);
		
	QString currentValue() {return QString();}
	void addValue(QString) {}
	
	void refresh(const vector<string>&);

public slots:	
        void slotCurrentChanged(int);	

protected:
	 void next(const Parameter&, const char* first,const char* second);
	 
	 MvQEditorComboBox *cbEdit_;
	 bool reportChange_;
	
};	


#endif
