summaryrefslogtreecommitdiffstats
path: root/qtsharp/src/examples/samples/mandelbrot2.cs
diff options
context:
space:
mode:
Diffstat (limited to 'qtsharp/src/examples/samples/mandelbrot2.cs')
-rw-r--r--qtsharp/src/examples/samples/mandelbrot2.cs88
1 files changed, 44 insertions, 44 deletions
diff --git a/qtsharp/src/examples/samples/mandelbrot2.cs b/qtsharp/src/examples/samples/mandelbrot2.cs
index 0e9436e2..175ef9bc 100644
--- a/qtsharp/src/examples/samples/mandelbrot2.cs
+++ b/qtsharp/src/examples/samples/mandelbrot2.cs
@@ -108,7 +108,7 @@ public class Mandelbrot
public static void Main (string[] args)
{
- TTQApplication app = new TTQApplication (args);
+ TQApplication app = new TQApplication (args);
dialog = new ImageDialog (null, "Mandelbrot", false, 0);
dialog.SetGeometry(0, 0, 550, 300 );
@@ -122,11 +122,11 @@ public class Mandelbrot
public class PicLabel: TQFrame
{
- TTQPixmap newPixmap;
+ TQPixmap newPixmap;
int newWidth = 400;
int newHeight = 300;
- public PicLabel( TTQWidget parent, string name, WidgetFlags flags ):
+ public PicLabel( TQWidget parent, string name, WidgetFlags flags ):
base( parent, name, flags )
{
SetBackgroundMode (Qt.BackgroundMode.NoBackground);
@@ -135,7 +135,7 @@ public class PicLabel: TQFrame
}
- protected void PerformResize (TTQResizeEvent e)
+ protected void PerformResize (TQResizeEvent e)
{
Console.WriteLine("Resizing to {0} by {1}",
e.Size().Width(), e.Size().Height() );
@@ -146,12 +146,12 @@ public class PicLabel: TQFrame
}
- protected void PerformPaint(TTQPaintEvent e )
+ protected void PerformPaint(TQPaintEvent e )
{
Console.WriteLine("Making a new image {0} by {1}", newWidth, newHeight );
- TTQImage image = Mandelbrot.dialog.MandelbrotImage( newWidth, newHeight );
- newPixmap = new TTQPixmap( image );
+ TQImage image = Mandelbrot.dialog.MandelbrotImage( newWidth, newHeight );
+ newPixmap = new TQPixmap( image );
BitBlt(this, 0, 0, newPixmap,
0, 0, -1, -1, RasterOp.CopyROP, false);
@@ -161,123 +161,123 @@ public class PicLabel: TQFrame
-public class ImageDialog : TTQDialog {
+public class ImageDialog : TQDialog {
const double DefaultPlotXMin = -2.0;
const double DefaultPlotXMax = 2.0;
const double DefaultPlotYMin = -1.5;
const double DefaultPlotYMax = 1.5;
- TTQHBoxLayout dialogLayout;
- TTQGridLayout gridLayout;
- TTQVBoxLayout leftLayout;
- TTQHBoxLayout buttonLayout;
- TTQPushButton redrawButton;
+ TQHBoxLayout dialogLayout;
+ TQGridLayout gridLayout;
+ TQVBoxLayout leftLayout;
+ TQHBoxLayout buttonLayout;
+ TQPushButton redrawButton;
public PicLabel pixmapLabel;
- TTQSizePolicy fixedSizePolicy;
+ TQSizePolicy fixedSizePolicy;
- TTQLabel XMinLabel, XMaxLabel, YMinLabel, YMaxLabel;
- TTQLineEdit editXMin, editXMax, editYMin, editYMax;
+ TQLabel XMinLabel, XMaxLabel, YMinLabel, YMaxLabel;
+ TQLineEdit editXMin, editXMax, editYMin, editYMax;
- public ImageDialog (TTQWidget parent, string name, bool modal, WidgetFlags fl):
+ public ImageDialog (TQWidget parent, string name, bool modal, WidgetFlags fl):
base (parent, name, modal, fl)
{
if (name == string.Empty)
SetName ("imageDialog");
SetCaption ("Mandelbrot Image");
- dialogLayout = new TTQHBoxLayout (this, 11, 6);
- gridLayout = new TTQGridLayout (null, 1, 1, 0, 6, "gridLayout");
- leftLayout = new TTQVBoxLayout (null, 0, 6, "leftLayout");
+ dialogLayout = new TQHBoxLayout (this, 11, 6);
+ gridLayout = new TQGridLayout (null, 1, 1, 0, 6, "gridLayout");
+ leftLayout = new TQVBoxLayout (null, 0, 6, "leftLayout");
- fixedSizePolicy = new TTQSizePolicy ( TTQSizePolicy.SizeType.Fixed,
- TTQSizePolicy.SizeType.Fixed, false );
+ fixedSizePolicy = new TQSizePolicy ( TQSizePolicy.SizeType.Fixed,
+ TQSizePolicy.SizeType.Fixed, false );
- XMinLabel = new TTQLabel ("Xmin", this);
+ XMinLabel = new TQLabel ("Xmin", this);
XMinLabel.SetSizePolicy (fixedSizePolicy);
gridLayout.AddWidget (XMinLabel, 0, 0);
- XMaxLabel = new TTQLabel ("Xmax", this);
+ XMaxLabel = new TQLabel ("Xmax", this);
XMaxLabel.SetSizePolicy(fixedSizePolicy);
gridLayout.AddWidget (XMaxLabel, 1, 0);
- YMinLabel = new TTQLabel ("Ymin", this);
+ YMinLabel = new TQLabel ("Ymin", this);
YMinLabel.SetSizePolicy (fixedSizePolicy);
gridLayout.AddWidget (YMinLabel, 2, 0);
- YMaxLabel = new TTQLabel ("Ymax", this);
+ YMaxLabel = new TQLabel ("Ymax", this);
YMaxLabel.SetSizePolicy (fixedSizePolicy);
gridLayout.AddWidget (YMaxLabel, 3, 0);
- TTQDoubleValidator validator = new TTQDoubleValidator (this);
+ TQDoubleValidator validator = new TQDoubleValidator (this);
- editXMin = new TTQLineEdit (this, "editXMin");
+ editXMin = new TQLineEdit (this, "editXMin");
editXMin.SetSizePolicy( fixedSizePolicy );
editXMin.SetText (Convert.ToString (DefaultPlotXMin));
editXMin.SetValidator (validator);
gridLayout.AddWidget (editXMin, 0, 1);
- editXMax = new TTQLineEdit (this, "editXMax");
+ editXMax = new TQLineEdit (this, "editXMax");
editXMax.SetSizePolicy( fixedSizePolicy );
editXMax.SetText (Convert.ToString(DefaultPlotXMax));
editXMax.SetValidator (validator);
gridLayout.AddWidget (editXMax, 1, 1);
- editYMin = new TTQLineEdit (this, "editYMin");
+ editYMin = new TQLineEdit (this, "editYMin");
editYMin.SetSizePolicy( fixedSizePolicy );
editYMin.SetText (Convert.ToString(DefaultPlotYMin));
editYMin.SetValidator (validator);
gridLayout.AddWidget (editYMin, 2, 1);
- editYMax = new TTQLineEdit (this, "editYMax");
+ editYMax = new TQLineEdit (this, "editYMax");
editYMax.SetSizePolicy( fixedSizePolicy );
editYMax.SetText (Convert.ToString(DefaultPlotYMax));
editYMax.SetValidator (validator);
gridLayout.AddWidget (editYMax, 3, 1);
leftLayout.AddLayout (gridLayout);
- TTQSpacerItem spacer1 = new TTQSpacerItem (0, 0, 0, 0);
+ TQSpacerItem spacer1 = new TQSpacerItem (0, 0, 0, 0);
leftLayout.AddItem (spacer1);
- buttonLayout = new TTQHBoxLayout (null, 0, 6, "buttonLayout");
- TTQSpacerItem spacer2 = new TTQSpacerItem (0, 0, 0, 0);
+ buttonLayout = new TQHBoxLayout (null, 0, 6, "buttonLayout");
+ TQSpacerItem spacer2 = new TQSpacerItem (0, 0, 0, 0);
buttonLayout.AddItem (spacer2);
- redrawButton = new TTQPushButton ("Redraw", this);
+ redrawButton = new TQPushButton ("Redraw", this);
redrawButton.SetSizePolicy ( fixedSizePolicy );
redrawButton.SetDefault (true);
buttonLayout.AddWidget (redrawButton);
- TTQSpacerItem spacer3 = new TTQSpacerItem (0, 0, 0, 0);
+ TQSpacerItem spacer3 = new TQSpacerItem (0, 0, 0, 0);
buttonLayout.AddItem (spacer3);
leftLayout.AddLayout (buttonLayout);
dialogLayout.AddLayout (leftLayout);
- TTQSpacerItem spacer4 = new TTQSpacerItem (0, 0, 0, 0);
+ TQSpacerItem spacer4 = new TQSpacerItem (0, 0, 0, 0);
dialogLayout.AddItem (spacer4);
pixmapLabel = new PicLabel (this, "pixmapLabel", 0);
//pixmapLabel.SetScaledContents (true);
- pixmapLabel.SetSizePolicy( TTQSizePolicy.SizeType.Minimum,
- TTQSizePolicy.SizeType.Minimum, false );
+ pixmapLabel.SetSizePolicy( TQSizePolicy.SizeType.Minimum,
+ TQSizePolicy.SizeType.Minimum, false );
pixmapLabel.SetGeometry( 0, 0, 400, 300 );
pixmapLabel.Show();
pixmapLabel.Resize(400,300);
dialogLayout.AddWidget (pixmapLabel);
- //TTQImage image = MandelbrotImage( 400, 300 );
- //pixmapLabel.SetPixmap( new TTQPixmap( image ) );
+ //TQImage image = MandelbrotImage( 400, 300 );
+ //pixmapLabel.SetPixmap( new TQPixmap( image ) );
- TTQObject.Connect (redrawButton, TQT_SIGNAL ("clicked()"), pixmapLabel, TQT_SLOT ("Repaint()"));
+ TQObject.Connect (redrawButton, TQT_SIGNAL ("clicked()"), pixmapLabel, TQT_SLOT ("Repaint()"));
//Redraw ();
}
- public TTQImage MandelbrotImage ( int width, int height)
+ public TQImage MandelbrotImage ( int width, int height)
{
int depth;
double real, imag;
@@ -290,7 +290,7 @@ public class ImageDialog : TTQDialog {
int ImageXMax = width;
int ImageYMax = height;
- TTQImage image = new TTQImage (ImageXMax, ImageYMax, 32, 0);
+ TQImage image = new TQImage (ImageXMax, ImageYMax, 32, 0);
for (int x = 0; x <= ImageXMax - 1; x+=1) {
for (int y = 0; y <= ImageYMax - 1; y+=1) {