6 Star 9 Fork 4

依尚/CTP-Future

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
conditiondialog.cpp 1.59 KB
一键复制 编辑 原始数据 按行查看 历史
MeGustas 提交于 2017-04-05 09:52 . 添加初始版本 - (UFX版本)
#include "conditiondialog.h"
#include "ui_ConditionDialog.h"
conditionDialog::conditionDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::ConditionDialog)
{
ui->setupUi(this);
this->setWindowTitle(QStringLiteral("设置触发条件"));
ui->m_PriceKindComboBox->addItem(QStringLiteral("最新价"));
ui->m_PriceKindComboBox->addItem(QStringLiteral("买价"));
ui->m_PriceKindComboBox->addItem(QStringLiteral("卖价"));
ui->m_SymbolComboBox->addItem(">");
ui->m_SymbolComboBox->addItem(">=");
ui->m_SymbolComboBox->addItem("<");
ui->m_SymbolComboBox->addItem("<=");
ui->m_SaveComboBox->addItem(QStringLiteral("一天"));
ui->m_SaveComboBox->addItem(QStringLiteral("不保存"));
ui->m_PriceDoubleSpinBox->setRange(0,100000);
connect(ui->m_OKButton,SIGNAL(clicked()),this,SLOT(OKButtonClicked()));
connect(ui->m_CancelButton,SIGNAL(clicked()),this,SLOT(CancelButtonClicked()));
}
conditionDialog::~conditionDialog()
{
delete ui;
}
void conditionDialog::SetPrice(double dprice){
//价格
ui->m_PriceDoubleSpinBox->setValue(dprice);
}
void conditionDialog::OKButtonClicked(){
ConditionType oCondition;
oCondition.PriceKind = ui->m_PriceKindComboBox->currentText();
oCondition.Symbol = ui->m_SymbolComboBox->currentText();
oCondition.Price = ui->m_PriceDoubleSpinBox->text().toDouble();
oCondition.SaveKind = ui->m_SaveComboBox->currentText();
emit SigSendCondition(oCondition);
this->accept();
}
void conditionDialog::CancelButtonClicked(){
this->close();
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/soso58/CTP-Future.git
[email protected]:soso58/CTP-Future.git
soso58
CTP-Future
CTP-Future
master

搜索帮助