ErrorReportDialog.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #ifndef CRYINCLUDE_EDITOR_ERRORREPORTDIALOG_H
  9. #define CRYINCLUDE_EDITOR_ERRORREPORTDIALOG_H
  10. #pragma once
  11. #if !defined(Q_MOC_RUN)
  12. #include "ErrorReport.h"
  13. namespace Ui {
  14. class CErrorReportDialog;
  15. }
  16. class CErrorReportTableModel;
  17. #include <QWidget>
  18. #endif
  19. class CErrorReportDialog
  20. : public QWidget
  21. {
  22. Q_OBJECT
  23. public:
  24. explicit CErrorReportDialog(QWidget* parent = nullptr); // standard constructor
  25. virtual ~CErrorReportDialog();
  26. static void RegisterViewClass();
  27. static void Open(CErrorReport* pReport);
  28. static void Close();
  29. static void Clear();
  30. // you are required to implement this to satisfy the unregister/registerclass requirements on "AzToolsFramework::RegisterViewPane"
  31. // make sure you pick a unique GUID
  32. static const GUID& GetClassID()
  33. {
  34. // {ea523b7e-3f63-821b-4823-a131fc5b46a3}
  35. static const GUID guid =
  36. {
  37. 0xea523b7e, 0x3f63, 0x821b, { 0x48, 0x23, 0xa1, 0x31, 0xfc, 0x5b, 0x46, 0xa3 }
  38. };
  39. return guid;
  40. }
  41. bool eventFilter(QObject* watched, QEvent* event) override;
  42. public Q_SLOTS:
  43. void CopyToClipboard();
  44. void SendInMail();
  45. void OpenInExcel();
  46. protected:
  47. void SetReport(CErrorReport* report);
  48. void UpdateErrors();
  49. protected Q_SLOTS:
  50. void OnReportItemClick(const QModelIndex& index);
  51. void OnReportItemRClick();
  52. void OnReportColumnRClick();
  53. void OnReportItemDblClick(const QModelIndex& index);
  54. void OnSortIndicatorChanged(int logicalIndex, Qt::SortOrder order);
  55. protected:
  56. void OnReportHyperlink(const QModelIndex& index);
  57. void keyPressEvent(QKeyEvent* event) override;
  58. CErrorReport* m_pErrorReport;
  59. static CErrorReportDialog* m_instance;
  60. QScopedPointer<Ui::CErrorReportDialog> ui;
  61. CErrorReportTableModel* m_errorReportModel;
  62. int m_sortIndicatorColumn;
  63. Qt::SortOrder m_sortIndicatorOrder;
  64. };
  65. #endif // CRYINCLUDE_EDITOR_ERRORREPORTDIALOG_H