Dmitry Yu Okunev лет назад: 8
Родитель
Сommit
bf170a2bd2
5 измененных файлов с 22 добавлено и 18 удалено
  1. 3 0
      .gitmodules
  2. 1 0
      3rdparty/qwt
  3. 2 1
      mainwindow.cpp
  4. 9 17
      mainwindow.ui
  5. 7 0
      rmui.pro

+ 3 - 0
.gitmodules

@@ -0,0 +1,3 @@
+[submodule "3rdparty/qwt"]
+	path = 3rdparty/qwt
+	url = https://github.com/osakared/qwt

+ 1 - 0
3rdparty/qwt

@@ -0,0 +1 @@
+Subproject commit 3bbb09072a2781864c620b1ec1fb366430f803ea

+ 2 - 1
mainwindow.cpp

@@ -31,7 +31,8 @@ MainWindow::MainWindow(QWidget *parent) :
     this->setWindowTitle("RM control interface");
     this->setWindowTitle("RM control interface");
     this->ui->centralWidget->installEventFilter(this);
     this->ui->centralWidget->installEventFilter(this);
     this->ui->toolsWidget->installEventFilter(this);
     this->ui->toolsWidget->installEventFilter(this);
-
+    this->ui->ADC1Plot->setAxisScale(QwtPlot::yLeft, 0, 4095);
+    this->ui->ADC2Plot->setAxisScale(QwtPlot::yLeft, 0, 4095);
 }
 }
 
 
 MainWindow::~MainWindow()
 MainWindow::~MainWindow()

+ 9 - 17
mainwindow.ui

@@ -42,32 +42,17 @@
         <enum>QLayout::SetMaximumSize</enum>
         <enum>QLayout::SetMaximumSize</enum>
        </property>
        </property>
        <item>
        <item>
-        <widget class="QOpenGLWidget" name="ADC1Graphic">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
+        <widget class="QwtPlot" name="ADC1Plot">
          <property name="minimumSize">
          <property name="minimumSize">
           <size>
           <size>
            <width>300</width>
            <width>300</width>
            <height>150</height>
            <height>150</height>
           </size>
           </size>
          </property>
          </property>
-         <property name="focusPolicy">
-          <enum>Qt::NoFocus</enum>
-         </property>
         </widget>
         </widget>
        </item>
        </item>
        <item>
        <item>
-        <widget class="QOpenGLWidget" name="ADC2Graphic">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
+        <widget class="QwtPlot" name="ADC2Plot">
          <property name="minimumSize">
          <property name="minimumSize">
           <size>
           <size>
            <width>300</width>
            <width>300</width>
@@ -374,6 +359,13 @@
   </widget>
   </widget>
  </widget>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
  <layoutdefault spacing="6" margin="11"/>
+ <customwidgets>
+  <customwidget>
+   <class>QwtPlot</class>
+   <extends>QFrame</extends>
+   <header>qwt_plot.h</header>
+  </customwidget>
+ </customwidgets>
  <resources/>
  <resources/>
  <connections/>
  <connections/>
 </ui>
 </ui>

+ 7 - 0
rmui.pro

@@ -18,3 +18,10 @@ SOURCES += main.cpp\
 HEADERS  += mainwindow.h
 HEADERS  += mainwindow.h
 
 
 FORMS    += mainwindow.ui
 FORMS    += mainwindow.ui
+
+win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../opt/qwt/lib/release/ -lqwt
+else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../opt/qwt/lib/debug/ -lqwt
+else:unix: LIBS += -L$$PWD/../../../opt/qwt/lib/ -lqwt
+
+INCLUDEPATH += $$PWD/../../../opt/qwt
+DEPENDPATH += $$PWD/../../../opt/qwt