diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-05 16:20:48 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-05 16:20:48 -0600 |
commit | e63beeb5bdb82987b1e00bc35178667786fbad48 (patch) | |
tree | ab77b6ac830b7944d5d1eb9ce8f81feb8fdab948 /qtsharp/src/examples | |
parent | 67557a2b56c0678c22ab1b00c4fd0224c5e9ed99 (diff) | |
download | tdebindings-e63beeb5bdb82987b1e00bc35178667786fbad48.tar.gz tdebindings-e63beeb5bdb82987b1e00bc35178667786fbad48.zip |
Fix incorrect conversion
Diffstat (limited to 'qtsharp/src/examples')
-rw-r--r-- | qtsharp/src/examples/samples/display.cs | 26 | ||||
-rw-r--r-- | qtsharp/src/examples/samples/emit.cs | 8 | ||||
-rw-r--r-- | qtsharp/src/examples/samples/eventhandling.cs | 12 | ||||
-rw-r--r-- | qtsharp/src/examples/samples/hello.cs | 10 | ||||
-rw-r--r-- | qtsharp/src/examples/samples/mandelbrot.cs | 84 | ||||
-rw-r--r-- | qtsharp/src/examples/samples/mandelbrot2.cs | 88 | ||||
-rw-r--r-- | qtsharp/src/examples/samples/qstring-slot.cs | 20 | ||||
-rw-r--r-- | qtsharp/src/examples/samples/quantumfractals.cs | 124 | ||||
-rw-r--r-- | qtsharp/src/examples/samples/scribblewindow.cs | 110 | ||||
-rw-r--r-- | qtsharp/src/examples/test-results.html | 2 | ||||
-rw-r--r-- | qtsharp/src/examples/tutorials/t1.cs | 4 | ||||
-rw-r--r-- | qtsharp/src/examples/tutorials/t2.cs | 10 | ||||
-rw-r--r-- | qtsharp/src/examples/tutorials/t3.cs | 12 | ||||
-rw-r--r-- | qtsharp/src/examples/tutorials/t4.cs | 12 | ||||
-rw-r--r-- | qtsharp/src/examples/tutorials/t5.cs | 18 | ||||
-rw-r--r-- | qtsharp/src/examples/tutorials/t6.cs | 24 | ||||
-rw-r--r-- | qtsharp/src/examples/tutorials/t7.cs | 26 |
17 files changed, 295 insertions, 295 deletions
diff --git a/qtsharp/src/examples/samples/display.cs b/qtsharp/src/examples/samples/display.cs index 00703b4b..9f2f4939 100644 --- a/qtsharp/src/examples/samples/display.cs +++ b/qtsharp/src/examples/samples/display.cs @@ -3,20 +3,20 @@ namespace QtSamples { using Qt; using System; - public class Display : TTQMainWindow { + public class Display : TQMainWindow { private TextArea textarea; - private TTQScrollView scrollview; - private TTQMenuBar menubar; - private TTQPopupMenu filemenu, aboutmenu; + private TQScrollView scrollview; + private TQMenuBar menubar; + private TQPopupMenu filemenu, aboutmenu; - private class TextArea : TTQTextEdit { + private class TextArea : TQTextEdit { - public TextArea (TTQWidget parent) : base (parent) + public TextArea (TQWidget parent) : base (parent) { - TTQFile file = new TTQFile ("display.cs"); + TQFile file = new TQFile ("display.cs"); if ( file.Open(1) ) { - TTQTextStream ts = new TTQTextStream (file); + TQTextStream ts = new TQTextStream (file); this.SetText (ts.Read ()); this.SetTabStopWidth (30); } @@ -25,13 +25,13 @@ namespace QtSamples { public Display () { - filemenu = new TTQPopupMenu (null, "filemenu"); + filemenu = new TQPopupMenu (null, "filemenu"); filemenu.InsertItem ("&Quit", qApp, TQT_SLOT ("quit()")); - aboutmenu = new TTQPopupMenu(null, "aboutmenu"); + aboutmenu = new TQPopupMenu(null, "aboutmenu"); aboutmenu.InsertItem("&About Qt-Sharp", this, TQT_SLOT("slotAbout()")); - menubar = new TTQMenuBar(this, ""); + menubar = new TQMenuBar(this, ""); menubar.InsertItem("&File", filemenu); menubar.InsertItem("&About", aboutmenu); @@ -42,7 +42,7 @@ namespace QtSamples { public void slotAbout () { - TTQMessageBox.Information ( + TQMessageBox.Information ( this, "About Qt-Sharp-0.7", "A Qt (http://www.trolltech.com) to C# language binding.\n" + "Qt-Sharp is compatible with Mono (http://go-mono.org) and\n" + @@ -53,7 +53,7 @@ namespace QtSamples { public static void Main (String[] args) { - TTQApplication app = new TTQApplication (args); + TQApplication app = new TQApplication (args); Display demo = new Display (); demo.SetCaption ("Qt-Sharp-0.7!"); app.SetMainWidget (demo); diff --git a/qtsharp/src/examples/samples/emit.cs b/qtsharp/src/examples/samples/emit.cs index a15868db..125166a2 100644 --- a/qtsharp/src/examples/samples/emit.cs +++ b/qtsharp/src/examples/samples/emit.cs @@ -6,12 +6,12 @@ namespace QtSamples { using Qt; [DeclareQtSignal ("MySignal()")] - public class EmitSample: TTQVBox { + public class EmitSample: TQVBox { public EmitSample (): this (null, "") {} - public EmitSample (TTQWidget parent, string name): base () + public EmitSample (TQWidget parent, string name): base () { - TTQPushButton pb = new TTQPushButton ("Papa Smurf", this); + TQPushButton pb = new TQPushButton ("Papa Smurf", this); Connect (pb, TQT_SIGNAL ("clicked ()"), TQT_SLOT ("DoEmit ()")); Connect (this, TQT_SIGNAL ("MySignal ()"), TQT_SLOT ("PrintStuff ()")); @@ -29,7 +29,7 @@ namespace QtSamples { public static int Main (string[] args) { - TTQApplication app = new TTQApplication (args); + TQApplication app = new TQApplication (args); EmitSample es = new EmitSample (); app.SetMainWidget (es); es.Show (); diff --git a/qtsharp/src/examples/samples/eventhandling.cs b/qtsharp/src/examples/samples/eventhandling.cs index 30928a63..efa938bb 100644 --- a/qtsharp/src/examples/samples/eventhandling.cs +++ b/qtsharp/src/examples/samples/eventhandling.cs @@ -11,11 +11,11 @@ namespace QtSamples { using Qt; using System; - public class EventHandling : TTQVBox { + public class EventHandling : TQVBox { public static void Main (String[] args) { - TTQApplication app = new TTQApplication (args); + TQApplication app = new TQApplication (args); EventHandling evh = new EventHandling (); app.SetMainWidget (evh); evh.Show (); @@ -30,20 +30,20 @@ namespace QtSamples { MyButton pb = new MyButton (this); } - public void mouseEvents (TTQObject sender, TQEventArgs e) + public void mouseEvents (TQObject sender, TQEventArgs e) { Console.WriteLine ("Mouse event: " + e.Name); } - class MyButton : TTQPushButton { + class MyButton : TQPushButton { - public MyButton (TTQWidget parent) : base ("Hello Qt-Sharp-0.7!", parent) + public MyButton (TQWidget parent) : base ("Hello Qt-Sharp-0.7!", parent) { // This is the local event handler for mousePressEvents mousePressEvent += new MousePressEvent (pressEvent); } - public void pressEvent (TTQMouseEvent e) + public void pressEvent (TQMouseEvent e) { Console.WriteLine ("I've been clicked"); } diff --git a/qtsharp/src/examples/samples/hello.cs b/qtsharp/src/examples/samples/hello.cs index 81a5eb89..1039aa34 100644 --- a/qtsharp/src/examples/samples/hello.cs +++ b/qtsharp/src/examples/samples/hello.cs @@ -11,11 +11,11 @@ namespace QtSamples { using Qt; using System; - public class HelloWorld : TTQVBox { + public class HelloWorld : TQVBox { public static void Main (String[] args) { - TTQApplication app = new TTQApplication (args); + TQApplication app = new TQApplication (args); HelloWorld hello = new HelloWorld (); app.SetMainWidget (hello); hello.Show (); @@ -24,13 +24,13 @@ namespace QtSamples { public HelloWorld () : base (null) { - TTQPushButton pb = new TTQPushButton ("Hello Qt-Sharp-0.7!", this); - TTQObject.Connect (pb, TQT_SIGNAL ("clicked()"), this, TQT_SLOT("SlotClicked()")); + TQPushButton pb = new TQPushButton ("Hello Qt-Sharp-0.7!", this); + TQObject.Connect (pb, TQT_SIGNAL ("clicked()"), this, TQT_SLOT("SlotClicked()")); } public void SlotClicked () { - Console.WriteLine ("TTQPushButton Clicked!"); + Console.WriteLine ("TQPushButton Clicked!"); } } } 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 (); } } 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) { diff --git a/qtsharp/src/examples/samples/qstring-slot.cs b/qtsharp/src/examples/samples/qstring-slot.cs index af2db0a2..c0559f5b 100644 --- a/qtsharp/src/examples/samples/qstring-slot.cs +++ b/qtsharp/src/examples/samples/qstring-slot.cs @@ -1,4 +1,4 @@ -// Demo of a TTQString slot +// Demo of a TQString slot // Implemented by Marcus Urban using System; @@ -6,21 +6,21 @@ using Qt; public class MyWidget : TQVBox { - TTQLineEdit lineEdit; - TTQLabel label; + TQLineEdit lineEdit; + TQLabel label; - public MyWidget (TTQWidget parent, String name) : base (parent, name) + public MyWidget (TQWidget parent, String name) : base (parent, name) { - lineEdit = new TTQLineEdit( this, "lineEdit" ); - label = new TTQLabel( this, "label" ); + lineEdit = new TQLineEdit( this, "lineEdit" ); + label = new TQLabel( this, "label" ); label.SetText("Default"); - TTQObject.Connect( lineEdit, TQT_SIGNAL("textChanged(TTQString)"), - label, "SetText(TTQString)" ); + TQObject.Connect( lineEdit, TQT_SIGNAL("textChanged(TQString)"), + label, "SetText(TQString)" ); } - public MyWidget (TTQWidget parent) : this (parent, "") {} + public MyWidget (TQWidget parent) : this (parent, "") {} public MyWidget () : this (null, "") {} } @@ -28,7 +28,7 @@ public class Example { public static int Main (String[] args) { - TTQApplication a = new TTQApplication (args); + TQApplication a = new TQApplication (args); MyWidget w = new MyWidget (); a.SetMainWidget (w); diff --git a/qtsharp/src/examples/samples/quantumfractals.cs b/qtsharp/src/examples/samples/quantumfractals.cs index 484b5640..9303b831 100644 --- a/qtsharp/src/examples/samples/quantumfractals.cs +++ b/qtsharp/src/examples/samples/quantumfractals.cs @@ -9,18 +9,18 @@ namespace Qf { using System; using System.Threading; - public class FractalViewer : TTQMainWindow { + public class FractalViewer : TQMainWindow { //Menuing - private TTQMenuBar menubar; - private TTQPopupMenu filemenu; - private TTQPopupMenu shapemenu; - private TTQPopupMenu settingsmenu; + private TQMenuBar menubar; + private TQPopupMenu filemenu; + private TQPopupMenu shapemenu; + private TQPopupMenu settingsmenu; public static int Main (string[] args) { //Initialize and start the main event loop - TTQApplication app = new TTQApplication (args); + TQApplication app = new TQApplication (args); FractalViewer view = new FractalViewer (); app.SetMainWidget (view); view.Show (); @@ -36,13 +36,13 @@ namespace Qf { SetCentralWidget (display); //Setup the filemenu - filemenu = new TTQPopupMenu (null, "filemenu"); + filemenu = new TQPopupMenu (null, "filemenu"); filemenu.InsertItem ("&Screenshot", display, TQT_SLOT ("SlotScreenshot()")); filemenu.InsertSeparator (); filemenu.InsertItem ("&Quit", qApp, TQT_SLOT ("quit()")); //Setup the shapemenu - shapemenu = new TTQPopupMenu (null, "typemenu"); + shapemenu = new TQPopupMenu (null, "typemenu"); shapemenu.InsertItem( "&Tetrahedron", 0); shapemenu.InsertItem( "&Cube", 1); shapemenu.InsertItem( "&Octahedron", 2); @@ -52,42 +52,42 @@ namespace Qf { shapemenu.InsertItem( "&Icosidodecahedron", 6); //Connect the shapemenu - TTQObject.Connect (shapemenu, TQT_SIGNAL ("activated(int)"), + TQObject.Connect (shapemenu, TQT_SIGNAL ("activated(int)"), display, TQT_SLOT("SlotShapeMenu(int)")); //Setup the settingsmenu - settingsmenu = new TTQPopupMenu (null, "settingsmenu"); + settingsmenu = new TQPopupMenu (null, "settingsmenu"); settingsmenu.InsertItem ("&Alpha", display, TQT_SLOT ("SlotSetAlpha()")); //Setup the menubar - menubar = new TTQMenuBar (this, ""); + menubar = new TQMenuBar (this, ""); menubar.InsertItem ("&File", filemenu); menubar.InsertItem ("&Shape", shapemenu); menubar.InsertItem ("&Settings", settingsmenu); } } - public class Display: TTQWidget, IQuantumFractal { + public class Display: TQWidget, IQuantumFractal { //Labels - TTQLabel count; - TTQLabel shape; - TTQLabel alpha; + TQLabel count; + TQLabel shape; + TQLabel alpha; //Buttons - TTQPushButton start; - TTQPushButton stop; - TTQPushButton reset; - TTQPushButton gray; - TTQPushButton intense; + TQPushButton start; + TQPushButton stop; + TQPushButton reset; + TQPushButton gray; + TQPushButton intense; //Drawable region TQPaintBuffer buffer; //Layouts - TTQVBoxLayout layout; - TTQHBoxLayout buttons; - TTQVBoxLayout labels; + TQVBoxLayout layout; + TQHBoxLayout buttons; + TQVBoxLayout labels; //Engine controller variables int[] topDensity = new int[0]; @@ -106,35 +106,35 @@ namespace Qf { QuantumFractals qf; Thread engine; - public Display (TTQWidget parent): base (parent) + public Display (TQWidget parent): base (parent) { //Setup the sizes - TTQSize size = new TTQSize (resolution, resolution); + TQSize size = new TQSize (resolution, resolution); parent.SetBaseSize (size); //Some nice colors - SetPaletteBackgroundColor (new TTQColor ("Black")); - SetPaletteForegroundColor (new TTQColor ("LightBlue")); + SetPaletteBackgroundColor (new TQColor ("Black")); + SetPaletteForegroundColor (new TQColor ("LightBlue")); //Setup the buttons - start = new TTQPushButton ("Start", this); - stop = new TTQPushButton ("Stop", this); - reset = new TTQPushButton ("Reset", this); - gray = new TTQPushButton ("Color", this); - intense = new TTQPushButton ("Intensity", this); + start = new TQPushButton ("Start", this); + stop = new TQPushButton ("Stop", this); + reset = new TQPushButton ("Reset", this); + gray = new TQPushButton ("Color", this); + intense = new TQPushButton ("Intensity", this); //Setup the labels - count = new TTQLabel (this); - alpha = new TTQLabel (this); - shape = new TTQLabel (this); + count = new TQLabel (this); + alpha = new TQLabel (this); + shape = new TQLabel (this); //Setup the drawable buffer = new TQPaintBuffer (this); buffer.SetMinimumSize (size); //Create the layouts - layout = new TTQVBoxLayout (this); - buttons = new TTQHBoxLayout (layout); + layout = new TQVBoxLayout (this); + buttons = new TQHBoxLayout (layout); //Add some buttons buttons.AddWidget (start); @@ -144,23 +144,23 @@ namespace Qf { buttons.AddWidget (intense); //Connect the buttons and SlotQuit - TTQObject.Connect (start, TQT_SIGNAL ("clicked()"), + TQObject.Connect (start, TQT_SIGNAL ("clicked()"), this, TQT_SLOT ("SlotStart()")); - TTQObject.Connect (stop, TQT_SIGNAL ("clicked()"), + TQObject.Connect (stop, TQT_SIGNAL ("clicked()"), this, TQT_SLOT ("SlotStop()")); - TTQObject.Connect (reset, TQT_SIGNAL ("clicked()"), + TQObject.Connect (reset, TQT_SIGNAL ("clicked()"), this, TQT_SLOT ("SlotReset()")); - TTQObject.Connect (gray, TQT_SIGNAL ("clicked()"), + TQObject.Connect (gray, TQT_SIGNAL ("clicked()"), this, TQT_SLOT ("SlotGray()")); - TTQObject.Connect (intense, TQT_SIGNAL ("clicked()"), + TQObject.Connect (intense, TQT_SIGNAL ("clicked()"), this, TQT_SLOT ("SlotIntense()")); - TTQObject.Connect (buffer, TQT_SIGNAL ("Painted()"), + TQObject.Connect (buffer, TQT_SIGNAL ("Painted()"), this, TQT_SLOT ("SlotSetLabels()")); - TTQObject.Connect (qApp, TQT_SIGNAL ("lastWindowClosed ()"), + TQObject.Connect (qApp, TQT_SIGNAL ("lastWindowClosed ()"), this, TQT_SLOT ("SlotQuit ()")); //Layout labels - labels = new TTQVBoxLayout (layout); + labels = new TQVBoxLayout (layout); labels.AddWidget (count); labels.AddWidget (shape); labels.AddWidget (alpha); @@ -367,9 +367,9 @@ namespace Qf { WasRunning = Running ? true : false; SlotStop (); - string filename = TTQFileDialog.GetSaveFileName ( + string filename = TQFileDialog.GetSaveFileName ( - TTQDir.HomeDirPath (), "*", this, "save", + TQDir.HomeDirPath (), "*", this, "save", "Save Screenshot", "*.png", true ); @@ -405,7 +405,7 @@ namespace Qf { } //Need to reset the resolution upon resize - private void TouchResize (TTQResizeEvent e) + private void TouchResize (TQResizeEvent e) { int height = buffer.Size ().Height (); int width = buffer.Size ().Width (); @@ -415,23 +415,23 @@ namespace Qf { } [DeclareQtSignal ("Painted()")] - public class TQPaintBuffer : TTQFrame { + public class TQPaintBuffer : TQFrame { //Drawables - private TTQPixmap buffer; - private TTQImage image; + private TQPixmap buffer; + private TQImage image; //Timer private TimerCallback call; private Timer timer; - public TQPaintBuffer (TTQWidget parent) : base (parent) + public TQPaintBuffer (TQWidget parent) : base (parent) { SetBackgroundMode (Qt.BackgroundMode.NoBackground); //Create drawables - buffer = new TTQPixmap (); - image = new TTQImage (Size (), 32); + buffer = new TQPixmap (); + image = new TQImage (Size (), 32); //Setup the event handlers paintEvent += new PaintEvent (TouchPaint); @@ -448,8 +448,8 @@ namespace Qf { //Resets the drawables public void Reset () { - buffer = new TTQPixmap (); - image = new TTQImage (Size (), 32); + buffer = new TQPixmap (); + image = new TQImage (Size (), 32); PaintImage (null); } @@ -484,24 +484,24 @@ namespace Qf { } //Receive focus events - private void TouchFocus (TTQFocusEvent e) + private void TouchFocus (TQFocusEvent e) { PerformPaint (); } //Receive paint events - private void TouchPaint (TTQPaintEvent e) + private void TouchPaint (TQPaintEvent e) { PerformPaint (); } //Receive resize events - private void TouchResize (TTQResizeEvent e) + private void TouchResize (TQResizeEvent e) { - image = new TTQImage (e.Size (), 32); + image = new TQImage (e.Size (), 32); buffer.Resize (e.Size()); - buffer.Fill (new TTQColor("black")); - BitBlt (buffer, 0, 0, new TTQPixmap (buffer), + buffer.Fill (new TQColor("black")); + BitBlt (buffer, 0, 0, new TQPixmap (buffer), 0, 0, -1, -1, RasterOp.CopyROP, false); } diff --git a/qtsharp/src/examples/samples/scribblewindow.cs b/qtsharp/src/examples/samples/scribblewindow.cs index 70ed3c0f..4013c355 100644 --- a/qtsharp/src/examples/samples/scribblewindow.cs +++ b/qtsharp/src/examples/samples/scribblewindow.cs @@ -9,22 +9,22 @@ namespace QtSamples { using Qt; using System; - [DeclareQtSignal ("colorChanged(TTQColor)")] - [DeclareQtSignal ("load(TTQString)")] - [DeclareQtSignal ("save(TTQString)")] - public class ScribbleWindow : TTQMainWindow { - - private TTQMenuBar menubar; - private TTQPopupMenu filemenu; - private TTQPopupMenu aboutmenu; - private TTQScrollView scrollview; + [DeclareQtSignal ("colorChanged(TQColor)")] + [DeclareQtSignal ("load(TQString)")] + [DeclareQtSignal ("save(TQString)")] + public class ScribbleWindow : TQMainWindow { + + private TQMenuBar menubar; + private TQPopupMenu filemenu; + private TQPopupMenu aboutmenu; + private TQScrollView scrollview; public ScribbleArea scribblearea; enum Color {Black, Red, Blue, Green, Yellow}; public static int Main (String[] args) { - TTQApplication app = new TTQApplication (args); + TQApplication app = new TQApplication (args); ScribbleWindow demo = new ScribbleWindow (); demo.SetGeometry (50, 500, 400, 400); app.SetMainWidget (demo); @@ -35,22 +35,22 @@ namespace QtSamples { ScribbleWindow () : base (null, null) { - filemenu = new TTQPopupMenu (null, "filemenu"); + filemenu = new TQPopupMenu (null, "filemenu"); filemenu.InsertItem ("&Load", this, TQT_SLOT ("SlotLoad()") ); filemenu.InsertItem ("&Save", this, TQT_SLOT ("SlotSave()") ); filemenu.InsertSeparator (); filemenu.InsertItem ("&Quit", qApp, TQT_SLOT ("quit()")); - aboutmenu = new TTQPopupMenu (null, "helpmenu"); + aboutmenu = new TQPopupMenu (null, "helpmenu"); aboutmenu.InsertItem ("&About Qt-Sharp", this, TQT_SLOT ("SlotAboutQtSharp()")); aboutmenu.InsertItem ("&About Qt", this, TQT_SLOT ("SlotAboutQt()")); - menubar = new TTQMenuBar (this, ""); + menubar = new TQMenuBar (this, ""); menubar.InsertItem ("&File", filemenu); menubar.InsertItem ("&Color", this, TQT_SLOT("SlotColorChooser()")); menubar.InsertItem ("&About", aboutmenu); - scrollview = new TTQScrollView (this); + scrollview = new TQScrollView (this); scrollview.SetGeometry (0, menubar.Height (), Width (), Height () - menubar.Height ()); scribblearea = new ScribbleArea (this); scribblearea.SetGeometry (0, 0, 1000, 1000); @@ -58,39 +58,39 @@ namespace QtSamples { this.SetCentralWidget (scrollview); SetMaximumSize (Width (), Height () - menubar.Height ()); - TTQObject.Connect (this, TQT_SIGNAL ("colorChanged(TTQColor)"), - scribblearea, TQT_SLOT ("SlotSetColor(TTQColor)") ); - TTQObject.Connect (this, TQT_SIGNAL ("load(TTQString)"), - scribblearea, TQT_SLOT ("PerformLoad(TTQString)") ); - TTQObject.Connect (this, TQT_SIGNAL ("save(TTQString)"), - scribblearea, TQT_SLOT ("PerformSave(TTQString)") ); + TQObject.Connect (this, TQT_SIGNAL ("colorChanged(TQColor)"), + scribblearea, TQT_SLOT ("SlotSetColor(TQColor)") ); + TQObject.Connect (this, TQT_SIGNAL ("load(TQString)"), + scribblearea, TQT_SLOT ("PerformLoad(TQString)") ); + TQObject.Connect (this, TQT_SIGNAL ("save(TQString)"), + scribblearea, TQT_SLOT ("PerformSave(TQString)") ); } public void SlotLoad () { - string filename = TTQFileDialog.GetOpenFileName (".", "*.bmp", this, - null, "Load File", TTQString.Null, true); + string filename = TQFileDialog.GetOpenFileName (".", "*.bmp", this, + null, "Load File", TQString.Null, true); if ( filename != null ) - Emit ("load(TTQString)", (TTQString) filename); + Emit ("load(TQString)", (TQString) filename); } public void SlotSave () { - string filename = TTQFileDialog.GetSaveFileName (".", "*.bmp", this, - null, "Save File", TTQString.Null, true); + string filename = TQFileDialog.GetSaveFileName (".", "*.bmp", this, + null, "Save File", TQString.Null, true); if ( filename != null ) { if ( ! filename.ToLower().EndsWith(".bmp") ) filename += ".bmp"; - Emit ("save(TTQString)", (TTQString) filename); + Emit ("save(TQString)", (TQString) filename); } } public void SlotAboutQtSharp () { - TTQMessageBox.Information (this, "About Qt# 0.7", + TQMessageBox.Information (this, "About Qt# 0.7", "A Qt (http://www.trolltech.com) to C# language binding. \n" + "Qt# is compatible with Mono (http://go-mono.org) and\n" + "Portable.NET (http://www.southern-storm.com.au/portable_net.html)\n" + @@ -100,29 +100,29 @@ namespace QtSamples { public void SlotAboutQt () { - TTQMessageBox.AboutQt (this, "About Qt"); + TQMessageBox.AboutQt (this, "About Qt"); } public void SlotColorChooser () { - TTQColor chosenColor = TQColorDialog.GetColor(); + TQColor chosenColor = TQColorDialog.GetColor(); if (chosenColor.IsValid()) - Emit ("colorChanged(TTQColor)", chosenColor); + Emit ("colorChanged(TQColor)", chosenColor); } - public class ScribbleArea : TTQFrame { - private TTQPoint last; - private TTQPixmap buffer; - private TTQColor currentcolor = new TTQColor("Black"); - private TTQPopupMenu popupmenu; + public class ScribbleArea : TQFrame { + private TQPoint last; + private TQPixmap buffer; + private TQColor currentcolor = new TQColor("Black"); + private TQPopupMenu popupmenu; - public ScribbleArea (TTQWidget parent) : base (parent) + public ScribbleArea (TQWidget parent) : base (parent) { - buffer = new TTQPixmap (); - last = new TTQPoint (); + buffer = new TQPixmap (); + last = new TQPoint (); SetBackgroundMode (Qt.BackgroundMode.NoBackground); - popupmenu = new TTQPopupMenu(); + popupmenu = new TQPopupMenu(); popupmenu.InsertItem ("&Clear", this, TQT_SLOT ("SlotClearArea()") ); mouseMoveEvent += new MouseMoveEvent (MouseMoved); @@ -131,51 +131,51 @@ namespace QtSamples { resizeEvent += new ResizeEvent (PerformResize); } - public void PerformLoad (TTQString filename) + public void PerformLoad (TQString filename) { if ( ! buffer.Load(filename) ) - TTQMessageBox.Warning (null, "Load error", "Could not load file"); + TQMessageBox.Warning (null, "Load error", "Could not load file"); Repaint(); } - public void PerformSave (TTQString filename) + public void PerformSave (TQString filename) { if ( ! buffer.Save (filename, "BMP") ) - TTQMessageBox.Warning( null, "Save error", "Could not save file"); + TQMessageBox.Warning( null, "Save error", "Could not save file"); } public void SlotClearArea () { - buffer.Fill( new TTQColor ("white") ); + buffer.Fill( new TQColor ("white") ); BitBlt (this, 0, 0, buffer, 0, 0, -1, -1, Qt.RasterOp.CopyROP, false); } - public void SlotSetColor (TTQColor color) + public void SlotSetColor (TQColor color) { currentcolor = color; } // Note, Dispose() is called on TQPoints here to increase performance - // of the UI. Otherwise, the GC would let dead TTQPoint instances pile + // of the UI. Otherwise, the GC would let dead TQPoint instances pile // up and delete them all at once, causing the UI to pause while it frees // memory. (This happens because the GC runs in the same thread as the // application.) - protected void MousePressed (TTQMouseEvent e) + protected void MousePressed (TQMouseEvent e) { if (e.Button() == ButtonState.RightButton ) - popupmenu.Exec (TTQCursor.Pos ()); + popupmenu.Exec (TQCursor.Pos ()); else { last.Dispose (); last = e.Pos(); } } - protected void MouseMoved (TTQMouseEvent e) + protected void MouseMoved (TQMouseEvent e) { - TTQPainter windowPainter = new TTQPainter (); - TTQPainter bufferPainter = new TTQPainter (); + TQPainter windowPainter = new TQPainter (); + TQPainter bufferPainter = new TQPainter (); windowPainter.Begin (this); bufferPainter.Begin (buffer); @@ -193,17 +193,17 @@ namespace QtSamples { last = e.Pos (); } - protected void PerformPaint (TTQPaintEvent e) + protected void PerformPaint (TQPaintEvent e) { BitBlt(this, 0, 0, buffer, 0, 0, -1, -1, RasterOp.CopyROP, false); } - protected void PerformResize (TTQResizeEvent e) + protected void PerformResize (TQResizeEvent e) { - TTQPixmap save = new TTQPixmap (buffer); + TQPixmap save = new TQPixmap (buffer); buffer.Resize (e.Size()); - buffer.Fill (new TTQColor("white")); + buffer.Fill (new TQColor("white")); BitBlt (buffer, 0, 0, save, 0, 0, -1, -1, RasterOp.CopyROP, false); } diff --git a/qtsharp/src/examples/test-results.html b/qtsharp/src/examples/test-results.html index 08238042..40f06b82 100644 --- a/qtsharp/src/examples/test-results.html +++ b/qtsharp/src/examples/test-results.html @@ -187,7 +187,7 @@ <TD COLSPAN=7 WIDTH=644 HEIGHT=19 ALIGN=LEFT><FONT FACE="Arial" SIZE=3>(1) No crashes, but no drawing</FONT></TD> </TR> <TR> - <TD COLSPAN=7 WIDTH=644 HEIGHT=19 ALIGN=LEFT><FONT FACE="Arial" SIZE=3>(2) Closing window results in a double TTQObject deletion and then application locks up</FONT></TD> + <TD COLSPAN=7 WIDTH=644 HEIGHT=19 ALIGN=LEFT><FONT FACE="Arial" SIZE=3>(2) Closing window results in a double TQObject deletion and then application locks up</FONT></TD> </TR> <TR> <TD COLSPAN=7 WIDTH=644 HEIGHT=37 ALIGN=LEFT><FONT FACE="Arial" SIZE=3>(3) Random lockups occur after a large amount of scribbling is performed; background fails to initialized properly sometimes</FONT></TD> diff --git a/qtsharp/src/examples/tutorials/t1.cs b/qtsharp/src/examples/tutorials/t1.cs index b5498d7a..84c79d38 100644 --- a/qtsharp/src/examples/tutorials/t1.cs +++ b/qtsharp/src/examples/tutorials/t1.cs @@ -9,9 +9,9 @@ public class Example { public static int Main (String[] args) { - TTQApplication a = new TTQApplication (args); + TQApplication a = new TQApplication (args); - TTQPushButton hello = new TTQPushButton ("Hello world!", null); + TQPushButton hello = new TQPushButton ("Hello world!", null); // In C++, the second parameter is 0 (null pointer) hello.Resize (100, 30); diff --git a/qtsharp/src/examples/tutorials/t2.cs b/qtsharp/src/examples/tutorials/t2.cs index 84af5a37..5dbe07d1 100644 --- a/qtsharp/src/examples/tutorials/t2.cs +++ b/qtsharp/src/examples/tutorials/t2.cs @@ -9,16 +9,16 @@ public class Example { public static int Main (String[] args) { - TTQApplication a = new TTQApplication (args); + TQApplication a = new TQApplication (args); - TTQPushButton quit = new TTQPushButton ("Quit", null); + TQPushButton quit = new TQPushButton ("Quit", null); // In C++, the second parameter is 0 (null pointer) quit.Resize (75, 30); - quit.SetFont (new TTQFont ("Times", 18, TTQFont.Weight.Bold)); - // In C++, TTQFont::Bold is sufficient + quit.SetFont (new TQFont ("Times", 18, TQFont.Weight.Bold)); + // In C++, TQFont::Bold is sufficient - TTQObject.Connect ( quit, QtSupport.TQT_SIGNAL ("clicked()"), a, QtSupport.TQT_SLOT ("Quit()") ); + TQObject.Connect ( quit, QtSupport.TQT_SIGNAL ("clicked()"), a, QtSupport.TQT_SLOT ("Quit()") ); // TQT_SIGNAL and TQT_SLOT are static functions of QtSupport a.SetMainWidget (quit); diff --git a/qtsharp/src/examples/tutorials/t3.cs b/qtsharp/src/examples/tutorials/t3.cs index 806c5184..26fece72 100644 --- a/qtsharp/src/examples/tutorials/t3.cs +++ b/qtsharp/src/examples/tutorials/t3.cs @@ -10,16 +10,16 @@ public class Example { public static int Main (String[] args) { - TTQApplication a = new TTQApplication (args); + TQApplication a = new TQApplication (args); - TTQVBox box = new TTQVBox (); + TQVBox box = new TQVBox (); box.Resize (200, 120); - TTQPushButton quit = new TTQPushButton ("Quit", box); - quit.SetFont (new TTQFont ("Times", 18, TTQFont.Weight.Bold)); - // In C++, TTQFont::Bold is sufficient + TQPushButton quit = new TQPushButton ("Quit", box); + quit.SetFont (new TQFont ("Times", 18, TQFont.Weight.Bold)); + // In C++, TQFont::Bold is sufficient - TTQObject.Connect ( quit, QtSupport.TQT_SIGNAL ("clicked()"), a, QtSupport.TQT_SLOT ("Quit()") ); + TQObject.Connect ( quit, QtSupport.TQT_SIGNAL ("clicked()"), a, QtSupport.TQT_SLOT ("Quit()") ); // TQT_SIGNAL and TQT_SLOT are static functions of QtSupport a.SetMainWidget (box); diff --git a/qtsharp/src/examples/tutorials/t4.cs b/qtsharp/src/examples/tutorials/t4.cs index 68b3c26a..e868cc7e 100644 --- a/qtsharp/src/examples/tutorials/t4.cs +++ b/qtsharp/src/examples/tutorials/t4.cs @@ -5,17 +5,17 @@ using System; using Qt; -public class MyWidget : TTQWidget { +public class MyWidget : TQWidget { - public MyWidget (TTQWidget parent, String name) : base (parent, name) + public MyWidget (TQWidget parent, String name) : base (parent, name) // In C++, parent and name have default values of 0 (null pointer) { this.SetMinimumSize (200, 120); this.SetMaximumSize (200, 120); - TTQPushButton quit = new TTQPushButton ("Quit", this, "quit"); + TQPushButton quit = new TQPushButton ("Quit", this, "quit"); quit.SetGeometry (62, 40, 75, 30); - quit.SetFont (new TTQFont ("Times", 18, TTQFont.Weight.Bold) ); + quit.SetFont (new TQFont ("Times", 18, TQFont.Weight.Bold) ); Connect ( quit, TQT_SIGNAL ("clicked()"), qApp, TQT_SLOT ("Quit()") ); // In C++, qApp is a global variable. Here it's a property of the TQObject @@ -23,7 +23,7 @@ public class MyWidget : TTQWidget { // static method connect(). } - public MyWidget (TTQWidget parent) : this (parent, "") {} + public MyWidget (TQWidget parent) : this (parent, "") {} public MyWidget () : this (null, "") {} // Note that it was necessary to use an empty string ("") // in the above. Using null does not work at runtime. @@ -33,7 +33,7 @@ public class Example { public static int Main (String[] args) { - TTQApplication a = new TTQApplication (args); + TQApplication a = new TQApplication (args); MyWidget w = new MyWidget (); w.SetGeometry (100, 100, 200, 120); diff --git a/qtsharp/src/examples/tutorials/t5.cs b/qtsharp/src/examples/tutorials/t5.cs index 1430e6f3..0488969d 100644 --- a/qtsharp/src/examples/tutorials/t5.cs +++ b/qtsharp/src/examples/tutorials/t5.cs @@ -5,19 +5,19 @@ using System; using Qt; -public class MyWidget : TTQVBox { +public class MyWidget : TQVBox { - public MyWidget (TTQWidget parent, String name) : base (parent, name) + public MyWidget (TQWidget parent, String name) : base (parent, name) // In C++, parent and name have default values of 0 (null pointer) { - TTQPushButton quit = new TTQPushButton ("Quit", this, "quit"); - quit.SetFont ( new TTQFont ("Times", 18, TTQFont.Weight.Bold) ); + TQPushButton quit = new TQPushButton ("Quit", this, "quit"); + quit.SetFont ( new TQFont ("Times", 18, TQFont.Weight.Bold) ); - TTQObject.Connect ( quit, TQT_SIGNAL ("clicked()"), qApp, TQT_SLOT ("Quit()") ); + TQObject.Connect ( quit, TQT_SIGNAL ("clicked()"), qApp, TQT_SLOT ("Quit()") ); - TTQLCDNumber lcd = new TTQLCDNumber (2, this, "lcd" ); + TQLCDNumber lcd = new TQLCDNumber (2, this, "lcd" ); - TTQSlider slider = new TTQSlider (Orientation.Horizontal, this, "slider"); + TQSlider slider = new TQSlider (Orientation.Horizontal, this, "slider"); // Note that Orientation is defined in the Qt class slider.SetRange (0, 99); slider.SetValue (0); @@ -25,7 +25,7 @@ public class MyWidget : TTQVBox { Connect ( slider, TQT_SIGNAL ("valueChanged(int)"), lcd, TQT_SLOT ("Display(int)") ); } - public MyWidget (TTQWidget parent) : this (parent, "") {} + public MyWidget (TQWidget parent) : this (parent, "") {} public MyWidget () : this (null, "") {} // Note that it was necessary to use an empty string ("") // in the above. Using null does not work at runtime. @@ -35,7 +35,7 @@ public class Example { public static int Main (String[] args) { - TTQApplication a = new TTQApplication (args); + TQApplication a = new TQApplication (args); MyWidget w = new MyWidget (); a.SetMainWidget (w); diff --git a/qtsharp/src/examples/tutorials/t6.cs b/qtsharp/src/examples/tutorials/t6.cs index 9912650b..6fee48e1 100644 --- a/qtsharp/src/examples/tutorials/t6.cs +++ b/qtsharp/src/examples/tutorials/t6.cs @@ -5,42 +5,42 @@ using System; using Qt; -public class LCDRange : TTQVBox { +public class LCDRange : TQVBox { - public LCDRange (TTQWidget parent, String name) : base (parent, name) + public LCDRange (TQWidget parent, String name) : base (parent, name) // In C++, parent and name have default values of 0 (null pointer) { - TTQLCDNumber lcd = new TTQLCDNumber (2, this, "lcd" ); - TTQSlider slider = new TTQSlider (Orientation.Horizontal, this, "slider"); + TQLCDNumber lcd = new TQLCDNumber (2, this, "lcd" ); + TQSlider slider = new TQSlider (Orientation.Horizontal, this, "slider"); slider.SetRange (0, 99); slider.SetValue (0); Connect ( slider, TQT_SIGNAL ("valueChanged(int)"), lcd, TQT_SLOT ("Display(int)") ); } - public LCDRange (TTQWidget parent) : this (parent, "") {} + public LCDRange (TQWidget parent) : this (parent, "") {} public LCDRange () : this (null, "") {} // Note that it was necessary to use an empty string ("") // in the above. Using null does not work at runtime. } -public class MyWidget : TTQVBox { +public class MyWidget : TQVBox { - MyWidget (TTQWidget parent, String name) : base (parent, name) + MyWidget (TQWidget parent, String name) : base (parent, name) { - TTQPushButton quit = new TTQPushButton ("Quit", this, "quit"); - quit.SetFont ( new TTQFont ("Times", 18, TTQFont.Weight.Bold) ); + TQPushButton quit = new TQPushButton ("Quit", this, "quit"); + quit.SetFont ( new TQFont ("Times", 18, TQFont.Weight.Bold) ); Connect ( quit, TQT_SIGNAL ("clicked()"), qApp, TQT_SLOT ("Quit()") ); - TTQGrid grid = new TTQGrid (4, this); + TQGrid grid = new TQGrid (4, this); for ( int c =0; c < 4; c++ ) for ( int r = 0; r < 4; r++ ) new LCDRange (grid); } - public MyWidget (TTQWidget parent) : this (parent, "") {} + public MyWidget (TQWidget parent) : this (parent, "") {} public MyWidget () : this (null, "") {} } @@ -48,7 +48,7 @@ public class Example { public static int Main (String[] args) { - TTQApplication a = new TTQApplication (args); + TQApplication a = new TQApplication (args); MyWidget w = new MyWidget (); a.SetMainWidget (w); diff --git a/qtsharp/src/examples/tutorials/t7.cs b/qtsharp/src/examples/tutorials/t7.cs index ba9e758d..e1891d26 100644 --- a/qtsharp/src/examples/tutorials/t7.cs +++ b/qtsharp/src/examples/tutorials/t7.cs @@ -9,15 +9,15 @@ using System; using Qt; [DeclareQtSignal ("valueChanged(int)")] -public class LCDRange : TTQVBox { +public class LCDRange : TQVBox { - TTQSlider slider; + TQSlider slider; - public LCDRange (TTQWidget parent, String name) : base (parent, name) + public LCDRange (TQWidget parent, String name) : base (parent, name) // In C++, parent and name have default values of 0 (null pointer) { - TTQLCDNumber lcd = new TTQLCDNumber (2, this, "lcd" ); - slider = new TTQSlider (Orientation.Horizontal, this, "slider"); + TQLCDNumber lcd = new TQLCDNumber (2, this, "lcd" ); + slider = new TQSlider (Orientation.Horizontal, this, "slider"); slider.SetRange (0, 99); slider.SetValue (0); @@ -25,7 +25,7 @@ public class LCDRange : TTQVBox { Connect ( slider, TQT_SIGNAL ("valueChanged(int)"), TQT_SIGNAL ("valueChanged(int)")); } - public LCDRange (TTQWidget parent) : this (parent, "") {} + public LCDRange (TQWidget parent) : this (parent, "") {} public LCDRange () : this (null, "") {} // Note that it was necessary to use an empty string ("") // in the above. Using null does not work at runtime. @@ -36,16 +36,16 @@ public class LCDRange : TTQVBox { } } -public class MyWidget : TTQVBox { +public class MyWidget : TQVBox { - MyWidget (TTQWidget parent, String name) : base (parent, name) + MyWidget (TQWidget parent, String name) : base (parent, name) { - TTQPushButton quit = new TTQPushButton ("Quit", this, "quit"); - quit.SetFont ( new TTQFont ("Times", 18, TTQFont.Weight.Bold) ); + TQPushButton quit = new TQPushButton ("Quit", this, "quit"); + quit.SetFont ( new TQFont ("Times", 18, TQFont.Weight.Bold) ); Connect ( quit, TQT_SIGNAL ("clicked()"), qApp, TQT_SLOT ("Quit()") ); - TTQGrid grid = new TTQGrid (4, this); + TQGrid grid = new TQGrid (4, this); LCDRange previous = null; @@ -60,7 +60,7 @@ public class MyWidget : TTQVBox { } } - public MyWidget (TTQWidget parent) : this (parent, "") {} + public MyWidget (TQWidget parent) : this (parent, "") {} public MyWidget () : this (null, "") {} } @@ -68,7 +68,7 @@ public class Example { public static int Main (String[] args) { - TTQApplication a = new TTQApplication (args); + TQApplication a = new TQApplication (args); MyWidget w = new MyWidget (); a.SetMainWidget (w); |