9 #ifndef UI_PLAYLISTDOCK_H
10 #define UI_PLAYLISTDOCK_H
12 #include <QtCore/QVariant>
13 #include <QtGui/QIcon>
14 #include <QtWidgets/QApplication>
15 #include <QtWidgets/QDockWidget>
16 #include <QtWidgets/QHBoxLayout>
17 #include <QtWidgets/QHeaderView>
18 #include <QtWidgets/QSplitter>
19 #include <QtWidgets/QStackedWidget>
20 #include <QtWidgets/QTextBrowser>
21 #include <QtWidgets/QVBoxLayout>
22 #include <QtWidgets/QWidget>
23 #include "docks/playlistdock.h"
24 #include "widgets/playlistlistview.h"
25 #include "widgets/playlisttable.h"
32 QWidget *dockWidgetContents;
33 QVBoxLayout *verticalLayout;
34 QStackedWidget *stackedWidget;
36 QVBoxLayout *verticalLayout_2;
37 QTextBrowser *textBrowser;
39 QVBoxLayout *verticalLayout_4;
40 QHBoxLayout *filtersLayout;
43 QWidget *layoutWidget;
44 QVBoxLayout *verticalLayout_3;
45 PlaylistTable *tableView;
46 PlaylistListView *listView;
48 void setupUi(QDockWidget *PlaylistDock)
50 if (PlaylistDock->objectName().isEmpty())
51 PlaylistDock->setObjectName(
"PlaylistDock");
52 PlaylistDock->resize(460, 278);
54 QString iconThemeName = QString::fromUtf8(
"view-media-playlist");
55 if (QIcon::hasThemeIcon(iconThemeName)) {
56 icon = QIcon::fromTheme(iconThemeName);
58 icon.addFile(QString::fromUtf8(
":/icons/oxygen/32x32/actions/view-media-playlist.png"), QSize(), QIcon::Normal, QIcon::Off);
60 PlaylistDock->setWindowIcon(icon);
61 dockWidgetContents =
new QWidget();
62 dockWidgetContents->setObjectName(
"dockWidgetContents");
63 verticalLayout =
new QVBoxLayout(dockWidgetContents);
64 verticalLayout->setSpacing(0);
65 verticalLayout->setObjectName(
"verticalLayout");
66 verticalLayout->setContentsMargins(0, 0, 0, 0);
67 stackedWidget =
new QStackedWidget(dockWidgetContents);
68 stackedWidget->setObjectName(
"stackedWidget");
70 page->setObjectName(
"page");
71 verticalLayout_2 =
new QVBoxLayout(page);
72 verticalLayout_2->setObjectName(
"verticalLayout_2");
73 verticalLayout_2->setContentsMargins(0, 0, 0, 0);
74 textBrowser =
new QTextBrowser(page);
75 textBrowser->setObjectName(
"textBrowser");
77 verticalLayout_2->addWidget(textBrowser);
79 stackedWidget->addWidget(page);
80 page_2 =
new QWidget();
81 page_2->setObjectName(
"page_2");
82 verticalLayout_4 =
new QVBoxLayout(page_2);
83 verticalLayout_4->setSpacing(0);
84 verticalLayout_4->setObjectName(
"verticalLayout_4");
85 verticalLayout_4->setContentsMargins(0, 0, 0, 0);
86 filtersLayout =
new QHBoxLayout();
87 filtersLayout->setObjectName(
"filtersLayout");
89 verticalLayout_4->addLayout(filtersLayout);
91 splitter =
new QSplitter(page_2);
92 splitter->setObjectName(
"splitter");
93 splitter->setOrientation(Qt::Horizontal);
94 treeWidget =
new BinTree(splitter);
95 QTreeWidgetItem *__qtreewidgetitem =
new QTreeWidgetItem();
96 __qtreewidgetitem->setText(0, QString::fromUtf8(
"1"));
97 treeWidget->setHeaderItem(__qtreewidgetitem);
98 treeWidget->setObjectName(
"treeWidget");
99 treeWidget->setAcceptDrops(
true);
100 treeWidget->setStyleSheet(QString::fromUtf8(
"QTreeWidget::item { padding: 10px }"));
101 treeWidget->setAlternatingRowColors(
true);
102 treeWidget->setRootIsDecorated(
false);
103 splitter->addWidget(treeWidget);
104 treeWidget->header()->setVisible(
false);
105 layoutWidget =
new QWidget(splitter);
106 layoutWidget->setObjectName(
"layoutWidget");
107 verticalLayout_3 =
new QVBoxLayout(layoutWidget);
108 verticalLayout_3->setObjectName(
"verticalLayout_3");
109 verticalLayout_3->setContentsMargins(0, 0, 0, 0);
110 tableView =
new PlaylistTable(layoutWidget);
111 tableView->setObjectName(
"tableView");
112 tableView->setContextMenuPolicy(Qt::CustomContextMenu);
113 tableView->setDragEnabled(
false);
114 tableView->setAlternatingRowColors(
true);
115 tableView->setSelectionMode(QAbstractItemView::ExtendedSelection);
116 tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
117 tableView->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
118 tableView->horizontalHeader()->setHighlightSections(
false);
119 tableView->verticalHeader()->setVisible(
false);
121 verticalLayout_3->addWidget(tableView);
123 listView =
new PlaylistListView(layoutWidget);
124 listView->setObjectName(
"listView");
125 listView->setContextMenuPolicy(Qt::CustomContextMenu);
126 listView->setSelectionMode(QAbstractItemView::ExtendedSelection);
127 listView->setMovement(QListView::Static);
129 verticalLayout_3->addWidget(listView);
131 splitter->addWidget(layoutWidget);
133 verticalLayout_4->addWidget(splitter);
135 stackedWidget->addWidget(page_2);
137 verticalLayout->addWidget(stackedWidget);
139 PlaylistDock->setWidget(dockWidgetContents);
141 retranslateUi(PlaylistDock);
143 stackedWidget->setCurrentIndex(1);
146 QMetaObject::connectSlotsByName(PlaylistDock);
149 void retranslateUi(QDockWidget *PlaylistDock)
151 PlaylistDock->setWindowTitle(QCoreApplication::translate(
"PlaylistDock",
"Playlist",
nullptr));
152 textBrowser->setHtml(QCoreApplication::translate(
"PlaylistDock",
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
153 "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
154 "p, li { white-space: pre-wrap; }\n"
155 "</style></head><body>\n"
156 "<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"
157 "<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"
158 "<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"
160 "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));
161 #if QT_CONFIG(tooltip)
162 tableView->setToolTip(QCoreApplication::translate(
"PlaylistDock",
"<html><head/><body><p>Double-click a playlist item to open it in the player.</p></body></html>",
nullptr));
169 class PlaylistDock:
public Ui_PlaylistDock {};