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

    currentTemplate = NULL;

    nameMobileForm = new NewLairMobile(this);
    nameBuildingForm = new LairName(this);

    connect(ui->pushButton_addMobile, SIGNAL(clicked()), nameMobileForm, SLOT(show()));
    connect(ui->pushButton_AddBuilding, SIGNAL(clicked()), nameBuildingForm, SLOT(show()));
    connect(nameMobileForm, SIGNAL(accepted()), this, SLOT(addMobile()));
    connect(nameBuildingForm, SIGNAL(accepted()), this, SLOT(addBuilding()));
    connect(ui->pushButton_RemoveBuilding, SIGNAL(clicked()), this, SLOT(removeBuilding()));
    connect(ui->pushButton_removeMobile, SIGNAL(clicked()), this, SLOT(removeMobile()));
    connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(commitToTemplate()));
    connect(ui->pushButton_view3d, SIGNAL(clicked()), this, SLOT(view3d()));

    this->setWindowFlags(windowFlags() | Qt::WindowMaximizeButtonHint | Qt::WindowMinimizeButtonHint);
}
Esempio n. 2
0
/* >>>>>>>>>> EXA_11 <<<<<<<<<< */
void exa_11 (void)
{ int n = 50 ,i, j;
  double fpi=3.1415927 / 180., step, x, y;

  step = 360. / (n - 1);
  for (i = 0; i < n; i++)
  { x = i * step;
    for (j = 0; j < n; j++)
    { y = j * step;
      zmat[i][j] = (float) (2 * sin (x * fpi) * sin (y * fpi));
    }
  }

  setpag ("da4p");
  disini ();
  pagera ();
  hwfont ();
  axspos (200, 2600);
  axslen (1800, 1800);

  name   ("X-axis", "x");
  name   ("Y-axis", "y");
  name   ("Z-axis", "z");

  titlin ("Surface Plot (SURMAT)", 2);
  titlin ("F(X,Y) = 2*SIN(X)*SIN(Y)", 4);

  view3d (-5.f, -5.f, 4.f, "abs");
  graf3d (0.f, 360.f, 0.f, 90.f, 0.f, 360.f, 0.f, 90.f,
          -3.f, 3.f, -3.f, 1.f);
  height (50);
  title  ();

  color  ("green");
  surmat ((float *) zmat, 50, 50, 1, 1);
  disfin ();
}