• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

tests/image/image.cpp

Go to the documentation of this file.
00001 #include <QApplication>
00002 #include <QObject>
00003 
00004 #include "DGVImage.h"
00005 
00006 int main(int argc, char *argv[])
00007 {
00008     QApplication app(argc,argv);
00009     DGVImage Image;
00010     QFileDialog *fileOpener = new QFileDialog;
00011 
00012     QString filename = fileOpener->getOpenFileName(0,
00013                            QObject::tr("Select File to Open"),
00014                            ".",
00015                            QObject::tr("Images (*.png *.ppm *.pgm *.pbm *pnm *.tif *tiff *.jpeg *.jpg *.bmp)"));
00016 
00017     if(!Image.openImage(filename))
00018     {
00019         cerr << "Error Loading file" << endl;
00020         return EXIT_FAILURE;
00021     }
00022 
00023     Image.setScaledContents(true);
00024     Image.show();
00025 
00026         return app.exec();
00027 }

Generated on Wed Sep 8 2010 01:36:51 for DGV by  doxygen 1.7.1