[kde-edu]: Cartesian plane on qt canvas
Master Maths
m2george at telkomsa.net
Wed Dec 8 08:50:03 CET 2004
On Mon, 6 Dec 2004 12:12:45 -0700, Jason Harris <kstars at 30doradus.org>
wrote:
> On Dec 6, 2004, at 11:48 AM, Jason Harris wrote:
>
>> Hi Trenton,
>>
>> Have a look at the KPlotWidget and KPlotObject classes in
>> kdeedu/libkdeedu.
>>
Hi Jason.
I had a look at the lib and it looks like it will do what I want to
achieve.
One problem though is that I can't increase the size of the display.
It only shows about 20x50p on the parent widget.
Can you have a look at this?
#include <qlayout.h>
#include <klocale.h>
#include <kdialog.h>
#include "trigviewer.h"
TrigViewer::TrigViewer(QWidget* parent, const char* name, WFlags fl)
: QWidget( parent, name )
{
view = new QWidget(this);
pw = new KPlotWidget( -50.0, 50.0, -50.0, 50.0, view );
pw->setDefaultPadding();
pw->setShowAxes( true );
pw->setBGColor( QColor( "white" ) );
pw->setFGColor( QColor ( "black") );
pw->setShowTickMarks( true );
pw->setXAxisLabel( i18n( "X-Axis" ) );
pw->setYAxisLabel( i18n( "Y-Axis" ) );
plotObjects();
}
Regards
Trenton.
--
Master Maths George.
Postnet Suite #109 Tel: +27(0)44 873 4683
Private Bag X6590 +27(0)82 871 6125
George +27(0)82 821 0088
6529
More information about the kde-edu
mailing list