Source Code (Use browser search to find items of interest.)
Class Index
aktion'KXAnim (./kdemultimedia/aktion/kxanim.h:25)
class KXAnim : public QWidget
{
Q_OBJECT
public:
/**
* Constructor. The parent argumet is NOT optional.
*/
KXAnim(QWidget *parent, const char *name=0);
~KXAnim();
/**
* Use this method to tell the player the name of the file
* to play. The file will not start to play until you call the
* play() slot.
* You need to call stop() before you can set a new filename.
*
* After call this method, you should wait for an @ref #stopped signal.
* Just then, the information about the file will be available.
*
* Also check for @ref #getErrorNumber and @ref #getErrorString to know
* if there was some error.
*/
void setFile(QString file);
/**
* If val==true, the widget will resize by himself after the setFile()
* to fit to the size of the video. If val==false, the video size will
* be adjusted to fit to the widget size.
*
* The size of the widget is automatically updated by @ref setFile
* and @ref play. But if you need to know the effective size of the
* widget *before* you call play, you need to call @ref updateSize
* manually.
*
* Default is true
*/
void setAutoResize(bool val) { autoResize=val; };
/**
* Returns the auto-resize state (see @ref #setAutoResize ).
*/
bool getAutoResize() { return autoResize; };
/**
* Updates the widget size to fit video size (taking care of the
* scale factors that applies). See @ref setAutoResize .
*/
void updateSize();
/**
* If val==true, the video will loop forever.
*
* Default is true
*/
void setLoop(bool val) { loop=val; };
/**
* Returns the loop state ( see @ref #setLoop ).
*/
bool getLoop() { return loop; };
/**
* Returns the current video file name (or an empty string, if
* there's no video yet).
*/
QString getVideoFileName() { return fileName; };
/**
* Returns the video height (in pixels).
*/
int getVideoHeight() { return videoHeight; };
/**
* Returns the video height (in pixels).
*/
int getVideoWidth() { return videoWidth; };
/**
* Returns the video playback speed (in frames per second).
*/
float getVideoSpeed() { return videoSpeed; };
/**
* Returns the number of frames in the video.
*/
int getVideoFrames() { return videoFrames; };
/**
* Returns the string that describes the video codec.
*/
QString getVideoCodec() { return videoCodec; };
/**
* Returns the the error code number. You should check this
* number after a @ref #setFile . If the code is zero, the there were
* no errors. To get a string containing a description see @ref #getErrorCode .
*/
int getErrorCode() { return errorCode; };
/**
* Returns the string that describes the error during @ref #setFile .
*/
QString getErrorString() { return errorString; };
/**
* Returns true is the video is in play mode. Otherwise it reurns
* false.
*/
bool isPlaying() { return playing; };
/**
* Returns true is the video is active. Otherwise it reurns
* false. The widget is NOT Active only when it's stopped. Therefore,
* you can use this method to check if the video is REALLY stopped.
*/
bool isActive() { return active; };
/**
* This method reset all the configuration parameters to their
* default values.
*/
void resetXAnimDefaults();
/* ================== SOUND ====================== */
/**
* If val==true, enables sound output.
*
* Default is true
*/
void setAudio(bool val) { audio=val; };
/**
* If val==true, allows xanim skip video frames for audio sync.
*
* Default is true
*/
void setAudioSync(bool val) { audioSync=val; };
/**
* Sets the initial audio volume.
*
* Default is 40
*/
void setInitialVolume(int val) { audioInitialVolume=val; };
/* ================== COLOR ====================== */
/**
* See @ref setColorMapping .
*/
enum colorMap { static332, lookupTable, grayScale, none };
/**
* Tells KXAnim wich type of color mappint to use for non truecolor
* displays.
*
* If val==KXAnim::static322, xanim will convert truecolor anims
* to static 322.
*
* If val==KXAnim::lookupTable, xanim will sample the color of
* truecolor animations ahead of time and forms a color lookup table.
*
* If val==KXAnim::grayScale, xanim will convert TrueColor
* animations to gray scale.
*
* Those three option are ignored for TrueColor and DirectColor
* displays.
*
* if val==KXAnim::none, xanim will use the default color mapping.
*
* Default is KXAnim::none
*/
void setColorMapping(colorMap val) { colorMapping=val; };
/**
* This sets the number of frames ahead to use for the look up table
* when using KXAnim::lookupTable in @ref #setColorMapping .
*
* Default is 5
*/
void setColorAhead(int val) { colorAhead=val; };
/* ================== GAMMA ====================== */
/**
* Set gamma of display. Gamma's greater than 1.0 typically brighten
* the animation.
*
* Default is 1.0
*/
void setGammaDisplay(float val) { gammaDisplay=val; };
/* ================== SCALING ====================== */
/**
* If val==true, the video size can be changed "on the fly".
*
* Default is true
*/
void setResizing(bool val) { resizing=val; };
/**
* Scale the size of anim by "val" before displaying.
*
* Default is 1.0 (no scaling)
*/
void setScaleFactor(float val) { scaleFactor=val; };
/**
* Scale the horizontal size of anim by "val" before displaying.
*
* Default is 1.0 (no scaling)
*/
void setScaleHFactor(float val) { scaleHFactor=val; };
/**
* Scale the vertical size of anim by "val" before displaying.
*
* Default is 1.0 (no scaling)
*/
void setScaleVFactor(float val) { scaleVFactor=val; };
/**
* Scale the animation to have width "val" before displaying.
*
* Default is 0 (no scaling)
*/
void setScaleWidth(int val) { scaleWidth=val; };
/**
* Scale the animation to have height "val" before displaying.
*
* Default is 0 (no scaling)
*/
void setScaleHeight(int val) { scaleHeight=val; };
/**
* Copy display scaling factors to buffering scaling factors.
*
* Default is false.
*/
void setScaleDisplayToBuffer(bool val) { scaleToBuffer=val; };
/**
* Scale the size of anim by "val" before buffering it.
*
* Default is 1.0 (no scaling)
*/
void setScaleFactorB(float val) { scaleFactorB=val; };
/**
* Scale the horizontal size of anim by "val" before buffering it.
*
* Default is 1.0 (no scaling)
*/
void setScaleHFactorB(float val) { scaleHFactorB=val; };
/**
* Scale the vertical size of anim by "val" before buffering it.
*
* Default is 1.0 (no scaling)
*/
void setScaleVFactorB(float val) { scaleVFactorB=val; };
/**
* Scale the animation to have width "val" before buffering it.
*
* Default is 0 (no scaling)
*/
void setScaleWidthB(int val) { scaleWidthB=val; };
/**
* Scale the animation to have height "val" before buffering it.
*
* Default is 0 (no scaling)
*/
void setScaleHeightB(int val) { scaleHeightB=val; };
/**
* Copy buffering scaling factors to display scaling factors.
*
* Default is false.
*/
void setScaleBufferToDisplay(bool val) { scaleToDisplay=val; };
/* ================== OTHERS ====================== */
/**
* 0: KXAnim will load the entire video into memory.
*
* 1: KXAnim will load and decompress the animation
* entirely into memory before displaying.
*
* 2: KXAnim will read each sector only when needed
*
* Default is 2.
*/
void setLoading(int val) { loading=val; };
/**
* If val==true, KXAnim will use X11 shared memory (this is
* mutually exclusive with @ref setPreload .
*
* Default is false.
*/
void setX11Shared(bool val) { x11Shared=val; };
/**
* If val==true, KXAnim will use X11 Buffering (if present) to
* smooth animations by double-buffering.
*
* Default is true.
*/
void setMultiBuffer(bool val) { multiBuffer=val; };
/**
* If val==true, KXAnim will use Pixmap instead of Image
* in X11shared. This option has no effect if the animation
* is buffered.
*
* Default is false.
*/
void setUsePixmap(bool val) { usePixmap=val; };
/**
* Select the best "X11 Visual of Class..." when displaying the
* animation. val can be anyone of the following strings and is
* case insensitive:
*
* default
* staticgray
* grayscale
* staticcolor
* pseudocolor
* truecolor
* directcolor
*
* Default is "default".
*/
void setX11VisualClass( const char *val) { x11VisualClass=val; };
/**
* This will pause XAnim at frame "val". val=-1 disables this
* option.
*
* Default is -1 (no pause).
*/
void setPauseAt(int val) { pauseAt=val; };
/**
* Use this method to pass any extra parametrs you want to
* xanim (separated by spaces).
*/
void setExtraParameters(const char *val) { extras=val; };
/**
* Use this method to set the executable name for xanim.
* Dafault is "xanim", but you can change it, for instance,
* if you don't have xanim in the path.
*/
void setExecutable(const char *val) { executable=val; };
signals:
/**
* This signal is emitted after a call to the stop() slot, and
* means that the player has REALLY stop the playing (it is: that
* xanim is inactive) (see @ref #stop ).
*/
void stopped();
/**
* This signal is emitted when the user clicks into the widget.
*/
void mouseClick( QMouseEvent *);
public slots:
/**
* Start playing the video.
*/
void play();
/**
* Pauses the video playing (xanim is still runnig).
*/
void pause();
/**
* Stops the video and exit xanim (don't worry about it, it's
* transparent for the class user).
*
* Note: calling this slot doesn't mean that the video will stop
* inmediatly. Use the @ref #stopped signal to know exactly when
* the player is set to the inactive mode (see @ref #isActive ).
*/
void stop();
/**
* Single step forward one frame. Pauses the video playing.
*/
void stepForward();
/**
* Single step back one frame. Pauses the video playing.
*/
void stepBack();
/**
* Single step forward one frame staying with anim.
* Pauses the video playing.
*/
void stepForwardWA();
/**
* Single step back one frame staying with anim.
* Pauses the video playing.
*/
void stepBackWA();
/**
* Toggle sound between ON/OFF.
*/
void toggleSound();
/**
* Increment volume by 1.
*/
void volumeIncrement();
/**
* Decrement volume by 1.
*/
void volumeDecrement();
/**
* Setup volume where v is a number from 0 to 100.
*/
void setVolume(int v);
/**
* Increase animation playback speed.
*/
void faster();
/**
* Decrease animation playback speed.
*/
void slower();
/**
* Reset animation playback speed to original values.
*/
void resetSpeed();
protected:
/**
* Don't use it!. This is internally used for the communication
* with xanim.
*/
void changeProperty( const char * c);
virtual void closeEvent( QCloseEvent *);
virtual void mousePressEvent( QMouseEvent *);
private:
bool playing;
bool active;
bool autoResize;
bool loop;
QString fileName;
QString outBuff;
QString videoCodec;
int errorCode;
QString errorString;
QString temp;
Window window;
Display *dpy;
unsigned long window_atom;
KProcess proc;
void setDefaults();
int videoHeight;
int videoWidth;
float videoSpeed;
int videoFrames;
int getVideoInfo();
void setErrorString( int, QString );
void parseParameters();
/* =========== SOUND ============ */
bool audio;
bool audioSync;
int audioInitialVolume;
/* =========== COLOR ============ */
colorMap colorMapping;
bool colorLookUp;
int colorAhead;
bool colorGray;
/* =========== GAMMA ============ */
float gammaDisplay;
/* =========== SCALING ============ */
bool resizing;
float scaleFactor;
float scaleHFactor;
float scaleVFactor;
int scaleWidth;
int scaleHeight;
bool scaleToBuffer;
float scaleFactorB;
float scaleHFactorB;
float scaleVFactorB;
int scaleWidthB;
int scaleHeightB;
bool scaleToDisplay;
/* =========== OTHERS ============ */
int loading;
// bool preload;
bool x11Shared;
bool multiBuffer;
bool usePixmap;
QString x11VisualClass;
int pauseAt;
QString executable;
QString extras;
private slots:
void getOutput( KProcess *, char *, int);
void emitStopped( KProcess *);
void checkOutput( KProcess *);
};
aktion'KXAnim::KXAnim() (./kdemultimedia/aktion/kxanim.cpp:17)
KXAnim::KXAnim(QWidget *parent, const char *name) : QWidget( parent, name)
{
/* default autoresize */
autoResize = true;
/* default loop state */
loop = true;
/* Get the base window ID */
window = this->winId();
/* Get the X11 display */
dpy = this->x11Display();
window_atom = XInternAtom(dpy, "XANIM_PROPERTY", 0);
/*** connections ***/
/* KProcess output */
connect(&proc, SIGNAL( receivedStdout(KProcess *, char *, int)),
this, SLOT( getOutput( KProcess *, char *, int)) );
/* KProcess output */
connect(&proc, SIGNAL( receivedStderr(KProcess *, char *, int)),
this, SLOT( getOutput( KProcess *, char *, int)) );
/* KProcess terminated */
connect(&proc, SIGNAL( processExited(KProcess *)),
this, SLOT( emitStopped( KProcess *)) );
setDefaults();
resetXAnimDefaults();
}
aktion'KXAnim::resetXAnimDefaults() (./kdemultimedia/aktion/kxanim.cpp:46)
void KXAnim::resetXAnimDefaults()
{
/* =========== SOUND ============ */
audio=true;
audioSync=true;
audioInitialVolume=40;
/* =========== COLOR ============ */
colorMapping=none;
colorAhead=5;
/* =========== GAMMA ============ */
gammaDisplay=1.0;
/* =========== SCALING ============ */
resizing=true;
scaleFactor=1.0;
scaleHFactor=1.0;
scaleVFactor=1.0;
scaleWidth=0;
scaleHeight=0;
scaleToBuffer=false;
scaleFactorB=1.0;
scaleHFactorB=1.0;
scaleVFactorB=1.0;
scaleWidthB=0;
scaleHeightB=0;
scaleToDisplay=false;
/* =========== OTHERS ============ */
loading=2;
//preload=false;
x11Shared=false;
multiBuffer=true;
usePixmap=false;
x11VisualClass="default";
pauseAt=-1;
extras="";
executable="xanim";
}
aktion'KXAnim::setDefaults() (./kdemultimedia/aktion/kxanim.cpp:85)
void KXAnim::setDefaults()
{
/* we aren't playing anything! */
playing = false;
/* we don't have a file yet! */
fileName = "";
/* x-anim is not active */
active = false;
/* set the default sizes */
videoHeight=0;
videoWidth=0;
/* set the default framerate */
videoSpeed=0.0;
/* we have no frames! */
videoFrames=0;
/* empty the outpu buffer */
outBuff = "";
/* we have no video, so: */
videoCodec="";
/* no errors */
errorCode=KA_ERROR_NONE;
errorString="";
/* resize to the minimun, if enable */
if (autoResize)
resize(1,1);
}
aktion'KXAnim::changeProperty() (./kdemultimedia/aktion/kxanim.cpp:112)
void KXAnim::changeProperty( const char *c )
{
/* send the char(s)... */
if (active)
XChangeProperty(dpy, window, window_atom, XA_STRING, 8, PropModeReplace, (unsigned char *)c, strlen(c));
}
aktion'KXAnim::updateSize() (./kdemultimedia/aktion/kxanim.cpp:119)
void KXAnim::updateSize()
{
int x,y;
x=int(videoWidth * scaleFactor);
y=int(videoHeight * scaleFactor);
if (scaleHFactor!=1.0)
x=int(videoWidth * scaleHFactor);
else
if (scaleWidth!=0)
x=scaleWidth;
if (scaleVFactor!=1.0)
y=int(videoWidth * scaleVFactor);
else
if (scaleHeight!=0)
y=scaleHeight;
if (x!=width() || y!=height()) setFixedSize(x,y);
}
aktion'KXAnim::play() (./kdemultimedia/aktion/kxanim.cpp:138)
void KXAnim::play()
{
QString s;
if (!fileName.isEmpty())
{
if (active == false)
/* Activate x-anim */
{
outBuff="";
proc.clearArguments();
proc << executable;
proc << "-Zr";
s.sprintf("+W%d",window);
proc << s;
parseParameters();
if (autoResize)
/* resize the widget properly */
updateSize();
proc << fileName;
proc.start(KProcess::NotifyOnExit,KProcess::Stdout);
active = true;
}
playing = !playing;
changeProperty(" ");
}
}
aktion'KXAnim::pause() (./kdemultimedia/aktion/kxanim.cpp:167)
void KXAnim::pause()
{
if (playing==true)
{
playing = false;
play();
}
}
aktion'KXAnim::stop() (./kdemultimedia/aktion/kxanim.cpp:176)
void KXAnim::stop()
{
changeProperty("q");
}
aktion'KXAnim::stepForward() (./kdemultimedia/aktion/kxanim.cpp:181)
void KXAnim::stepForward()
{
playing = false;
changeProperty(".");
}
aktion'KXAnim::stepBack() (./kdemultimedia/aktion/kxanim.cpp:187)
void KXAnim::stepBack()
{
playing = false;
changeProperty(",");
}
aktion'KXAnim::stepForwardWA() (./kdemultimedia/aktion/kxanim.cpp:193)
void KXAnim::stepForwardWA()
{
playing = false;
changeProperty("/");
}
aktion'KXAnim::stepBackWA() (./kdemultimedia/aktion/kxanim.cpp:199)
void KXAnim::stepBackWA()
{
playing = false;
changeProperty("m");
}
aktion'KXAnim::toggleSound() (./kdemultimedia/aktion/kxanim.cpp:205)
void KXAnim::toggleSound()
{
changeProperty("s");
}
aktion'KXAnim::volumeIncrement() (./kdemultimedia/aktion/kxanim.cpp:210)
void KXAnim::volumeIncrement()
{
changeProperty("3");
}
aktion'KXAnim::volumeDecrement() (./kdemultimedia/aktion/kxanim.cpp:215)
void KXAnim::volumeDecrement()
{
changeProperty("2");
}
aktion'KXAnim::setVolume() (./kdemultimedia/aktion/kxanim.cpp:220)
void KXAnim::setVolume(int v)
{
QString s;
s.sprintf("v%d",v);
changeProperty(s);
}
aktion'KXAnim::faster() (./kdemultimedia/aktion/kxanim.cpp:228)
void KXAnim::faster()
{
changeProperty("-");
}
aktion'KXAnim::slower() (./kdemultimedia/aktion/kxanim.cpp:233)
void KXAnim::slower()
{
changeProperty("=");
}
aktion'KXAnim::resetSpeed() (./kdemultimedia/aktion/kxanim.cpp:238)
void KXAnim::resetSpeed()
{
changeProperty("0");
}
aktion'KXAnim::setFile() (./kdemultimedia/aktion/kxanim.cpp:243)
void KXAnim::setFile(QString file)
{
errorCode=KA_ERROR_NONE;
if (!file.isEmpty() && QFile::exists(file) && !QDir(file).exists())
{
if (active == false)
/* Activate x-anim */
{
fileName = file;
outBuff="";
proc.clearArguments();
proc << executable;
proc << "+Zv" << "+v" << "+f" << "-Ae";
proc << fileName;
/* just to get the file information */
disconnect(&proc, SIGNAL( processExited(KProcess *)),
this, SLOT( emitStopped( KProcess *)) );
connect(&proc, SIGNAL( processExited(KProcess *)),
this, SLOT( checkOutput( KProcess *)) );
proc.start(KProcess::NotifyOnExit,KProcess::AllOutput);
}
else
{
errorCode = KA_ERROR_ACTIVE;
setErrorString( errorCode, file );
emit stopped();
}
}
else
{
errorCode = KA_ERROR_FILENAME;
setErrorString( errorCode, file );
emit stopped();
}
}
aktion'KXAnim::checkOutput() (./kdemultimedia/aktion/kxanim.cpp:280)
void KXAnim::checkOutput( KProcess *)
{
/*
the xanim has stopped. Check the output and emit the stopped signal
*/
disconnect(&proc, SIGNAL( processExited(KProcess *)),
this, SLOT( checkOutput( KProcess *)) );
connect(&proc, SIGNAL( processExited(KProcess *)),
this, SLOT( emitStopped( KProcess *)) );
playing = false;
active = false;
errorCode=getVideoInfo();
if (errorCode==0)
if (autoResize)
/* resize the widget properly */
updateSize();
setErrorString( errorCode, fileName );
emit stopped();
}
aktion'KXAnim::getVideoInfo() (./kdemultimedia/aktion/kxanim.cpp:301)
int KXAnim::getVideoInfo()
{
int pos, pos2, pos3;
QString s;
/*** check the output of xanim to see if the executable is valid ***/
if ( (pos=outBuff.find("XAnim Rev",0,false)) == -1)
return KA_ERROR_EXECUTABLE;
/*** check the output of xanim to get the file info ***/
if ( (pos=outBuff.find("Video Codec:",0,false)) != -1)
{
/* check the video codec */
if ( (pos2=outBuff.find("unsupported by this executable",pos+12,false)) == -1)
{
if ( (pos3=outBuff.find("depth=",pos+13,false)) != -1)
{
videoCodec=outBuff.mid(pos+13,pos3-(pos+13));
}
else return KA_ERROR_INFO;
}
else return KA_ERROR_UNSUPPORTED;
} else videoCodec="";
// if ( (pos=outBuff.find("Frame Stats:",0,false)) != -1)
// {
/* check the size */
pos2=outBuff.find("Size",0,false);
if (pos2==-1)
{
pos2=outBuff.findRev("MPG",-1,false);
if (pos2!=-1) pos2--;
}
if (pos2!=-1)
{
if ( (pos3=outBuff.find("x",pos2+5,false)) != -1)
{
s=outBuff.mid(pos2+5,pos3-(pos2+5));
videoWidth=s.toInt();
if ( (pos2=outBuff.find(" ",pos3,false)) != -1)
{
s=outBuff.mid(pos3+1,pos2-(pos3+1));
videoHeight=s.toInt();
}
else return KA_ERROR_INFO;
}
else return KA_ERROR_INFO;
}
else return KA_ERROR_INFO;
/* check the number of frames */
if ( (pos2=outBuff.find("frames",0,false)) != -1)
{
if ( (pos3=outBuff.find(" ",pos2+8,false)) != -1)
{
s=outBuff.mid(pos2+7,pos3-(pos2+7));
videoFrames=s.toInt();
}
else return KA_ERROR_INFO;
}
else videoFrames=0;
/* check the video speed */
if ( (pos2=outBuff.find("fps=",0,false)) != -1)
{
if ( (pos3=outBuff.find("\n",pos2+4,false)) != -1)
{
s=outBuff.mid(pos2+4,pos3-(pos2+4));
videoSpeed=s.toFloat();
}
else return KA_ERROR_INFO;
}
else videoSpeed=0;
// }
// else return KA_ERROR_INFO;
/* no errors! */
return KA_ERROR_NONE;
}
aktion'KXAnim::getOutput() (./kdemultimedia/aktion/kxanim.cpp:381)
void KXAnim::getOutput( KProcess *, char *text, int len)
{
temp.fill(' ',len+1);
temp.replace(0,len,text);
temp[len]='\0';
outBuff.append(temp);
}
aktion'KXAnim::emitStopped() (./kdemultimedia/aktion/kxanim.cpp:389)
void KXAnim::emitStopped( KProcess *)
{
/*
the xanim has stopped the playing of a video
emit the stopped signal
*/
playing = false;
active = false;
emit stopped();
}
aktion'KXAnim::setErrorString() (./kdemultimedia/aktion/kxanim.cpp:400)
void KXAnim::setErrorString( int n, QString file )
{
/* no errors */
errorString="";
switch (n)
{
case KA_ERROR_FILENAME : errorString.sprintf("%s: wrong file name.", file.data()); break;
case KA_ERROR_INFO : errorString="Error reading file info."; break;
case KA_ERROR_UNSUPPORTED: errorString="Unsupported video codec."; break;
case KA_ERROR_ACTIVE : errorString="The video is active!"; break;
case KA_ERROR_EXECUTABLE : errorString="Can't find the xanim executable:\n"+executable; break;
}
}
aktion'KXAnim::closeEvent() (./kdemultimedia/aktion/kxanim.cpp:414)
void KXAnim::closeEvent( QCloseEvent *e)
{
if (active)
stop();
while (active);
e->accept();
}
aktion'KXAnim::~KXAnim() (./kdemultimedia/aktion/kxanim.cpp:422)
KXAnim::~KXAnim()
{
}
aktion'KXAnim::parseParameters() (./kdemultimedia/aktion/kxanim.cpp:426)
void KXAnim::parseParameters()
{
QString s;
int pos,pos2;
if (!loop)
proc<<"+Ze";
/* =========== SOUND ============ */
if (audio==false) proc<<"-Ae";
if (audioSync==false) proc<<"-Ak";
if (audioInitialVolume!=40)
{
s.sprintf("+Av%d",audioInitialVolume);
proc<<s;
}
/* =========== COLOR ============ */
switch (colorMapping)
{
case none: break;
case static332: proc<<"+C3"; break;
case lookupTable: proc<<"+CF4"; break;
case grayScale: proc<<"+Cg"; break;
}
if (colorMapping==lookupTable && colorAhead!=5)
{
s.sprintf("+Cs%d",colorAhead);
proc<<s;
}
/* =========== GAMMA ============ */
if (gammaDisplay!=1.0)
{
s.sprintf("+Gd%1.5f",gammaDisplay);
proc<<s;
}
/* =========== SCALING ============ */
if (resizing==true) proc<<"+Sr";
if (!autoResize)
{
s.sprintf("+Sx%d", width());
proc << s;
s.sprintf("+Sy%d", height());
proc << s;
}
else
{
if (scaleFactor != 1.0)
{
s.sprintf("+Ss%2.5f",scaleFactor);
proc<<s;
}
else
{
if (scaleHFactor != 1.0)
{
s.sprintf("+Sh%10.8f",scaleHFactor);
proc<<s;
}
if (scaleVFactor != 1.0)
{
s.sprintf("+Sv%10.8f",scaleVFactor);
proc<<s;
}
}
if (scaleWidth!=0)
{
s.sprintf("+Sx%d",scaleWidth);
proc<<s;
}
if (scaleHeight!=0)
{
s.sprintf("+Sy%d",scaleHeight);
proc<<s;
}
if (scaleToBuffer==true) proc<<"+Sc";
}
if (scaleFactorB != 1.0)
{
s.sprintf("+SS%10.8f",scaleFactorB);
proc<<s;
}
else
{
if (scaleHFactorB != 1.0)
{
s.sprintf("+SH%10.8f",scaleHFactorB);
proc<<s;
}
if (scaleVFactorB != 1.0)
{
s.sprintf("+SV%10.8f",scaleVFactorB);
proc<<s;
}
}
if (scaleWidthB!=0)
{
s.sprintf("+SX%d",scaleWidthB);
proc<<s;
}
if (scaleHeightB!=0)
{
s.sprintf("+SY%d",scaleHeightB);
proc<<s;
}
if (scaleToDisplay==true) proc<<"+SC";
/* =========== OTHERS ============ */
switch (loading)
{
case 0: break;
case 1: proc<<"+b"; break;
case 2: proc<<"+f"; break;
}
if (x11Shared==true && loading!=1) proc<<"+B";
if (multiBuffer==false) proc<<"-D";
if (usePixmap==true) proc<<"+p";
if (x11VisualClass.contains("default",false)==0)
{
s="+V";
s+=x11VisualClass;
proc<<s;
}
if (pauseAt!=-1)
{
s.sprintf("+Zp%d",pauseAt);
proc<<s;
}
extras.simplifyWhiteSpace();
if (!extras.isEmpty())
{
pos=-1;
do
{
pos2=extras.find(' ',pos+1);
if (pos2!=-1)
s=extras.mid(pos+1,pos2-(pos+1));
else
s=extras.mid(pos+1,extras.length()-(pos+1));
proc<<s;
pos=pos2;
} while (pos2!=-1);
}
}
aktion'KXAnim::mousePressEvent() (./kdemultimedia/aktion/kxanim.cpp:574)
void KXAnim::mousePressEvent( QMouseEvent *mouse)
{
emit mouseClick(mouse);
}