summaryrefslogtreecommitdiffstats
path: root/qtsharp/src/examples/samples/mandelbrot.cs
diff options
context:
space:
mode:
Diffstat (limited to 'qtsharp/src/examples/samples/mandelbrot.cs')
-rw-r--r--qtsharp/src/examples/samples/mandelbrot.cs84
1 files changed, 42 insertions, 42 deletions
diff --git a/qtsharp/src/examples/samples/mandelbrot.cs b/qtsharp/src/examples/samples/mandelbrot.cs
index cecd6286..3850b781 100644
--- a/qtsharp/src/examples/samples/mandelbrot.cs
+++ b/qtsharp/src/examples/samples/mandelbrot.cs
@@ -106,7 +106,7 @@ public class Mandelbrot {
public static void Main (string[] args)
{
- TTQApplication app = new TTQApplication (args);
+ TQApplication app = new TQApplication (args);
ImageDialog dialog = new ImageDialog (null, "Mandelbrot", false, 0);
dialog.Show ();
@@ -117,109 +117,109 @@ public class Mandelbrot {
}
-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;
- TTQLabel pixmapLabel;
- TTQSizePolicy fixedSizePolicy;
+ TQHBoxLayout dialogLayout;
+ TQGridLayout gridLayout;
+ TQVBoxLayout leftLayout;
+ TQHBoxLayout buttonLayout;
+ TQPushButton redrawButton;
+ TQLabel pixmapLabel;
+ 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 ();
- fixedSizePolicy.SetHorData (TTQSizePolicy.SizeType.Fixed);
- fixedSizePolicy.SetVerData (TTQSizePolicy.SizeType.Fixed);
+ fixedSizePolicy = new TQSizePolicy ();
+ fixedSizePolicy.SetHorData (TQSizePolicy.SizeType.Fixed);
+ fixedSizePolicy.SetVerData (TQSizePolicy.SizeType.Fixed);
- 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.SetText (Convert.ToString (DefaultPlotXMin));
editXMin.SetValidator (validator);
gridLayout.AddWidget (editXMin, 0, 1);
- editXMax = new TTQLineEdit (this, "editXMax");
+ editXMax = new TQLineEdit (this, "editXMax");
editXMax.SetText (Convert.ToString(DefaultPlotXMax));
editXMax.SetValidator (validator);
gridLayout.AddWidget (editXMax, 1, 1);
- editYMin = new TTQLineEdit (this, "editYMin");
+ editYMin = new TQLineEdit (this, "editYMin");
editYMin.SetText (Convert.ToString(DefaultPlotYMin));
editYMin.SetValidator (validator);
gridLayout.AddWidget (editYMin, 2, 1);
- editYMax = new TTQLineEdit (this, "editYMax");
+ editYMax = new TQLineEdit (this, "editYMax");
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.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 TTQLabel (this, "pixmapLabel", 0);
+ pixmapLabel = new TQLabel (this, "pixmapLabel", 0);
pixmapLabel.SetScaledContents (true);
dialogLayout.AddWidget (pixmapLabel);
- TTQObject.Connect (redrawButton, TQT_SIGNAL ("clicked()"), this, TQT_SLOT ("Redraw()"));
+ TQObject.Connect (redrawButton, TQT_SIGNAL ("clicked()"), this, TQT_SLOT ("Redraw()"));
Redraw ();
}
- TTQImage MandelbrotImage ()
+ TQImage MandelbrotImage ()
{
int depth;
double real, imag;
@@ -232,7 +232,7 @@ public class ImageDialog : TTQDialog {
int ImageXMax = pixmapLabel.Width ();
int ImageYMax = pixmapLabel.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) {
@@ -248,16 +248,16 @@ public class ImageDialog : TTQDialog {
public void Redraw ()
{
- TTQSize s = pixmapLabel.BaseSize ();
+ TQSize s = pixmapLabel.BaseSize ();
pixmapLabel.Resize (400,300);
- TTQApplication.SetOverrideCursor ( new TTQCursor( (int) CursorShape.WaitCursor ));
- TTQImage image = MandelbrotImage ();
- TTQPixmap pixmap = new TTQPixmap (image);
+ TQApplication.SetOverrideCursor ( new TQCursor( (int) CursorShape.WaitCursor ));
+ TQImage image = MandelbrotImage ();
+ TQPixmap pixmap = new TQPixmap (image);
pixmapLabel.SetPixmap( pixmap);
image.Dispose ();
pixmap.Dispose ();
this.AdjustSize ();
- TTQApplication.RestoreOverrideCursor ();
+ TQApplication.RestoreOverrideCursor ();
}
}