JMessageTip.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #include "JMessageTip.h"
  2. #include "../RewriteControl/MsgDlg/CustomMessageDlg.h"
  3. JMessageTip::JMessageTip()
  4. {
  5. }
  6. void JMessageTip::Message_information(const QString& strTip, QWidget* parent /*= nullptr*/)
  7. {
  8. }
  9. QMessageBox::StandardButton JMessageTip::Message_question(const QString& strMsg, QWidget* parent /*= nullptr*/)
  10. {
  11. return QMessageBox::information(nullptr, "Title", "Content", QMessageBox::Yes | QMessageBox::No);
  12. }
  13. void JMessageTip::Message_warning(const QString& strMsg, QWidget* parent /*= nullptr*/)
  14. {
  15. CreateCustomMessageDlg();
  16. QMessageBox::warning(nullptr, tr("Currently exiting.....","当前正在退出....."),
  17. tr("The current camera initialization failed and no camera is available.","当前相机初始化失败,没有可用相机"));
  18. }
  19. void JMessageTip::Message_warning(const QString& title, const QString& text, QWidget* parent /*= nullptr*/)
  20. {
  21. }
  22. void JMessageTip::Message_critical(const QString& strTip, QWidget* parent /*= nullptr*/)
  23. {
  24. }
  25. void JMessageTip::Message_critical(const QString& title, const QString& text, QWidget* parent /*= nullptr*/)
  26. {
  27. }
  28. void JMessageTip::CreateCustomMessageDlg()
  29. {
  30. CustomMessageDlg dlg;
  31. dlg.exec();
  32. }