summaryrefslogtreecommitdiffstats
path: root/qtjava/javalib/examples/sound
diff options
context:
space:
mode:
Diffstat (limited to 'qtjava/javalib/examples/sound')
-rw-r--r--qtjava/javalib/examples/sound/SoundPlayer.java36
1 files changed, 18 insertions, 18 deletions
diff --git a/qtjava/javalib/examples/sound/SoundPlayer.java b/qtjava/javalib/examples/sound/SoundPlayer.java
index ad6cf7a7..81b7a932 100644
--- a/qtjava/javalib/examples/sound/SoundPlayer.java
+++ b/qtjava/javalib/examples/sound/SoundPlayer.java
@@ -11,13 +11,13 @@
import org.kde.qt.*;
-class SoundPlayer extends QMainWindow {
+class SoundPlayer extends TQMainWindow {
-private QSound bucket3;
-private QSound bucket4;
+private TQSound bucket3;
+private TQSound bucket4;
//
-// Very simple example of QSound.play(filename)
+// Very simple example of TQSound.play(filename)
//
// 99% of this program is just boilerplate Qt code to put up a nice
// window so you think something special is happening.
@@ -27,14 +27,14 @@ private QSound bucket4;
SoundPlayer()
{
super();
- bucket3 = new QSound("sounds/3.wav");
- bucket4 = new QSound("sounds/4.wav");
+ bucket3 = new TQSound("sounds/3.wav");
+ bucket4 = new TQSound("sounds/4.wav");
- if (!QSound.isAvailable()) {
+ if (!TQSound.isAvailable()) {
// Bail out. Programs in which sound is not critical
// could just silently (hehe) ignore the lack of a server.
//
- QMessageBox.warning(this,"No Sound",
+ TQMessageBox.warning(this,"No Sound",
"<p><b>Sorry, you are not running the Network Audio System.</b>"
+ "<p>If you have the `au' command, run it in the background before this program. "
+ "The latest release of the Network Audio System can be obtained from:"
@@ -48,11 +48,11 @@ SoundPlayer()
+ "<p>After installing NAS, you will then need to reconfigure Qt with NAS sound support");
}
- QPopupMenu file = new QPopupMenu(this);
- file.insertItem("Play &1", this, SLOT("doPlay1()"), new QKeySequence(CTRL+Key_1));
- file.insertItem("Play &2", this, SLOT("doPlay2()"), new QKeySequence(CTRL+Key_2));
- file.insertItem("Play from bucket &3", this, SLOT("doPlay3()"), new QKeySequence(CTRL+Key_3));
- file.insertItem("Play from bucket &4", this, SLOT("doPlay4()"), new QKeySequence(CTRL+Key_4));
+ TQPopupMenu file = new TQPopupMenu(this);
+ file.insertItem("Play &1", this, SLOT("doPlay1()"), new TQKeySequence(CTRL+Key_1));
+ file.insertItem("Play &2", this, SLOT("doPlay2()"), new TQKeySequence(CTRL+Key_2));
+ file.insertItem("Play from bucket &3", this, SLOT("doPlay3()"), new TQKeySequence(CTRL+Key_3));
+ file.insertItem("Play from bucket &4", this, SLOT("doPlay4()"), new TQKeySequence(CTRL+Key_4));
file.insertSeparator();
file.insertItem("Play 3 and 4 together", this, SLOT("doPlay34()"));
file.insertItem("Play all together", this, SLOT("doPlay1234()"));
@@ -63,12 +63,12 @@ SoundPlayer()
void doPlay1()
{
- QSound.play("sounds/1.wav");
+ TQSound.play("sounds/1.wav");
}
void doPlay2()
{
- QSound.play("sounds/2.wav");
+ TQSound.play("sounds/2.wav");
}
void doPlay3()
@@ -91,15 +91,15 @@ void doPlay34()
void doPlay1234()
{
// Some sound platforms will only play one sound at a time
- QSound.play("sounds/1.wav");
- QSound.play("sounds/2.wav");
+ TQSound.play("sounds/1.wav");
+ TQSound.play("sounds/2.wav");
bucket3.play();
bucket4.play();
}
public static void main(String[] args)
{
- QApplication app = new QApplication(args);
+ TQApplication app = new TQApplication(args);
SoundPlayer sp = new SoundPlayer();
app.setMainWidget(sp);
sp.setCaption("Qt Example - Sounds");