~vbursian/research-assistant/intervers

« back to all changes in this revision

Viewing changes to RAGUI/DlgEditScales.cpp

  • Committer: Viktor Bursian
  • Date: 2013-06-06 15:10:08 UTC
  • Revision ID: vbursian@gmail.com-20130606151008-6641eh62f0lgx8jt
Tags: version_0.3.0
version 0.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
////////////////////////////////////////////////////////////////////////////////
 
2
/*! @file DlgEditScales.cpp   Редактирование шкал графика.
 
3
- Part of RAGUI - Research Assistant Graphical User Interface.
 
4
- Uses  QtGui v.4.6  -  http://qt.nokia.com/
 
5
- Uses  RANet - Research Assistant Net Library (based on ANSI C++).
 
6
- Copyright(C) 2010, Viktor E. Bursian, St.Petersburg, Russia.
 
7
                     Viktor.Bursian@mail.ioffe.ru
 
8
*///////////////////////////////////////////////////////////////////////////////
 
9
#include "DlgEditScales.h"
 
10
#include "Units.h"
 
11
#include <QVBoxLayout>
 
12
#include <QFormLayout>
 
13
#include <QLabel>
 
14
#include <QDialogButtonBox>
 
15
namespace RA {
 
16
//------------------------------------------------------------------------------
 
17
 
 
18
sScalesDlg::sScalesDlg (QWidget *  parent)
 
19
    :QDialog(parent)
 
20
{
 
21
//  resize(200,100);
 
22
  setWindowTitle(tr("Set plot scales"));
 
23
  QVBoxLayout *       Layout = new QVBoxLayout();
 
24
  setLayout(Layout);
 
25
 
 
26
  Layout->addWidget(new QLabel(tr("<b><u>Absciss")));
 
27
 
 
28
  QFormLayout *       ALayout = new QFormLayout();
 
29
  Layout->addLayout(ALayout);
 
30
 
 
31
  ALayout->setWidget(0,QFormLayout::LabelRole,new QLabel(tr("title")));
 
32
  fldAbscissVariableName = new QLineEdit(this);
 
33
  ALayout->setWidget(0,QFormLayout::FieldRole,fldAbscissVariableName);
 
34
 
 
35
  fldAbscissRange = new sPhysRangeField(this,"range",sPhysRange(),true);
 
36
  Layout->addWidget(fldAbscissRange,0,Qt::AlignLeft);
 
37
 
 
38
  Layout->addWidget(new QLabel("   "));
 
39
 
 
40
  Layout->addWidget(new QLabel(tr("<b><u>Ordinate")));
 
41
 
 
42
  QFormLayout *       OLayout = new QFormLayout();
 
43
  Layout->addLayout(OLayout);
 
44
 
 
45
  OLayout->setWidget(0,QFormLayout::LabelRole,new QLabel(tr("title")));
 
46
  fldOrdinateVariableName = new QLineEdit(this);
 
47
  OLayout->setWidget(0,QFormLayout::FieldRole,fldOrdinateVariableName);
 
48
 
 
49
  fldOrdinateRange = new sPhysRangeField(this,"range",sPhysRange(),true);
 
50
  Layout->addWidget(fldOrdinateRange,0,Qt::AlignLeft);
 
51
 
 
52
  QDialogButtonBox *  buttonBox = new QDialogButtonBox(this);
 
53
  buttonBox->setObjectName(QString::fromUtf8("buttonBox"));
 
54
  buttonBox->setOrientation(Qt::Horizontal);
 
55
  buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
 
56
 
 
57
  Layout->addWidget(buttonBox);
 
58
 
 
59
  connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
 
60
//  connect(buttonBox, SIGNAL(accepted()), this, SLOT(OnOK()));
 
61
  connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
 
62
};
 
63
 
 
64
//------------------------------------------------------------------------------
 
65
}; //namespace RA
 
66
 
 
67