-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproblemwidget.cpp
More file actions
32 lines (26 loc) · 867 Bytes
/
Copy pathproblemwidget.cpp
File metadata and controls
32 lines (26 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "problemwidget.h"
#include "ui_problemwidget.h"
ProblemWidget::ProblemWidget(QWidget *parent)
: QWidget(parent)
, ui(new Ui::ProblemWidget)
{
ui->setupUi(this);
m_problemButtonGroup = new QButtonGroup(this);
m_solvingDialog = new SolvingDialog();
m_problemButtonGroup->addButton(ui->Example1_Problem_PushButton);
connect(m_problemButtonGroup, &QButtonGroup::buttonClicked, this, &ProblemWidget::handleProblemButtonClicked);
connect(this, &ProblemWidget::createSolvingTab, m_solvingDialog, &SolvingDialog::createNewTab);
}
ProblemWidget::~ProblemWidget()
{
delete ui;
}
void ProblemWidget::handleProblemButtonClicked(QAbstractButton *button)
{
if (m_solvingDialog == nullptr)
{
m_solvingDialog = new SolvingDialog(this);
}
emit createSolvingTab(button->text());
m_solvingDialog->show();
}