[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KAudioPlayer::play()
From:       Arnold Krille <kde () arnoldarts ! de>
Date:       2003-03-26 23:32:51
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


On Wednesday 26 March 2003 14:18, Joerg Anders wrote:
> On Wed, 26 Mar 2003, Arnold Krille wrote:
> > Will test it a soon as my kde3.1.1 is compiled...

Jippie, kde3.1.1 completed!

> I think here is a bug because I completed:
> (again see http://rnvs.informatik.tu-chemnitz.de/kartstest/servertest.html)

Now I know the main fault. You need a dispatcher running if you want to access 
aRtsreferences...

Append a modified version. I tested it with kde3.1.1...

Arnold

["Makefile" (text/x-makefile)]

#QTDIR = /usr/qt/3
#KDEDIR = /usr/kde/3.1
OBJS = servertest.o
QTINCLUDES = $(QTDIR)/include
KDEINCLUDES = $(KDEDIR)/include
QTLIBS = -L$(QTDIR)/lib -lqt-mt
KDELIBS =  -L$(KDEDIR)/lib -lkdeui -lartskde -lkdecore
#KDELIBS =  -L$(KDEDIR)/lib -lkdeui -lartskde -lkdecore -lartsflow -lartsflow_idl \
-lsoundserver_idl -lmcop

DEBUGFLAG = -g

MOC = $(QTDIR)/bin/moc
CXXFLAGS = $(DEBUGFLAG) -I $(KDEINCLUDES) -I$(QTINCLUDES)

servertest: $(OBJS)
	$(CXX) -o servertest $(OBJS) $(KDELIBS) $(QTLIBS)


clear: clean
	rm -f servertest

clean:
	rm -f $(OBJS) core


["servertest.cpp" (text/x-c++src)]

#include <kapplication.h>
#include <kcmdlineargs.h>
#include <kaboutdata.h>
#include <qdialog.h>
#include <arts/soundserver.h>
#include <arts/kartsserver.h>
#include <arts/kartsdispatcher.h>

#include <kdebug.h>

class MyDialog : public QDialog {
	public: 
		MyDialog() : QDialog() {
			setGeometry(10, 10, 200, 200);
		}
	protected:
		bool isSuspended() {
			KArtsServer *server = new KArtsServer();
			KArtsDispatcher *dispatcher = new KArtsDispatcher( server );
			bool suspend;
			if( server->server().secondsUntilSuspend() == 0) suspend=true;
			else suspend = false;
			delete server;
			return suspend;
		}

		virtual void mousePressEvent ( QMouseEvent * e ) {
			if ( isSuspended() ) kdDebug()<<"Server is suspended"<<endl;
				else kdDebug()<<"Server is not suspended"<<endl;
		}
};


static KCmdLineOptions options[] = {
 { 0,0,0 }
};

int main( int argc, char **argv )
{
    KAboutData *about = new KAboutData
		("servertest", "servertest", "0.1.0", " a server test", KAboutData::License_GPL, 0, 0,
		 "http://www.kde.org", 
		 "ja@informatik.tu-chemnitz,de");
	about->addAuthor
		("Joerg Anders", "Main author and maintainer", "ja@informatik.tu-chemnitz,de");
	about->addAuthor
		( "Arnold Krille", "Make it run...", "arnold@arnoldarts.de" );
    KCmdLineArgs::init(argc, argv, about);
    KCmdLineArgs::addCmdLineOptions( options );

    KApplication a( argc, argv );
    MyDialog *d = new MyDialog();
    a.setMainWidget( d );
    d->show();
    return a.exec();
}

[Attachment #7 (application/pgp-signature)]
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic