summaryrefslogtreecommitdiffstats
path: root/qtsharp/src/examples
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:44:01 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:44:01 +0000
commit479f5f799523bffbcc83dff581a2299c047c6fff (patch)
tree186aae707ed02aac6c7cab2fb14e97f72aca5e36 /qtsharp/src/examples
parentf1dbff6145c98324ff82e34448b7483727e8ace4 (diff)
downloadtdebindings-479f5f799523bffbcc83dff581a2299c047c6fff.tar.gz
tdebindings-479f5f799523bffbcc83dff581a2299c047c6fff.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1157645 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'qtsharp/src/examples')
-rw-r--r--qtsharp/src/examples/samples/display.cs30
-rw-r--r--qtsharp/src/examples/samples/emit.cs12
-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.cs146
-rw-r--r--qtsharp/src/examples/samples/scribblewindow.cs124
-rw-r--r--qtsharp/src/examples/test-results.html2
-rw-r--r--qtsharp/src/examples/tutorials/t1.cs4
-rw-r--r--qtsharp/src/examples/tutorials/t2.cs12
-rw-r--r--qtsharp/src/examples/tutorials/t3.cs14
-rw-r--r--qtsharp/src/examples/tutorials/t4.cs14
-rw-r--r--qtsharp/src/examples/tutorials/t5.cs20
-rw-r--r--qtsharp/src/examples/tutorials/t6.cs28
-rw-r--r--qtsharp/src/examples/tutorials/t7.cs36
17 files changed, 328 insertions, 328 deletions
diff --git a/qtsharp/src/examples/samples/display.cs b/qtsharp/src/examples/samples/display.cs
index b1c7ca10..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 : QMainWindow {
+ public class Display : TQMainWindow {
private TextArea textarea;
- private QScrollView scrollview;
- private QMenuBar menubar;
- private QPopupMenu filemenu, aboutmenu;
+ private TQScrollView scrollview;
+ private TQMenuBar menubar;
+ private TQPopupMenu filemenu, aboutmenu;
- private class TextArea : QTextEdit {
+ private class TextArea : TQTextEdit {
- public TextArea (QWidget parent) : base (parent)
+ public TextArea (TQWidget parent) : base (parent)
{
- QFile file = new QFile ("display.cs");
+ TQFile file = new TQFile ("display.cs");
if ( file.Open(1) ) {
- QTextStream ts = new QTextStream (file);
+ TQTextStream ts = new TQTextStream (file);
this.SetText (ts.Read ());
this.SetTabStopWidth (30);
}
@@ -25,13 +25,13 @@ namespace QtSamples {
public Display ()
{
- filemenu = new QPopupMenu (null, "filemenu");
- filemenu.InsertItem ("&Quit", qApp, SLOT ("quit()"));
+ filemenu = new TQPopupMenu (null, "filemenu");
+ filemenu.InsertItem ("&Quit", qApp, TQT_SLOT ("quit()"));
- aboutmenu = new QPopupMenu(null, "aboutmenu");
- aboutmenu.InsertItem("&About Qt-Sharp", this, SLOT("slotAbout()"));
+ aboutmenu = new TQPopupMenu(null, "aboutmenu");
+ aboutmenu.InsertItem("&About Qt-Sharp", this, TQT_SLOT("slotAbout()"));
- menubar = new QMenuBar(this, "");
+ menubar = new TQMenuBar(this, "");
menubar.InsertItem("&File", filemenu);
menubar.InsertItem("&About", aboutmenu);
@@ -42,7 +42,7 @@ namespace QtSamples {
public void slotAbout ()
{
- QMessageBox.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)
{
- QApplication app = new QApplication (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 e9c3c40a..125166a2 100644
--- a/qtsharp/src/examples/samples/emit.cs
+++ b/qtsharp/src/examples/samples/emit.cs
@@ -6,15 +6,15 @@ namespace QtSamples {
using Qt;
[DeclareQtSignal ("MySignal()")]
- public class EmitSample: QVBox {
+ public class EmitSample: TQVBox {
public EmitSample (): this (null, "") {}
- public EmitSample (QWidget parent, string name): base ()
+ public EmitSample (TQWidget parent, string name): base ()
{
- QPushButton pb = new QPushButton ("Papa Smurf", this);
+ TQPushButton pb = new TQPushButton ("Papa Smurf", this);
- Connect (pb, SIGNAL ("clicked ()"), SLOT ("DoEmit ()"));
- Connect (this, SIGNAL ("MySignal ()"), SLOT ("PrintStuff ()"));
+ Connect (pb, TQT_SIGNAL ("clicked ()"), TQT_SLOT ("DoEmit ()"));
+ Connect (this, TQT_SIGNAL ("MySignal ()"), TQT_SLOT ("PrintStuff ()"));
}
public void DoEmit ()
@@ -29,7 +29,7 @@ namespace QtSamples {
public static int Main (string[] args)
{
- QApplication app = new QApplication (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 ee410dd3..2372d766 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 : QVBox {
+ public class EventHandling : TQVBox {
public static void Main (String[] args)
{
- QApplication app = new QApplication (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 (QObject sender, QEventArgs e)
+ public void mouseEvents (TQObject sender, QEventArgs e)
{
Console.WriteLine ("Mouse event: " + e.Name);
}
- class MyButton : QPushButton {
+ class MyButton : TQPushButton {
- public MyButton (QWidget 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 (QMouseEvent 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 db6890e5..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 : QVBox {
+ public class HelloWorld : TQVBox {
public static void Main (String[] args)
{
- QApplication app = new QApplication (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)
{
- QPushButton pb = new QPushButton ("Hello Qt-Sharp-0.7!", this);
- QObject.Connect (pb, SIGNAL ("clicked()"), this, 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 ("QPushButton Clicked!");
+ Console.WriteLine ("TQPushButton Clicked!");
}
}
}
diff --git a/qtsharp/src/examples/samples/mandelbrot.cs b/qtsharp/src/examples/samples/mandelbrot.cs
index 5dbd9b85..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)
{
- QApplication app = new QApplication (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 : QDialog {
+public class ImageDialog : TQDialog {
const double DefaultPlotXMin = -2.0;
const double DefaultPlotXMax = 2.0;
const double DefaultPlotYMin = -1.5;
const double DefaultPlotYMax = 1.5;
- QHBoxLayout dialogLayout;
- QGridLayout gridLayout;
- QVBoxLayout leftLayout;
- QHBoxLayout buttonLayout;
- QPushButton redrawButton;
- QLabel pixmapLabel;
- QSizePolicy fixedSizePolicy;
+ TQHBoxLayout dialogLayout;
+ TQGridLayout gridLayout;
+ TQVBoxLayout leftLayout;
+ TQHBoxLayout buttonLayout;
+ TQPushButton redrawButton;
+ TQLabel pixmapLabel;
+ TQSizePolicy fixedSizePolicy;
- QLabel XMinLabel, XMaxLabel, YMinLabel, YMaxLabel;
- QLineEdit editXMin, editXMax, editYMin, editYMax;
+ TQLabel XMinLabel, XMaxLabel, YMinLabel, YMaxLabel;
+ TQLineEdit editXMin, editXMax, editYMin, editYMax;
- public ImageDialog (QWidget 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 QHBoxLayout (this, 11, 6);
- gridLayout = new QGridLayout (null, 1, 1, 0, 6, "gridLayout");
- leftLayout = new QVBoxLayout (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 QSizePolicy ();
- fixedSizePolicy.SetHorData (QSizePolicy.SizeType.Fixed);
- fixedSizePolicy.SetVerData (QSizePolicy.SizeType.Fixed);
+ fixedSizePolicy = new TQSizePolicy ();
+ fixedSizePolicy.SetHorData (TQSizePolicy.SizeType.Fixed);
+ fixedSizePolicy.SetVerData (TQSizePolicy.SizeType.Fixed);
- XMinLabel = new QLabel ("Xmin", this);
+ XMinLabel = new TQLabel ("Xmin", this);
XMinLabel.SetSizePolicy (fixedSizePolicy);
gridLayout.AddWidget (XMinLabel, 0, 0);
- XMaxLabel = new QLabel ("Xmax", this);
+ XMaxLabel = new TQLabel ("Xmax", this);
XMaxLabel.SetSizePolicy(fixedSizePolicy);
gridLayout.AddWidget (XMaxLabel, 1, 0);
- YMinLabel = new QLabel ("Ymin", this);
+ YMinLabel = new TQLabel ("Ymin", this);
YMinLabel.SetSizePolicy (fixedSizePolicy);
gridLayout.AddWidget (YMinLabel, 2, 0);
- YMaxLabel = new QLabel ("Ymax", this);
+ YMaxLabel = new TQLabel ("Ymax", this);
YMaxLabel.SetSizePolicy (fixedSizePolicy);
gridLayout.AddWidget (YMaxLabel, 3, 0);
- QDoubleValidator validator = new QDoubleValidator (this);
+ TQDoubleValidator validator = new TQDoubleValidator (this);
- editXMin = new QLineEdit (this, "editXMin");
+ editXMin = new TQLineEdit (this, "editXMin");
editXMin.SetText (Convert.ToString (DefaultPlotXMin));
editXMin.SetValidator (validator);
gridLayout.AddWidget (editXMin, 0, 1);
- editXMax = new QLineEdit (this, "editXMax");
+ editXMax = new TQLineEdit (this, "editXMax");
editXMax.SetText (Convert.ToString(DefaultPlotXMax));
editXMax.SetValidator (validator);
gridLayout.AddWidget (editXMax, 1, 1);
- editYMin = new QLineEdit (this, "editYMin");
+ editYMin = new TQLineEdit (this, "editYMin");
editYMin.SetText (Convert.ToString(DefaultPlotYMin));
editYMin.SetValidator (validator);
gridLayout.AddWidget (editYMin, 2, 1);
- editYMax = new QLineEdit (this, "editYMax");
+ editYMax = new TQLineEdit (this, "editYMax");
editYMax.SetText (Convert.ToString(DefaultPlotYMax));
editYMax.SetValidator (validator);
gridLayout.AddWidget (editYMax, 3, 1);
leftLayout.AddLayout (gridLayout);
- QSpacerItem spacer1 = new QSpacerItem (0, 0, 0, 0);
+ TQSpacerItem spacer1 = new TQSpacerItem (0, 0, 0, 0);
leftLayout.AddItem (spacer1);
- buttonLayout = new QHBoxLayout (null, 0, 6, "buttonLayout");
- QSpacerItem spacer2 = new QSpacerItem (0, 0, 0, 0);
+ buttonLayout = new TQHBoxLayout (null, 0, 6, "buttonLayout");
+ TQSpacerItem spacer2 = new TQSpacerItem (0, 0, 0, 0);
buttonLayout.AddItem (spacer2);
- redrawButton = new QPushButton ("Redraw", this);
+ redrawButton = new TQPushButton ("Redraw", this);
redrawButton.SetDefault (true);
buttonLayout.AddWidget (redrawButton);
- QSpacerItem spacer3 = new QSpacerItem (0, 0, 0, 0);
+ TQSpacerItem spacer3 = new TQSpacerItem (0, 0, 0, 0);
buttonLayout.AddItem (spacer3);
leftLayout.AddLayout (buttonLayout);
dialogLayout.AddLayout (leftLayout);
- QSpacerItem spacer4 = new QSpacerItem (0, 0, 0, 0);
+ TQSpacerItem spacer4 = new TQSpacerItem (0, 0, 0, 0);
dialogLayout.AddItem (spacer4);
- pixmapLabel = new QLabel (this, "pixmapLabel", 0);
+ pixmapLabel = new TQLabel (this, "pixmapLabel", 0);
pixmapLabel.SetScaledContents (true);
dialogLayout.AddWidget (pixmapLabel);
- QObject.Connect (redrawButton, SIGNAL ("clicked()"), this, SLOT ("Redraw()"));
+ TQObject.Connect (redrawButton, TQT_SIGNAL ("clicked()"), this, TQT_SLOT ("Redraw()"));
Redraw ();
}
- QImage MandelbrotImage ()
+ TQImage MandelbrotImage ()
{
int depth;
double real, imag;
@@ -232,7 +232,7 @@ public class ImageDialog : QDialog {
int ImageXMax = pixmapLabel.Width ();
int ImageYMax = pixmapLabel.Height ();
- QImage image = new QImage (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 : QDialog {
public void Redraw ()
{
- QSize s = pixmapLabel.BaseSize ();
+ TQSize s = pixmapLabel.BaseSize ();
pixmapLabel.Resize (400,300);
- QApplication.SetOverrideCursor ( new QCursor( (int) CursorShape.WaitCursor ));
- QImage image = MandelbrotImage ();
- QPixmap pixmap = new QPixmap (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 ();
- QApplication.RestoreOverrideCursor ();
+ TQApplication.RestoreOverrideCursor ();
}
}
diff --git a/qtsharp/src/examples/samples/mandelbrot2.cs b/qtsharp/src/examples/samples/mandelbrot2.cs
index bcb0a360..2b83579e 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)
{
- QApplication app = new QApplication (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: QFrame
{
- QPixmap newPixmap;
+ TQPixmap newPixmap;
int newWidth = 400;
int newHeight = 300;
- public PicLabel( QWidget 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: QFrame
}
- protected void PerformResize (QResizeEvent 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: QFrame
}
- protected void PerformPaint(QPaintEvent e )
+ protected void PerformPaint(TQPaintEvent e )
{
Console.WriteLine("Making a new image {0} by {1}", newWidth, newHeight );
- QImage image = Mandelbrot.dialog.MandelbrotImage( newWidth, newHeight );
- newPixmap = new QPixmap( 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: QFrame
-public class ImageDialog : QDialog {
+public class ImageDialog : TQDialog {
const double DefaultPlotXMin = -2.0;
const double DefaultPlotXMax = 2.0;
const double DefaultPlotYMin = -1.5;
const double DefaultPlotYMax = 1.5;
- QHBoxLayout dialogLayout;
- QGridLayout gridLayout;
- QVBoxLayout leftLayout;
- QHBoxLayout buttonLayout;
- QPushButton redrawButton;
+ TQHBoxLayout dialogLayout;
+ TQGridLayout gridLayout;
+ TQVBoxLayout leftLayout;
+ TQHBoxLayout buttonLayout;
+ TQPushButton redrawButton;
public PicLabel pixmapLabel;
- QSizePolicy fixedSizePolicy;
+ TQSizePolicy fixedSizePolicy;
- QLabel XMinLabel, XMaxLabel, YMinLabel, YMaxLabel;
- QLineEdit editXMin, editXMax, editYMin, editYMax;
+ TQLabel XMinLabel, XMaxLabel, YMinLabel, YMaxLabel;
+ TQLineEdit editXMin, editXMax, editYMin, editYMax;
- public ImageDialog (QWidget 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 QHBoxLayout (this, 11, 6);
- gridLayout = new QGridLayout (null, 1, 1, 0, 6, "gridLayout");
- leftLayout = new QVBoxLayout (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 QSizePolicy ( QSizePolicy.SizeType.Fixed,
- QSizePolicy.SizeType.Fixed, false );
+ fixedSizePolicy = new TQSizePolicy ( TQSizePolicy.SizeType.Fixed,
+ TQSizePolicy.SizeType.Fixed, false );
- XMinLabel = new QLabel ("Xmin", this);
+ XMinLabel = new TQLabel ("Xmin", this);
XMinLabel.SetSizePolicy (fixedSizePolicy);
gridLayout.AddWidget (XMinLabel, 0, 0);
- XMaxLabel = new QLabel ("Xmax", this);
+ XMaxLabel = new TQLabel ("Xmax", this);
XMaxLabel.SetSizePolicy(fixedSizePolicy);
gridLayout.AddWidget (XMaxLabel, 1, 0);
- YMinLabel = new QLabel ("Ymin", this);
+ YMinLabel = new TQLabel ("Ymin", this);
YMinLabel.SetSizePolicy (fixedSizePolicy);
gridLayout.AddWidget (YMinLabel, 2, 0);
- YMaxLabel = new QLabel ("Ymax", this);
+ YMaxLabel = new TQLabel ("Ymax", this);
YMaxLabel.SetSizePolicy (fixedSizePolicy);
gridLayout.AddWidget (YMaxLabel, 3, 0);
- QDoubleValidator validator = new QDoubleValidator (this);
+ TQDoubleValidator validator = new TQDoubleValidator (this);
- editXMin = new QLineEdit (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 QLineEdit (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 QLineEdit (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 QLineEdit (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);
- QSpacerItem spacer1 = new QSpacerItem (0, 0, 0, 0);
+ TQSpacerItem spacer1 = new TQSpacerItem (0, 0, 0, 0);
leftLayout.AddItem (spacer1);
- buttonLayout = new QHBoxLayout (null, 0, 6, "buttonLayout");
- QSpacerItem spacer2 = new QSpacerItem (0, 0, 0, 0);
+ buttonLayout = new TQHBoxLayout (null, 0, 6, "buttonLayout");
+ TQSpacerItem spacer2 = new TQSpacerItem (0, 0, 0, 0);
buttonLayout.AddItem (spacer2);
- redrawButton = new QPushButton ("Redraw", this);
+ redrawButton = new TQPushButton ("Redraw", this);
redrawButton.SetSizePolicy ( fixedSizePolicy );
redrawButton.SetDefault (true);
buttonLayout.AddWidget (redrawButton);
- QSpacerItem spacer3 = new QSpacerItem (0, 0, 0, 0);
+ TQSpacerItem spacer3 = new TQSpacerItem (0, 0, 0, 0);
buttonLayout.AddItem (spacer3);
leftLayout.AddLayout (buttonLayout);
dialogLayout.AddLayout (leftLayout);
- QSpacerItem spacer4 = new QSpacerItem (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( QSizePolicy.SizeType.Minimum,
- QSizePolicy.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);
- //QImage image = MandelbrotImage( 400, 300 );
- //pixmapLabel.SetPixmap( new QPixmap( image ) );
+ //TQImage image = MandelbrotImage( 400, 300 );
+ //pixmapLabel.SetPixmap( new TQPixmap( image ) );
- QObject.Connect (redrawButton, SIGNAL ("clicked()"), pixmapLabel, SLOT ("Repaint()"));
+ TQObject.Connect (redrawButton, TQT_SIGNAL ("clicked()"), pixmapLabel, TQT_SLOT ("Repaint()"));
//Redraw ();
}
- public QImage MandelbrotImage ( int width, int height)
+ public TQImage MandelbrotImage ( int width, int height)
{
int depth;
double real, imag;
@@ -290,7 +290,7 @@ public class ImageDialog : QDialog {
int ImageXMax = width;
int ImageYMax = height;
- QImage image = new QImage (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 e6d5110a..e33fa1b3 100644
--- a/qtsharp/src/examples/samples/qstring-slot.cs
+++ b/qtsharp/src/examples/samples/qstring-slot.cs
@@ -1,4 +1,4 @@
-// Demo of a QString slot
+// Demo of a TQString slot
// Implemented by Marcus Urban
using System;
@@ -6,21 +6,21 @@ using Qt;
public class MyWidget : QVBox
{
- QLineEdit lineEdit;
- QLabel label;
+ TQLineEdit lineEdit;
+ TQLabel label;
- public MyWidget (QWidget parent, String name) : base (parent, name)
+ public MyWidget (TQWidget parent, String name) : base (parent, name)
{
- lineEdit = new QLineEdit( this, "lineEdit" );
- label = new QLabel( this, "label" );
+ lineEdit = new TQLineEdit( this, "lineEdit" );
+ label = new TQLabel( this, "label" );
label.SetText("Default");
- QObject.Connect( lineEdit, SIGNAL("textChanged(QString)"),
- label, "SetText(QString)" );
+ TQObject.Connect( lineEdit, TQT_SIGNAL("textChanged(TQString)"),
+ label, "SetText(TQString)" );
}
- public MyWidget (QWidget 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)
{
- QApplication a = new QApplication (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 56898912..fe6c914e 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 : QMainWindow {
+ public class FractalViewer : TQMainWindow {
//Menuing
- private QMenuBar menubar;
- private QPopupMenu filemenu;
- private QPopupMenu shapemenu;
- private QPopupMenu 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
- QApplication app = new QApplication (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 QPopupMenu (null, "filemenu");
- filemenu.InsertItem ("&Screenshot", display, SLOT ("SlotScreenshot()"));
+ filemenu = new TQPopupMenu (null, "filemenu");
+ filemenu.InsertItem ("&Screenshot", display, TQT_SLOT ("SlotScreenshot()"));
filemenu.InsertSeparator ();
- filemenu.InsertItem ("&Quit", qApp, SLOT ("quit()"));
+ filemenu.InsertItem ("&Quit", qApp, TQT_SLOT ("quit()"));
//Setup the shapemenu
- shapemenu = new QPopupMenu (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
- QObject.Connect (shapemenu, SIGNAL ("activated(int)"),
- display, SLOT("SlotShapeMenu(int)"));
+ TQObject.Connect (shapemenu, TQT_SIGNAL ("activated(int)"),
+ display, TQT_SLOT("SlotShapeMenu(int)"));
//Setup the settingsmenu
- settingsmenu = new QPopupMenu (null, "settingsmenu");
- settingsmenu.InsertItem ("&Alpha", display, SLOT ("SlotSetAlpha()"));
+ settingsmenu = new TQPopupMenu (null, "settingsmenu");
+ settingsmenu.InsertItem ("&Alpha", display, TQT_SLOT ("SlotSetAlpha()"));
//Setup the menubar
- menubar = new QMenuBar (this, "");
+ menubar = new TQMenuBar (this, "");
menubar.InsertItem ("&File", filemenu);
menubar.InsertItem ("&Shape", shapemenu);
menubar.InsertItem ("&Settings", settingsmenu);
}
}
- public class Display: QWidget, IQuantumFractal {
+ public class Display: TQWidget, IQuantumFractal {
//Labels
- QLabel count;
- QLabel shape;
- QLabel alpha;
+ TQLabel count;
+ TQLabel shape;
+ TQLabel alpha;
//Buttons
- QPushButton start;
- QPushButton stop;
- QPushButton reset;
- QPushButton gray;
- QPushButton intense;
+ TQPushButton start;
+ TQPushButton stop;
+ TQPushButton reset;
+ TQPushButton gray;
+ TQPushButton intense;
//Drawable region
QPaintBuffer buffer;
//Layouts
- QVBoxLayout layout;
- QHBoxLayout buttons;
- QVBoxLayout 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 (QWidget parent): base (parent)
+ public Display (TQWidget parent): base (parent)
{
//Setup the sizes
- QSize size = new QSize (resolution, resolution);
+ TQSize size = new TQSize (resolution, resolution);
parent.SetBaseSize (size);
//Some nice colors
- SetPaletteBackgroundColor (new QColor ("Black"));
- SetPaletteForegroundColor (new QColor ("LightBlue"));
+ SetPaletteBackgroundColor (new TQColor ("Black"));
+ SetPaletteForegroundColor (new TQColor ("LightBlue"));
//Setup the buttons
- start = new QPushButton ("Start", this);
- stop = new QPushButton ("Stop", this);
- reset = new QPushButton ("Reset", this);
- gray = new QPushButton ("Color", this);
- intense = new QPushButton ("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 QLabel (this);
- alpha = new QLabel (this);
- shape = new QLabel (this);
+ count = new TQLabel (this);
+ alpha = new TQLabel (this);
+ shape = new TQLabel (this);
//Setup the drawable
buffer = new QPaintBuffer (this);
buffer.SetMinimumSize (size);
//Create the layouts
- layout = new QVBoxLayout (this);
- buttons = new QHBoxLayout (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
- QObject.Connect (start, SIGNAL ("clicked()"),
- this, SLOT ("SlotStart()"));
- QObject.Connect (stop, SIGNAL ("clicked()"),
- this, SLOT ("SlotStop()"));
- QObject.Connect (reset, SIGNAL ("clicked()"),
- this, SLOT ("SlotReset()"));
- QObject.Connect (gray, SIGNAL ("clicked()"),
- this, SLOT ("SlotGray()"));
- QObject.Connect (intense, SIGNAL ("clicked()"),
- this, SLOT ("SlotIntense()"));
- QObject.Connect (buffer, SIGNAL ("Painted()"),
- this, SLOT ("SlotSetLabels()"));
- QObject.Connect (qApp, SIGNAL ("lastWindowClosed ()"),
- this, SLOT ("SlotQuit ()"));
+ TQObject.Connect (start, TQT_SIGNAL ("clicked()"),
+ this, TQT_SLOT ("SlotStart()"));
+ TQObject.Connect (stop, TQT_SIGNAL ("clicked()"),
+ this, TQT_SLOT ("SlotStop()"));
+ TQObject.Connect (reset, TQT_SIGNAL ("clicked()"),
+ this, TQT_SLOT ("SlotReset()"));
+ TQObject.Connect (gray, TQT_SIGNAL ("clicked()"),
+ this, TQT_SLOT ("SlotGray()"));
+ TQObject.Connect (intense, TQT_SIGNAL ("clicked()"),
+ this, TQT_SLOT ("SlotIntense()"));
+ TQObject.Connect (buffer, TQT_SIGNAL ("Painted()"),
+ this, TQT_SLOT ("SlotSetLabels()"));
+ TQObject.Connect (qApp, TQT_SIGNAL ("lastWindowClosed ()"),
+ this, TQT_SLOT ("SlotQuit ()"));
//Layout labels
- labels = new QVBoxLayout (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 = QFileDialog.GetSaveFileName (
+ string filename = TQFileDialog.GetSaveFileName (
- QDir.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 (QResizeEvent 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 QPaintBuffer : QFrame {
+ public class QPaintBuffer : TQFrame {
//Drawables
- private QPixmap buffer;
- private QImage image;
+ private TQPixmap buffer;
+ private TQImage image;
//Timer
private TimerCallback call;
private Timer timer;
- public QPaintBuffer (QWidget parent) : base (parent)
+ public QPaintBuffer (TQWidget parent) : base (parent)
{
SetBackgroundMode (Qt.BackgroundMode.NoBackground);
//Create drawables
- buffer = new QPixmap ();
- image = new QImage (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 QPixmap ();
- image = new QImage (Size (), 32);
+ buffer = new TQPixmap ();
+ image = new TQImage (Size (), 32);
PaintImage (null);
}
@@ -484,24 +484,24 @@ namespace Qf {
}
//Receive focus events
- private void TouchFocus (QFocusEvent e)
+ private void TouchFocus (TQFocusEvent e)
{
PerformPaint ();
}
//Receive paint events
- private void TouchPaint (QPaintEvent e)
+ private void TouchPaint (TQPaintEvent e)
{
PerformPaint ();
}
//Receive resize events
- private void TouchResize (QResizeEvent e)
+ private void TouchResize (TQResizeEvent e)
{
- image = new QImage (e.Size (), 32);
+ image = new TQImage (e.Size (), 32);
buffer.Resize (e.Size());
- buffer.Fill (new QColor("black"));
- BitBlt (buffer, 0, 0, new QPixmap (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 6b594eb8..fdd9fe46 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(QColor)")]
- [DeclareQtSignal ("load(QString)")]
- [DeclareQtSignal ("save(QString)")]
- public class ScribbleWindow : QMainWindow {
-
- private QMenuBar menubar;
- private QPopupMenu filemenu;
- private QPopupMenu aboutmenu;
- private QScrollView 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)
{
- QApplication app = new QApplication (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 QPopupMenu (null, "filemenu");
- filemenu.InsertItem ("&Load", this, SLOT ("SlotLoad()") );
- filemenu.InsertItem ("&Save", this, SLOT ("SlotSave()") );
+ 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, SLOT ("quit()"));
+ filemenu.InsertItem ("&Quit", qApp, TQT_SLOT ("quit()"));
- aboutmenu = new QPopupMenu (null, "helpmenu");
- aboutmenu.InsertItem ("&About Qt-Sharp", this, SLOT ("SlotAboutQtSharp()"));
- aboutmenu.InsertItem ("&About Qt", this, SLOT ("SlotAboutQt()"));
+ aboutmenu = new TQPopupMenu (null, "helpmenu");
+ aboutmenu.InsertItem ("&About Qt-Sharp", this, TQT_SLOT ("SlotAboutQtSharp()"));
+ aboutmenu.InsertItem ("&About Qt", this, TQT_SLOT ("SlotAboutQt()"));
- menubar = new QMenuBar (this, "");
+ menubar = new TQMenuBar (this, "");
menubar.InsertItem ("&File", filemenu);
- menubar.InsertItem ("&Color", this, SLOT("SlotColorChooser()"));
+ menubar.InsertItem ("&Color", this, TQT_SLOT("SlotColorChooser()"));
menubar.InsertItem ("&About", aboutmenu);
- scrollview = new QScrollView (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 ());
- QObject.Connect (this, SIGNAL ("colorChanged(QColor)"),
- scribblearea, SLOT ("SlotSetColor(QColor)") );
- QObject.Connect (this, SIGNAL ("load(QString)"),
- scribblearea, SLOT ("PerformLoad(QString)") );
- QObject.Connect (this, SIGNAL ("save(QString)"),
- scribblearea, SLOT ("PerformSave(QString)") );
+ 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 = QFileDialog.GetOpenFileName (".", "*.bmp", this,
- null, "Load File", QString.Null, true);
+ string filename = TQFileDialog.GetOpenFileName (".", "*.bmp", this,
+ null, "Load File", TQString.Null, true);
if ( filename != null )
- Emit ("load(QString)", (QString) filename);
+ Emit ("load(TQString)", (TQString) filename);
}
public void SlotSave ()
{
- string filename = QFileDialog.GetSaveFileName (".", "*.bmp", this,
- null, "Save File", QString.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(QString)", (QString) filename);
+ Emit ("save(TQString)", (TQString) filename);
}
}
public void SlotAboutQtSharp ()
{
- QMessageBox.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,30 +100,30 @@ namespace QtSamples {
public void SlotAboutQt ()
{
- QMessageBox.AboutQt (this, "About Qt");
+ TQMessageBox.AboutQt (this, "About Qt");
}
public void SlotColorChooser ()
{
- QColor chosenColor = QColorDialog.GetColor();
+ TQColor chosenColor = QColorDialog.GetColor();
if (chosenColor.IsValid())
- Emit ("colorChanged(QColor)", chosenColor);
+ Emit ("colorChanged(TQColor)", chosenColor);
}
- public class ScribbleArea : QFrame {
- private QPoint last;
- private QPixmap buffer;
- private QColor currentcolor = new QColor("Black");
- private QPopupMenu popupmenu;
+ public class ScribbleArea : TQFrame {
+ private TQPoint last;
+ private TQPixmap buffer;
+ private TQColor currentcolor = new TQColor("Black");
+ private TQPopupMenu popupmenu;
- public ScribbleArea (QWidget parent) : base (parent)
+ public ScribbleArea (TQWidget parent) : base (parent)
{
- buffer = new QPixmap ();
- last = new QPoint ();
+ buffer = new TQPixmap ();
+ last = new TQPoint ();
SetBackgroundMode (Qt.BackgroundMode.NoBackground);
- popupmenu = new QPopupMenu();
- popupmenu.InsertItem ("&Clear", this, SLOT ("SlotClearArea()") );
+ popupmenu = new TQPopupMenu();
+ popupmenu.InsertItem ("&Clear", this, TQT_SLOT ("SlotClearArea()") );
mouseMoveEvent += new MouseMoveEvent (MouseMoved);
mousePressEvent += new MousePressEvent (MousePressed);
@@ -131,51 +131,51 @@ namespace QtSamples {
resizeEvent += new ResizeEvent (PerformResize);
}
- public void PerformLoad (QString filename)
+ public void PerformLoad (TQString filename)
{
if ( ! buffer.Load(filename) )
- QMessageBox.Warning (null, "Load error", "Could not load file");
+ TQMessageBox.Warning (null, "Load error", "Could not load file");
Repaint();
}
- public void PerformSave (QString filename)
+ public void PerformSave (TQString filename)
{
if ( ! buffer.Save (filename, "BMP") )
- QMessageBox.Warning( null, "Save error", "Could not save file");
+ TQMessageBox.Warning( null, "Save error", "Could not save file");
}
public void SlotClearArea ()
{
- buffer.Fill( new QColor ("white") );
+ buffer.Fill( new TQColor ("white") );
BitBlt (this, 0, 0, buffer, 0, 0, -1, -1, Qt.RasterOp.CopyROP, false);
}
- public void SlotSetColor (QColor color)
+ public void SlotSetColor (TQColor color)
{
currentcolor = color;
}
// Note, Dispose() is called on QPoints here to increase performance
- // of the UI. Otherwise, the GC would let dead QPoint 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 (QMouseEvent e)
+ protected void MousePressed (TQMouseEvent e)
{
if (e.Button() == ButtonState.RightButton )
- popupmenu.Exec (QCursor.Pos ());
+ popupmenu.Exec (TQCursor.Pos ());
else {
last.Dispose ();
last = e.Pos();
}
}
- protected void MouseMoved (QMouseEvent e)
+ protected void MouseMoved (TQMouseEvent e)
{
- QPainter windowPainter = new QPainter ();
- QPainter bufferPainter = new QPainter ();
+ 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 (QPaintEvent e)
+ protected void PerformPaint (TQPaintEvent e)
{
BitBlt(this, 0, 0, buffer,
0, 0, -1, -1, RasterOp.CopyROP, false);
}
- protected void PerformResize (QResizeEvent e)
+ protected void PerformResize (TQResizeEvent e)
{
- QPixmap save = new QPixmap (buffer);
+ TQPixmap save = new TQPixmap (buffer);
buffer.Resize (e.Size());
- buffer.Fill (new QColor("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 43ddae93..631ee200 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 QObject 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 3dc075b1..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)
{
- QApplication a = new QApplication (args);
+ TQApplication a = new TQApplication (args);
- QPushButton hello = new QPushButton ("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 44eb304b..5dbe07d1 100644
--- a/qtsharp/src/examples/tutorials/t2.cs
+++ b/qtsharp/src/examples/tutorials/t2.cs
@@ -9,17 +9,17 @@ public class Example {
public static int Main (String[] args)
{
- QApplication a = new QApplication (args);
+ TQApplication a = new TQApplication (args);
- QPushButton quit = new QPushButton ("Quit", null);
+ TQPushButton quit = new TQPushButton ("Quit", null);
// In C++, the second parameter is 0 (null pointer)
quit.Resize (75, 30);
- quit.SetFont (new QFont ("Times", 18, QFont.Weight.Bold));
- // In C++, QFont::Bold is sufficient
+ quit.SetFont (new TQFont ("Times", 18, TQFont.Weight.Bold));
+ // In C++, TQFont::Bold is sufficient
- QObject.Connect ( quit, QtSupport.SIGNAL ("clicked()"), a, QtSupport.SLOT ("Quit()") );
- // SIGNAL and SLOT are static functions of QtSupport
+ 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);
quit.Show ();
diff --git a/qtsharp/src/examples/tutorials/t3.cs b/qtsharp/src/examples/tutorials/t3.cs
index a1c76ce4..26fece72 100644
--- a/qtsharp/src/examples/tutorials/t3.cs
+++ b/qtsharp/src/examples/tutorials/t3.cs
@@ -10,17 +10,17 @@ public class Example {
public static int Main (String[] args)
{
- QApplication a = new QApplication (args);
+ TQApplication a = new TQApplication (args);
- QVBox box = new QVBox ();
+ TQVBox box = new TQVBox ();
box.Resize (200, 120);
- QPushButton quit = new QPushButton ("Quit", box);
- quit.SetFont (new QFont ("Times", 18, QFont.Weight.Bold));
- // In C++, QFont::Bold is sufficient
+ TQPushButton quit = new TQPushButton ("Quit", box);
+ quit.SetFont (new TQFont ("Times", 18, TQFont.Weight.Bold));
+ // In C++, TQFont::Bold is sufficient
- QObject.Connect ( quit, QtSupport.SIGNAL ("clicked()"), a, QtSupport.SLOT ("Quit()") );
- // SIGNAL and SLOT are static functions of QtSupport
+ 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);
box.Show ();
diff --git a/qtsharp/src/examples/tutorials/t4.cs b/qtsharp/src/examples/tutorials/t4.cs
index 5373af19..a8884b92 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 : QWidget {
+public class MyWidget : TQWidget {
- public MyWidget (QWidget 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);
- QPushButton quit = new QPushButton ("Quit", this, "quit");
+ TQPushButton quit = new TQPushButton ("Quit", this, "quit");
quit.SetGeometry (62, 40, 75, 30);
- quit.SetFont (new QFont ("Times", 18, QFont.Weight.Bold) );
+ quit.SetFont (new TQFont ("Times", 18, TQFont.Weight.Bold) );
- Connect ( quit, SIGNAL ("clicked()"), qApp, SLOT ("Quit()") );
+ Connect ( quit, TQT_SIGNAL ("clicked()"), qApp, TQT_SLOT ("Quit()") );
// In C++, qApp is a global variable. Here it's a property of the QObject
// class, which we inherit, giving the same effect. We also inherit the
// static method connect().
}
- public MyWidget (QWidget 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)
{
- QApplication a = new QApplication (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 4feadae5..0488969d 100644
--- a/qtsharp/src/examples/tutorials/t5.cs
+++ b/qtsharp/src/examples/tutorials/t5.cs
@@ -5,27 +5,27 @@
using System;
using Qt;
-public class MyWidget : QVBox {
+public class MyWidget : TQVBox {
- public MyWidget (QWidget 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)
{
- QPushButton quit = new QPushButton ("Quit", this, "quit");
- quit.SetFont ( new QFont ("Times", 18, QFont.Weight.Bold) );
+ TQPushButton quit = new TQPushButton ("Quit", this, "quit");
+ quit.SetFont ( new TQFont ("Times", 18, TQFont.Weight.Bold) );
- QObject.Connect ( quit, SIGNAL ("clicked()"), qApp, SLOT ("Quit()") );
+ TQObject.Connect ( quit, TQT_SIGNAL ("clicked()"), qApp, TQT_SLOT ("Quit()") );
- QLCDNumber lcd = new QLCDNumber (2, this, "lcd" );
+ TQLCDNumber lcd = new TQLCDNumber (2, this, "lcd" );
- QSlider slider = new QSlider (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);
- Connect ( slider, SIGNAL ("valueChanged(int)"), lcd, SLOT ("Display(int)") );
+ Connect ( slider, TQT_SIGNAL ("valueChanged(int)"), lcd, TQT_SLOT ("Display(int)") );
}
- public MyWidget (QWidget 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)
{
- QApplication a = new QApplication (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 223e0ff1..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 : QVBox {
+public class LCDRange : TQVBox {
- public LCDRange (QWidget 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)
{
- QLCDNumber lcd = new QLCDNumber (2, this, "lcd" );
- QSlider slider = new QSlider (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, SIGNAL ("valueChanged(int)"), lcd, SLOT ("Display(int)") );
+ Connect ( slider, TQT_SIGNAL ("valueChanged(int)"), lcd, TQT_SLOT ("Display(int)") );
}
- public LCDRange (QWidget 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 : QVBox {
+public class MyWidget : TQVBox {
- MyWidget (QWidget parent, String name) : base (parent, name)
+ MyWidget (TQWidget parent, String name) : base (parent, name)
{
- QPushButton quit = new QPushButton ("Quit", this, "quit");
- quit.SetFont ( new QFont ("Times", 18, QFont.Weight.Bold) );
+ TQPushButton quit = new TQPushButton ("Quit", this, "quit");
+ quit.SetFont ( new TQFont ("Times", 18, TQFont.Weight.Bold) );
- Connect ( quit, SIGNAL ("clicked()"), qApp, SLOT ("Quit()") );
+ Connect ( quit, TQT_SIGNAL ("clicked()"), qApp, TQT_SLOT ("Quit()") );
- QGrid grid = new QGrid (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 (QWidget 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)
{
- QApplication a = new QApplication (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 de9011f2..e1891d26 100644
--- a/qtsharp/src/examples/tutorials/t7.cs
+++ b/qtsharp/src/examples/tutorials/t7.cs
@@ -9,23 +9,23 @@ using System;
using Qt;
[DeclareQtSignal ("valueChanged(int)")]
-public class LCDRange : QVBox {
+public class LCDRange : TQVBox {
- QSlider slider;
+ TQSlider slider;
- public LCDRange (QWidget 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)
{
- QLCDNumber lcd = new QLCDNumber (2, this, "lcd" );
- slider = new QSlider (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);
- Connect ( slider, SIGNAL ("valueChanged(int)"), lcd, SLOT ("Display(int)") );
- Connect ( slider, SIGNAL ("valueChanged(int)"), SIGNAL ("valueChanged(int)"));
+ Connect ( slider, TQT_SIGNAL ("valueChanged(int)"), lcd, TQT_SLOT ("Display(int)") );
+ Connect ( slider, TQT_SIGNAL ("valueChanged(int)"), TQT_SIGNAL ("valueChanged(int)"));
}
- public LCDRange (QWidget 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 : QVBox {
}
}
-public class MyWidget : QVBox {
+public class MyWidget : TQVBox {
- MyWidget (QWidget parent, String name) : base (parent, name)
+ MyWidget (TQWidget parent, String name) : base (parent, name)
{
- QPushButton quit = new QPushButton ("Quit", this, "quit");
- quit.SetFont ( new QFont ("Times", 18, QFont.Weight.Bold) );
+ TQPushButton quit = new TQPushButton ("Quit", this, "quit");
+ quit.SetFont ( new TQFont ("Times", 18, TQFont.Weight.Bold) );
- Connect ( quit, SIGNAL ("clicked()"), qApp, SLOT ("Quit()") );
+ Connect ( quit, TQT_SIGNAL ("clicked()"), qApp, TQT_SLOT ("Quit()") );
- QGrid grid = new QGrid (4, this);
+ TQGrid grid = new TQGrid (4, this);
LCDRange previous = null;
@@ -53,14 +53,14 @@ public class MyWidget : QVBox {
for ( int r = 0; r < 4; r++ ) {
LCDRange lr = new LCDRange (grid);
if (previous != null)
- Connect (lr, SIGNAL ("valueChanged(int)"),
- previous, SLOT ("SetValue(int)") );
+ Connect (lr, TQT_SIGNAL ("valueChanged(int)"),
+ previous, TQT_SLOT ("SetValue(int)") );
previous = lr;
}
}
}
- public MyWidget (QWidget 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)
{
- QApplication a = new QApplication (args);
+ TQApplication a = new TQApplication (args);
MyWidget w = new MyWidget ();
a.SetMainWidget (w);