Upload
qt-project
View
1.554
Download
0
Tags:
Embed Size (px)
DESCRIPTION
For the past 7 years, Midland Valley as been capitalizing on Qt to create advanced geological modeling applications for the Oil & Gas industry. Featuring 2D and 3D modeling and visualization, these applications provide enhanced user interface and easy to use workflows. Combining many Qt technologies in the applications and in our development process (from sockets and widgets to graphics views, models/views, Webkit, designer plug ins, unit tests) has enabled us to deliver superior applications with a better mixed-platform integration, a shorter release cycle, and improved quality. Presentation by Mike Krus and Colin Dunlop held during Qt Developer Days 2009. http://qt.nokia.com/developer/learning/elearning
Citation preview
Code Less, Find more oilQt in Use at Midland Valley
Introduction
• What Midland Valley does
• Deploying Qt
• Qt as our users see it
• Qt as our developers see it
writing better software - writing software better
1
Qt used for finding Oil & Gold
2
Delft University of Technology
Qt used for finding Oil & Gold
• Oil & Gas E & P
– 2D Line Restoration &
validation
3
Qt used for finding Oil & Gold
• Oil & Gas E & P
– Full 3D structural modelling
• basin modelling
• fracture modelling
• sediment modelling
4
Qt used for finding Oil & Gold
• Minerals
5
Qt used for finding Oil & Gold
• Carbon Capture & Storage
6
Qt used for finding Oil & Gold
• Radioactive Waste Disposal
7
Qt used for finding Oil & Gold
• Geological Surveys and Government Institutes
8
Qt used for finding Oil & Gold
• University Teaching
and Research
9
Qt used for finding Oil & Gold
10
Life BQ (Before Qt)
• Multi-platform environment
• 2DMove
– Win32/MFC
– Linux/SunOS/Irix through Mainwin
• 3DMove
– Unix Motif
Introducing Qt in MVE
• 4DMove, using Qt from day one
• Windows and Linux
• Easy to use UI & Workflows
• 3D View using Coin/SoQt
12
It’s all Qt now
• All products ported to Qt
– 3DMove in 2007,
– 2DMove in 2008
• All products released as
one, using launcher
• Windows and Linux, 32 and 64 bits
• One common toolkit, one common code base
13
Model / Views
14
Graphics - 1
• Painter, plots
• Screen shots here
15
Graphics - 2
• QGraphicsView
• Screen shot here
16
Graphics – 3(D)
• Coin, SoQt, Quarter
• Screen shot here
17
WebKit and Google Maps
18
Writing Better Software
• Rich set of widgets
• Designer
• Support libraries!
– WebKit, QtConcurrent,
QOpenGL, Network,
XML, Help...
• Qt makes hard things easy
19
• Send objects from C++ to JavaScript
C++ and JavaScript talk WebKit
20
webpage->mainFrame()->addToJavaScriptWindowObject("mapController", controller );
void renderInWebPage(QObject* object, double lat, double lng){
object->setProperty("name", QVariant("name"));object->setProperty("lat", QVariant(lat)); object->setProperty("long", QVariant(lng)); webpage->mainFrame()->addToJavaScriptWindowObject("myObject", object );webpage->mainFrame()->evaluateJavaScript("renderObject(myObject);"));
}
webpage->mainFrame()->addToJavaScriptWindowObject("mapController", controller );
void renderInWebPage(QObject* object, double lat, double lng){
object->setProperty("name", QVariant("name"));object->setProperty("lat", QVariant(lat)); object->setProperty("long", QVariant(lng)); webpage->mainFrame()->addToJavaScriptWindowObject("myObject", object );webpage->mainFrame()->evaluateJavaScript("renderObject(myObject);"));
}
void renderObject(object){
var ov = new GMarker(new GLatLng(geo.lat, geo.long));var infoHtml = geo.description ? geo.description : geo.name;map.addOverlay(ov);ov.bindInfoWindowHtml(infoHtml);var el = GEvent.addListener(ov, "click", function() {
if(mapController) mapController.geoClick(geo.id);});
}
void renderObject(object){
var ov = new GMarker(new GLatLng(geo.lat, geo.long));var infoHtml = geo.description ? geo.description : geo.name;map.addOverlay(ov);ov.bindInfoWindowHtml(infoHtml);var el = GEvent.addListener(ov, "click", function() {
if(mapController) mapController.geoClick(geo.id);});
}
• Use objects in JavaScript and call back C++
• Old Single Threaded
QtConcurrent
21
// now unfold the passive bedsfor(int i=0; i<_passiveBedSize; i++){
restorePassiveBed(_toRestore[i], _passiveObjects[i], refPlaneNormal, refPlane, forward);
}
// now unfold the passive bedsfor(int i=0; i<_passiveBedSize; i++){
restorePassiveBed(_toRestore[i], _passiveObjects[i], refPlaneNormal, refPlane, forward);
}
QFutureSynchronizer<void> synchronizer;
// now unfold the passive bedsfor(int i=0; i<_passiveBedSize; i++){
QFuture<bool> future = QtConcurrent::run(this, &mveFlexuralUnfolder::restorePassiveBed, _toRestore[i], _passiveObjects[i], refPlaneNormal, refPlane, forward);
synchronizer.addFuture(future);}
synchronizer.waitForFinished();
QFutureSynchronizer<void> synchronizer;
// now unfold the passive bedsfor(int i=0; i<_passiveBedSize; i++){
QFuture<bool> future = QtConcurrent::run(this, &mveFlexuralUnfolder::restorePassiveBed, _toRestore[i], _passiveObjects[i], refPlaneNormal, refPlane, forward);
synchronizer.addFuture(future);}
synchronizer.waitForFinished();
• New Fast Parallel
Writing Software Better
• Several platforms, One code
• Build system, devenv integration
• Reusable UI
– Custom widgets
– Designer Plugins
• Unit testing
• Trolltech/Nokia support
22
Custom Widgets & Designer Plugin
23
Unit Testing
• UI for unit testing
• Selective test
execution
24
Conclusion
• Better software
– Rich UI, integrate with modern technology
– Improve workflows and provide richer functionnality
• Better tool
– Streamline development cycle
– Improve stability and quality
25