summaryrefslogtreecommitdiffstats
path: root/qtsharp/src/examples/samples
diff options
context:
space:
mode:
Diffstat (limited to 'qtsharp/src/examples/samples')
-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.cs12
-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.cs88
-rw-r--r--qtsharp/src/examples/samples/qstring-slot.cs20
-rw-r--r--qtsharp/src/examples/samples/quantumfractals.cs124
-rw-r--r--qtsharp/src/examples/samples/scribblewindow.cs110
9 files changed, 241 insertions, 241 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);
}