Changeset View
Changeset View
Standalone View
Standalone View
src/panels/information/informationpanelcontent.cpp
Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Line(s) | 64 | { | |||
---|---|---|---|---|---|
80 | 80 | | |||
81 | m_preview = new PixmapViewer(parent); | 81 | m_preview = new PixmapViewer(parent); | ||
82 | m_preview->setMinimumWidth(minPreviewWidth); | 82 | m_preview->setMinimumWidth(minPreviewWidth); | ||
83 | m_preview->setMinimumHeight(KIconLoader::SizeEnormous); | 83 | m_preview->setMinimumHeight(KIconLoader::SizeEnormous); | ||
84 | 84 | | |||
85 | m_phononWidget = new PhononWidget(parent); | 85 | m_phononWidget = new PhononWidget(parent); | ||
86 | m_phononWidget->hide(); | 86 | m_phononWidget->hide(); | ||
87 | m_phononWidget->setMinimumWidth(minPreviewWidth); | 87 | m_phononWidget->setMinimumWidth(minPreviewWidth); | ||
88 | m_phononWidget->setAutoPlay(InformationPanelSettings::previewsAutoPlay()); | ||||
88 | connect(m_phononWidget, &PhononWidget::hasVideoChanged, | 89 | connect(m_phononWidget, &PhononWidget::hasVideoChanged, | ||
89 | this, &InformationPanelContent::slotHasVideoChanged); | 90 | this, &InformationPanelContent::slotHasVideoChanged); | ||
90 | 91 | | |||
91 | // name | 92 | // name | ||
92 | m_nameLabel = new QLabel(parent); | 93 | m_nameLabel = new QLabel(parent); | ||
93 | QFont font = m_nameLabel->font(); | 94 | QFont font = m_nameLabel->font(); | ||
94 | font.setBold(true); | 95 | font.setBold(true); | ||
95 | m_nameLabel->setFont(font); | 96 | m_nameLabel->setFont(font); | ||
▲ Show 20 Lines • Show All 202 Lines • ▼ Show 20 Line(s) | 298 | KFileItemList InformationPanelContent::items() { | |||
298 | return m_metaDataWidget->items(); | 299 | return m_metaDataWidget->items(); | ||
299 | } | 300 | } | ||
300 | 301 | | |||
301 | void InformationPanelContent::slotHasVideoChanged(bool hasVideo) | 302 | void InformationPanelContent::slotHasVideoChanged(bool hasVideo) | ||
302 | { | 303 | { | ||
303 | m_preview->setVisible(InformationPanelSettings::previewsShown() && !hasVideo); | 304 | m_preview->setVisible(InformationPanelSettings::previewsShown() && !hasVideo); | ||
304 | } | 305 | } | ||
305 | 306 | | |||
307 | void InformationPanelContent::setPreviewAutoPlay(bool autoPlay) { | ||||
308 | m_phononWidget->setAutoPlay(autoPlay); | ||||
309 | } | ||||
310 | | ||||
306 | void InformationPanelContent::refreshMetaData() | 311 | void InformationPanelContent::refreshMetaData() | ||
307 | { | 312 | { | ||
308 | if (!m_item.isNull()) { | 313 | if (!m_item.isNull()) { | ||
309 | showItem(m_item); | 314 | showItem(m_item); | ||
310 | } | 315 | } | ||
311 | } | 316 | } | ||
312 | 317 | | |||
313 | void InformationPanelContent::setNameLabelText(const QString& text) | 318 | void InformationPanelContent::setNameLabelText(const QString& text) | ||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |