Index: trunk/examples/examples.pro
===================================================================
--- trunk/examples/examples.pro	(revision 20)
+++ trunk/examples/examples.pro	(revision 50)
@@ -78,5 +78,5 @@
 
 x11:nas:SUBDIRS += 	    sound
-mac|win32:SUBDIRS +=	    sound
+mac|win32|os2:SUBDIRS +=	    sound
 
 iconview:SUBDIRS += fileiconview \
@@ -134,5 +134,4 @@
 		helpdemo \
 		movies \
-		process \
 		qdir \
 		tetrix \
Index: trunk/examples/process/README
===================================================================
--- trunk/examples/process/README	(revision 50)
+++ trunk/examples/process/README	(revision 50)
@@ -0,0 +1,8 @@
+The process example is not particularly useful, but it shows a typical
+use of the class QProcess.
+
+This example starts the uic command with some options and displays the
+output of the uic call. The uic is a command line tool that is used if you
+create dialogs with the Qt Designer. If you installed Qt correctly, it
+should be available on your system. It outputs the generated code to
+standard output by default.
Index: trunk/examples/process/process.cpp
===================================================================
--- trunk/examples/process/process.cpp	(revision 50)
+++ trunk/examples/process/process.cpp	(revision 50)
@@ -0,0 +1,95 @@
+/****************************************************************************
+** $Id$
+**
+** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
+**
+** This file is part of an example program for Qt.  This example
+** program may be used, distributed and modified without limitation.
+**
+*****************************************************************************/
+
+#include <qobject.h>
+#include <qprocess.h>
+#include <qvbox.h>
+#include <qtextview.h>
+#include <qpushbutton.h>
+#include <qapplication.h>
+#include <qmessagebox.h>
+
+#include <stdlib.h>
+
+class UicManager : public QVBox
+{
+    Q_OBJECT
+
+public:
+    UicManager();
+    ~UicManager() {}
+
+public slots:
+    void readFromStdout();
+    void scrollToTop();
+
+private:
+    QProcess *proc;
+    QTextView *output;
+    QPushButton *quitButton;
+};
+
+UicManager::UicManager()
+{
+    // Layout
+    output = new QTextView( this );
+    quitButton = new QPushButton( tr("Quit"), this );
+    connect( quitButton, SIGNAL(clicked()),
+	    qApp, SLOT(quit()) );
+    resize( 500, 500 );
+
+    // QProcess related code
+    proc = new QProcess( this );
+
+    // Set up the command and arguments.
+    // On the command line you would do:
+    //   uic -tr i18n "small_dialog.ui"
+    proc->addArgument( "uic" );
+    proc->addArgument( "-tr" );
+    proc->addArgument( "i18n" );
+    proc->addArgument( "small_dialog.ui" );
+
+    connect( proc, SIGNAL(readyReadStdout()),
+	    this, SLOT(readFromStdout()) );
+    connect( proc, SIGNAL(processExited()),
+	    this, SLOT(scrollToTop()) );
+
+    if ( !proc->start() ) {
+	// error handling
+	QMessageBox::critical( 0,
+		tr("Fatal error"),
+		tr("Could not start the uic command."),
+		tr("Quit") );
+	exit( -1 );
+    }
+}
+
+void UicManager::readFromStdout()
+{
+    // Read and process the data.
+    // Bear in mind that the data might be output in chunks.
+    output->append( proc->readStdout() );
+}
+
+void UicManager::scrollToTop()
+{
+    output->setContentsPos( 0, 0 );
+}
+
+int main( int argc, char **argv )
+{
+    QApplication a( argc, argv );
+    UicManager manager;
+    a.setMainWidget( &manager );
+    manager.show();
+    return a.exec();
+}
+
+#include "process.moc"
Index: trunk/examples/process/process.pro
===================================================================
--- trunk/examples/process/process.pro	(revision 50)
+++ trunk/examples/process/process.pro	(revision 50)
@@ -0,0 +1,11 @@
+TEMPLATE	= app
+TARGET		= process
+
+CONFIG		+= qt warn_on release
+DEPENDPATH	= ../../include
+
+REQUIRES	= large-config
+
+HEADERS		=
+SOURCES		= process.cpp
+INTERFACES	=
Index: trunk/examples/process/small_dialog.ui
===================================================================
--- trunk/examples/process/small_dialog.ui	(revision 50)
+++ trunk/examples/process/small_dialog.ui	(revision 50)
@@ -0,0 +1,197 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>SmallDialog</class>
+<widget class="QDialog">
+    <property name="name">
+        <cstring>SmallDialog</cstring>
+    </property>
+    <property name="geometry">
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>361</width>
+            <height>283</height>
+        </rect>
+    </property>
+    <property name="caption">
+        <string>Small Dialog</string>
+    </property>
+    <property name="sizeGripEnabled">
+        <bool>true</bool>
+    </property>
+    <grid>
+        <property name="name">
+            <cstring>unnamed</cstring>
+        </property>
+        <property name="margin">
+            <number>11</number>
+        </property>
+        <property name="spacing">
+            <number>6</number>
+        </property>
+        <widget class="QLayoutWidget" row="2" column="0">
+            <property name="name">
+                <cstring>Layout1</cstring>
+            </property>
+            <hbox>
+                <property name="name">
+                    <cstring>unnamed</cstring>
+                </property>
+                <property name="margin">
+                    <number>0</number>
+                </property>
+                <property name="spacing">
+                    <number>6</number>
+                </property>
+                <widget class="QPushButton">
+                    <property name="name">
+                        <cstring>buttonHelp</cstring>
+                    </property>
+                    <property name="text">
+                        <string>&amp;Help</string>
+                    </property>
+                    <property name="autoDefault">
+                        <bool>true</bool>
+                    </property>
+                </widget>
+                <spacer>
+                    <property name="name" stdset="0">
+                        <cstring>Horizontal Spacing2</cstring>
+                    </property>
+                    <property name="orientation">
+                        <enum>Horizontal</enum>
+                    </property>
+                    <property name="sizeType">
+                        <enum>Expanding</enum>
+                    </property>
+                    <property name="sizeHint">
+                        <size>
+                            <width>20</width>
+                            <height>20</height>
+                        </size>
+                    </property>
+                </spacer>
+                <widget class="QPushButton">
+                    <property name="name">
+                        <cstring>buttonOk</cstring>
+                    </property>
+                    <property name="text">
+                        <string>OK</string>
+                    </property>
+                    <property name="accel">
+                        <number>0</number>
+                    </property>
+                    <property name="autoDefault">
+                        <bool>true</bool>
+                    </property>
+                    <property name="default">
+                        <bool>true</bool>
+                    </property>
+                </widget>
+                <widget class="QPushButton">
+                    <property name="name">
+                        <cstring>buttonCancel</cstring>
+                    </property>
+                    <property name="text">
+                        <string>Cancel</string>
+                    </property>
+                    <property name="accel">
+                        <number>0</number>
+                    </property>
+                    <property name="autoDefault">
+                        <bool>true</bool>
+                    </property>
+                </widget>
+            </hbox>
+        </widget>
+        <widget class="QLabel" row="0" column="0">
+            <property name="name">
+                <cstring>TextLabel1</cstring>
+            </property>
+            <property name="sizePolicy">
+                <sizepolicy>
+                    <hsizetype>1</hsizetype>
+                    <vsizetype>0</vsizetype>
+                </sizepolicy>
+            </property>
+            <property name="text">
+                <string>This is just a useless dialog.</string>
+            </property>
+        </widget>
+        <widget class="QFrame" row="1" column="0">
+            <property name="name">
+                <cstring>Frame4</cstring>
+            </property>
+            <property name="frameShape">
+                <enum>StyledPanel</enum>
+            </property>
+            <property name="frameShadow">
+                <enum>Raised</enum>
+            </property>
+            <grid>
+                <property name="name">
+                    <cstring>unnamed</cstring>
+                </property>
+                <property name="margin">
+                    <number>11</number>
+                </property>
+                <property name="spacing">
+                    <number>6</number>
+                </property>
+                <widget class="QDial" row="0" column="1">
+                    <property name="name">
+                        <cstring>Dial1</cstring>
+                    </property>
+                </widget>
+                <widget class="QLCDNumber" row="1" column="1">
+                    <property name="name">
+                        <cstring>LCDNumber1</cstring>
+                    </property>
+                    <property name="numDigits">
+                        <number>2</number>
+                    </property>
+                </widget>
+                <widget class="QSlider" row="0" column="0" rowspan="2" colspan="1">
+                    <property name="name">
+                        <cstring>Slider1</cstring>
+                    </property>
+                    <property name="orientation">
+                        <enum>Vertical</enum>
+                    </property>
+                </widget>
+            </grid>
+        </widget>
+    </grid>
+</widget>
+<connections>
+    <connection>
+        <sender>buttonOk</sender>
+        <signal>clicked()</signal>
+        <receiver>SmallDialog</receiver>
+        <slot>accept()</slot>
+    </connection>
+    <connection>
+        <sender>buttonCancel</sender>
+        <signal>clicked()</signal>
+        <receiver>SmallDialog</receiver>
+        <slot>reject()</slot>
+    </connection>
+    <connection>
+        <sender>Slider1</sender>
+        <signal>valueChanged(int)</signal>
+        <receiver>LCDNumber1</receiver>
+        <slot>display(int)</slot>
+    </connection>
+    <connection>
+        <sender>Slider1</sender>
+        <signal>valueChanged(int)</signal>
+        <receiver>Dial1</receiver>
+        <slot>setValue(int)</slot>
+    </connection>
+    <connection>
+        <sender>Dial1</sender>
+        <signal>valueChanged(int)</signal>
+        <receiver>Slider1</receiver>
+        <slot>setValue(int)</slot>
+    </connection>
+</connections>
+</UI>
Index: trunk/examples/sound/sound.cpp
===================================================================
--- trunk/examples/sound/sound.cpp	(revision 50)
+++ trunk/examples/sound/sound.cpp	(revision 50)
@@ -0,0 +1,103 @@
+/****************************************************************************
+** $Id$
+**
+** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
+**
+** This file is part of an example program for Qt.  This example
+** program may be used, distributed and modified without limitation.
+**
+*****************************************************************************/
+//
+// Very simple example of QSound::play(filename)
+//
+// 99% of this program is just boilerplate Qt code to put up a nice
+// window so you think something special is happening.
+//
+
+#include "sound.h"
+#include <qapplication.h>
+#include <qmessagebox.h>
+#include <qmenubar.h>
+
+SoundPlayer::SoundPlayer() :
+    QMainWindow(),
+    bucket3("sounds/3.wav"),
+    bucket4("sounds/4.wav")
+{
+    if (!QSound::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",
+		"<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:"
+		"<pre>\n"
+		" &nbsp;\n"
+		"   ftp.ncd.com:/pub/ncd/technology/src/nas\n"
+		"   ftp.x.org:/contrib/audio/nas\n"
+		"</pre>"
+		"<p>Release 1.2 of NAS is also included with the X11R6"
+		"contrib distribution."
+		"<p>After installing NAS, you will then need to reconfigure Qt with NAS sound support");
+    }
+
+    QPopupMenu *file = new QPopupMenu;
+    file->insertItem("Play &1",  this, SLOT(doPlay1()), CTRL+Key_1);
+    file->insertItem("Play &2",  this, SLOT(doPlay2()), CTRL+Key_2);
+    file->insertItem("Play from bucket &3",  this, SLOT(doPlay3()), CTRL+Key_3);
+    file->insertItem("Play from bucket &4",  this, SLOT(doPlay4()), CTRL+Key_4);
+    file->insertSeparator();
+    file->insertItem("Play 3 and 4 together",  this, SLOT(doPlay34()));
+    file->insertItem("Play all together",  this, SLOT(doPlay1234()));
+    file->insertSeparator();
+    file->insertItem("E&xit",  qApp, SLOT(quit()));
+    menuBar()->insertItem("&File", file);
+}
+
+void SoundPlayer::doPlay1()
+{
+    QSound::play("sounds/1.wav");
+}
+
+void SoundPlayer::doPlay2()
+{
+    QSound::play("sounds/2.wav");
+}
+
+void SoundPlayer::doPlay3()
+{
+    bucket3.play();
+}
+
+void SoundPlayer::doPlay4()
+{
+    bucket4.play();
+}
+
+void SoundPlayer::doPlay34()
+{
+    // Some sound platforms will only play one sound at a time
+    bucket3.play();
+    bucket4.play();
+}
+
+void SoundPlayer::doPlay1234()
+{
+    // Some sound platforms will only play one sound at a time
+    QSound::play("sounds/1.wav");
+    QSound::play("sounds/2.wav");
+    bucket3.play();
+    bucket4.play();
+}
+
+int main(int argc, char** argv)
+{
+    QApplication app(argc,argv);
+    SoundPlayer sp;
+    app.setMainWidget(&sp);
+    sp.setCaption("Qt Example - Sounds");
+    sp.show();
+    return app.exec();
+}
+
Index: trunk/examples/sound/sound.h
===================================================================
--- trunk/examples/sound/sound.h	(revision 50)
+++ trunk/examples/sound/sound.h	(revision 50)
@@ -0,0 +1,34 @@
+/****************************************************************************
+** $Id$
+**
+** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
+**
+** This file is part of an example program for Qt.  This example
+** program may be used, distributed and modified without limitation.
+**
+*****************************************************************************/
+#ifndef PLAY_H
+#define PLAY_H
+
+#include "qsound.h"
+#include <qmainwindow.h>
+
+class SoundPlayer : public QMainWindow {
+    Q_OBJECT
+public:
+    SoundPlayer();
+
+public slots:
+    void doPlay1();
+    void doPlay2();
+    void doPlay3();
+    void doPlay4();
+    void doPlay34();
+    void doPlay1234();
+
+private:
+    QSound bucket3;
+    QSound bucket4;
+};
+
+#endif
Index: trunk/examples/sound/sound.pro
===================================================================
--- trunk/examples/sound/sound.pro	(revision 50)
+++ trunk/examples/sound/sound.pro	(revision 50)
@@ -0,0 +1,11 @@
+TEMPLATE	= app
+TARGET		= sound
+
+CONFIG		+= qt warn_on release
+DEPENDPATH	= ../../include
+
+REQUIRES	= full-config
+x11:REQUIRES	= nas
+
+HEADERS		= sound.h
+SOURCES		= sound.cpp
