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
2. 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
3. Qt used for finding Oil & Gold
Delft University of Technology
2
4. Qt used for finding Oil & Gold
• Oil & Gas E & P
– 2D Line Restoration &
validation
3
5. Qt used for finding Oil & Gold
• Oil & Gas E & P
– Full 3D structural modelling
• basin modelling
• fracture modelling
• sediment modelling
4
13. Introducing Qt in MVE
• 4DMove, using Qt from day one
• Windows and Linux
• Easy to use UI & Workflows
• 3D View using Coin/SoQt
12
14. 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
20. Writing Better Software
• Rich set of widgets
• Designer
• Support libraries!
– WebKit, QtConcurrent,
QOpenGL, Network,
XML, Help...
• Qt makes hard things easy
19
21. C++ and JavaScript talk WebKit
• Send objects from C++ to JavaScript
webpage->mainFrame()->addToJavaScriptWindowObject("mapController", controller );
webpage->mainFrame()->addToJavaScriptWindowObject("mapController", controller );
void renderInWebPage(QObject* object, double lat, double lng)
void renderInWebPage(QObject* object, double lat, double lng)
{
{
object->setProperty("name", QVariant("name"));
object->setProperty("name", QVariant("name"));
object->setProperty("lat", QVariant(lat));
object->setProperty("lat", QVariant(lat));
object->setProperty("long", QVariant(lng));
object->setProperty("long", QVariant(lng));
webpage->mainFrame()->addToJavaScriptWindowObject("myObject", object );
webpage->mainFrame()->addToJavaScriptWindowObject("myObject", object );
webpage->mainFrame()->evaluateJavaScript("renderObject(myObject);"));
webpage->mainFrame()->evaluateJavaScript("renderObject(myObject);"));
}
}
• Use objects in JavaScript and call back C++
void renderObject(object)
void renderObject(object)
{
{
var ov = new GMarker(new GLatLng(geo.lat, geo.long));
var ov = new GMarker(new GLatLng(geo.lat, geo.long));
var infoHtml = geo.description ? geo.description : geo.name;
var infoHtml = geo.description ? geo.description : geo.name;
map.addOverlay(ov);
map.addOverlay(ov);
ov.bindInfoWindowHtml(infoHtml);
ov.bindInfoWindowHtml(infoHtml);
var el = GEvent.addListener(ov, "click", function() {
var el = GEvent.addListener(ov, "click", function() {
if(mapController) mapController.geoClick(geo.id);
if(mapController) mapController.geoClick(geo.id);
});
});
}
}
20
22. QtConcurrent
• Old Single Threaded
// now unfold the passive beds
// now unfold the passive beds
for(int i=0; i<_passiveBedSize; i++)
for(int i=0; i<_passiveBedSize; i++)
{
{
restorePassiveBed(_toRestore[i], _passiveObjects[i],
restorePassiveBed(_toRestore[i], _passiveObjects[i],
refPlaneNormal, refPlane, forward);
refPlaneNormal, refPlane, forward);
}
}
• New Fast Parallel
QFutureSynchronizer<void> synchronizer;
QFutureSynchronizer<void> synchronizer;
// now unfold the passive beds
// now unfold the passive beds
for(int i=0; i<_passiveBedSize; i++)
for(int i=0; i<_passiveBedSize; i++)
{
{
QFuture<bool> future = QtConcurrent::run(this,
QFuture<bool> future = QtConcurrent::run(this,
&mveFlexuralUnfolder::restorePassiveBed, _toRestore[i], _passiveObjects[i],
&mveFlexuralUnfolder::restorePassiveBed, _toRestore[i], _passiveObjects[i],
refPlaneNormal, refPlane, forward);
refPlaneNormal, refPlane, forward);
synchronizer.addFuture(future);
synchronizer.addFuture(future);
}
}
synchronizer.waitForFinished();
synchronizer.waitForFinished();
21
23. Writing Software Better
• Several platforms, One code
• Build system, devenv integration
• Reusable UI
– Custom widgets
– Designer Plugins
• Unit testing
• Trolltech/Nokia support
22