summaryrefslogtreecommitdiffstats
path: root/qtjava/javalib/examples/listbox
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 /qtjava/javalib/examples/listbox
parent1a96c45b22d01378202d9dc7ed9c47acd30f966e (diff)
downloadtdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.tar.gz
tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.zip
Initial TQt conversion
Diffstat (limited to 'qtjava/javalib/examples/listbox')
-rw-r--r--qtjava/javalib/examples/listbox/ListBoxDemo.java62
-rw-r--r--qtjava/javalib/examples/listbox/Main.java2
2 files changed, 32 insertions, 32 deletions
diff --git a/qtjava/javalib/examples/listbox/ListBoxDemo.java b/qtjava/javalib/examples/listbox/ListBoxDemo.java
index 60eecffc..77ef7635 100644
--- a/qtjava/javalib/examples/listbox/ListBoxDemo.java
+++ b/qtjava/javalib/examples/listbox/ListBoxDemo.java
@@ -12,51 +12,51 @@ import org.kde.qt.*;
-class ListBoxDemo extends QWidget
+class ListBoxDemo extends TQWidget
{
-private QListBox l;
-private QSpinBox columns;
-private QSpinBox rows;
-private QButtonGroup bg;
+private TQListBox l;
+private TQSpinBox columns;
+private TQSpinBox rows;
+private TQButtonGroup bg;
ListBoxDemo()
{
super( null, null );
- QGridLayout g = new QGridLayout( this, 2, 2, 6 );
+ TQGridLayout g = new TQGridLayout( this, 2, 2, 6 );
- g.addWidget( new QLabel( "<b>Configuration:</b>", this ), 0, 0 );
- g.addWidget( new QLabel( "<b>Result:</b>", this ), 0, 1 );
+ g.addWidget( new TQLabel( "<b>Configuration:</b>", this ), 0, 0 );
+ g.addWidget( new TQLabel( "<b>Result:</b>", this ), 0, 1 );
- l = new QListBox( this );
+ l = new TQListBox( this );
g.addWidget( l, 1, 1 );
- l.setFocusPolicy( QWidget.StrongFocus );
+ l.setFocusPolicy( TQWidget.StrongFocus );
- QVBoxLayout v = new QVBoxLayout();
+ TQVBoxLayout v = new TQVBoxLayout();
g.addLayout( v, 1, 0 );
- QRadioButton b = null;
- bg = new QButtonGroup( (QWidget) null );
+ TQRadioButton b = null;
+ bg = new TQButtonGroup( (TQWidget) null );
- b = new QRadioButton( "Fixed number of columns,\n"
+ b = new TQRadioButton( "Fixed number of columns,\n"
+ "as many rows as needed.",
this );
bg.insert( b );
v.addWidget( b );
b.setChecked( true );
connect( b, SIGNAL("clicked()"), this, SLOT("setNumCols()") );
- QHBoxLayout h = new QHBoxLayout();
+ TQHBoxLayout h = new TQHBoxLayout();
v.addLayout( h );
h.addSpacing( 30 );
h.addSpacing( 100 );
- h.addWidget( new QLabel( "Columns:", this ) );
- columns = new QSpinBox( this );
+ h.addWidget( new TQLabel( "Columns:", this ) );
+ columns = new TQSpinBox( this );
h.addWidget( columns );
v.addSpacing( 12 );
- b = new QRadioButton( "As many columns as fit on-screen,\n"
+ b = new TQRadioButton( "As many columns as fit on-screen,\n"
+ "as many rows as needed.",
this );
bg.insert( b );
@@ -65,24 +65,24 @@ ListBoxDemo()
v.addSpacing( 12 );
- b = new QRadioButton( "Fixed number of rows,\n"
+ b = new TQRadioButton( "Fixed number of rows,\n"
+ "as many columns as needed.",
this );
bg.insert( b );
v.addWidget( b );
connect( b, SIGNAL("clicked()"), this, SLOT("setNumRows()") );
- h = new QHBoxLayout();
+ h = new TQHBoxLayout();
v.addLayout( h );
h.addSpacing( 30 );
h.addSpacing( 100 );
- h.addWidget( new QLabel( "Rows:", this ) );
- rows = new QSpinBox( this );
+ h.addWidget( new TQLabel( "Rows:", this ) );
+ rows = new TQSpinBox( this );
rows.setEnabled( false );
h.addWidget( rows );
v.addSpacing( 12 );
- b = new QRadioButton( "As many rows as fit on-screen,\n"
+ b = new TQRadioButton( "As many rows as fit on-screen,\n"
+ "as many columns as needed.",
this );
bg.insert( b );
@@ -91,25 +91,25 @@ ListBoxDemo()
v.addSpacing( 12 );
- QCheckBox cb = new QCheckBox( "Variable-height rows", this );
+ TQCheckBox cb = new TQCheckBox( "Variable-height rows", this );
cb.setChecked( true );
connect( cb, SIGNAL("toggled(boolean)"), this, SLOT("setVariableHeight(boolean)") );
v.addWidget( cb );
v.addSpacing( 6 );
- cb = new QCheckBox( "Variable-width columns", this );
+ cb = new TQCheckBox( "Variable-width columns", this );
connect( cb, SIGNAL("toggled(boolean)"), this, SLOT("setVariableWidth(boolean)") );
v.addWidget( cb );
- cb = new QCheckBox( "Extended-Selection", this );
+ cb = new TQCheckBox( "Extended-Selection", this );
connect( cb, SIGNAL("toggled(boolean)"), this, SLOT("setMultiSelection(boolean)") );
v.addWidget( cb );
- QPushButton pb = new QPushButton( "Sort ascending", this );
+ TQPushButton pb = new TQPushButton( "Sort ascending", this );
connect( pb, SIGNAL(" clicked()"), this, SLOT(" sortAscending()") );
v.addWidget( pb );
- pb = new QPushButton( "Sort descending", this );
+ pb = new TQPushButton( "Sort descending", this );
connect( pb, SIGNAL(" clicked()"), this, SLOT(" sortDescending()") );
v.addWidget( pb );
@@ -149,7 +149,7 @@ void setRowsByHeight()
{
columns.setEnabled( false );
rows.setEnabled( false );
- l.setRowMode( QListBox.FitToHeight );
+ l.setRowMode( TQListBox.FitToHeight );
}
@@ -157,7 +157,7 @@ void setColsByWidth()
{
columns.setEnabled( false );
rows.setEnabled( false );
- l.setColumnMode( QListBox.FitToWidth );
+ l.setColumnMode( TQListBox.FitToWidth );
}
@@ -175,7 +175,7 @@ void setVariableHeight( boolean b )
void setMultiSelection( boolean b )
{
l.clearSelection();
- l.setSelectionMode( b ? QListBox.Extended : QListBox.Single );
+ l.setSelectionMode( b ? TQListBox.Extended : TQListBox.Single );
}
void sortAscending()
diff --git a/qtjava/javalib/examples/listbox/Main.java b/qtjava/javalib/examples/listbox/Main.java
index ff21a95f..4b836bb1 100644
--- a/qtjava/javalib/examples/listbox/Main.java
+++ b/qtjava/javalib/examples/listbox/Main.java
@@ -13,7 +13,7 @@ public class Main {
public static void main(String[] args)
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
ListBoxDemo t = new ListBoxDemo();
t.setCaption( "Qt Example - Listbox" );