|
|
@ -139,7 +139,7 @@ MediaControl::MediaControl(const TQString &configFile, Type t, int actions,
|
|
|
|
playpause_button = new TrayButton (this, "PLAYPAUSE");
|
|
|
|
playpause_button = new TrayButton (this, "PLAYPAUSE");
|
|
|
|
stop_button = new TrayButton (this, "STOP");
|
|
|
|
stop_button = new TrayButton (this, "STOP");
|
|
|
|
next_button = new TrayButton (this, "NEXT");
|
|
|
|
next_button = new TrayButton (this, "NEXT");
|
|
|
|
time_slider = new MCSlider (Qt::Horizontal, this, "time_slider" );
|
|
|
|
time_slider = new MCSlider (TQt::Horizontal, this, "time_slider" );
|
|
|
|
time_slider->setRange(0,0);
|
|
|
|
time_slider->setRange(0,0);
|
|
|
|
time_slider->setValue(0);
|
|
|
|
time_slider->setValue(0);
|
|
|
|
time_slider->setTracking( false );
|
|
|
|
time_slider->setTracking( false );
|
|
|
@ -184,7 +184,7 @@ void MediaControl::dropEvent(TQDropEvent* event)
|
|
|
|
void MediaControl::setSliderPosition(int len ,int time)
|
|
|
|
void MediaControl::setSliderPosition(int len ,int time)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
time_slider->blockSignals(true);
|
|
|
|
time_slider->blockSignals(true);
|
|
|
|
if(orientation() ==Qt::Vertical)
|
|
|
|
if(orientation() ==TQt::Vertical)
|
|
|
|
time = len - time;
|
|
|
|
time = len - time;
|
|
|
|
|
|
|
|
|
|
|
|
if (mLastLen != len)
|
|
|
|
if (mLastLen != len)
|
|
|
@ -318,7 +318,7 @@ void MediaControl::reportBug()
|
|
|
|
// Fixing the orientation problem in qslider.
|
|
|
|
// Fixing the orientation problem in qslider.
|
|
|
|
void MediaControl::adjustTime(int time)
|
|
|
|
void MediaControl::adjustTime(int time)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(orientation() ==Qt::Vertical)
|
|
|
|
if(orientation() ==TQt::Vertical)
|
|
|
|
emit(newJumpToTime(mLastLen - time));
|
|
|
|
emit(newJumpToTime(mLastLen - time));
|
|
|
|
else
|
|
|
|
else
|
|
|
|
emit(newJumpToTime(time));
|
|
|
|
emit(newJumpToTime(time));
|
|
|
@ -498,7 +498,7 @@ int MediaControl::heightForWidth(int width) const
|
|
|
|
|
|
|
|
|
|
|
|
void MediaControl::mousePressEvent(TQMouseEvent* e)
|
|
|
|
void MediaControl::mousePressEvent(TQMouseEvent* e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (e->button() == Qt::RightButton)
|
|
|
|
if (e->button() == TQt::RightButton)
|
|
|
|
rmbMenu->popup(e->globalPos());
|
|
|
|
rmbMenu->popup(e->globalPos());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -507,7 +507,7 @@ bool MediaControl::eventFilter(TQObject *, TQEvent *e)
|
|
|
|
if (e->type() == TQEvent::MouseButtonPress)
|
|
|
|
if (e->type() == TQEvent::MouseButtonPress)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQMouseEvent *me = TQT_TQMOUSEEVENT(e);
|
|
|
|
TQMouseEvent *me = TQT_TQMOUSEEVENT(e);
|
|
|
|
if (me->button() == Qt::RightButton)
|
|
|
|
if (me->button() == TQt::RightButton)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
rmbMenu->popup(me->globalPos());
|
|
|
|
rmbMenu->popup(me->globalPos());
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
@ -532,9 +532,9 @@ void MediaControl::resizeEvent( TQResizeEvent* )
|
|
|
|
// kdDebug(90200) << "resizeEvent()" << endl;
|
|
|
|
// kdDebug(90200) << "resizeEvent()" << endl;
|
|
|
|
int w = width();
|
|
|
|
int w = width();
|
|
|
|
int h = height();
|
|
|
|
int h = height();
|
|
|
|
if ( orientation() ==Qt::Vertical )
|
|
|
|
if ( orientation() ==TQt::Vertical )
|
|
|
|
{ // ====== VERTICAL =================================================
|
|
|
|
{ // ====== VERTICAL =================================================
|
|
|
|
time_slider->setOrientation(Qt::Vertical);
|
|
|
|
time_slider->setOrientation(TQt::Vertical);
|
|
|
|
int slider_width = time_slider->minimumSizeHint().width();
|
|
|
|
int slider_width = time_slider->minimumSizeHint().width();
|
|
|
|
// some styles need more space for sliders than avilable in very small panels :(
|
|
|
|
// some styles need more space for sliders than avilable in very small panels :(
|
|
|
|
if ( slider_width > w ) slider_width = w;
|
|
|
|
if ( slider_width > w ) slider_width = w;
|
|
|
@ -566,7 +566,7 @@ void MediaControl::resizeEvent( TQResizeEvent* )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else // ====== HORIZONTAL ===============================================
|
|
|
|
else // ====== HORIZONTAL ===============================================
|
|
|
|
{
|
|
|
|
{
|
|
|
|
time_slider->setOrientation(Qt::Horizontal);
|
|
|
|
time_slider->setOrientation(TQt::Horizontal);
|
|
|
|
int slider_height = time_slider->minimumSizeHint().height();
|
|
|
|
int slider_height = time_slider->minimumSizeHint().height();
|
|
|
|
// some styles need more space for sliders than avilable in very small panels :(
|
|
|
|
// some styles need more space for sliders than avilable in very small panels :(
|
|
|
|
if ( slider_height > h ) slider_height = h;
|
|
|
|
if ( slider_height > h ) slider_height = h;
|
|
|
|