예제 #1
0
/**
 * Class constructor.
 */
LearningWidget::LearningWidget(MainWindow* parent) :
    QWidget(parent),
    ui(new Ui::LearningWidget),
    model(NULL),
    mainWin(parent)
{
    //autogenerated stuff
    ui->setupUi(this);

    //creates and adds newt param widget to layout
	npw = new NetParamWidget(this);
	ui->splitterH->addWidget(npw);

    //connects signals and slots
	connect(ui->closeButton, SIGNAL(pressed()), this, SLOT(closeBtnPressed()));
	connect(ui->startBtn, SIGNAL(pressed()), this, SLOT(startLearning()));
	connect(ui->stopBtn, SIGNAL(pressed()), this, SLOT(stopLearning()));
	connect(ui->datasetBox, SIGNAL(activated(QString)), this, SLOT(datasetSelected(QString)));
	connect(ui->networkBox, SIGNAL(activated(QString)), this, SLOT(networkSelected(QString)));
	connect(ui->lrnCoefBox, SIGNAL(valueChanged(double)), this, SLOT(lrnCoefChanged(double)));
	connect(ui->maxErrBox, SIGNAL(valueChanged(double)), this, SLOT(maxErrChanged(double)));
	connect(ui->maxIterBox, SIGNAL(valueChanged(int)), this, SLOT(maxIterChanged(int)));
    connect(ui->maxTimeBox, SIGNAL(valueChanged(int)), this, SLOT(maxTimeChanged(int)));
    connect(ui->resetButton, SIGNAL(pressed()), this, SLOT(resetLearning()));
    connect(ui->graphBtn, SIGNAL(pressed()), this, SLOT(graphBtnPressed()));
    connect(ui->tableBtn, SIGNAL(pressed()), this, SLOT(tableBtnPressed()));

    ui->graphBtn->setChecked(true);
    ui->graphStack->setCurrentIndex(0);
}
예제 #2
0
phraseWindow::phraseWindow(User *user):user(user)
{
    this->setMaximumSize(270, 480);
    this->setMinimumSize(270, 480);
    setWindowFlags(Qt::FramelessWindowHint);
    background = new QLabel(this);
    background->setStyleSheet("background:url(:/image/phraseWindow.jpg)");
    background->setGeometry(0, 0, this->width(), this->height());

    searchWordEdit.setParent(this);
    searchWordEdit.setGeometry(70, 5, 130, 25);
    meaningLabel.setParent(this);
    meaningLabel.setGeometry(88, 38, 150, 20);
    meaningLabel.setStyleSheet("background-color:transparent");
    searchButton.setParent(this);
    searchButton.setGeometry(210, 5, 20, 20);
    searchButton.setText("搜索");
    //导航栏
    translateButton.setParent(this);
    translateButton.setStyleSheet("background-color:transparent;border:0px groove gray;border-radius:19px;padding:2px 4px");
    phrase.setParent(this);
    phrase.setStyleSheet("background-color:transparent;border:0px groove gray;border-radius:19px;padding:2px 4px");
    wordlearning.setParent(this);
    wordlearning.setStyleSheet("background-color:transparent;border:0px groove gray;border-radius:19px;padding:2px 4px");
    aboutUser.setParent(this);
    aboutUser.setStyleSheet("background-color:transparent;border:0px groove gray;border-radius:19px;padding:2px 4px");
    more.setParent(this);
    more.setStyleSheet("background-color:transparent;border:0px groove gray;border-radius:19px;padding:2px 4px");

    wordlearning.setGeometry(7, 425, 38, 38);
    phrase.setGeometry(61, 425, 38, 38);
    translateButton.setGeometry(115, 425, 38, 38);
    aboutUser.setGeometry(169, 425, 38, 38);
    more.setGeometry(222, 425, 38, 38);

    learningPharse.setParent(this);
    learningPharse.setGeometry(32, 360, 95, 38);
    reviewPhrase.setParent(this);
    reviewPhrase.setGeometry(145, 360, 93, 38);
    learningPharse.setStyleSheet("background-color:transparent");
    reviewPhrase.setStyleSheet("background-color:transparent");
    connect(&wordlearning, SIGNAL(clicked()), this, SLOT(openWordLearning()));
    connect(&translateButton, SIGNAL(clicked()), this, SLOT(openTranslate()));
    connect(&aboutUser, SIGNAL(clicked()), this, SLOT(openUser()));
    connect(&more, SIGNAL(clicked()), this, SLOT(openSetting()));
    connect(&learningPharse, SIGNAL(clicked()), this, SLOT(startLearning()));
    connect(&reviewPhrase, SIGNAL(clicked()), this, SLOT(startReviewing()));
}
예제 #3
0
파일: ccedit.cpp 프로젝트: Adamiko/los
CCEdit::CCEdit(QWidget* parent, CCInfo* n) : QFrame(parent)
{
	setupUi(this);
	m_info = n;
	m_controlcombo->addItem(tr("Off"), -1);
	for(int i = 0; i < 128; ++i)
	{
		QString ctl(QString::number(i)+": ");
		m_controlcombo->addItem(ctl.append(midiCtrlName(i)), i);
	}
	updateValues();
	connect(m_learn, SIGNAL(clicked()), this, SLOT(startLearning()));
	connect(m_channel, SIGNAL(valueChanged(int)), this, SLOT(channelChanged(int)));
	connect(m_controlcombo, SIGNAL(currentIndexChanged(int)), this, SLOT(controlChanged(int)));
	connect(m_chkRecord, SIGNAL(toggled(bool)), this, SLOT(recordOnlyChanged(bool)));
	connect(m_chkToggle, SIGNAL(toggled(bool)), this, SLOT(toggleChanged(bool)));
	connect(m_chkNRPN, SIGNAL(toggled(bool)), this, SLOT(toggleNRPN(bool)));
	connect(m_txtMSB, SIGNAL(valueChanged(int)), this, SLOT(msbChanged(int)));
	connect(m_txtLSB, SIGNAL(valueChanged(int)), this, SLOT(lsbChanged(int)));
}