Skip to content

Commit 46fbed6

Browse files
added cmake for qwt and graph to ui
1 parent 7789bb1 commit 46fbed6

File tree

5 files changed

+503
-85
lines changed

5 files changed

+503
-85
lines changed

src/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,18 @@ IF(NOT BUILD_HEADLESS)
454454
ADD_DEFINITIONS(-DQT_NO_KEYWORDS)
455455
ENDIF()
456456

457+
#BENLARSON
458+
SET(QWT_INCLUDE_DIR CACHE PATH "Qwt include directory")
459+
IF(NOT QWT_INCLUDE_DIR)
460+
MESSAGE(FATAL_ERROR "QWT_INCLUDE_DIR should be set to path like 'qwt-6.0.1/include'")
461+
ENDIF()
462+
INCLUDE_DIRECTORIES(${QWT_INCLUDE_DIR})
463+
SET(QWT_LIBRARY CACHE FILEPATH "Qwt library")
464+
IF(NOT QWT_LIBRARY)
465+
MESSAGE(FATAL_ERROR "QWT_LIBRARY should be set to a filepath like 'qwt-6.0.1/lib/libqwt.so'")
466+
ENDIF()
467+
SET(qwt_libraries ${QWT_LIBRARY} )
468+
#END##BENLARSON
457469

458470
########################################################################
459471
# Find and configure dl library

src/Interface/Modules/Math/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ SET(Interface_Modules_Math_HEADERS
5252
SolveLinearSystemDialog.h
5353
ConvertMatrixTypeDialog.h
5454
BuildNoiseColumnMatrixDialog.h
55+
qwt_global.h
56+
qwt_plot.h
5557
)
5658

5759
SET(Interface_Modules_Math_SOURCES
@@ -81,8 +83,10 @@ TARGET_LINK_LIBRARIES(Interface_Modules_Math
8183
Algorithms_Math
8284
Modules_Math
8385
Interface_Modules_Base
86+
8487
${SCI_BOOST_LIBRARY}
85-
${QT_LIBRARIES})
88+
${QT_LIBRARIES}
89+
${qwt_libraries})
8690

8791
IF(BUILD_SHARED_LIBS)
8892
ADD_DEFINITIONS(-DBUILD_Interface_Modules_Math)

src/Interface/Modules/Math/SolveLinearSystem.ui

