Esempio n. 1
0
ContractForm::ContractForm(QWidget* parent)
    : QWidget(parent)
    , ui(new Ui::ContractForm)
{
    ui->setupUi(this);

    //设置列=
    table_col_ << "symbol"
               << "exchange"
               << "name"

               << "productClass"
               << "volumeMultiple"
               << "priceTick"

               << "maxLimit"
               << "minLimit"
               << "maxMarket"
               << "minMarket";
    this->ui->tableWidget->setColumnCount(table_col_.length());
    for (int i = 0; i < table_col_.length(); i++) {
        ui->tableWidget->setHorizontalHeaderItem(i, new QTableWidgetItem(table_col_.at(i)));
    }

    // 调整参数=
    bfAdjustTableWidget(ui->tableWidget);
}
Esempio n. 2
0
CtaForm::CtaForm(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::CtaForm)
{
    ui->setupUi(this);

    //设置列=
    table_col_ << "robot"
               << "status"
               << "symbol"
               << "profit"

               << "lPosition"
               << "lPrice"
               << "lProfilt"

               << "sPosition"
               << "sPrice"
               << "sProfit"

               << "maxPos"  //风控:最大持仓=
               << "maxVol"  //分控:最大单笔开仓量=
               << "maxLoss" //分控:最大浮亏 x%=;整体的放哪里呢? todo(hege)

               << "exchange";

    this->ui->tableWidget->setColumnCount(table_col_.length());
    for (int i = 0; i < table_col_.length(); i++) {
        ui->tableWidget->setHorizontalHeaderItem(i, new QTableWidgetItem(table_col_.at(i)));
    }

    // 调整参数=
    bfAdjustTableWidget(ui->tableWidget);
}
Esempio n. 3
0
TradeForm::TradeForm(QWidget* parent)
    : QWidget(parent)
    , ui(new Ui::TradeForm)
{
    ui->setupUi(this);

    //设置列=
    table_col_ << "symbol"
               << "exchange"

               << "direction"
               << "offset"
               << "price"
               << "volume"

               << "tradeDate"
               << "tradeTime"

               << "tradeId"
               << "bfOrderId";
    this->ui->tableWidget->setColumnCount(table_col_.length());
    for (int i = 0; i < table_col_.length(); i++) {
        ui->tableWidget->setHorizontalHeaderItem(i, new QTableWidgetItem(table_col_.at(i)));
    }

    // 调整参数=
    bfAdjustTableWidget(ui->tableWidget);
}
Esempio n. 4
0
StatForm::StatForm(QWidget* parent)
    : QWidget(parent)
    , ui(new Ui::StatForm)
{
    ui->setupUi(this);
    setWindowIcon(QIcon(":/images/datafeed.png"));

    //设置列=
    table_col_ << "symbol"
               << "exchange"
               << "name"

               << "period"
               << "startDate"
               << "startTime"
               << "endDate"
               << "endTime";
    this->ui->tableWidget->setColumnCount(table_col_.length());
    for (int i = 0; i < table_col_.length(); i++) {
        ui->tableWidget->setHorizontalHeaderItem(i, new QTableWidgetItem(table_col_.at(i)));
    }

    // 调整参数=
    bfAdjustTableWidget(ui->tableWidget);
}
Esempio n. 5
0
PositionForm::PositionForm(QWidget* parent)
    : QWidget(parent)
    , ui(new Ui::PositionForm)
{
    ui->setupUi(this);

    //设置列=
    table_col_ << "symbol"
               << "exchange"

               << "direction"
               << "position"
               << "ydPosition"
               << "price"
               << "frozen"

               << "key";
    this->ui->tableWidget->setColumnCount(table_col_.length());
    for (int i = 0; i < table_col_.length(); i++) {
        ui->tableWidget->setHorizontalHeaderItem(i, new QTableWidgetItem(table_col_.at(i)));
    }

    // 调整参数=
    bfAdjustTableWidget(ui->tableWidget);
}
Esempio n. 6
0
DebugForm::DebugForm(QWidget* parent)
    : QWidget(parent)
    , ui(new Ui::DebugForm)
{
    ui->setupUi(this);

    //设置列=
    table_col_ << "when"
               << "message";
    this->ui->tableWidget->setColumnCount(table_col_.length());
    for (int i = 0; i < table_col_.length(); i++) {
        ui->tableWidget->setHorizontalHeaderItem(i, new QTableWidgetItem(table_col_.at(i)));
    }

    // 调整参数=
    bfAdjustTableWidget(ui->tableWidget);
}
Esempio n. 7
0
TradeForm::TradeForm(QWidget* parent)
    : QWidget(parent)
    , ui(new Ui::TradeForm)
{
    ui->setupUi(this);

    //设置列=
    instruments_col_ << "symbol"
                     << "exchange";
    this->ui->tableWidget->setColumnCount(instruments_col_.length());
    for (int i = 0; i < instruments_col_.length(); i++) {
        ui->tableWidget->setHorizontalHeaderItem(i, new QTableWidgetItem(instruments_col_.at(i)));
    }

    // 调整参数=
    bfAdjustTableWidget(ui->tableWidget);
}
Esempio n. 8
0
BarForm::BarForm(QWidget* parent)
    : QWidget(parent)
    , ui(new Ui::BarForm)
{
    ui->setupUi(this);
    setWindowIcon(QIcon(":/images/datafeed.png"));

    //设置列=
    table_col_ << "symbol"
               << "exchange"
               << "period"

               << "actionDate"
               << "barTime"
               << "volume"
               << "openInterest"
               << "lastVolume"

               << "openPrice"
               << "highPrice"
               << "lowPrice"
               << "closePrice"

               << "key";
    this->ui->tableWidget->setColumnCount(table_col_.length());
    for (int i = 0; i < table_col_.length(); i++) {
        ui->tableWidget->setHorizontalHeaderItem(i, new QTableWidgetItem(table_col_.at(i)));
    }
    //this->ui->tableWidget->setColumnWidth(0,250);

    // 调整参数=
    bfAdjustTableWidget(ui->tableWidget);

    //设置上下分割=
    //ui->splitter->setStretchFactor(0, 2);
    //ui->splitter->setStretchFactor(1, 1);

    //设置graph
    initGraph();
}
Esempio n. 9
0
RobotForm::RobotForm(QWidget* parent)
    : QWidget(parent)
    , ui(new Ui::RobotForm)
{
    ui->setupUi(this);

    //设置列=
    table_col_ << "robotId"
               << "modelId"
               << "gatewayId"
               << "symbol"
               << "exchange"
               << "status";

    this->ui->tableWidget->setColumnCount(table_col_.length());
    for (int i = 0; i < table_col_.length(); i++) {
        ui->tableWidget->setHorizontalHeaderItem(i, new QTableWidgetItem(table_col_.at(i)));
    }

    // 调整参数=
    bfAdjustTableWidget(ui->tableWidget);
}
Esempio n. 10
0
TickForm::TickForm(QWidget* parent)
    : QWidget(parent)
    , ui(new Ui::TickForm)
{
    ui->setupUi(this);

    //设置列=
    table_col_ << "symbol"
               << "exchange"

               << "actionDate"
               << "tickTime"
               << "lastPrice"

               << "bidPrice1"
               << "askPrice1"
               << "bidVolume1"
               << "askVolume1"

               << "volume"
               << "openInterest"
               << "lastVolume"

               << "openPrice"
               << "highPrice"
               << "lowPrice"
               << "preClosePrice"
               << "upperLimit"
               << "lowerLimit";
    this->ui->tableWidget->setColumnCount(table_col_.length());
    for (int i = 0; i < table_col_.length(); i++) {
        ui->tableWidget->setHorizontalHeaderItem(i, new QTableWidgetItem(table_col_.at(i)));
    }

    // 调整参数=
    bfAdjustTableWidget(ui->tableWidget);
}