-
Notifications
You must be signed in to change notification settings - Fork 0
/
intentofcomingpage.cpp
33 lines (29 loc) · 1.12 KB
/
intentofcomingpage.cpp
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
33
#include "intentofcomingpage.h"
#include "ui_intentofcomingpage.h"
#include <iostream>
//#include <QDebug>
extern int buNeYa;
extern int genderId, ageId, intentId;
IntentOfComingPage::IntentOfComingPage(QWidget *parent) : QWizardPage(parent), ui(new Ui::WizardPage)
{
// setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/watermark.png"));
ui->setupUi(this);
intentButtonGroup = new QButtonGroup;
int k = 1;
// foreach (auto radioButton, ui->groupBox_3->findChildren<QRadioButton*>(Qt::FindDirectChildrenOnly))
foreach (auto radioButton, ui->groupBox_3->findChildren<QRadioButton*>())
{
intentButtonGroup->addButton(radioButton);
connect(radioButton, &QAbstractButton::clicked, this, &IntentOfComingPage::completeChanged);
// connect(radioButton, SIGNAL(clicked), this, SIGNAL(completeChanged));
}
}
int IntentOfComingPage::nextId() const
{
return -1;
}
bool IntentOfComingPage::isComplete() const
{
intentId = intentButtonGroup->id(intentButtonGroup->checkedButton()) * (-1) - buNeYa;
return intentId != -1 && ageId != -1 && genderId != -1;
}