main.cpp 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. #include <QtGui/QApplication>
  2. #include "DfBrowser/dbrowser.h"
  3. #include "DfBrowser/extras/orientation.h"
  4. int main(int argc, char *argv[])
  5. {
  6. QApplication a(argc, argv);
  7. QDir dir(QDir::homePath());
  8. if (a.arguments().count()>1){
  9. if (dir.exists(a.arguments().at(1)))
  10. dir.setPath(a.arguments().at(1));
  11. }
  12. DBrowser *window=new DBrowser(dir.path());
  13. window->fBrowser->setBasePath(QDir::homePath());
  14. //Orientation orientation;
  15. window->setAttribute(Orientation::setOrientation(Orientation::ScreenOrientationAuto));
  16. switch (Orientation::showMode()){
  17. case Orientation::ShowModeFullScreen: window->showFullScreen();break;
  18. case Orientation::ShowModeMaximized: window->showMaximized();break;
  19. case Orientation::ShowModeNormal: window->show();break;
  20. default: window->show();
  21. };
  22. /*
  23. #if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(QT_SIMULATOR) || defined(MEEGO_EDITION) || defined(UI_TABLET)
  24. qDebug("Esto es movil");
  25. #endif
  26. */
  27. return a.exec();
  28. }