Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

VideoRingtone Class Reference
[QtTelephonyModule]

The VideoRingtone class provides an interface to the Qt Extended media system to play the video tones for incoming calls. More...

    #include <VideoRingtone>

Inherits QObject.

Public Functions

Public Slots

Signals

Additional Inherited Members


Detailed Description

The VideoRingtone class provides an interface to the Qt Extended media system to play the video tones for incoming calls.

The VideoRingtone acts as a bridge between RingControl and other part of the system that is interested in displaying the video widget, for example, CallScreen.

The RingControl class communicates with this class via messages on the QPE/VideoRingtone QCop channel. The following messages are supported.

MessageDescription
playVideo(QString)This message is forwarded to playVideo().
stopVideo()This message is forwarded to stopVideo().
videoRingtoneFailed()This message is equivalent to the videoRingtoneFailed() signal.

RingControl calls playVideo() when the video ringtone is preferred. The CallScreen should be listening to the videoWidgetReady() signal to retreive the video widget object by calling videoWidget().

The signal videoRingtoneStopped() is emitted when the tone finished playing.

    CallScreen::CallScreen() {
        ...
        VideoRingtone *vrt = qtopiaTask<VideoRingtone>();
        if ( vrt )
            connect( vrt, SIGNAL(videoWidgetReady()),
                this, SLOT(showVideo()) );
        ...
    }

    CallScreen::showVideo() {
        VideoRingtone *vrt = qtopiaTask<VideoRingtone>();
        if (!vrt)
            return;
        QWidget *widget = vrt->videoWidget();

        // set the new parent to manage resource
        widget->setParent( this );

        layout()->addWidget( widget );
    }

This class is a Qt Extended server task and is part of the Qt Extended server. It cannot be used by other Qt Extended applications.

See also RingControl.


Member Function Documentation

VideoRingtone::VideoRingtone ( QObject * parent = 0 )

Creates a new VideoRingtone instance with the specified parent.

VideoRingtone::~VideoRingtone ()

Destroys the VideoRingtone object.

void VideoRingtone::playVideo ( const QString & fileName )   [slot]

Attempts to play the video fileName.

void VideoRingtone::stopVideo ()   [slot]

Stops the media content.

void VideoRingtone::videoRingtoneFailed ()   [signal]

This signal is emitted when the media system fails to play the video tone.

void VideoRingtone::videoRingtoneStopped ()   [signal]

This signal is emitted when the video tone is stopped.

QWidget * VideoRingtone::videoWidget ()

Returns the video widget instance.

void VideoRingtone::videoWidgetReady ()   [signal]

This signal is emitted when the video widget is created and ready to be used.


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3