SimulatedObjectSelectionWindow.cpp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 <Editor/Plugins/SimulatedObject/SimulatedObjectSelectionWindow.h>
  9. #include <MCore/Source/LogManager.h>
  10. #include <QLabel>
  11. #include <QSizePolicy>
  12. #include <QTreeWidget>
  13. #include <QPixmap>
  14. #include <QPushButton>
  15. #include <QVBoxLayout>
  16. #include <QIcon>
  17. #include <QLineEdit>
  18. #include <QGraphicsDropShadowEffect>
  19. namespace EMStudio
  20. {
  21. SimulatedObjectSelectionWindow::SimulatedObjectSelectionWindow(QWidget* parent)
  22. : QDialog(parent)
  23. {
  24. setWindowTitle("SimulatedObject Selection Window");
  25. m_okButton = new QPushButton("OK");
  26. m_cancelButton = new QPushButton("Cancel");
  27. QHBoxLayout* buttonLayout = new QHBoxLayout();
  28. buttonLayout->addWidget(m_okButton);
  29. buttonLayout->addWidget(m_cancelButton);
  30. QVBoxLayout* layout = new QVBoxLayout(this);
  31. m_simulatedObjectSelectionWidget = new SimulatedObjectSelectionWidget(this);
  32. layout->addWidget(m_simulatedObjectSelectionWidget);
  33. layout->addLayout(buttonLayout);
  34. connect(m_okButton, &QPushButton::clicked, this, &SimulatedObjectSelectionWindow::accept);
  35. connect(m_cancelButton, &QPushButton::clicked, this, &SimulatedObjectSelectionWindow::reject);
  36. connect(m_simulatedObjectSelectionWidget, &SimulatedObjectSelectionWidget::OnDoubleClicked, this, &SimulatedObjectSelectionWindow::accept);
  37. }
  38. } // namespace EMStudio