summaryrefslogtreecommitdiffstats
path: root/qtjava/javalib/examples/mdi/ApplicationWindow.java
diff options
context:
space:
mode:
Diffstat (limited to 'qtjava/javalib/examples/mdi/ApplicationWindow.java')
-rw-r--r--qtjava/javalib/examples/mdi/ApplicationWindow.java90
1 files changed, 45 insertions, 45 deletions
diff --git a/qtjava/javalib/examples/mdi/ApplicationWindow.java b/qtjava/javalib/examples/mdi/ApplicationWindow.java
index e74e6233..a2d3cbbc 100644
--- a/qtjava/javalib/examples/mdi/ApplicationWindow.java
+++ b/qtjava/javalib/examples/mdi/ApplicationWindow.java
@@ -11,16 +11,16 @@
import org.kde.qt.*;
import java.util.ArrayList;
-class ApplicationWindow extends QMainWindow
+class ApplicationWindow extends TQMainWindow
{
-private QPrinter printer;
-private QWorkspace ws;
+private TQPrinter printer;
+private TQWorkspace ws;
/* Keep a copy of ws.windowList(), so that the MDIWindow
widgets in it won't get garbage collected */
private ArrayList windows;
-private QToolBar fileTools;
-private QPopupMenu windowsMenu;
+private TQToolBar fileTools;
+private TQPopupMenu windowsMenu;
@@ -110,75 +110,75 @@ ApplicationWindow()
super( null, "example application main window", WDestructiveClose );
int id;
- QPixmap openIcon, saveIcon;
+ TQPixmap openIcon, saveIcon;
- fileTools = new QToolBar( this, "file operations" );
+ fileTools = new TQToolBar( this, "file operations" );
addToolBar( fileTools, tr( "File Operations" ), DockTop, true );
- openIcon = new QPixmap( fileopen );
- QToolButton fileOpen
- = new QToolButton( new QIconSet(openIcon), "Open File", "",
+ openIcon = new TQPixmap( fileopen );
+ TQToolButton fileOpen
+ = new TQToolButton( new TQIconSet(openIcon), "Open File", "",
this, SLOT("load()"), fileTools, "open file" );
- saveIcon = new QPixmap( filesave );
- QToolButton fileSave
- = new QToolButton( new QIconSet(saveIcon), "Save File", "",
+ saveIcon = new TQPixmap( filesave );
+ TQToolButton fileSave
+ = new TQToolButton( new TQIconSet(saveIcon), "Save File", "",
this, SLOT("save()"), fileTools, "save file" );
- printer = new QPrinter();
- QPixmap printIcon;
+ printer = new TQPrinter();
+ TQPixmap printIcon;
- printIcon = new QPixmap( fileprint );
- QToolButton filePrint
- = new QToolButton( new QIconSet(printIcon), "Print File", "",
+ printIcon = new TQPixmap( fileprint );
+ TQToolButton filePrint
+ = new TQToolButton( new TQIconSet(printIcon), "Print File", "",
this, SLOT("print()"), fileTools, "print file" );
- QWhatsThis.add( filePrint, filePrintText );
+ TQWhatsThis.add( filePrint, filePrintText );
- QWhatsThis.whatsThisButton( fileTools );
+ TQWhatsThis.whatsThisButton( fileTools );
- QWhatsThis.add( fileOpen, fileOpenText );
- QWhatsThis.add( fileSave, fileSaveText );
+ TQWhatsThis.add( fileOpen, fileOpenText );
+ TQWhatsThis.add( fileSave, fileSaveText );
- QPopupMenu file = new QPopupMenu( this );
+ TQPopupMenu file = new TQPopupMenu( this );
menuBar().insertItem( "&File", file );
- file.insertItem( "&New", this, SLOT("newDoc()"), new QKeySequence(CTRL+Key_N) );
+ file.insertItem( "&New", this, SLOT("newDoc()"), new TQKeySequence(CTRL+Key_N) );
- id = file.insertItem( new QIconSet(openIcon), "&Open...",
- this, SLOT("load()"), new QKeySequence(CTRL+Key_O) );
+ id = file.insertItem( new TQIconSet(openIcon), "&Open...",
+ this, SLOT("load()"), new TQKeySequence(CTRL+Key_O) );
file.setWhatsThis( id, fileOpenText );
- id = file.insertItem( new QIconSet(saveIcon), "&Save",
- this, SLOT("save()"), new QKeySequence(CTRL+Key_S) );
+ id = file.insertItem( new TQIconSet(saveIcon), "&Save",
+ this, SLOT("save()"), new TQKeySequence(CTRL+Key_S) );
file.setWhatsThis( id, fileSaveText );
id = file.insertItem( "Save &As...", this, SLOT("saveAs()") );
file.setWhatsThis( id, fileSaveText );
file.insertSeparator();
- id = file.insertItem( new QIconSet(printIcon), "&Print...",
- this, SLOT("print()"), new QKeySequence(CTRL+Key_P) );
+ id = file.insertItem( new TQIconSet(printIcon), "&Print...",
+ this, SLOT("print()"), new TQKeySequence(CTRL+Key_P) );
file.setWhatsThis( id, filePrintText );
file.insertSeparator();
- file.insertItem( "&Close", this, SLOT("closeWindow()"), new QKeySequence(CTRL+Key_W) );
- file.insertItem( "&Quit", qApp(), SLOT(" closeAllWindows()"), new QKeySequence(CTRL+Key_Q) );
+ file.insertItem( "&Close", this, SLOT("closeWindow()"), new TQKeySequence(CTRL+Key_W) );
+ file.insertItem( "&Quit", qApp(), SLOT(" closeAllWindows()"), new TQKeySequence(CTRL+Key_Q) );
- windowsMenu = new QPopupMenu( this );
+ windowsMenu = new TQPopupMenu( this );
windowsMenu.setCheckable( true );
connect( windowsMenu, SIGNAL(" aboutToShow()"),
this, SLOT(" windowsMenuAboutToShow()") );
menuBar().insertItem( "&Windows", windowsMenu );
menuBar().insertSeparator();
- QPopupMenu help = new QPopupMenu( this );
+ TQPopupMenu help = new TQPopupMenu( this );
menuBar().insertItem( "&Help", help );
- help.insertItem( "&About", this, SLOT("about()"), new QKeySequence(Key_F1));
+ help.insertItem( "&About", this, SLOT("about()"), new TQKeySequence(Key_F1));
help.insertItem( "About &Qt", this, SLOT("aboutQt()"));
help.insertSeparator();
- help.insertItem( "What's &This", this, SLOT("whatsThis()"), new QKeySequence(SHIFT+Key_F1));
+ help.insertItem( "What's &This", this, SLOT("whatsThis()"), new TQKeySequence(SHIFT+Key_F1));
- QVBox vb = new QVBox( this );
- vb.setFrameStyle( QFrame.StyledPanel | QFrame.Sunken );
- ws = new QWorkspace( vb );
+ TQVBox vb = new TQVBox( this );
+ vb.setFrameStyle( TQFrame.StyledPanel | TQFrame.Sunken );
+ ws = new TQWorkspace( vb );
ws.setScrollBarsEnabled( true );
setCentralWidget( vb );
@@ -191,7 +191,7 @@ MDIWindow newDoc()
MDIWindow w = new MDIWindow( ws, null, WDestructiveClose );
connect( w, SIGNAL("message(String,int)"), statusBar(), SLOT("message(String,int)") );
w.setCaption("unnamed document");
- w.setIcon( new QPixmap("document.xpm") );
+ w.setIcon( new TQPixmap("document.xpm") );
// show the very first window in maximized mode
windows = ws.windowList();
if ( windows.size() == 0 )
@@ -203,7 +203,7 @@ MDIWindow newDoc()
void load()
{
- String fn = QFileDialog.getOpenFileName( "", "", this );
+ String fn = TQFileDialog.getOpenFileName( "", "", this );
if ( !fn.equals("") ) {
MDIWindow w = newDoc();
w.load( fn );
@@ -245,7 +245,7 @@ void closeWindow()
void about()
{
- QMessageBox.about( this, "Qt Application Example",
+ TQMessageBox.about( this, "Qt Application Example",
"This example demonstrates simple use of\n "
+ "Qt's Multiple Document Interface (MDI).");
}
@@ -253,7 +253,7 @@ void about()
void aboutQt()
{
- QMessageBox.aboutQt( this, "Qt Application Example" );
+ TQMessageBox.aboutQt( this, "Qt Application Example" );
}
@@ -269,7 +269,7 @@ void windowsMenuAboutToShow()
}
windowsMenu.insertSeparator();
for ( int i = 0; i < windows.size(); ++i ) {
- int id = windowsMenu.insertItem(((QWidget) windows.get(i)).caption(),
+ int id = windowsMenu.insertItem(((TQWidget) windows.get(i)).caption(),
this, SLOT(" windowsMenuActivated( int )") );
windowsMenu.setItemParameter( id, i );
windowsMenu.setItemChecked( id, ws.activeWindow() == windows.get(i) );
@@ -279,7 +279,7 @@ void windowsMenuAboutToShow()
void windowsMenuActivated( int id )
{
windows = ws.windowList();
- QWidget w = (QWidget) windows.get( id );
+ TQWidget w = (TQWidget) windows.get( id );
if ( w != null )
w.showNormal();
w.setFocus();