
#include <qwidget.h>
#include <qapplication.h>
#include <qmessagebox.h>
#include "mainpanel.h"
#include "../../src/glfunc.h"


int main( int argc, char ** argv ) {

    QApplication a( argc, argv );

	CMainPanel * mw = NULL;
	
	if (isMonitoringActive()!=true){
		QString str = "PowerSoft Plus monitoring service is not started!";
		QMessageBox::critical(0, "PowerSoft Plus", str);
	} else {
	    mw = new CMainPanel();
	    if (mw != NULL) {
		mw->show();
		mw->dataRefresh();
	    }
	}

	a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) );
    
	return a.exec();
}
