Browse Source

Native control for adding points.

Neal Wilson 11 years ago
parent
commit
0b22cf8ac7
3 changed files with 77 additions and 36 deletions
  1. 38
    36
      BrewPlot.pro
  2. 21
    0
      newpointcontrol.cpp
  3. 18
    0
      newpointcontrol.h

+ 38
- 36
BrewPlot.pro View File

@@ -1,36 +1,38 @@
1
-# Add more folders to ship with the application, here
2
-folder_01.source = qml/BrewPlot
3
-folder_01.target = qml
4
-DEPLOYMENTFOLDERS = folder_01
5
-
6
-# Additional import path used to resolve QML modules in Creator's code model
7
-QML_IMPORT_PATH =
8
-
9
-symbian:TARGET.UID3 = 0xE41BFE6C
10
-
11
-# Allow network access on Symbian
12
-symbian:TARGET.CAPABILITY += NetworkServices
13
-
14
-# Define QMLJSDEBUGGER to allow debugging of QML in debug builds
15
-# (This might significantly increase build time)
16
-# DEFINES += QMLJSDEBUGGER
17
-
18
-# If your application uses the Qt Mobility libraries, uncomment
19
-# the following lines and add the respective components to the 
20
-# MOBILITY variable. 
21
-# CONFIG += mobility
22
-# MOBILITY +=
23
-
24
-# The .cpp file which was generated for your project. Feel free to hack it.
25
-SOURCES += main.cpp \
26
-    qmllineitem.cpp
27
-
28
-# Please do not modify the following two lines. Required for deployment.
29
-include(qmlapplicationviewer/qmlapplicationviewer.pri)
30
-qtcAddDeployment()
31
-
32
-HEADERS += \
33
-    qmllineitem.h
34
-
35
-RESOURCES += \
36
-    qmlfiles.qrc
1
+# Add more folders to ship with the application, here
2
+folder_01.source = qml/BrewPlot
3
+folder_01.target = qml
4
+DEPLOYMENTFOLDERS = folder_01
5
+
6
+# Additional import path used to resolve QML modules in Creator's code model
7
+QML_IMPORT_PATH =
8
+
9
+symbian:TARGET.UID3 = 0xE41BFE6C
10
+
11
+# Allow network access on Symbian
12
+symbian:TARGET.CAPABILITY += NetworkServices
13
+
14
+# Define QMLJSDEBUGGER to allow debugging of QML in debug builds
15
+# (This might significantly increase build time)
16
+# DEFINES += QMLJSDEBUGGER
17
+
18
+# If your application uses the Qt Mobility libraries, uncomment
19
+# the following lines and add the respective components to the 
20
+# MOBILITY variable. 
21
+# CONFIG += mobility
22
+# MOBILITY +=
23
+
24
+# The .cpp file which was generated for your project. Feel free to hack it.
25
+SOURCES += main.cpp \
26
+    qmllineitem.cpp \
27
+    newpointcontrol.cpp
28
+
29
+# Please do not modify the following two lines. Required for deployment.
30
+include(qmlapplicationviewer/qmlapplicationviewer.pri)
31
+qtcAddDeployment()
32
+
33
+HEADERS += \
34
+    qmllineitem.h \
35
+    newpointcontrol.h
36
+
37
+RESOURCES += \
38
+    qmlfiles.qrc

+ 21
- 0
newpointcontrol.cpp View File

@@ -0,0 +1,21 @@
1
+#include <QBoxLayout>
2
+#include <QFormLayout>
3
+#include <QLineEdit>
4
+#include <QPushButton>
5
+#include "newpointcontrol.h"
6
+
7
+NewPointControl::NewPointControl(QWidget *parent) :
8
+    QWidget(parent)
9
+{
10
+    QVBoxLayout *layout = new QVBoxLayout;
11
+    QFormLayout *flayout = new QFormLayout;
12
+    QLineEdit *groundsMass = new QLineEdit;
13
+    QLineEdit *brewMass = new QLineEdit;
14
+    QLineEdit *tds = new QLineEdit;
15
+    QPushButton *plot = new QPushButton(tr("Plot"));
16
+    flayout->addRow(tr("Mass of ground coffee:"), groundsMass);
17
+    flayout->addRow(tr("Mass of brewed coffee:"), brewMass);
18
+    flayout->addRow(tr("% total dissolved solids:"), tds);
19
+    layout->addLayout(flayout);
20
+    layout->addWidget(plot);
21
+}

+ 18
- 0
newpointcontrol.h View File

@@ -0,0 +1,18 @@
1
+#ifndef NEWPOINTCONTROL_H
2
+#define NEWPOINTCONTROL_H
3
+
4
+#include <QWidget>
5
+
6
+class NewPointControl : public QWidget
7
+{
8
+    Q_OBJECT
9
+public:
10
+    explicit NewPointControl(QWidget *parent = 0);
11
+    
12
+signals:
13
+    
14
+public slots:
15
+    
16
+};
17
+
18
+#endif // NEWPOINTCONTROL_H

Loading…
Cancel
Save