本文整理汇总了C++中K_D函数的典型用法代码示例。如果您正苦于以下问题:C++ K_D函数的具体用法?C++ K_D怎么用?C++ K_D使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了K_D函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AbstractVideoOutput
AbstractVideoDataOutput::AbstractVideoDataOutput()
: AbstractVideoOutput(*new AbstractVideoDataOutputPrivate)
{
K_D(AbstractVideoDataOutput);
d->isRunning = false;
d->allowedFormats << VideoFrame2::Format_RGB888;
}
示例2: K_D
void MediaControls::setMediaObject(MediaObject *media)
{
K_D(MediaControls);
if (d->media) {
disconnect(d->media, SIGNAL(destroyed()), this, SLOT(_k_mediaDestroyed()));
disconnect(d->media, SIGNAL(stateChanged(Phonon::State, Phonon::State)), this,
SLOT(_k_stateChanged(Phonon::State, Phonon::State)));
disconnect(d->media, SIGNAL(finished()), this, SLOT(_k_finished()));
disconnect(&d->playButton, SIGNAL(clicked()), d->media, SLOT(play()));
disconnect(&d->pauseButton, SIGNAL(clicked()), d->media, SLOT(pause()));
disconnect(&d->stopButton, SIGNAL(clicked()), d->media, SLOT(stop()));
}
d->media = media;
if (media) {
connect(media, SIGNAL(destroyed()), SLOT(_k_mediaDestroyed()));
connect(media, SIGNAL(stateChanged(Phonon::State, Phonon::State)),
SLOT(_k_stateChanged(Phonon::State, Phonon::State)));
connect(d->media, SIGNAL(finished()), this, SLOT(_k_finished()));
connect(&d->playButton, SIGNAL(clicked()), media, SLOT(play()));
connect(&d->pauseButton, SIGNAL(clicked()), media, SLOT(pause()));
connect(&d->stopButton, SIGNAL(clicked()), media, SLOT(stop()));
}
d->seekSlider.setMediaObject(media);
}
示例3: QWidget
SeekSlider::SeekSlider(QWidget *parent)
: QWidget(parent)
, k_ptr(new SeekSliderPrivate(this))
{
K_D(SeekSlider);
connect(&d->slider, SIGNAL(valueChanged(int)), SLOT(_k_seek(int)));
}
示例4: K_D
void MediaObject::pause()
{
K_D(MediaObject);
if (d->backendObject() && d->mediaSource.type() != MediaSource::Invalid) {
INTERFACE_CALL(pause());
}
}
示例5: MediaNode
AbstractAudioDataOutput::AbstractAudioDataOutput()
: MediaNode(*new AbstractAudioDataOutputPrivate)
{
K_D(AbstractAudioDataOutput);
d->isRunning = false;
d->allowedFormats << AudioFormat();
}
示例6: K_D
void MediaObject::play()
{
K_D(MediaObject);
if (d->backendObject() && isPlayable(d->mediaSource.type())) {
INTERFACE_CALL(play());
}
}
示例7: pDebug
void VideoWidget::setFullScreen(bool newFullScreen)
{
pDebug() << Q_FUNC_INFO << newFullScreen;
K_D(VideoWidget);
// TODO: disable screensaver? or should we leave that responsibility to the
// application?
Qt::WindowFlags flags = windowFlags();
if (newFullScreen) {
if (!isFullScreen()) {
//we only update that value if it is not already fullscreen
d->changeFlags = flags & (Qt::Window | Qt::SubWindow);
flags |= Qt::Window;
flags ^= Qt::SubWindow;
setWindowFlags(flags);
#ifdef Q_WS_X11
// This works around a bug with Compiz
// as the window must be visible before we can set the state
show();
raise();
setWindowState( windowState() | Qt::WindowFullScreen ); // set
#else
setWindowState( windowState() | Qt::WindowFullScreen ); // set
show();
#endif
}
} else if (isFullScreen()) {
flags ^= (Qt::Window | Qt::SubWindow); //clear the flags...
flags |= d->changeFlags; //then we reset the flags (window and subwindow)
setWindowFlags(flags);
setWindowState( windowState() ^ Qt::WindowFullScreen ); // reset
show();
}
}
示例8: QObject
Effect::Effect(const EffectDescription &description, QObject *parent)
: QObject(parent), MediaNode(*new EffectPrivate)
{
K_D(Effect);
d->description = description;
d->createBackendObject();
}
示例9: QWidget
VideoWidget::VideoWidget(VideoWidgetPrivate &dd, QWidget *parent)
: QWidget(parent),
Phonon::AbstractVideoOutput(dd)
{
K_D(VideoWidget);
d->init();
}
示例10: K_D
void VolumeSlider::setMutedIcon(const QIcon &icon)
{
K_D(VolumeSlider);
pDebug() << Q_FUNC_INFO << icon;
k_ptr->mutedIcon = icon;
d->updateIcon();
}
示例11: QWidget
VolumeSlider::VolumeSlider(AudioOutput *output, QWidget *parent)
: QWidget(parent),
k_ptr(new VolumeSliderPrivate(this))
{
K_D(VolumeSlider);
#ifndef QT_NO_TOOLTIP
setToolTip(tr("Volume: %1%").arg(100));
#endif
#ifndef QT_NO_WHATSTHIS
setWhatsThis(tr("Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1%").arg(100));
#endif
connect(&d->slider, SIGNAL(valueChanged(int)), SLOT(_k_sliderChanged(int)));
connect(&d->muteButton, SIGNAL(clicked()), SLOT(_k_buttonClicked()));
if (output) {
d->output = output;
d->slider.setValue(qRound(100 * output->volume()));
d->slider.setEnabled(true);
d->muteButton.setEnabled(true);
connect(output, SIGNAL(volumeChanged(qreal)), SLOT(_k_volumeChanged(qreal)));
connect(output, SIGNAL(mutedChanged(bool)), SLOT(_k_mutedChanged(bool)));
}
setFocusProxy(&d->slider);
}
示例12: K_D
QAction *KXmlGuiWindow::toolBarMenuAction()
{
K_D(KXmlGuiWindow);
if ( !d->toolBarHandler )
return 0;
return d->toolBarHandler->toolBarMenuAction();
}
示例13: K_D
void Effect::setParameterValue(const EffectParameter ¶m, const QVariant &newValue)
{
K_D(Effect);
d->parameterValues[param] = newValue;
if (d->backendObject()) {
INTERFACE_CALL(setParameterValue(param, newValue));
}
}
示例14: QWidget
EffectWidget::EffectWidget(Effect *effect, QWidget *parent)
: QWidget(parent),
k_ptr(new EffectWidgetPrivate(effect))
{
K_D(EffectWidget);
d->q_ptr = this;
d->autogenerateUi();
}
示例15: K_D
void SeekSlider::setOrientation(Qt::Orientation o)
{
K_D(SeekSlider);
Qt::Alignment align = (o == Qt::Horizontal ? Qt::AlignVCenter : Qt::AlignHCenter);
d->layout.setAlignment(&d->iconLabel, align);
d->layout.setAlignment(&d->slider, align);
d->layout.setDirection(o == Qt::Horizontal ? QBoxLayout::LeftToRight : QBoxLayout::TopToBottom);
d->slider.setOrientation(o);
}