LUAEditorGoToLineDialog.hxx 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 LUAEDITOR_GOTOLINE_H
  9. #define LUAEDITOR_GOTOLINE_H
  10. #if !defined(Q_MOC_RUN)
  11. #include <AzCore/base.h>
  12. #include <AzCore/Memory/SystemAllocator.h>
  13. #include <QDialog>
  14. #endif
  15. #pragma once
  16. namespace Ui
  17. {
  18. class goToLineDlg;
  19. }
  20. namespace LUAEditor
  21. {
  22. //////////////////////////////////////////////////////////////////////////
  23. // Find Dialog
  24. class LUAEditorGoToLineDialog
  25. : public QDialog
  26. {
  27. Q_OBJECT
  28. public:
  29. explicit LUAEditorGoToLineDialog(QWidget *parent = nullptr);
  30. ~LUAEditorGoToLineDialog() override;
  31. int getLineNumber() const { return m_lineNumber; }
  32. int getColumnNumber() const { return m_columnNumber; }
  33. public slots:
  34. void setLineNumber(int line, int column) const;
  35. void handleLineNumberInput(const QString& input);
  36. void validateAndAccept();
  37. private:
  38. Ui::goToLineDlg* m_gui;
  39. int m_lineNumber = 0;
  40. int m_columnNumber = 0;
  41. };
  42. }
  43. #endif //LUAEDITOR_FINDDIALOG_H