EvaluateView.cpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #include "EvaluateView.h"
  2. #include "ProjectListWidget.h"
  3. #include "RenameWidget.h"
  4. #include <Widgets/Button.h>
  5. #include <Widgets/LineEdit.h>
  6. #include <QBoxLayout>
  7. #include <QLabel>
  8. EvaluateView::EvaluateView(QWidget *parent) : QWidget(parent)
  9. {
  10. initialize();
  11. initLayout();
  12. connectSiganlsAndSlots();
  13. }
  14. void EvaluateView::initialize()
  15. {
  16. m_hBoxLayout = new QHBoxLayout(this);
  17. m_listWidget = new QWidget(this);
  18. m_listWidget->setFixedWidth(260);
  19. QPalette pal(m_listWidget->palette());
  20. pal.setColor(QPalette::Background, QColor("#f3f3f3"));
  21. m_listWidget->setAutoFillBackground(true);
  22. m_listWidget->setPalette(pal);
  23. m_listLayout = new QVBoxLayout(m_listWidget);
  24. m_searchLineEdit = new LineEdit(this);
  25. m_searchLineEdit->setIsClearButtonEnabled(true);
  26. m_searchLineEdit->setPlaceholderText("搜索工程");
  27. m_projListWidget = new ProjectListWidget(this);
  28. m_projDetailWidget = new QWidget(this);
  29. m_projLayout = new QVBoxLayout();
  30. m_projNameLabel = new QLabel(this);
  31. m_projNameLabel->setText("工程名");
  32. }
  33. void EvaluateView::initLayout()
  34. {
  35. m_hBoxLayout->setMargin(0);
  36. m_hBoxLayout->addWidget(m_listWidget);
  37. m_listLayout->addWidget(m_searchLineEdit);
  38. m_listLayout->addWidget(m_projListWidget);
  39. m_hBoxLayout->addWidget(m_projDetailWidget);
  40. m_projDetailWidget->setLayout(m_projLayout);
  41. m_projLayout->addWidget(m_projNameLabel, Qt::AlignTop);
  42. }
  43. void EvaluateView::connectSiganlsAndSlots() { }