|
@@ -836,6 +836,7 @@ generated file empty.
|
836
|
836
|
@<TranslationConfWidget implementation@>@/
|
837
|
837
|
@<FreeAnnotationConfWidget implementation@>@/
|
838
|
838
|
@<RateOfChange implementation@>@/
|
|
839
|
+@<SettingsWindow implementation@>@/
|
839
|
840
|
|
840
|
841
|
@ A few headers are required for various parts of \pn{}. These allow the use of
|
841
|
842
|
various Qt modules.
|
|
@@ -7653,7 +7654,8 @@ class GraphView : public QGraphicsView@/
|
7653
|
7654
|
QMap<int, QPointF> *prevPoints;
|
7654
|
7655
|
QMap<int, double> *translations;
|
7655
|
7656
|
QList<QGraphicsItem *> *gridLinesF;
|
7656
|
|
- QList<QGraphicsItem *> *gridLinesC;@/
|
|
7657
|
+ QList<QGraphicsItem *> *gridLinesC;
|
|
7658
|
+ QList<QGraphicsItem *> *relativeGridLines;@/
|
7657
|
7659
|
public:@/
|
7658
|
7660
|
GraphView(QWidget *parent = NULL);
|
7659
|
7661
|
void removeSeries(int column);@/
|
|
@@ -7695,7 +7697,8 @@ GraphView::GraphView(QWidget *parent) : QGraphicsView(parent),
|
7695
|
7697
|
prevPoints(new QMap<int, QPointF>),
|
7696
|
7698
|
translations(new QMap<int, double>),
|
7697
|
7699
|
gridLinesF(new QList<QGraphicsItem *>),
|
7698
|
|
- gridLinesC(new QList<QGraphicsItem *>)@/
|
|
7700
|
+ gridLinesC(new QList<QGraphicsItem *>),
|
|
7701
|
+ relativeGridLines(new QList<QGraphicsItem *>)@/
|
7699
|
7702
|
{
|
7700
|
7703
|
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
7701
|
7704
|
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
|
@@ -14763,8 +14766,12 @@ QList<NodeInserter *> topLevelNodeInserters;
|
14763
|
14766
|
@ With this done, we can now produce a window which allows someone to easily
|
14764
|
14767
|
edit the device configuration.
|
14765
|
14768
|
|
|
14769
|
+As of version 1.6 this class is no longer a window but just a |QWidget| which
|
|
14770
|
+is inserted into another more general settings window. The name of the class
|
|
14771
|
+should be changed in a future version to reflect this change.
|
|
14772
|
+
|
14766
|
14773
|
@<Class declarations@>=
|
14767
|
|
-class DeviceConfigurationWindow : public QMainWindow
|
|
14774
|
+class DeviceConfigurationWindow : public QWidget
|
14768
|
14775
|
{
|
14769
|
14776
|
@[Q_OBJECT@]@;
|
14770
|
14777
|
public:@/
|
|
@@ -14797,7 +14804,7 @@ this) is expanded to show the new child node if it has not already been
|
14797
|
14804
|
expanded.
|
14798
|
14805
|
|
14799
|
14806
|
@<DeviceConfigurationWindow implementation@>=
|
14800
|
|
-DeviceConfigurationWindow::DeviceConfigurationWindow() : QMainWindow(NULL),
|
|
14807
|
+DeviceConfigurationWindow::DeviceConfigurationWindow() : QWidget(NULL),
|
14801
|
14808
|
view(new QTreeView), configArea(new QScrollArea)
|
14802
|
14809
|
{
|
14803
|
14810
|
QSplitter *splitter = new QSplitter;
|
|
@@ -14832,7 +14839,9 @@ DeviceConfigurationWindow::DeviceConfigurationWindow() : QMainWindow(NULL),
|
14832
|
14839
|
configArea->setMinimumWidth(580);
|
14833
|
14840
|
configArea->setMinimumHeight(460);
|
14834
|
14841
|
splitter->addWidget(configArea);
|
14835
|
|
- setCentralWidget(splitter);
|
|
14842
|
+ QVBoxLayout *centralLayout = new QVBoxLayout;
|
|
14843
|
+ centralLayout->addWidget(splitter);
|
|
14844
|
+ setLayout(centralLayout);
|
14836
|
14845
|
connect(view, SIGNAL(activated(QModelIndex)),
|
14837
|
14846
|
this, SLOT(newSelection(QModelIndex)));
|
14838
|
14847
|
connect(view, SIGNAL(clicked(QModelIndex)),
|
|
@@ -14899,6 +14908,9 @@ void DeviceConfigurationWindow::resizeColumn()
|
14899
|
14908
|
instantiate this from the host environment. For this we at least require a
|
14900
|
14909
|
constructor.
|
14901
|
14910
|
|
|
14911
|
+Now that this widget is available through a more general settings window it may
|
|
14912
|
+be better to remove direct access to this class from the host environment.
|
|
14913
|
+
|
14902
|
14914
|
@<Function prototypes for scripting@>=
|
14903
|
14915
|
QScriptValue constructDeviceConfigurationWindow(QScriptContext *context,
|
14904
|
14916
|
QScriptEngine *engine);
|
|
@@ -16817,6 +16829,8 @@ app.registerDeviceConfigurationWidget("annotationspinbox", NoteSpinConfWidget::s
|
16817
|
16829
|
|
16818
|
16830
|
@i freeannotation.w
|
16819
|
16831
|
|
|
16832
|
+@i settings.w
|
|
16833
|
+
|
16820
|
16834
|
@** Communicating with a Device through Modbus RTU.
|
16821
|
16835
|
|
16822
|
16836
|
\noindent The classes described here need to be further generalized to support
|