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

 Copyright 2012 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 MvQApplication_H
#define MvQApplication_H

#ifdef METVIEW_QT5
 #include <QtWidgets/QApplication>
#else
 #include <QtGui/QApplication>
#endif
#include <QWidget>

#include <MvRequest.h>
#include <MvProtocol.h>
#include <qsocketnotifier.h>

#include "MvQDragDrop.h"
#include "MvQX11Application.h"

using namespace std;

class MvQApplication : public MvQX11Application, public MvApplication
{
   Q_OBJECT

public:
	// Constructor
	MvQApplication(int& ac, char** av, const char* name=NULL);

	// Destructor
	virtual ~MvQApplication();

public slots:
	void slotDataReceived(int);
	void processDropRequest(MvRequest*);

private:
	// No copy allowed
	MvQApplication(const MvQApplication&);
	MvQApplication& operator=(const MvQApplication&){return *this;}

	QSocketNotifier *sn_;
	char* desktopName_;
};

#endif
