#include "phononwidget.h"
+#include <KIconLoader>
+#include <KLocalizedString>
#include <Phonon/AudioOutput>
-#include <Phonon/Global>
#include <Phonon/MediaObject>
#include <Phonon/SeekSlider>
#include <Phonon/VideoWidget>
-#include <QVBoxLayout>
-#include <QHBoxLayout>
#include <QShowEvent>
#include <QToolButton>
-#include <QDialog>
-#include <QIcon>
-#include <KIconLoader>
-#include <QUrl>
-#include <KLocalizedString>
+#include <QVBoxLayout>
class EmbeddedVideoPlayer : public Phonon::VideoWidget
{
Q_OBJECT
public:
- EmbeddedVideoPlayer(QWidget *parent = 0) :
+ EmbeddedVideoPlayer(QWidget *parent = nullptr) :
Phonon::VideoWidget(parent)
{
}
updateGeometry();
}
- QSize sizeHint() const Q_DECL_OVERRIDE
+ QSize sizeHint() const override
{
return m_sizeHint.isValid() ? m_sizeHint : Phonon::VideoWidget::sizeHint();
}
PhononWidget::PhononWidget(QWidget *parent)
: QWidget(parent),
m_url(),
- m_playButton(0),
- m_stopButton(0),
- m_topLayout(0),
- m_media(0),
- m_seekSlider(0),
- m_audioOutput(0),
- m_videoPlayer(0)
+ m_playButton(nullptr),
+ m_stopButton(nullptr),
+ m_topLayout(nullptr),
+ m_media(nullptr),
+ m_seekSlider(nullptr),
+ m_audioOutput(nullptr),
+ m_videoPlayer(nullptr)
{
}
if (!m_topLayout) {
m_topLayout = new QVBoxLayout(this);
- m_topLayout->setMargin(0);
+ m_topLayout->setContentsMargins(0, 0, 0, 0);
- QHBoxLayout *controlsLayout = new QHBoxLayout(this);
- controlsLayout->setMargin(0);
+ QHBoxLayout *controlsLayout = new QHBoxLayout();
+ controlsLayout->setContentsMargins(0, 0, 0, 0);
controlsLayout->setSpacing(0);
m_playButton = new QToolButton(this);
m_videoPlayer->hide();
}
emit hasVideoChanged(false);
- // fall through
+ Q_FALLTHROUGH();
default:
m_stopButton->hide();
m_playButton->show();