CvarDPE.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  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. #include "CvarDPE.h"
  9. #include <AzFramework/DocumentPropertyEditor/CvarAdapter.h>
  10. #include <AzFramework/DocumentPropertyEditor/ValueStringSort.h>
  11. #include "QtViewPaneManager.h"
  12. namespace AzToolsFramework
  13. {
  14. CvarDPE::CvarDPE(QWidget* parentWidget)
  15. : FilteredDPE(parentWidget)
  16. , m_cvarAdapter(AZStd::make_shared<AZ::DocumentPropertyEditor::CvarAdapter>())
  17. , m_sortAdapter(AZStd::make_shared<AZ::DocumentPropertyEditor::ValueStringSort>())
  18. {
  19. setWindowTitle(tr("Console Variables"));
  20. m_sortAdapter->SetSourceAdapter(m_cvarAdapter);
  21. SetAdapter(m_sortAdapter);
  22. }
  23. void CvarDPE::RegisterViewClass()
  24. {
  25. ViewPaneOptions opts;
  26. opts.paneRect = QRect(100, 100, 700, 600);
  27. RegisterViewPane<CvarDPE>(LyViewPane::ConsoleVariables, LyViewPane::CategoryOther, opts);
  28. }
  29. } // namespace AzToolsFramework