summaryrefslogtreecommitdiffstats
path: root/qtsharp/src/examples
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 15:55:57 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 15:55:57 -0600
commit9ba04742771370f59740e32e11c5f3a1e6a1b70a (patch)
treec81c34dae2b3b1ea73801bf18a960265dc4207f7 /qtsharp/src/examples
parent1a96c45b22d01378202d9dc7ed9c47acd30f966e (diff)
downloadtdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.tar.gz
tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.zip
Initial TQt conversion
Diffstat (limited to 'qtsharp/src/examples')
-rw-r--r--qtsharp/src/examples/samples/display.cs26
-rw-r--r--qtsharp/src/examples/samples/emit.cs8
-rw-r--r--qtsharp/src/examples/samples/eventhandling.cs16
-rw-r--r--qtsharp/src/examples/samples/hello.cs10
-rw-r--r--qtsharp/src/examples/samples/mandelbrot.cs84
-rw-r--r--qtsharp/src/examples/samples/mandelbrot2.cs90
-rw-r--r--qtsharp/src/examples/samples/qstring-slot.cs22
-rw-r--r--qtsharp/src/examples/samples/quantumfractals.cs130
-rw-r--r--qtsharp/src/examples/samples/scribblewindow.cs112
-rw-r--r--qtsharp/src/examples/test-results.html4
-rw-r--r--qtsharp/src/examples/tutorials/t1.cs4
-rw-r--r--qtsharp/src/examples/tutorials/t2.cs10
-rw-r--r--qtsharp/src/examples/tutorials/t3.cs12
-rw-r--r--qtsharp/src/examples/tutorials/t4.cs14
-rw-r--r--qtsharp/src/examples/tutorials/t5.cs18
-rw-r--r--qtsharp/src/examples/tutorials/t6.cs24
-rw-r--r--qtsharp/src/examples/tutorials/t7.cs26
17 files changed, 305 insertions, 305 deletions
diff --git a/qtsharp/src/examples/samples/display.cs b/qtsharp/src/examples/samples/display.cs
index 9f2f4939..00703b4b 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 : TQMainWindow {
+ public class Display : TTQMainWindow {
private TextArea textarea;
- private TQScrollView scrollview;
- private TQMenuBar menubar;
- private TQPopupMenu filemenu, aboutmenu;
+ private TTQScrollView scrollview;
+ private TTQMenuBar menubar;
+ private TTQPopupMenu filemenu, aboutmenu;
- private class TextArea : TQTextEdit {
+ private class TextArea : TTQTextEdit {
- public TextArea (TQWidget parent) : base (parent)
+ public TextArea (TTQWidget parent) : base (parent)
{
- TQFile file = new TQFile ("display.cs");
+ TTQFile file = new TTQFile ("display.cs");
if ( file.Open(1) ) {
- TQTextStream ts = new TQTextStream (file);
+ TTQTextStream ts = new TTQTextStream (file);
this.SetText (ts.Read ());
this.SetTabStopWidth (30);
}
@@ -25,13 +25,13 @@ namespace QtSamples {
public Display ()
{
- filemenu = new TQPopupMenu (null, "filemenu");
+ filemenu = new TTQPopupMenu (null, "filemenu");
filemenu.InsertItem ("&Quit", qApp, TQT_SLOT ("quit()"));
- aboutmenu = new TQPopupMenu(null, "aboutmenu");
+ aboutmenu = new TTQPopupMenu(null, "aboutmenu");
aboutmenu.InsertItem("&About Qt-Sharp", this, TQT_SLOT("slotAbout()"));
- menubar = new TQMenuBar(this, "");
+ menubar = new TTQMenuBar(this, "");
menubar.InsertItem("&File", filemenu);
menubar.InsertItem("&About", aboutmenu);
@@ -42,7 +42,7 @@ namespace QtSamples {
public void slotAbout ()
{
- TQMessageBox.Information (
+ TTQMessageBox.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)
{
- TQApplication app = new TQApplication (args);
+ TTQApplication app = new TTQApplication (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 125166a2..a15868db 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: TQVBox {
+ public class EmitSample: TTQVBox {
public EmitSample (): this (null, "") {}
- public EmitSample (TQWidget parent, string name): base ()
+ public EmitSample (TTQWidget parent, string name): base ()
{
- TQPushButton pb = new TQPushButton ("Papa Smurf", this);
+ TTQPushButton pb = new TTQPushButton ("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)
{
- TQApplication app = new TQApplication (args);
+ TTQApplication app = new TTQApplication (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 2372d766..30928a63 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 : TQVBox {
+ public class EventHandling : TTQVBox {
public static void Main (String[] args)
{
- TQApplication app = new TQApplication (args);
+ TTQApplication app = new TTQApplication (args);
EventHandling evh = new EventHandling ();
app.SetMainWidget (evh);
evh.Show ();
@@ -24,26 +24,26 @@ namespace QtSamples {
public EventHandling () : base (null)
{
- // This is the global event handler for QMouseEvents
- mouseHandler += new QMouseHandler(mouseEvents);
+ // This is the global event handler for TQMouseEvents
+ mouseHandler += new TQMouseHandler(mouseEvents);
MyButton pb = new MyButton (this);
}
- public void mouseEvents (TQObject sender, QEventArgs e)
+ public void mouseEvents (TTQObject sender, TQEventArgs e)
{
Console.WriteLine ("Mouse event: " + e.Name);
}
- class MyButton : TQPushButton {
+ class MyButton : TTQPushButton {
- public MyButton (TQWidget parent) : base ("Hello Qt-Sharp-0.7!", parent)
+ public MyButton (TTQWidget parent) : base ("Hello Qt-Sharp-0.7!", parent)
{
// This is the local event handler for mousePressEvents
mousePressEvent += new MousePressEvent (pressEvent);
}
- public void pressEvent (TQMouseEvent e)
+ public void pressEvent (TTQMouseEvent e)
{
Console.WriteLine ("I've been clicked");
}
diff --git a/qtsharp/src/examples/samples/hello.cs b/qtsharp/src/examples/samples/hello.cs
index 1039aa34..81a5eb89 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 : TQVBox {
+ public class HelloWorld : TTQVBox {
public static void Main (String[] args)
{
- TQApplication app = new TQApplication (args);
+ TTQApplication app = new TTQApplication (args);
HelloWorld hello = new HelloWorld ();
app.SetMainWidget (hello);
hello.Show ();
@@ -24,13 +24,13 @@ namespace QtSamples {
public HelloWorld () : base (null)
{
- TQPushButton pb = new TQPushButton ("Hello Qt-Sharp-0.7!", this);
- TQObject.Connect (pb, TQT_SIGNAL ("clicked()"), this, TQT_SLOT("SlotClicked()"));
+ TTQPushButton pb = new TTQPushButton ("Hello Qt-Sharp-0.7!", this);
+ TTQObject.Connect (pb, TQT_SIGNAL ("clicked()"), this, TQT_SLOT("SlotClicked()"));
}
public void SlotClicked ()
{
- Console.WriteLine ("TQPushButton Clicked!");
+ Console.WriteLine ("TTQPushButton Clicked!");
}
}
}
diff --git a/qtsharp/src/examples/samples/mandelbrot.cs b/qtsharp/src/examples/samples/mandelbrot.cs
index 3850b781..cecd6286 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)
{
- TQApplication app = new TQApplication (args);
+ TTQApplication app = new TTQApplication (args);
ImageDialog dialog = new ImageDialog (null, "Mandelbrot", false, 0);
dialog.Show ();
@@ -117,109 +117,109 @@ public class Mandelbrot {
}
-public class ImageDialog : TQDialog {
+public class ImageDialog : TTQDialog {
const double DefaultPlotXMin = -2.0;
const double DefaultPlotXMax = 2.0;
const double DefaultPlotYMin = -1.5;
const double DefaultPlotYMax = 1.5;
- TQHBoxLayout dialogLayout;
- TQGridLayout gridLayout;
- TQVBoxLayout leftLayout;
- TQHBoxLayout buttonLayout;
- TQPushButton redrawButton;
- TQLabel pixmapLabel;
- TQSizePolicy fixedSizePolicy;
+ TTQHBoxLayout dialogLayout;
+ TTQGridLayout gridLayout;
+ TTQVBoxLayout leftLayout;
+ TTQHBoxLayout buttonLayout;
+ TTQPushButton redrawButton;
+ TTQLabel pixmapLabel;
+ TTQSizePolicy fixedSizePolicy;
- TQLabel XMinLabel, XMaxLabel, YMinLabel, YMaxLabel;
- TQLineEdit editXMin, editXMax, editYMin, editYMax;
+ TTQLabel XMinLabel, XMaxLabel, YMinLabel, YMaxLabel;
+ TTQLineEdit editXMin, editXMax, editYMin, editYMax;
- public ImageDialog (TQWidget parent, string name, bool modal, WidgetFlags fl):
+ public ImageDialog (TTQWidget parent, string name, bool modal, WidgetFlags fl):
base (parent, name, modal, fl)
{
if (name == string.Empty)
SetName ("imageDialog");
SetCaption ("Mandelbrot Image");
- dialogLayout = new TQHBoxLayout (this, 11, 6);
- gridLayout = new TQGridLayout (null, 1, 1, 0, 6, "gridLayout");
- leftLayout = new TQVBoxLayout (null, 0, 6, "leftLayout");
+ dialogLayout = new TTQHBoxLayout (this, 11, 6);
+ gridLayout = new TTQGridLayout (null, 1, 1, 0, 6, "gridLayout");
+ leftLayout = new TTQVBoxLayout (null, 0, 6, "leftLayout");
- fixedSizePolicy = new TQSizePolicy ();
- fixedSizePolicy.SetHorData (TQSizePolicy.SizeType.Fixed);
- fixedSizePolicy.SetVerData (TQSizePolicy.SizeType.Fixed);
+ fixedSizePolicy = new TTQSizePolicy ();
+ fixedSizePolicy.SetHorData (TTQSizePolicy.SizeType.Fixed);
+ fixedSizePolicy.SetVerData (TTQSizePolicy.SizeType.Fixed);
- XMinLabel = new TQLabel ("Xmin", this);
+ XMinLabel = new TTQLabel ("Xmin", this);
XMinLabel.SetSizePolicy (fixedSizePolicy);
gridLayout.AddWidget (XMinLabel, 0, 0);
- XMaxLabel = new TQLabel ("Xmax", this);
+ XMaxLabel = new TTQLabel ("Xmax", this);
XMaxLabel.SetSizePolicy(fixedSizePolicy);
gridLayout.AddWidget (XMaxLabel, 1, 0);
- YMinLabel = new TQLabel ("Ymin", this);
+ YMinLabel = new TTQLabel ("Ymin", this);
YMinLabel.SetSizePolicy (fixedSizePolicy);
gridLayout.AddWidget (YMinLabel, 2, 0);
- YMaxLabel = new TQLabel ("Ymax", this);
+ YMaxLabel = new TTQLabel ("Ymax", this);
YMaxLabel.SetSizePolicy (fixedSizePolicy);
gridLayout.AddWidget (YMaxLabel, 3, 0);
- TQDoubleValidator validator = new TQDoubleValidator (this);
+ TTQDoubleValidator validator = new TTQDoubleValidator (this);
- editXMin = new TQLineEdit (this, "editXMin");
+ editXMin = new TTQLineEdit (this, "editXMin");
editXMin.SetText (Convert.ToString (DefaultPlotXMin));
editXMin.SetValidator (validator);
gridLayout.AddWidget (editXMin, 0, 1);
- editXMax = new TQLineEdit (this, "editXMax");
+ editXMax = new TTQLineEdit (this, "editXMax");
editXMax.SetText (Convert.ToString(DefaultPlotXMax));
editXMax.SetValidator (validator);
gridLayout.AddWidget (editXMax, 1, 1);
- editYMin = new TQLineEdit (this, "editYMin");
+ editYMin = new TTQLineEdit (this, "editYMin");
editYMin.SetText (Convert.ToString(DefaultPlotYMin));
editYMin.SetValidator (validator);
gridLayout.AddWidget (editYMin, 2, 1);
- editYMax = new TQLineEdit (this, "editYMax");
+ editYMax = new TTQLineEdit (this, "editYMax");
editYMax.SetText (Convert.ToString(DefaultPlotYMax));
editYMax.SetValidator (validator);
gridLayout.AddWidget (editYMax, 3, 1);
leftLayout.AddLayout (gridLayout);
- TQSpacerItem spacer1 = new TQSpacerItem (0, 0, 0, 0);
+ TTQSpacerItem spacer1 = new TTQSpacerItem (0, 0, 0, 0);
leftLayout.AddItem (spacer1);
- buttonLayout = new TQHBoxLayout (null, 0, 6, "buttonLayout");
- TQSpacerItem spacer2 = new TQSpacerItem (0, 0, 0, 0);
+ buttonLayout = new TTQHBoxLayout (null, 0, 6, "buttonLayout");
+ TTQSpacerItem spacer2 = new TTQSpacerItem (0, 0, 0, 0);
buttonLayout.AddItem (spacer2);
- redrawButton = new TQPushButton ("Redraw", this);
+ redrawButton = new TTQPushButton ("Redraw", this);
redrawButton.SetDefault (true);
buttonLayout.AddWidget (redrawButton);
- TQSpacerItem spacer3 = new TQSpacerItem (0, 0, 0, 0);
+ TTQSpacerItem spacer3 = new TTQSpacerItem (0, 0, 0, 0);
buttonLayout.AddItem (spacer3);
leftLayout.AddLayout (buttonLayout);
dialogLayout.AddLayout (leftLayout);
- TQSpacerItem spacer4 = new TQSpacerItem (0, 0, 0, 0);
+ TTQSpacerItem spacer4 = new TTQSpacerItem (0, 0, 0, 0);
dialogLayout.AddItem (spacer4);
- pixmapLabel = new TQLabel (this, "pixmapLabel", 0);
+ pixmapLabel = new TTQLabel (this, "pixmapLabel", 0);
pixmapLabel.SetScaledContents (true);
dialogLayout.AddWidget (pixmapLabel);
- TQObject.Connect (redrawButton, TQT_SIGNAL ("clicked()"), this, TQT_SLOT ("Redraw()"));
+ TTQObject.Connect (redrawButton, TQT_SIGNAL ("clicked()"), this, TQT_SLOT ("Redraw()"));
Redraw ();
}
- TQImage MandelbrotImage ()
+ TTQImage MandelbrotImage ()
{
int depth;
double real, imag;
@@ -232,7 +232,7 @@ public class ImageDialog : TQDialog {
int ImageXMax = pixmapLabel.Width ();
int ImageYMax = pixmapLabel.Height ();
- TQImage image = new TQImage (ImageXMax, ImageYMax, 32, 0);
+ TTQImage image = new TTQImage (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 : TQDialog {
public void Redraw ()
{
- TQSize s = pixmapLabel.BaseSize ();
+ TTQSize s = pixmapLabel.BaseSize ();
pixmapLabel.Resize (400,300);
- TQApplication.SetOverrideCursor ( new TQCursor( (int) CursorShape.WaitCursor ));
- TQImage image = MandelbrotImage ();
- TQPixmap pixmap = new TQPixmap (image);
+ TTQApplication.SetOverrideCursor ( new TTQCursor( (int) CursorShape.WaitCursor ));
+ TTQImage image = MandelbrotImage ();
+ TTQPixmap pixmap = new TTQPixmap (image);
pixmapLabel.SetPixmap( pixmap);
image.Dispose ();
pixmap.Dispose ();
this.AdjustSize ();
- TQApplication.RestoreOverrideCursor ();
+ TTQApplication.RestoreOverrideCursor ();
}
}
diff --git a/qtsharp/src/examples/samples/mandelbrot2.cs b/qtsharp/src/examples/samples/mandelbrot2.cs
index 2b83579e..0e9436e2 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)
{
- TQApplication app = new TQApplication (args);
+ TTQApplication app = new TTQApplication (args);
dialog = new ImageDialog (null, "Mandelbrot", false, 0);
dialog.SetGeometry(0, 0, 550, 300 );
@@ -120,13 +120,13 @@ public class Mandelbrot
}
-public class PicLabel: QFrame
+public class PicLabel: TQFrame
{
- TQPixmap newPixmap;
+ TTQPixmap newPixmap;
int newWidth = 400;
int newHeight = 300;
- public PicLabel( TQWidget parent, string name, WidgetFlags flags ):
+ public PicLabel( TTQWidget parent, string name, WidgetFlags flags ):
base( parent, name, flags )
{
SetBackgroundMode (Qt.BackgroundMode.NoBackground);
@@ -135,7 +135,7 @@ public class PicLabel: QFrame
}
- protected void PerformResize (TQResizeEvent e)
+ protected void PerformResize (TTQResizeEvent e)
{
Console.WriteLine("Resizing to {0} by {1}",
e.Size().Width(), e.Size().Height() );
@@ -146,12 +146,12 @@ public class PicLabel: QFrame
}
- protected void PerformPaint(TQPaintEvent e )
+ protected void PerformPaint(TTQPaintEvent e )
{
Console.WriteLine("Making a new image {0} by {1}", newWidth, newHeight );
- TQImage image = Mandelbrot.dialog.MandelbrotImage( newWidth, newHeight );
- newPixmap = new TQPixmap( image );
+ TTQImage image = Mandelbrot.dialog.MandelbrotImage( newWidth, newHeight );
+ newPixmap = new TTQPixmap( image );
BitBlt(this, 0, 0, newPixmap,
0, 0, -1, -1, RasterOp.CopyROP, false);
@@ -161,123 +161,123 @@ public class PicLabel: QFrame
-public class ImageDialog : TQDialog {
+public class ImageDialog : TTQDialog {
const double DefaultPlotXMin = -2.0;
const double DefaultPlotXMax = 2.0;
const double DefaultPlotYMin = -1.5;
const double DefaultPlotYMax = 1.5;
- TQHBoxLayout dialogLayout;
- TQGridLayout gridLayout;
- TQVBoxLayout leftLayout;
- TQHBoxLayout buttonLayout;
- TQPushButton redrawButton;
+ TTQHBoxLayout dialogLayout;
+ TTQGridLayout gridLayout;
+ TTQVBoxLayout leftLayout;
+ TTQHBoxLayout buttonLayout;
+ TTQPushButton redrawButton;
public PicLabel pixmapLabel;
- TQSizePolicy fixedSizePolicy;
+ TTQSizePolicy fixedSizePolicy;
- TQLabel XMinLabel, XMaxLabel, YMinLabel, YMaxLabel;
- TQLineEdit editXMin, editXMax, editYMin, editYMax;
+ TTQLabel XMinLabel, XMaxLabel, YMinLabel, YMaxLabel;
+ TTQLineEdit editXMin, editXMax, editYMin, editYMax;
- public ImageDialog (TQWidget parent, string name, bool modal, WidgetFlags fl):
+ public ImageDialog (TTQWidget parent, string name, bool modal, WidgetFlags fl):
base (parent, name, modal, fl)
{
if (name == string.Empty)
SetName ("imageDialog");
SetCaption ("Mandelbrot Image");
- dialogLayout = new TQHBoxLayout (this, 11, 6);
- gridLayout = new TQGridLayout (null, 1, 1, 0, 6, "gridLayout");
- leftLayout = new TQVBoxLayout (null, 0, 6, "leftLayout");
+ dialogLayout = new TTQHBoxLayout (this, 11, 6);
+ gridLayout = new TTQGridLayout (null, 1, 1, 0, 6, "gridLayout");
+ leftLayout = new TTQVBoxLayout (null, 0, 6, "leftLayout");
- fixedSizePolicy = new TQSizePolicy ( TQSizePolicy.SizeType.Fixed,
- TQSizePolicy.SizeType.Fixed, false );
+ fixedSizePolicy = new TTQSizePolicy ( TTQSizePolicy.SizeType.Fixed,
+ TTQSizePolicy.SizeType.Fixed, false );
- XMinLabel = new TQLabel ("Xmin", this);
+ XMinLabel = new TTQLabel ("Xmin", this);
XMinLabel.SetSizePolicy (fixedSizePolicy);
gridLayout.AddWidget (XMinLabel, 0, 0);
- XMaxLabel = new TQLabel ("Xmax", this);
+ XMaxLabel = new TTQLabel ("Xmax", this);
XMaxLabel.SetSizePolicy(fixedSizePolicy);
gridLayout.AddWidget (XMaxLabel, 1, 0);
- YMinLabel = new TQLabel ("Ymin", this);
+ YMinLabel = new TTQLabel ("Ymin", this);
YMinLabel.SetSizePolicy (fixedSizePolicy);
gridLayout.AddWidget (YMinLabel, 2, 0);
- YMaxLabel = new TQLabel ("Ymax", this);
+ YMaxLabel = new TTQLabel ("Ymax", this);
YMaxLabel.SetSizePolicy (fixedSizePolicy);
gridLayout.AddWidget (YMaxLabel, 3, 0);
- TQDoubleValidator validator = new TQDoubleValidator (this);
+ TTQDoubleValidator validator = new TTQDoubleValidator (this);
- editXMin = new TQLineEdit (this, "editXMin");
+ editXMin = new TTQLineEdit (this, "editXMin");
editXMin.SetSizePolicy( fixedSizePolicy );
editXMin.SetText (Convert.ToString (DefaultPlotXMin));
editXMin.SetValidator (validator);
gridLayout.AddWidget (editXMin, 0, 1);
- editXMax = new TQLineEdit (this, "editXMax");
+ editXMax = new TTQLineEdit (this, "editXMax");
editXMax.SetSizePolicy( fixedSizePolicy );
editXMax.SetText (Convert.ToString(DefaultPlotXMax));
editXMax.SetValidator (validator);
gridLayout.AddWidget (editXMax, 1, 1);
- editYMin = new TQLineEdit (this, "editYMin");
+ editYMin = new TTQLineEdit (this, "editYMin");
editYMin.SetSizePolicy( fixedSizePolicy );
editYMin.SetText (Convert.ToString(DefaultPlotYMin));
editYMin.SetValidator (validator);
gridLayout.AddWidget (editYMin, 2, 1);
- editYMax = new TQLineEdit (this, "editYMax");
+ editYMax = new TTQLineEdit (this, "editYMax");
editYMax.SetSizePolicy( fixedSizePolicy );
editYMax.SetText (Convert.ToString(DefaultPlotYMax));
editYMax.SetValidator (validator);
gridLayout.AddWidget (editYMax, 3, 1);
leftLayout.AddLayout (gridLayout);
- TQSpacerItem spacer1 = new TQSpacerItem (0, 0, 0, 0);
+ TTQSpacerItem spacer1 = new TTQSpacerItem (0, 0, 0, 0);
leftLayout.AddItem (spacer1);
- buttonLayout = new TQHBoxLayout (null, 0, 6, "buttonLayout");
- TQSpacerItem spacer2 = new TQSpacerItem (0, 0, 0, 0);
+ buttonLayout = new TTQHBoxLayout (null, 0, 6, "buttonLayout");
+ TTQSpacerItem spacer2 = new TTQSpacerItem (0, 0, 0, 0);
buttonLayout.AddItem (spacer2);
- redrawButton = new TQPushButton ("Redraw", this);
+ redrawButton = new TTQPushButton ("Redraw", this);
redrawButton.SetSizePolicy ( fixedSizePolicy );
redrawButton.SetDefault (true);
buttonLayout.AddWidget (redrawButton);
- TQSpacerItem spacer3 = new TQSpacerItem (0, 0, 0, 0);
+ TTQSpacerItem spacer3 = new TTQSpacerItem (0, 0, 0, 0);
buttonLayout.AddItem (spacer3);
leftLayout.AddLayout (buttonLayout);
dialogLayout.AddLayout (leftLayout);
- TQSpacerItem spacer4 = new TQSpacerItem (0, 0, 0, 0);
+ TTQSpacerItem spacer4 = new TTQSpacerItem (0, 0, 0, 0);
dialogLayout.AddItem (spacer4);
pixmapLabel = new PicLabel (this, "pixmapLabel", 0);
//pixmapLabel.SetScaledContents (true);
- pixmapLabel.SetSizePolicy( TQSizePolicy.SizeType.Minimum,
- TQSizePolicy.SizeType.Minimum, false );
+ pixmapLabel.SetSizePolicy( TTQSizePolicy.SizeType.Minimum,
+ TTQSizePolicy.SizeType.Minimum, false );
pixmapLabel.SetGeometry( 0, 0, 400, 300 );
pixmapLabel.Show();
pixmapLabel.Resize(400,300);
dialogLayout.AddWidget (pixmapLabel);
- //TQImage image = MandelbrotImage( 400, 300 );
- //pixmapLabel.SetPixmap( new TQPixmap( image ) );
+ //TTQImage image = MandelbrotImage( 400, 300 );
+ //pixmapLabel.SetPixmap( new TTQPixmap( image ) );
- TQObject.Connect (redrawButton, TQT_SIGNAL ("clicked()"), pixmapLabel, TQT_SLOT ("Repaint()"));
+ TTQObject.Connect (redrawButton, TQT_SIGNAL ("clicked()"), pixmapLabel, TQT_SLOT ("Repaint()"));
//Redraw ();
}
- public TQImage MandelbrotImage ( int width, int height)
+ public TTQImage MandelbrotImage ( int width, int height)
{
int depth;
double real, imag;
@@ -290,7 +290,7 @@ public class ImageDialog : TQDialog {
int ImageXMax = width;
int ImageYMax = height;
- TQImage image = new TQImage (ImageXMax, ImageYMax, 32, 0);
+ TTQImage image = new TTQImage (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 e33fa1b3..af2db0a2 100644
--- a/qtsharp/src/examples/samples/qstring-slot.cs
+++ b/qtsharp/src/examples/samples/qstring-slot.cs
@@ -1,26 +1,26 @@
-// Demo of a TQString slot
+// Demo of a TTQString slot
// Implemented by Marcus Urban
using System;
using Qt;
-public class MyWidget : QVBox
+public class MyWidget : TQVBox
{
- TQLineEdit lineEdit;
- TQLabel label;
+ TTQLineEdit lineEdit;
+ TTQLabel label;
- public MyWidget (TQWidget parent, String name) : base (parent, name)
+ public MyWidget (TTQWidget parent, String name) : base (parent, name)
{
- lineEdit = new TQLineEdit( this, "lineEdit" );
- label = new TQLabel( this, "label" );
+ lineEdit = new TTQLineEdit( this, "lineEdit" );
+ label = new TTQLabel( this, "label" );
label.SetText("Default");
- TQObject.Connect( lineEdit, TQT_SIGNAL("textChanged(TQString)"),
- label, "SetText(TQString)" );
+ TTQObject.Connect( lineEdit, TQT_SIGNAL("textChanged(TTQString)"),
+ label, "SetText(TTQString)" );
}
- public MyWidget (TQWidget parent) : this (parent, "") {}
+ public MyWidget (TTQWidget parent) : this (parent, "") {}
public MyWidget () : this (null, "") {}
}
@@ -28,7 +28,7 @@ public class Example {
public static int Main (String[] args)
{
- TQApplication a = new TQApplication (args);
+ TTQApplication a = new TTQApplication (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 fe6c914e..484b5640 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 : TQMainWindow {
+ public class FractalViewer : TTQMainWindow {
//Menuing
- private TQMenuBar menubar;
- private TQPopupMenu filemenu;
- private TQPopupMenu shapemenu;
- private TQPopupMenu settingsmenu;
+ private TTQMenuBar menubar;
+ private TTQPopupMenu filemenu;
+ private TTQPopupMenu shapemenu;
+ private TTQPopupMenu settingsmenu;
public static int Main (string[] args)
{
//Initialize and start the main event loop
- TQApplication app = new TQApplication (args);
+ TTQApplication app = new TTQApplication (args);
FractalViewer view = new FractalViewer ();
app.SetMainWidget (view);
view.Show ();
@@ -36,13 +36,13 @@ namespace Qf {
SetCentralWidget (display);
//Setup the filemenu
- filemenu = new TQPopupMenu (null, "filemenu");
+ filemenu = new TTQPopupMenu (null, "filemenu");
filemenu.InsertItem ("&Screenshot", display, TQT_SLOT ("SlotScreenshot()"));
filemenu.InsertSeparator ();
filemenu.InsertItem ("&Quit", qApp, TQT_SLOT ("quit()"));
//Setup the shapemenu
- shapemenu = new TQPopupMenu (null, "typemenu");
+ shapemenu = new TTQPopupMenu (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
- TQObject.Connect (shapemenu, TQT_SIGNAL ("activated(int)"),
+ TTQObject.Connect (shapemenu, TQT_SIGNAL ("activated(int)"),
display, TQT_SLOT("SlotShapeMenu(int)"));
//Setup the settingsmenu
- settingsmenu = new TQPopupMenu (null, "settingsmenu");
+ settingsmenu = new TTQPopupMenu (null, "settingsmenu");
settingsmenu.InsertItem ("&Alpha", display, TQT_SLOT ("SlotSetAlpha()"));
//Setup the menubar
- menubar = new TQMenuBar (this, "");
+ menubar = new TTQMenuBar (this, "");
menubar.InsertItem ("&File", filemenu);
menubar.InsertItem ("&Shape", shapemenu);
menubar.InsertItem ("&Settings", settingsmenu);
}
}
- public class Display: TQWidget, IQuantumFractal {
+ public class Display: TTQWidget, IQuantumFractal {
//Labels
- TQLabel count;
- TQLabel shape;
- TQLabel alpha;
+ TTQLabel count;
+ TTQLabel shape;
+ TTQLabel alpha;
//Buttons
- TQPushButton start;
- TQPushButton stop;
- TQPushButton reset;
- TQPushButton gray;
- TQPushButton intense;
+ TTQPushButton start;
+ TTQPushButton stop;
+ TTQPushButton reset;
+ TTQPushButton gray;
+ TTQPushButton intense;
//Drawable region
- QPaintBuffer buffer;
+ TQPaintBuffer buffer;
//Layouts
- TQVBoxLayout layout;
- TQHBoxLayout buttons;
- TQVBoxLayout labels;
+ TTQVBoxLayout layout;
+ TTQHBoxLayout buttons;
+ TTQVBoxLayout labels;
//Engine controller variables
int[] topDensity = new int[0];
@@ -106,35 +106,35 @@ namespace Qf {
QuantumFractals qf;
Thread engine;
- public Display (TQWidget parent): base (parent)
+ public Display (TTQWidget parent): base (parent)
{
//Setup the sizes
- TQSize size = new TQSize (resolution, resolution);
+ TTQSize size = new TTQSize (resolution, resolution);
parent.SetBaseSize (size);
//Some nice colors
- SetPaletteBackgroundColor (new TQColor ("Black"));
- SetPaletteForegroundColor (new TQColor ("LightBlue"));
+ SetPaletteBackgroundColor (new TTQColor ("Black"));
+ SetPaletteForegroundColor (new TTQColor ("LightBlue"));
//Setup the buttons
- 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);
+ 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);
//Setup the labels
- count = new TQLabel (this);
- alpha = new TQLabel (this);
- shape = new TQLabel (this);
+ count = new TTQLabel (this);
+ alpha = new TTQLabel (this);
+ shape = new TTQLabel (this);
//Setup the drawable
- buffer = new QPaintBuffer (this);
+ buffer = new TQPaintBuffer (this);
buffer.SetMinimumSize (size);
//Create the layouts
- layout = new TQVBoxLayout (this);
- buttons = new TQHBoxLayout (layout);
+ layout = new TTQVBoxLayout (this);
+ buttons = new TTQHBoxLayout (layout);
//Add some buttons
buttons.AddWidget (start);
@@ -144,23 +144,23 @@ namespace Qf {
buttons.AddWidget (intense);
//Connect the buttons and SlotQuit
- TQObject.Connect (start, TQT_SIGNAL ("clicked()"),
+ TTQObject.Connect (start, TQT_SIGNAL ("clicked()"),
this, TQT_SLOT ("SlotStart()"));
- TQObject.Connect (stop, TQT_SIGNAL ("clicked()"),
+ TTQObject.Connect (stop, TQT_SIGNAL ("clicked()"),
this, TQT_SLOT ("SlotStop()"));
- TQObject.Connect (reset, TQT_SIGNAL ("clicked()"),
+ TTQObject.Connect (reset, TQT_SIGNAL ("clicked()"),
this, TQT_SLOT ("SlotReset()"));
- TQObject.Connect (gray, TQT_SIGNAL ("clicked()"),
+ TTQObject.Connect (gray, TQT_SIGNAL ("clicked()"),
this, TQT_SLOT ("SlotGray()"));
- TQObject.Connect (intense, TQT_SIGNAL ("clicked()"),
+ TTQObject.Connect (intense, TQT_SIGNAL ("clicked()"),
this, TQT_SLOT ("SlotIntense()"));
- TQObject.Connect (buffer, TQT_SIGNAL ("Painted()"),
+ TTQObject.Connect (buffer, TQT_SIGNAL ("Painted()"),
this, TQT_SLOT ("SlotSetLabels()"));
- TQObject.Connect (qApp, TQT_SIGNAL ("lastWindowClosed ()"),
+ TTQObject.Connect (qApp, TQT_SIGNAL ("lastWindowClosed ()"),
this, TQT_SLOT ("SlotQuit ()"));
//Layout labels
- labels = new TQVBoxLayout (layout);
+ labels = new TTQVBoxLayout (layout);
labels.AddWidget (count);
labels.AddWidget (shape);
labels.AddWidget (alpha);
@@ -367,9 +367,9 @@ namespace Qf {
WasRunning = Running ? true : false;
SlotStop ();
- string filename = TQFileDialog.GetSaveFileName (
+ string filename = TTQFileDialog.GetSaveFileName (
- TQDir.HomeDirPath (), "*", this, "save",
+ TTQDir.HomeDirPath (), "*", this, "save",
"Save Screenshot", "*.png", true
);
@@ -386,7 +386,7 @@ namespace Qf {
WasRunning = Running ? true : false;
SlotStop ();
- qf.Alpha = QInputDialog.GetDouble (
+ qf.Alpha = TQInputDialog.GetDouble (
"Set Alpha", "Alpha: ", qf.Alpha, 0, 2, 32
);
@@ -405,7 +405,7 @@ namespace Qf {
}
//Need to reset the resolution upon resize
- private void TouchResize (TQResizeEvent e)
+ private void TouchResize (TTQResizeEvent e)
{
int height = buffer.Size ().Height ();
int width = buffer.Size ().Width ();
@@ -415,23 +415,23 @@ namespace Qf {
}
[DeclareQtSignal ("Painted()")]
- public class QPaintBuffer : TQFrame {
+ public class TQPaintBuffer : TTQFrame {
//Drawables
- private TQPixmap buffer;
- private TQImage image;
+ private TTQPixmap buffer;
+ private TTQImage image;
//Timer
private TimerCallback call;
private Timer timer;
- public QPaintBuffer (TQWidget parent) : base (parent)
+ public TQPaintBuffer (TTQWidget parent) : base (parent)
{
SetBackgroundMode (Qt.BackgroundMode.NoBackground);
//Create drawables
- buffer = new TQPixmap ();
- image = new TQImage (Size (), 32);
+ buffer = new TTQPixmap ();
+ image = new TTQImage (Size (), 32);
//Setup the event handlers
paintEvent += new PaintEvent (TouchPaint);
@@ -448,8 +448,8 @@ namespace Qf {
//Resets the drawables
public void Reset ()
{
- buffer = new TQPixmap ();
- image = new TQImage (Size (), 32);
+ buffer = new TTQPixmap ();
+ image = new TTQImage (Size (), 32);
PaintImage (null);
}
@@ -484,24 +484,24 @@ namespace Qf {
}
//Receive focus events
- private void TouchFocus (TQFocusEvent e)
+ private void TouchFocus (TTQFocusEvent e)
{
PerformPaint ();
}
//Receive paint events
- private void TouchPaint (TQPaintEvent e)
+ private void TouchPaint (TTQPaintEvent e)
{
PerformPaint ();
}
//Receive resize events
- private void TouchResize (TQResizeEvent e)
+ private void TouchResize (TTQResizeEvent e)
{
- image = new TQImage (e.Size (), 32);
+ image = new TTQImage (e.Size (), 32);
buffer.Resize (e.Size());
- buffer.Fill (new TQColor("black"));
- BitBlt (buffer, 0, 0, new TQPixmap (buffer),
+ buffer.Fill (new TTQColor("black"));
+ BitBlt (buffer, 0, 0, new TTQPixmap (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 fdd9fe46..70ed3c0f 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(TQColor)")]
- [DeclareQtSignal ("load(TQString)")]
- [DeclareQtSignal ("save(TQString)")]
- public class ScribbleWindow : TQMainWindow {
-
- private TQMenuBar menubar;
- private TQPopupMenu filemenu;
- private TQPopupMenu aboutmenu;
- private TQScrollView scrollview;
+ [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;
public ScribbleArea scribblearea;
enum Color {Black, Red, Blue, Green, Yellow};
public static int Main (String[] args)
{
- TQApplication app = new TQApplication (args);
+ TTQApplication app = new TTQApplication (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 TQPopupMenu (null, "filemenu");
+ filemenu = new TTQPopupMenu (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 TQPopupMenu (null, "helpmenu");
+ aboutmenu = new TTQPopupMenu (null, "helpmenu");
aboutmenu.InsertItem ("&About Qt-Sharp", this, TQT_SLOT ("SlotAboutQtSharp()"));
aboutmenu.InsertItem ("&About Qt", this, TQT_SLOT ("SlotAboutQt()"));
- menubar = new TQMenuBar (this, "");
+ menubar = new TTQMenuBar (this, "");
menubar.InsertItem ("&File", filemenu);
menubar.InsertItem ("&Color", this, TQT_SLOT("SlotColorChooser()"));
menubar.InsertItem ("&About", aboutmenu);
- scrollview = new TQScrollView (this);
+ scrollview = new TTQScrollView (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 ());
- 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)") );
+ 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)") );
}
public void SlotLoad ()
{
- string filename = TQFileDialog.GetOpenFileName (".", "*.bmp", this,
- null, "Load File", TQString.Null, true);
+ string filename = TTQFileDialog.GetOpenFileName (".", "*.bmp", this,
+ null, "Load File", TTQString.Null, true);
if ( filename != null )
- Emit ("load(TQString)", (TQString) filename);
+ Emit ("load(TTQString)", (TTQString) filename);
}
public void SlotSave ()
{
- string filename = TQFileDialog.GetSaveFileName (".", "*.bmp", this,
- null, "Save File", TQString.Null, true);
+ string filename = TTQFileDialog.GetSaveFileName (".", "*.bmp", this,
+ null, "Save File", TTQString.Null, true);
if ( filename != null )
{
if ( ! filename.ToLower().EndsWith(".bmp") )
filename += ".bmp";
- Emit ("save(TQString)", (TQString) filename);
+ Emit ("save(TTQString)", (TTQString) filename);
}
}
public void SlotAboutQtSharp ()
{
- TQMessageBox.Information (this, "About Qt# 0.7",
+ TTQMessageBox.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 ()
{
- TQMessageBox.AboutQt (this, "About Qt");
+ TTQMessageBox.AboutQt (this, "About Qt");
}
public void SlotColorChooser ()
{
- TQColor chosenColor = QColorDialog.GetColor();
+ TTQColor chosenColor = TQColorDialog.GetColor();
if (chosenColor.IsValid())
- Emit ("colorChanged(TQColor)", chosenColor);
+ Emit ("colorChanged(TTQColor)", chosenColor);
}
- public class ScribbleArea : TQFrame {
- private TQPoint last;
- private TQPixmap buffer;
- private TQColor currentcolor = new TQColor("Black");
- private TQPopupMenu popupmenu;
+ public class ScribbleArea : TTQFrame {
+ private TTQPoint last;
+ private TTQPixmap buffer;
+ private TTQColor currentcolor = new TTQColor("Black");
+ private TTQPopupMenu popupmenu;
- public ScribbleArea (TQWidget parent) : base (parent)
+ public ScribbleArea (TTQWidget parent) : base (parent)
{
- buffer = new TQPixmap ();
- last = new TQPoint ();
+ buffer = new TTQPixmap ();
+ last = new TTQPoint ();
SetBackgroundMode (Qt.BackgroundMode.NoBackground);
- popupmenu = new TQPopupMenu();
+ popupmenu = new TTQPopupMenu();
popupmenu.InsertItem ("&Clear", this, TQT_SLOT ("SlotClearArea()") );
mouseMoveEvent += new MouseMoveEvent (MouseMoved);
@@ -131,51 +131,51 @@ namespace QtSamples {
resizeEvent += new ResizeEvent (PerformResize);
}
- public void PerformLoad (TQString filename)
+ public void PerformLoad (TTQString filename)
{
if ( ! buffer.Load(filename) )
- TQMessageBox.Warning (null, "Load error", "Could not load file");
+ TTQMessageBox.Warning (null, "Load error", "Could not load file");
Repaint();
}
- public void PerformSave (TQString filename)
+ public void PerformSave (TTQString filename)
{
if ( ! buffer.Save (filename, "BMP") )
- TQMessageBox.Warning( null, "Save error", "Could not save file");
+ TTQMessageBox.Warning( null, "Save error", "Could not save file");
}
public void SlotClearArea ()
{
- buffer.Fill( new TQColor ("white") );
+ buffer.Fill( new TTQColor ("white") );
BitBlt (this, 0, 0, buffer, 0, 0, -1, -1, Qt.RasterOp.CopyROP, false);
}
- public void SlotSetColor (TQColor color)
+ public void SlotSetColor (TTQColor color)
{
currentcolor = color;
}
- // Note, Dispose() is called on QPoints here to increase performance
- // of the UI. Otherwise, the GC would let dead TQPoint instances pile
+ // Note, Dispose() is called on TQPoints here to increase performance
+ // of the UI. Otherwise, the GC would let dead TTQPoint 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 (TQMouseEvent e)
+ protected void MousePressed (TTQMouseEvent e)
{
if (e.Button() == ButtonState.RightButton )
- popupmenu.Exec (TQCursor.Pos ());
+ popupmenu.Exec (TTQCursor.Pos ());
else {
last.Dispose ();
last = e.Pos();
}
}
- protected void MouseMoved (TQMouseEvent e)
+ protected void MouseMoved (TTQMouseEvent e)
{
- TQPainter windowPainter = new TQPainter ();
- TQPainter bufferPainter = new TQPainter ();
+ TTQPainter windowPainter = new TTQPainter ();
+ TTQPainter bufferPainter = new TTQPainter ();
windowPainter.Begin (this);
bufferPainter.Begin (buffer);
@@ -193,17 +193,17 @@ namespace QtSamples {
last = e.Pos ();
}
- protected void PerformPaint (TQPaintEvent e)
+ protected void PerformPaint (TTQPaintEvent e)
{
BitBlt(this, 0, 0, buffer,
0, 0, -1, -1, RasterOp.CopyROP, false);
}
- protected void PerformResize (TQResizeEvent e)
+ protected void PerformResize (TTQResizeEvent e)
{
- TQPixmap save = new TQPixmap (buffer);
+ TTQPixmap save = new TTQPixmap (buffer);
buffer.Resize (e.Size());
- buffer.Fill (new TQColor("white"));
+ buffer.Fill (new TTQColor("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 631ee200..08238042 100644
--- a/qtsharp/src/examples/test-results.html
+++ b/qtsharp/src/examples/test-results.html
@@ -3,7 +3,7 @@
<HTML>
<HEAD>
- <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
+ <META HTTP-ETQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.0.2 (Linux)">
<META NAME="CREATED" CONTENT="20021229;19061900">
@@ -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 TQObject 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 TTQObject 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 84c79d38..b5498d7a 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)
{
- TQApplication a = new TQApplication (args);
+ TTQApplication a = new TTQApplication (args);
- TQPushButton hello = new TQPushButton ("Hello world!", null);
+ TTQPushButton hello = new TTQPushButton ("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 5dbe07d1..84af5a37 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)
{
- TQApplication a = new TQApplication (args);
+ TTQApplication a = new TTQApplication (args);
- TQPushButton quit = new TQPushButton ("Quit", null);
+ TTQPushButton quit = new TTQPushButton ("Quit", null);
// In C++, the second parameter is 0 (null pointer)
quit.Resize (75, 30);
- quit.SetFont (new TQFont ("Times", 18, TQFont.Weight.Bold));
- // In C++, TQFont::Bold is sufficient
+ quit.SetFont (new TTQFont ("Times", 18, TTQFont.Weight.Bold));
+ // In C++, TTQFont::Bold is sufficient
- TQObject.Connect ( quit, QtSupport.TQT_SIGNAL ("clicked()"), a, QtSupport.TQT_SLOT ("Quit()") );
+ TTQObject.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 26fece72..806c5184 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)
{
- TQApplication a = new TQApplication (args);
+ TTQApplication a = new TTQApplication (args);
- TQVBox box = new TQVBox ();
+ TTQVBox box = new TTQVBox ();
box.Resize (200, 120);
- TQPushButton quit = new TQPushButton ("Quit", box);
- quit.SetFont (new TQFont ("Times", 18, TQFont.Weight.Bold));
- // In C++, TQFont::Bold is sufficient
+ TTQPushButton quit = new TTQPushButton ("Quit", box);
+ quit.SetFont (new TTQFont ("Times", 18, TTQFont.Weight.Bold));
+ // In C++, TTQFont::Bold is sufficient
- TQObject.Connect ( quit, QtSupport.TQT_SIGNAL ("clicked()"), a, QtSupport.TQT_SLOT ("Quit()") );
+ TTQObject.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 a8884b92..68b3c26a 100644
--- a/qtsharp/src/examples/tutorials/t4.cs
+++ b/qtsharp/src/examples/tutorials/t4.cs
@@ -5,25 +5,25 @@
using System;
using Qt;
-public class MyWidget : TQWidget {
+public class MyWidget : TTQWidget {
- public MyWidget (TQWidget parent, String name) : base (parent, name)
+ public MyWidget (TTQWidget 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);
- TQPushButton quit = new TQPushButton ("Quit", this, "quit");
+ TTQPushButton quit = new TTQPushButton ("Quit", this, "quit");
quit.SetGeometry (62, 40, 75, 30);
- quit.SetFont (new TQFont ("Times", 18, TQFont.Weight.Bold) );
+ quit.SetFont (new TTQFont ("Times", 18, TTQFont.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 QObject
+ // In C++, qApp is a global variable. Here it's a property of the TQObject
// class, which we inherit, giving the same effect. We also inherit the
// static method connect().
}
- public MyWidget (TQWidget parent) : this (parent, "") {}
+ public MyWidget (TTQWidget 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)
{
- TQApplication a = new TQApplication (args);
+ TTQApplication a = new TTQApplication (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 0488969d..1430e6f3 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 : TQVBox {
+public class MyWidget : TTQVBox {
- public MyWidget (TQWidget parent, String name) : base (parent, name)
+ public MyWidget (TTQWidget parent, String name) : base (parent, name)
// In C++, parent and name have default values of 0 (null pointer)
{
- TQPushButton quit = new TQPushButton ("Quit", this, "quit");
- quit.SetFont ( new TQFont ("Times", 18, TQFont.Weight.Bold) );
+ TTQPushButton quit = new TTQPushButton ("Quit", this, "quit");
+ quit.SetFont ( new TTQFont ("Times", 18, TTQFont.Weight.Bold) );
- TQObject.Connect ( quit, TQT_SIGNAL ("clicked()"), qApp, TQT_SLOT ("Quit()") );
+ TTQObject.Connect ( quit, TQT_SIGNAL ("clicked()"), qApp, TQT_SLOT ("Quit()") );
- TQLCDNumber lcd = new TQLCDNumber (2, this, "lcd" );
+ TTQLCDNumber lcd = new TTQLCDNumber (2, this, "lcd" );
- TQSlider slider = new TQSlider (Orientation.Horizontal, this, "slider");
+ TTQSlider slider = new TTQSlider (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 : TQVBox {
Connect ( slider, TQT_SIGNAL ("valueChanged(int)"), lcd, TQT_SLOT ("Display(int)") );
}
- public MyWidget (TQWidget parent) : this (parent, "") {}
+ public MyWidget (TTQWidget 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)
{
- TQApplication a = new TQApplication (args);
+ TTQApplication a = new TTQApplication (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 6fee48e1..9912650b 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 : TQVBox {
+public class LCDRange : TTQVBox {
- public LCDRange (TQWidget parent, String name) : base (parent, name)
+ public LCDRange (TTQWidget parent, String name) : base (parent, name)
// In C++, parent and name have default values of 0 (null pointer)
{
- TQLCDNumber lcd = new TQLCDNumber (2, this, "lcd" );
- TQSlider slider = new TQSlider (Orientation.Horizontal, this, "slider");
+ TTQLCDNumber lcd = new TTQLCDNumber (2, this, "lcd" );
+ TTQSlider slider = new TTQSlider (Orientation.Horizontal, this, "slider");
slider.SetRange (0, 99);
slider.SetValue (0);
Connect ( slider, TQT_SIGNAL ("valueChanged(int)"), lcd, TQT_SLOT ("Display(int)") );
}
- public LCDRange (TQWidget parent) : this (parent, "") {}
+ public LCDRange (TTQWidget 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 : TQVBox {
+public class MyWidget : TTQVBox {
- MyWidget (TQWidget parent, String name) : base (parent, name)
+ MyWidget (TTQWidget parent, String name) : base (parent, name)
{
- TQPushButton quit = new TQPushButton ("Quit", this, "quit");
- quit.SetFont ( new TQFont ("Times", 18, TQFont.Weight.Bold) );
+ TTQPushButton quit = new TTQPushButton ("Quit", this, "quit");
+ quit.SetFont ( new TTQFont ("Times", 18, TTQFont.Weight.Bold) );
Connect ( quit, TQT_SIGNAL ("clicked()"), qApp, TQT_SLOT ("Quit()") );
- TQGrid grid = new TQGrid (4, this);
+ TTQGrid grid = new TTQGrid (4, this);
for ( int c =0; c < 4; c++ )
for ( int r = 0; r < 4; r++ )
new LCDRange (grid);
}
- public MyWidget (TQWidget parent) : this (parent, "") {}
+ public MyWidget (TTQWidget parent) : this (parent, "") {}
public MyWidget () : this (null, "") {}
}
@@ -48,7 +48,7 @@ public class Example {
public static int Main (String[] args)
{
- TQApplication a = new TQApplication (args);
+ TTQApplication a = new TTQApplication (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 e1891d26..ba9e758d 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 : TQVBox {
+public class LCDRange : TTQVBox {
- TQSlider slider;
+ TTQSlider slider;
- public LCDRange (TQWidget parent, String name) : base (parent, name)
+ public LCDRange (TTQWidget parent, String name) : base (parent, name)
// In C++, parent and name have default values of 0 (null pointer)
{
- TQLCDNumber lcd = new TQLCDNumber (2, this, "lcd" );
- slider = new TQSlider (Orientation.Horizontal, this, "slider");
+ TTQLCDNumber lcd = new TTQLCDNumber (2, this, "lcd" );
+ slider = new TTQSlider (Orientation.Horizontal, this, "slider");
slider.SetRange (0, 99);
slider.SetValue (0);
@@ -25,7 +25,7 @@ public class LCDRange : TQVBox {
Connect ( slider, TQT_SIGNAL ("valueChanged(int)"), TQT_SIGNAL ("valueChanged(int)"));
}
- public LCDRange (TQWidget parent) : this (parent, "") {}
+ public LCDRange (TTQWidget 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 : TQVBox {
}
}
-public class MyWidget : TQVBox {
+public class MyWidget : TTQVBox {
- MyWidget (TQWidget parent, String name) : base (parent, name)
+ MyWidget (TTQWidget parent, String name) : base (parent, name)
{
- TQPushButton quit = new TQPushButton ("Quit", this, "quit");
- quit.SetFont ( new TQFont ("Times", 18, TQFont.Weight.Bold) );
+ TTQPushButton quit = new TTQPushButton ("Quit", this, "quit");
+ quit.SetFont ( new TTQFont ("Times", 18, TTQFont.Weight.Bold) );
Connect ( quit, TQT_SIGNAL ("clicked()"), qApp, TQT_SLOT ("Quit()") );
- TQGrid grid = new TQGrid (4, this);
+ TTQGrid grid = new TTQGrid (4, this);
LCDRange previous = null;
@@ -60,7 +60,7 @@ public class MyWidget : TQVBox {
}
}
- public MyWidget (TQWidget parent) : this (parent, "") {}
+ public MyWidget (TTQWidget parent) : this (parent, "") {}
public MyWidget () : this (null, "") {}
}
@@ -68,7 +68,7 @@ public class Example {
public static int Main (String[] args)
{
- TQApplication a = new TQApplication (args);
+ TTQApplication a = new TTQApplication (args);
MyWidget w = new MyWidget ();
a.SetMainWidget (w);