Exemplo n.º 1
0
void R::mover(int x11, int y11, int x22, int y22) {
    int t;

    esconder();

    x1 = x11;
    y1 = y11;
    x2 = x22;
    y2 = y22;

    aparecer();
}
Exemplo n.º 2
0
void AleatoriedadWidget::distroMaximoMinino(){

    ui->label_2_7->setText("Minimo");
    ui->label_2_8->setText("Maximo");
    ui->doubleSpinBox_2_1->setMinimum(-999999999.000000);
    ui->doubleSpinBox_2_1->setValue(0);
    ui->doubleSpinBox_2_2->setMinimum(-999999999.000000);
    ui->doubleSpinBox_2_2->setValue(1);
    esconder(2);
    mostrar(1);
    ui->widget_2_2->show();

}
Exemplo n.º 3
0
AleatoriedadWidget::AleatoriedadWidget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::AleatoriedadWidget)
{
    ui->setupUi(this);
    esconder(2);

    setupAction();

    createMenus();

    setupToolBar();
}
Exemplo n.º 4
0
void AleatoriedadWidget::on_comboBox_2_3_currentIndexChanged(int index)
{
    if( index != 0 ){
        ui->comboBox_2_2->setCurrentIndex(0);
        ui->doubleSpinBox_2_1->setDecimals(0);
        ui->doubleSpinBox_2_2->setDecimals(0);
        ui->doubleSpinBox_2_3->setDecimals(0);
        ui->doubleSpinBox_2_4->setDecimals(0);
        ui->doubleSpinBox_2_1->setMaximum(999999999);
        ui->doubleSpinBox_2_2->setMaximum(999999999);
        ui->doubleSpinBox_2_3->setMaximum(999999999);
        ui->doubleSpinBox_2_4->setMaximum(999999999);
        ui->widget_2_2->show();
    }
    switch (index){
    case 0:
        if(ui->comboBox_2_2->currentIndex() == 0)
            ui->widget_2_2->hide();
        break;
    case 1: // Uniforme Discreta
        distroMaximoMinino();
        ui->doubleSpinBox_2_1->setMinimum(0);
        ui->doubleSpinBox_2_2->setMinimum(0);
        ui->doubleSpinBox_2_2->setValue(100);
        break;
    case 2: // Bernoulli Trial
        ui->label_2_7->setText("Probabilidad p");
        ui->doubleSpinBox_2_1->setMinimum(0.01);
        ui->doubleSpinBox_2_1->setMaximum(.99);
        ui->doubleSpinBox_2_1->setValue(0.5);
        ui->doubleSpinBox_2_1->setDecimals(2);
        esconder(3);
        break;
    case 3: // Binomial
        ui->label_2_7->setText("Probabilidad p");
        ui->label_2_8->setText("Intentos n");
        ui->doubleSpinBox_2_1->setMinimum(0.01);
        ui->doubleSpinBox_2_1->setMaximum(0.99);
        ui->doubleSpinBox_2_1->setValue(0.1);
        ui->doubleSpinBox_2_2->setMinimum(1);
        ui->doubleSpinBox_2_2->setValue(20);
        esconder(2);
        mostrar(1);
        break;
    case 4: // Geometric
        ui->label_2_7->setText("Probabilidad p");
        ui->doubleSpinBox_2_1->setMinimum(0.01);
        ui->doubleSpinBox_2_1->setMaximum(.99);
        ui->doubleSpinBox_2_1->setValue(0.5);
        ui->doubleSpinBox_2_1->setDecimals(2);
        esconder(3);
        break;
    case 5: // Hypergeometric
        ui->label_2_7->setText("Trail n");
        ui->label_2_8->setText("Poblacion N");
        ui->label_2_9->setText("Successes K");
        ui->doubleSpinBox_2_1->setMinimum(0);
        ui->doubleSpinBox_2_1->setValue(6);
        ui->doubleSpinBox_2_2->setMinimum(1);
        ui->doubleSpinBox_2_2->setValue(10);
        ui->doubleSpinBox_2_3->setMinimum(0);
        ui->doubleSpinBox_2_3->setValue(4);
        esconder(1);
        mostrar(2);
        break;
    case 6: // Negative Binomial
        ui->label_2_7->setText("Probabilidad p");
        ui->label_2_8->setText("Sucesos s");
        ui->doubleSpinBox_2_1->setMinimum(0.01);
        ui->doubleSpinBox_2_1->setMaximum(0.99);
        ui->doubleSpinBox_2_1->setValue(0.5);
        ui->doubleSpinBox_2_2->setMinimum(1);
        ui->doubleSpinBox_2_2->setValue(5);
        ui->doubleSpinBox_2_1->setDecimals(2);
        esconder(2);
        mostrar(1);
        break;
    case 7: // Pascal
        ui->label_2_7->setText("Probabilidad p");
        ui->label_2_8->setText("Sucesos s");
        ui->doubleSpinBox_2_1->setMinimum(0.01);
        ui->doubleSpinBox_2_1->setMaximum(0.99);
        ui->doubleSpinBox_2_1->setValue(0.5);
        ui->doubleSpinBox_2_2->setMinimum(1);
        ui->doubleSpinBox_2_2->setValue(3);
        ui->doubleSpinBox_2_1->setDecimals(2);
        esconder(2);
        mostrar(1);
        break;
    case 8: // Poisson
        ui->label_2_7->setText("Rate miu");
        ui->doubleSpinBox_2_1->setMinimum(0.01);
        ui->doubleSpinBox_2_1->setValue(2);
        ui->doubleSpinBox_2_1->setDecimals(2);
        esconder(3);
        break;
//    default:
//        break;
    }
}
Exemplo n.º 5
0
void AleatoriedadWidget::on_comboBox_2_2_currentIndexChanged(int index)
{
    if( index != 0 ){
        ui->comboBox_2_3->setCurrentIndex(0);
        ui->doubleSpinBox_2_1->setDecimals(4);
        ui->doubleSpinBox_2_2->setDecimals(4);
        ui->doubleSpinBox_2_3->setDecimals(4);
        ui->doubleSpinBox_2_4->setDecimals(4);
        ui->doubleSpinBox_2_1->setMaximum(999999999);
        ui->doubleSpinBox_2_2->setMaximum(999999999);
        ui->doubleSpinBox_2_3->setMaximum(999999999);
        ui->doubleSpinBox_2_4->setMaximum(999999999);
        ui->widget_2_2->show();
    }

    switch (index){
    case 0: // Ninguna
        if(ui->comboBox_2_3->currentIndex() == 0)
            ui->widget_2_2->hide();
        break;
    case 1: // Uniforme
        distroMaximoMinino();
        break;
    case 2: // Arcoseno
        distroMaximoMinino();
        break;
    case 3: //Beta
        distroMaximoMinino();
        ui->label_2_9->setText("Shape v");
        ui->label_2_10->setText("Shape w");
        ui->doubleSpinBox_2_3->setMinimum(0);
        ui->doubleSpinBox_2_3->setValue(3);
        ui->doubleSpinBox_2_4->setMinimum(0);
        ui->doubleSpinBox_2_4->setValue(3);
        mostrar(2);
        break;
    case 4: // Cauchy (or Lorentz)
        ui->label_2_7->setText("Location a");
        ui->label_2_8->setText("Scale b");
        ui->doubleSpinBox_2_1->setMinimum(-999999999);
        ui->doubleSpinBox_2_1->setValue(0);
        ui->doubleSpinBox_2_2->setMinimum(0.000000001);
        ui->doubleSpinBox_2_2->setValue(0.5);
        esconder(2);
        mostrar(1);
        break;
    case 5: // Chi-Cuadrado
        ui->label_2_7->setText("Shape v");
        ui->doubleSpinBox_2_1->setMinimum(1);
        ui->doubleSpinBox_2_1->setValue(1);
        esconder(3);
        break;
    case 6: // Coseno
        distroMaximoMinino();
        break;
    case 7: // Double Log
        distroMaximoMinino();
        break;
    case 8: // Erlang
        ui->label_2_7->setText("Scale b");
        ui->label_2_8->setText("Shape c");
        ui->doubleSpinBox_2_1->setMinimum(0.000000001);
        ui->doubleSpinBox_2_1->setValue(1);
        ui->doubleSpinBox_2_2->setMinimum(0);
        ui->doubleSpinBox_2_2->setValue(2);
        esconder(2);
        mostrar(1);
        break;
    case 9: // Exponencial
        ui->label_2_7->setText("Location a");
        ui->label_2_8->setText("Scale b");
        ui->doubleSpinBox_2_1->setMinimum(-999999999);
        ui->doubleSpinBox_2_1->setValue(0);
        ui->doubleSpinBox_2_2->setMinimum(0.000000001);
        ui->doubleSpinBox_2_2->setValue(1);
        esconder(2);
        mostrar(1);
        break;
    case 10: // Extreme Value
        ui->label_2_7->setText("Location a");
        ui->label_2_8->setText("Scale b");
        ui->doubleSpinBox_2_1->setMinimum(-999999999);
        ui->doubleSpinBox_2_1->setValue(0);
        ui->doubleSpinBox_2_2->setMinimum(0.000000001);
        ui->doubleSpinBox_2_2->setValue(1);
        esconder(2);
        mostrar(1);
        break;
    case 11: // F Ratio
        ui->label_2_7->setText("Shape v");
        ui->label_2_8->setText("Shape w");
        ui->doubleSpinBox_2_3->setMinimum(1);
        ui->doubleSpinBox_2_3->setValue(4);
        ui->doubleSpinBox_2_4->setMinimum(1);
        ui->doubleSpinBox_2_4->setValue(4);
        break;
    case 12: // Gamma
        ui->label_2_7->setText("Location a");
        ui->label_2_8->setText("Scale b");
        ui->label_2_9->setText("Shape c");
        ui->doubleSpinBox_2_1->setMinimum(-999999999);
        ui->doubleSpinBox_2_1->setValue(0);
        ui->doubleSpinBox_2_2->setMinimum(0.000000001);
        ui->doubleSpinBox_2_2->setValue(1);
        ui->doubleSpinBox_2_3->setMinimum(0.000000001);
        ui->doubleSpinBox_2_3->setValue(2);
        esconder(1);
        mostrar(2);
        break;
    case 13: // Laplace
        ui->label_2_7->setText("Location a");
        ui->label_2_8->setText("Scale b");
        ui->doubleSpinBox_2_1->setMinimum(-999999999);
        ui->doubleSpinBox_2_1->setValue(0);
        ui->doubleSpinBox_2_2->setMinimum(0.000000001);
        ui->doubleSpinBox_2_2->setValue(1);
        esconder(2);
        mostrar(1);
        break;
    case 14: // Logarithmic
        distroMaximoMinino();
        break;
    case 15: // Logistic
        ui->label_2_7->setText("Location a");
        ui->label_2_8->setText("Scale b");
        ui->doubleSpinBox_2_1->setMinimum(-999999999);
        ui->doubleSpinBox_2_1->setValue(0);
        ui->doubleSpinBox_2_2->setMinimum(0.000000001);
        ui->doubleSpinBox_2_2->setValue(1);
        esconder(2);
        mostrar(1);
        break;
    case 16: // Lognormal
        ui->label_2_7->setText("Location a");
        ui->label_2_8->setText("Shepe mu");
        ui->label_2_9->setText("Scale sigma");
        ui->doubleSpinBox_2_1->setMinimum(-999999999);
        ui->doubleSpinBox_2_1->setValue(0);
        ui->doubleSpinBox_2_2->setMinimum(-999999999);
        ui->doubleSpinBox_2_2->setValue(0);
        ui->doubleSpinBox_2_3->setMinimum(0.000000001);
        ui->doubleSpinBox_2_3->setValue(1);
        esconder(1);
        mostrar(2);
        break;
    case 17: // Normal
        ui->label_2_7->setText("Shepe mu");
        ui->label_2_8->setText("Scale sigma");
        ui->doubleSpinBox_2_1->setMinimum(-999999999);
        ui->doubleSpinBox_2_1->setValue(0);
        ui->doubleSpinBox_2_2->setMinimum(0.000000001);
        ui->doubleSpinBox_2_2->setValue(1);
        break;
    case 18: // Parabolic
        distroMaximoMinino();
        break;
    case 19: // Pareto
        ui->label_2_7->setText("Shape c");
        ui->doubleSpinBox_2_1->setMinimum(0.000000001);
        ui->doubleSpinBox_2_1->setValue(1);
        esconder(3);
        break;
    case 20: // Pearson Type 5
        ui->label_2_7->setText("Scale b");
        ui->label_2_8->setText("Shape c");
        ui->doubleSpinBox_2_1->setMinimum(0.000000001);
        ui->doubleSpinBox_2_1->setValue(1);
        ui->doubleSpinBox_2_2->setMinimum(0.000000001);
        ui->doubleSpinBox_2_2->setValue(2);
        esconder(2);
        mostrar(1);
        break;
    case 21: // Pearson Type 6
        ui->label_2_7->setText("Scale b");
        ui->label_2_8->setText("Shepe v");
        ui->label_2_9->setText("Shepe w");
        ui->doubleSpinBox_2_1->setMinimum(0.000000001);
        ui->doubleSpinBox_2_1->setValue(1);
        ui->doubleSpinBox_2_2->setMinimum(0.000000001);
        ui->doubleSpinBox_2_2->setValue(2);
        ui->doubleSpinBox_2_3->setMinimum(0.000000001);
        ui->doubleSpinBox_2_3->setValue(2);
        esconder(1);
        mostrar(2);
        break;
    case 22: // Power
        ui->label_2_7->setText("Shape c");
        ui->doubleSpinBox_2_1->setMinimum(0.000000001);
        ui->doubleSpinBox_2_1->setValue(0.5);
        esconder(3);
        break;
    case 23: // Rayleigh
        ui->label_2_7->setText("Location a");
        ui->label_2_8->setText("Scale b");
        ui->doubleSpinBox_2_1->setMinimum(-999999999);
        ui->doubleSpinBox_2_1->setValue(0);
        ui->doubleSpinBox_2_2->setMinimum(0.000000001);
        ui->doubleSpinBox_2_2->setValue(1);
        esconder(2);
        mostrar(1);
        break;
    case 24: // Students T
        ui->label_2_7->setText("Shape v");
        ui->doubleSpinBox_2_1->setMinimum(1);
        ui->doubleSpinBox_2_1->setValue(1);
        esconder(3);
        break;
    case 25: // Triangular
        distroMaximoMinino();
        ui->label_2_7->setText("Location c");
        ui->doubleSpinBox_2_3->setMinimum(-999999999);
        ui->doubleSpinBox_2_3->setValue(0.5);
        ui->label_2_7->show();
        ui->doubleSpinBox_2_3->show();
        break;
    case 26: // Weibull
        ui->label_2_7->setText("Location a");
        ui->label_2_8->setText("Scale b");
        ui->label_2_9->setText("Shape c");
        ui->doubleSpinBox_2_1->setMinimum(-999999999);
        ui->doubleSpinBox_2_1->setValue(0);
        ui->doubleSpinBox_2_2->setMinimum(0.000000001);
        ui->doubleSpinBox_2_2->setValue(1);
        ui->doubleSpinBox_2_3->setMinimum(0.000000001);
        ui->doubleSpinBox_2_3->setValue(2);
        esconder(1);
        mostrar(2);
        break;
//    default:
//        break;
    }
}