You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

utilitydialog.h 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Copyright (c) 2011-2016 The Starwels developers
  2. // Distributed under the MIT software license, see the accompanying
  3. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
  4. #ifndef STARWELS_QT_UTILITYDIALOG_H
  5. #define STARWELS_QT_UTILITYDIALOG_H
  6. #include <QDialog>
  7. #include <QObject>
  8. class StarwelsGUI;
  9. namespace Ui {
  10. class HelpMessageDialog;
  11. }
  12. /** "Help message" dialog box */
  13. class HelpMessageDialog : public QDialog
  14. {
  15. Q_OBJECT
  16. public:
  17. explicit HelpMessageDialog(QWidget *parent, bool about);
  18. ~HelpMessageDialog();
  19. void printToConsole();
  20. void showOrPrint();
  21. private:
  22. Ui::HelpMessageDialog *ui;
  23. QString text;
  24. private Q_SLOTS:
  25. void on_okButton_accepted();
  26. };
  27. /** "Shutdown" window */
  28. class ShutdownWindow : public QWidget
  29. {
  30. Q_OBJECT
  31. public:
  32. ShutdownWindow(QWidget *parent=0, Qt::WindowFlags f=0);
  33. static QWidget *showShutdownWindow(StarwelsGUI *window);
  34. protected:
  35. void closeEvent(QCloseEvent *event);
  36. };
  37. #endif // STARWELS_QT_UTILITYDIALOG_H