|
|
#include <kfiledialog.h> | #include <kfiledialog.h> |
#include <qfile.h> | #include <qfile.h> |
#include <kurifilter.h> | #include <kurifilter.h> |
#include <arts/kartsdispatcher.h> |
|
//#include <arts/kplayobjectfactory.h> |
|
//#include <arts/kartsserver.h> |
|
| |
#include <kaction.h> | #include <kaction.h> |
#include <kglobalsettings.h> | #include <kglobalsettings.h> |
|
|
connect( m_check->checkBox(), SIGNAL(clicked()), this, SLOT(slotChecked()) ); | connect( m_check->checkBox(), SIGNAL(clicked()), this, SLOT(slotChecked()) ); |
connect( &m_selectTimer, SIGNAL(timeout()), this, SLOT(select()) ); | connect( &m_selectTimer, SIGNAL(timeout()), this, SLOT(select()) ); |
| |
m_playObj = 0L; |
|
m_playServer = 0L; |
|
m_previous = 0L; | m_previous = 0L; |
m_next = 0L; | m_next = 0L; |
m_isSelected = false; | m_isSelected = false; |
|
|
if ( Settings::singleClick() && kapp->activePopupWidget() == 0L ) | if ( Settings::singleClick() && kapp->activePopupWidget() == 0L ) |
m_selectTimer.start(KGlobalSettings::autoSelectDelay(), true); | m_selectTimer.start(KGlobalSettings::autoSelectDelay(), true); |
} | } |
if (m_type == Sound) { |
|
KArtsDispatcher *dispatcher = new KArtsDispatcher(); // Needed for m_playObj |
|
dispatcher = dispatcher; // To avoid "warning: unused variable `KArtsDispatcher*dispatcher'" warning |
|
if (!m_playServer) |
|
m_playServer = new KArtsServer(); |
|
m_playFactory = new KDE::PlayObjectFactory(m_playServer); |
|
m_playObj = m_playFactory->createPlayObject(fullPath(), true); |
|
m_playObj->play(); |
|
} |
|
} | } |
| |
void Item::leaveEvent(QEvent*) | void Item::leaveEvent(QEvent*) |
|
|
m_selectTimer.stop(); | m_selectTimer.stop(); |
OnClickAction::stopHoverFeedback(); | OnClickAction::stopHoverFeedback(); |
| |
if (m_playObj) { |
|
m_playObj->halt(); |
|
delete m_playObj; |
|
delete m_playFactory; |
|
m_playObj = 0L; |
|
} |
|
} | } |
| |
void Item::mousePressEvent(QMouseEvent *event) | void Item::mousePressEvent(QMouseEvent *event) |