main.cpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #include "mainwindow.h"
  2. #include <QtGui/QApplication>
  3. #include "mainwindow.h"
  4. #include "sens.cpp"
  5. #include "accelerometerwidget.h"
  6. #include <QGridLayout>
  7. #include <QLCDNumber>
  8. #include <QSlider>
  9. #include <QPushButton>
  10. #include "qsound.h"
  11. #include <QtGui/QApplication>
  12. int main(int argc, char *argv[])
  13. {
  14. QApplication app(argc, argv);
  15. MainWindow mainWindow;
  16. accelerometerWidget acc;
  17. Sens z;
  18. QPushButton exit("Exit",&z);
  19. QPushButton start("Alarm",&z);
  20. start.setGeometry(80,416,150,60);
  21. exit.setGeometry(640,416,150,60);
  22. QObject::connect(&start, SIGNAL(clicked()), &acc, SLOT(showFullScreen()));
  23. //QObject::connect(&start, SIGNAL(clicked()), &acc, SLOT(valueCurrent()));
  24. //QObject::connect(&start, SIGNAL(clicked()), &acc, SLOT(voitureAlarm()));
  25. QObject::connect(&exit, SIGNAL(clicked()), &app, SLOT(quit()));
  26. mainWindow.setCentralWidget(&z);
  27. mainWindow.setOrientation(MainWindow::ScreenOrientationAuto);
  28. //mainWindow.showExpanded();
  29. mainWindow.showFullScreen();
  30. return app.exec();
  31. }