Lines changed: 133 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>389</width>
10-
<height>192</height>
9+
<width>730</width>
10+
<height>570</height>
1111
</rect>
1212
</property>
1313
<property name="sizePolicy">
@@ -31,98 +31,138 @@
3131
<property name="title">
3232
<string/>
3333
</property>
34-
<layout class="QFormLayout" name="formLayout">
35-
<item row="0" column="0">
36-
<widget class="QLabel" name="label_3">
37-
<property name="text">
38-
<string>Method:</string>
39-
</property>
40-
</widget>
41-
</item>
42-
<item row="0" column="1">
43-
<widget class="QComboBox" name="methodComboBox_">
34+
<layout class="QVBoxLayout" name="verticalLayout_3">
35+
<item>
36+
<layout class="QVBoxLayout" name="verticalLayout_2">
4437
<item>
45-
<property name="text">
46-
<string>Conjugate Gradient (SCI)</string>
47-
</property>
38+
<layout class="QHBoxLayout" name="horizontalLayout_5">
39+
<item>
40+
<widget class="QLabel" name="label_3">
41+
<property name="text">
42+
<string>Method:</string>
43+
</property>
44+
</widget>
45+
</item>
46+
<item>
47+
<widget class="QComboBox" name="methodComboBox_">
48+
<item>
49+
<property name="text">
50+
<string>Conjugate Gradient (SCI)</string>
51+
</property>
52+
</item>
53+
<item>
54+
<property name="text">
55+
<string>BiConjugate Gradient (SCI)</string>
56+
</property>
57+
</item>
58+
<item>
59+
<property name="text">
60+
<string>Jacobi (SCI)</string>
61+
</property>
62+
</item>
63+
<item>
64+
<property name="text">
65+
<string>MINRES (SCI)</string>
66+
</property>
67+
</item>
68+
</widget>
69+
</item>
70+
</layout>
4871
</item>
4972
<item>
50-
<property name="text">
51-
<string>BiConjugate Gradient (SCI)</string>
52-
</property>
73+
<layout class="QHBoxLayout" name="horizontalLayout_4">
74+
<item>
75+
<widget class="QLabel" name="label_4">
76+
<property name="text">
77+
<string>Preconditioner:</string>
78+
</property>
79+
</widget>
80+
</item>
81+
<item>
82+
<widget class="QComboBox" name="preconditionerComboBox_">
83+
<item>
84+
<property name="text">
85+
<string>Jacobi</string>
86+
</property>
87+
</item>
88+
<item>
89+
<property name="text">
90+
<string>None</string>
91+
</property>
92+
</item>
93+
</widget>
94+
</item>
95+
</layout>
5396
</item>
5497
<item>
55-
<property name="text">
56-
<string>Jacobi (SCI)</string>
57-
</property>
98+
<layout class="QHBoxLayout" name="horizontalLayout_3">
99+
<item>
100+
<widget class="QLabel" name="label">
101+
<property name="text">
102+
<string>Target error:</string>
103+
</property>
104+
</widget>
105+
</item>
106+
<item>
107+
<widget class="QDoubleSpinBox" name="targetErrorSpinBox_">
108+
<property name="decimals">
109+
<number>20</number>
110+
</property>
111+
<property name="maximum">
112+
<double>999999999.000000000000000</double>
113+
</property>
114+
<property name="singleStep">
115+
<double>0.000100000000000</double>
116+
</property>
117+
<property name="value">
118+
<double>0.010000000000000</double>
119+
</property>
120+
</widget>
121+
</item>
122+
</layout>
58123
</item>
59124
<item>
60-
<property name="text">
61-
<string>MINRES (SCI)</string>
62-
</property>
125+
<layout class="QHBoxLayout" name="horizontalLayout_2">
126+
<item>
127+
<widget class="QLabel" name="label_2">
128+
<property name="text">
129+
<string>Maximum iterations:</string>
130+
</property>
131+
</widget>
132+
</item>
133+
<item>
134+
<widget class="QSpinBox" name="maxIterationsSpinBox_">
135+
<property name="minimum">
136+
<number>1</number>
137+
</property>
138+
<property name="maximum">
139+
<number>100000</number>
140+
</property>
141+
</widget>
142+
</item>
143+
</layout>
63144
</item>
64-
</widget>
65-
</item>
66-
<item row="1" column="0">
67-
<widget class="QLabel" name="label_4">
68-
<property name="text">
69-
<string>Preconditioner:</string>
70-
</property>
71-
</widget>
72-
</item>
73-
<item row="1" column="1">
74-
<widget class="QComboBox" name="preconditionerComboBox_">
75145
<item>
76-
<property name="text">
77-
<string>Jacobi</string>
78-
</property>
146+
<layout class="QHBoxLayout" name="horizontalLayout" stretch="10,0">
147+
<item>
148+
<widget class="QwtPlot" name="qwtPlot"/>
149+
</item>
150+
<item>
151+
<spacer name="horizontalSpacer">
152+
<property name="orientation">
153+
<enum>Qt::Horizontal</enum>
154+
</property>
155+
<property name="sizeHint" stdset="0">
156+
<size>
157+
<width>40</width>
158+
<height>20</height>
159+
</size>
160+
</property>
161+
</spacer>
162+
</item>
163+
</layout>
79164
</item>
80-
<item>
81-
<property name="text">
82-
<string>None</string>
83-
</property>
84-
</item>
85-
</widget>
86-
</item>
87-
<item row="4" column="0">
88-
<widget class="QLabel" name="label_2">
89-
<property name="text">
90-
<string>Maximum iterations:</string>
91-
</property>
92-
</widget>
93-
</item>
94-
<item row="4" column="1">
95-
<widget class="QSpinBox" name="maxIterationsSpinBox_">
96-
<property name="minimum">
97-
<number>1</number>
98-
</property>
99-
<property name="maximum">
100-
<number>100000</number>
101-
</property>
102-
</widget>
103-
</item>
104-
<item row="2" column="1">
105-
<widget class="QDoubleSpinBox" name="targetErrorSpinBox_">
106-
<property name="decimals">
107-
<number>20</number>
108-
</property>
109-
<property name="maximum">
110-
<double>999999999.000000000000000</double>
111-
</property>
112-
<property name="singleStep">
113-
<double>0.000100000000000</double>
114-
</property>
115-
<property name="value">
116-
<double>0.010000000000000</double>
117-
</property>
118-
</widget>
119-
</item>
120-
<item row="2" column="0">
121-
<widget class="QLabel" name="label">
122-
<property name="text">
123-
<string>Target error:</string>
124-
</property>
125-
</widget>
165+
</layout>
126166
</item>
127167
</layout>
128168
<zorder>label_2</zorder>
@@ -133,10 +173,19 @@
133173
<zorder>preconditionerComboBox_</zorder>
134174
<zorder>targetErrorSpinBox_</zorder>
135175
<zorder>label</zorder>
176+
<zorder>qwtPlot</zorder>
177+
<zorder>horizontalSpacer</zorder>
136178
</widget>
137179
</item>
138180
</layout>
139181
</widget>
182+
<customwidgets>
183+
<customwidget>
184+
<class>QwtPlot</class>
185+
<extends>QFrame</extends>
186+
<header>qwt_plot.h</header>
187+
</customwidget>
188+
</customwidgets>
140189
<resources/>
141190
<connections/>
142191
</ui>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2+
* Qwt Widget Library
3+
* Copyright (C) 1997 Josef Wilgen
4+
* Copyright (C) 2002 Uwe Rathmann
5+
*
6+
* This library is free software; you can redistribute it and/or
7+
* modify it under the terms of the Qwt License, Version 1.0
8+
*****************************************************************************/
9+
10+
#ifndef QWT_GLOBAL_H
11+
#define QWT_GLOBAL_H
12+
13+
#include <qglobal.h>
14+
15+
// QWT_VERSION is (major << 16) + (minor << 8) + patch.
16+
17+
#define QWT_VERSION 0x060102
18+
#define QWT_VERSION_STR "6.1.2"
19+
20+
#if defined(_MSC_VER) /* MSVC Compiler */
21+
/* template-class specialization 'identifier' is already instantiated */
22+
#pragma warning(disable: 4660)
23+
/* inherits via dominance */
24+
#pragma warning(disable: 4250)
25+
#endif // _MSC_VER
26+
27+
#ifdef QWT_DLL
28+
29+
#if defined(QWT_MAKEDLL) // create a Qwt DLL library
30+
#define QWT_EXPORT Q_DECL_EXPORT
31+
#else // use a Qwt DLL library
32+
#define QWT_EXPORT Q_DECL_IMPORT
33+
#endif
34+
35+
#endif // QWT_DLL
36+
37+
#ifndef QWT_EXPORT
38+
#define QWT_EXPORT
39+
#endif
40+
41+
#endif

0 commit comments

Comments
 (0)