ErrorReportDialog.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. // CErrorReportDialog dialog
  12. #if !defined(Q_MOC_RUN)
  13. #include "ErrorReport.h"
  14. namespace Ui {
  15. class CErrorReportDialog;
  16. }
  17. class CErrorReportTableModel;
  18. #include <QWidget>
  19. #endif
  20. class CErrorReportDialog
  21. : public QWidget
  22. {
  23. Q_OBJECT
  24. public:
  25. explicit CErrorReportDialog(QWidget* parent = nullptr); // standard constructor
  26. virtual ~CErrorReportDialog();
  27. static void RegisterViewClass();
  28. static void Open(CErrorReport* pReport);
  29. static void Close();
  30. static void Clear();
  31. // you are required to implement this to satisfy the unregister/registerclass requirements on "AzToolsFramework::RegisterViewPane"
  32. // make sure you pick a unique GUID
  33. static const GUID& GetClassID()
  34. {
  35. // {ea523b7e-3f63-821b-4823-a131fc5b46a3}
  36. static const GUID guid =
  37. {
  38. 0xea523b7e, 0x3f63, 0x821b, { 0x48, 0x23, 0xa1, 0x31, 0xfc, 0x5b, 0x46, 0xa3 }
  39. };
  40. return guid;
  41. }
  42. bool eventFilter(QObject* watched, QEvent* event) override;
  43. public Q_SLOTS:
  44. void CopyToClipboard();
  45. void SendInMail();
  46. void OpenInExcel();
  47. protected:
  48. void SetReport(CErrorReport* report);
  49. void UpdateErrors();
  50. protected Q_SLOTS:
  51. void OnReportItemClick(const QModelIndex& index);
  52. void OnReportItemRClick();
  53. void OnReportColumnRClick();
  54. void OnReportItemDblClick(const QModelIndex& index);
  55. void OnSortIndicatorChanged(int logicalIndex, Qt::SortOrder order);
  56. protected:
  57. void OnReportHyperlink(const QModelIndex& index);
  58. void keyPressEvent(QKeyEvent* event) override;
  59. CErrorReport* m_pErrorReport;
  60. static CErrorReportDialog* m_instance;
  61. QScopedPointer<Ui::CErrorReportDialog> ui;
  62. CErrorReportTableModel* m_errorReportModel;
  63. int m_sortIndicatorColumn;
  64. Qt::SortOrder m_sortIndicatorOrder;
  65. };
  66. #endif // CRYINCLUDE_EDITOR_ERRORREPORTDIALOG_H