9#ifndef UI_PLAYLISTDOCK_H
10#define UI_PLAYLISTDOCK_H
12#include <QtCore/QVariant>
14#include <QtWidgets/QApplication>
15#include <QtWidgets/QDockWidget>
16#include <QtWidgets/QHeaderView>
17#include <QtWidgets/QStackedWidget>
18#include <QtWidgets/QTextBrowser>
19#include <QtWidgets/QVBoxLayout>
20#include <QtWidgets/QWidget>
21#include "widgets/playlistlistview.h"
22#include "widgets/playlisttable.h"
29 QWidget *dockWidgetContents;
30 QVBoxLayout *verticalLayout;
31 QStackedWidget *stackedWidget;
33 QVBoxLayout *verticalLayout_2;
34 QTextBrowser *textBrowser;
36 QVBoxLayout *verticalLayout_3;
37 PlaylistTable *tableView;
38 PlaylistListView *listView;
40 void setupUi(QDockWidget *PlaylistDock)
42 if (PlaylistDock->objectName().isEmpty())
43 PlaylistDock->setObjectName(
"PlaylistDock");
44 PlaylistDock->resize(460, 278);
46 QString iconThemeName = QString::fromUtf8(
"view-media-playlist");
47 if (QIcon::hasThemeIcon(iconThemeName)) {
48 icon = QIcon::fromTheme(iconThemeName);
50 icon.addFile(QString::fromUtf8(
":/icons/oxygen/32x32/actions/view-media-playlist.png"), QSize(), QIcon::Mode::Normal, QIcon::State::Off);
52 PlaylistDock->setWindowIcon(icon);
53 dockWidgetContents =
new QWidget();
54 dockWidgetContents->setObjectName(
"dockWidgetContents");
55 verticalLayout =
new QVBoxLayout(dockWidgetContents);
56 verticalLayout->setSpacing(0);
57 verticalLayout->setObjectName(
"verticalLayout");
58 verticalLayout->setContentsMargins(0, 0, 0, 0);
59 stackedWidget =
new QStackedWidget(dockWidgetContents);
60 stackedWidget->setObjectName(
"stackedWidget");
62 page->setObjectName(
"page");
63 verticalLayout_2 =
new QVBoxLayout(page);
64 verticalLayout_2->setObjectName(
"verticalLayout_2");
65 verticalLayout_2->setContentsMargins(0, 0, 0, 0);
66 textBrowser =
new QTextBrowser(page);
67 textBrowser->setObjectName(
"textBrowser");
69 verticalLayout_2->addWidget(textBrowser);
71 stackedWidget->addWidget(page);
72 page_2 =
new QWidget();
73 page_2->setObjectName(
"page_2");
74 verticalLayout_3 =
new QVBoxLayout(page_2);
75 verticalLayout_3->setObjectName(
"verticalLayout_3");
76 verticalLayout_3->setContentsMargins(0, 0, 0, 0);
77 tableView =
new PlaylistTable(page_2);
78 tableView->setObjectName(
"tableView");
79 tableView->setContextMenuPolicy(Qt::CustomContextMenu);
80 tableView->setDragEnabled(
false);
81 tableView->setAlternatingRowColors(
true);
82 tableView->setSelectionMode(QAbstractItemView::ExtendedSelection);
83 tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
84 tableView->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
85 tableView->horizontalHeader()->setHighlightSections(
false);
86 tableView->verticalHeader()->setVisible(
false);
88 verticalLayout_3->addWidget(tableView);
90 listView =
new PlaylistListView(page_2);
91 listView->setObjectName(
"listView");
92 listView->setContextMenuPolicy(Qt::CustomContextMenu);
93 listView->setSelectionMode(QAbstractItemView::ExtendedSelection);
94 listView->setMovement(QListView::Static);
96 verticalLayout_3->addWidget(listView);
98 stackedWidget->addWidget(page_2);
100 verticalLayout->addWidget(stackedWidget);
102 PlaylistDock->setWidget(dockWidgetContents);
104 retranslateUi(PlaylistDock);
106 stackedWidget->setCurrentIndex(0);
109 QMetaObject::connectSlotsByName(PlaylistDock);
112 void retranslateUi(QDockWidget *PlaylistDock)
114 PlaylistDock->setWindowTitle(QCoreApplication::translate(
"PlaylistDock",
"Playlist",
nullptr));
115 textBrowser->setHtml(QCoreApplication::translate(
"PlaylistDock",
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
116"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
117"p, li { white-space: pre-wrap; }\n"
118"</style></head><body>\n"
119"<p style=\" margin-top:12px; margin-bottom:16px; margin-left:-24px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">Double-click</span> a playlist item to open it in the player.</p>\n"
120"<p style=\" margin-top:0px; margin-bottom:16px; margin-left:-24px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">You can freely preview clips without necessarily adding them to the playlist or closing it.</p>\n"
121"<p style=\" margin-top:0px; margin-bottom:16px; margin-left:-24px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">To trim or adjust a playlist item <span style=\" font-weight:600;\">Double-click</span> to open it, make the changes, and click the <span style=\" font-weight:600;\">Update</span> icon.</p>\n"
123 "yle=\" margin-top:0px; margin-bottom:16px; margin-left:-24px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">Drag-n-drop</span> to rearrange the items.</p></body></html>",
nullptr));
124#if QT_CONFIG(tooltip)
125 tableView->setToolTip(QCoreApplication::translate(
"PlaylistDock",
"<html><head/><body><p>Double-click a playlist item to open it in the player.</p></body></html>",
nullptr));
132 class PlaylistDock:
public Ui_PlaylistDock {};