qapplication.h 642 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * The MiniQt Library
  3. *
  4. * Copyright (C) 1999 Sandro Sigala <ssigala@globalnet.it>
  5. */
  6. #ifndef QAPPLICATION_H
  7. #define QAPPLICATION_H
  8. #include "qobject.h"
  9. class QWidget;
  10. struct QApplicationPrivate;
  11. class QApplication : public QObject {
  12. Q_OBJECT
  13. public:
  14. QApplication(int argc, char **argv);
  15. ~QApplication();
  16. QWidget *mainWidget();
  17. void setMainWidget(QWidget *w);
  18. int exec();
  19. public slots:
  20. void quit();
  21. private:
  22. QApplicationPrivate *d;
  23. };
  24. extern QApplication *qApp;
  25. // In ISO C++ is not permitted to call main(), so we need this trick
  26. #define main qmain
  27. #endif // !QAPPLICATION_H