aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina/LVideoWidget.cpp
diff options
context:
space:
mode:
authorZackaryWelch <welch.zackary@gmail.com>2017-10-21 17:48:29 -0400
committerZackaryWelch <welch.zackary@gmail.com>2017-10-21 17:48:29 -0400
commit3a38773ce20620610e87c84c40ebfd6d2f478203 (patch)
treeae1ab2c3aaf3f1fb69aebb901ae2895cba109a07 /src-qt5/core/libLumina/LVideoWidget.cpp
parentAdd a semi-functional "VideoItemWidget" class to lumina-fm sources (not tied ... (diff)
downloadlumina-3a38773ce20620610e87c84c40ebfd6d2f478203.tar.gz
lumina-3a38773ce20620610e87c84c40ebfd6d2f478203.tar.bz2
lumina-3a38773ce20620610e87c84c40ebfd6d2f478203.zip
Finished video thumbnails and roll over playback for lumina-fm and
lumina-fileinfo
Diffstat (limited to 'src-qt5/core/libLumina/LVideoWidget.cpp')
-rw-r--r--src-qt5/core/libLumina/LVideoWidget.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src-qt5/core/libLumina/LVideoWidget.cpp b/src-qt5/core/libLumina/LVideoWidget.cpp
new file mode 100644
index 00000000..14490484
--- /dev/null
+++ b/src-qt5/core/libLumina/LVideoWidget.cpp
@@ -0,0 +1,28 @@
+#include "LVideoWidget.h"
+
+LVideoWidget::LVideoWidget(QString file, QSize iconSize, QWidget *parent) : QWidget(parent) {
+ flag = false;
+ iconLabel = new LVideoLabel(file, parent);
+ textLabel = new QLabel(parent);
+
+ layout = new QHBoxLayout(this);
+ layout->setAlignment(Qt::AlignLeft | Qt::AlignCenter);
+ layout->addWidget(iconLabel);
+ layout->addWidget(textLabel);
+ layout->setStretchFactor(textLabel, 1); //make sure this always occupies all extra space
+
+ textLabel->setText(file.section("/", -1));
+ iconLabel->setFixedSize(iconSize);
+ iconLabel->setVisible(true);
+ textLabel->setVisible(true);
+}
+
+LVideoWidget::~LVideoWidget() {
+ delete iconLabel;
+ delete textLabel;
+ delete layout;
+}
+
+void LVideoWidget::setIconSize(QSize iconSize) {
+ iconLabel->setFixedSize(iconSize);
+}
bgstack15