
#include "Display.h"
#include <qapplication.h>
#include <qwidget.h>
#include <qdirectpainter_qws.h>

bool Display::initialized = false;
int Display::theWidth;
int Display::theHeight;
RotationMode Display::theRotation;

void Display::init()
{
  if(initialized)
    return;
    
  initialized = true;

  QWidget *w = QApplication::desktop();
  QDirectPainter painter(w);

  theWidth = w->width();
  theHeight = w->height();
  theRotation = (RotationMode)painter.transformOrientation();
  
/*
  if((theRotation == ROTATION_270) ||
     (theRotation == ROTATION_90))
  {
    int t = theWidth;
    theWidth = theHeight;
    theHeight = t;
  }
*/
}
