9 #ifndef UI_PLAYLISTDOCK_H 10 #define UI_PLAYLISTDOCK_H 12 #include <QtCore/QVariant> 13 #include <QtWidgets/QAction> 14 #include <QtWidgets/QApplication> 15 #include <QtWidgets/QButtonGroup> 16 #include <QtWidgets/QDockWidget> 17 #include <QtWidgets/QHBoxLayout> 18 #include <QtWidgets/QHeaderView> 19 #include <QtWidgets/QListView> 20 #include <QtWidgets/QPushButton> 21 #include <QtWidgets/QSpacerItem> 22 #include <QtWidgets/QStackedWidget> 23 #include <QtWidgets/QTextBrowser> 24 #include <QtWidgets/QVBoxLayout> 25 #include <QtWidgets/QWidget> 26 #include "widgets/playlisttable.h" 33 QAction *actionInsertCut;
34 QAction *actionAppendCut;
35 QAction *actionInsertBlank;
36 QAction *actionAppendBlank;
37 QAction *actionUpdate;
39 QAction *actionRemove;
41 QAction *actionRemoveAll;
42 QAction *actionThumbnailsHidden;
43 QAction *actionLeftAndRight;
44 QAction *actionTopAndBottom;
45 QAction *actionInOnlySmall;
46 QAction *actionInOnlyLarge;
47 QAction *actionAddToTimeline;
48 QAction *actionDetailed;
51 QWidget *dockWidgetContents;
52 QVBoxLayout *verticalLayout;
53 QStackedWidget *stackedWidget;
55 QVBoxLayout *verticalLayout_2;
56 QTextBrowser *textBrowser;
58 QVBoxLayout *verticalLayout_3;
59 PlaylistTable *tableView;
61 QHBoxLayout *horizontalLayout;
62 QPushButton *addButton;
63 QPushButton *removeButton;
64 QPushButton *updateButton;
65 QPushButton *tilesButton;
66 QPushButton *iconsButton;
67 QPushButton *detailsButton;
68 QPushButton *menuButton;
69 QSpacerItem *horizontalSpacer;
71 void setupUi(QDockWidget *PlaylistDock)
73 if (PlaylistDock->objectName().isEmpty())
74 PlaylistDock->setObjectName(QStringLiteral(
"PlaylistDock"));
75 PlaylistDock->resize(460, 278);
77 QString iconThemeName = QStringLiteral(
"view-media-playlist");
78 if (QIcon::hasThemeIcon(iconThemeName)) {
79 icon = QIcon::fromTheme(iconThemeName);
81 icon.addFile(QStringLiteral(
":/icons/oxygen/32x32/actions/view-media-playlist.png"), QSize(), QIcon::Normal, QIcon::Off);
83 PlaylistDock->setWindowIcon(icon);
84 actionInsertCut =
new QAction(PlaylistDock);
85 actionInsertCut->setObjectName(QStringLiteral(
"actionInsertCut"));
86 actionAppendCut =
new QAction(PlaylistDock);
87 actionAppendCut->setObjectName(QStringLiteral(
"actionAppendCut"));
89 iconThemeName = QStringLiteral(
"list-add");
90 if (QIcon::hasThemeIcon(iconThemeName)) {
91 icon1 = QIcon::fromTheme(iconThemeName);
93 icon1.addFile(QStringLiteral(
"."), QSize(), QIcon::Normal, QIcon::Off);
95 actionAppendCut->setIcon(icon1);
96 actionInsertBlank =
new QAction(PlaylistDock);
97 actionInsertBlank->setObjectName(QStringLiteral(
"actionInsertBlank"));
98 actionAppendBlank =
new QAction(PlaylistDock);
99 actionAppendBlank->setObjectName(QStringLiteral(
"actionAppendBlank"));
100 actionUpdate =
new QAction(PlaylistDock);
101 actionUpdate->setObjectName(QStringLiteral(
"actionUpdate"));
102 actionOpen =
new QAction(PlaylistDock);
103 actionOpen->setObjectName(QStringLiteral(
"actionOpen"));
104 actionRemove =
new QAction(PlaylistDock);
105 actionRemove->setObjectName(QStringLiteral(
"actionRemove"));
106 actionGoto =
new QAction(PlaylistDock);
107 actionGoto->setObjectName(QStringLiteral(
"actionGoto"));
108 actionRemoveAll =
new QAction(PlaylistDock);
109 actionRemoveAll->setObjectName(QStringLiteral(
"actionRemoveAll"));
110 actionThumbnailsHidden =
new QAction(PlaylistDock);
111 actionThumbnailsHidden->setObjectName(QStringLiteral(
"actionThumbnailsHidden"));
112 actionThumbnailsHidden->setCheckable(
true);
113 actionLeftAndRight =
new QAction(PlaylistDock);
114 actionLeftAndRight->setObjectName(QStringLiteral(
"actionLeftAndRight"));
115 actionLeftAndRight->setCheckable(
true);
116 actionTopAndBottom =
new QAction(PlaylistDock);
117 actionTopAndBottom->setObjectName(QStringLiteral(
"actionTopAndBottom"));
118 actionTopAndBottom->setCheckable(
true);
119 actionInOnlySmall =
new QAction(PlaylistDock);
120 actionInOnlySmall->setObjectName(QStringLiteral(
"actionInOnlySmall"));
121 actionInOnlySmall->setCheckable(
true);
122 actionInOnlyLarge =
new QAction(PlaylistDock);
123 actionInOnlyLarge->setObjectName(QStringLiteral(
"actionInOnlyLarge"));
124 actionInOnlyLarge->setCheckable(
true);
125 actionAddToTimeline =
new QAction(PlaylistDock);
126 actionAddToTimeline->setObjectName(QStringLiteral(
"actionAddToTimeline"));
127 actionDetailed =
new QAction(PlaylistDock);
128 actionDetailed->setObjectName(QStringLiteral(
"actionDetailed"));
129 actionDetailed->setCheckable(
true);
130 actionTiled =
new QAction(PlaylistDock);
131 actionTiled->setObjectName(QStringLiteral(
"actionTiled"));
132 actionTiled->setCheckable(
true);
133 actionIcons =
new QAction(PlaylistDock);
134 actionIcons->setObjectName(QStringLiteral(
"actionIcons"));
135 actionIcons->setCheckable(
true);
136 dockWidgetContents =
new QWidget();
137 dockWidgetContents->setObjectName(QStringLiteral(
"dockWidgetContents"));
138 verticalLayout =
new QVBoxLayout(dockWidgetContents);
139 verticalLayout->setSpacing(0);
140 verticalLayout->setObjectName(QStringLiteral(
"verticalLayout"));
141 verticalLayout->setContentsMargins(0, 0, 0, 0);
142 stackedWidget =
new QStackedWidget(dockWidgetContents);
143 stackedWidget->setObjectName(QStringLiteral(
"stackedWidget"));
144 page =
new QWidget();
145 page->setObjectName(QStringLiteral(
"page"));
146 verticalLayout_2 =
new QVBoxLayout(page);
147 verticalLayout_2->setObjectName(QStringLiteral(
"verticalLayout_2"));
148 verticalLayout_2->setContentsMargins(0, 0, 0, 0);
149 textBrowser =
new QTextBrowser(page);
150 textBrowser->setObjectName(QStringLiteral(
"textBrowser"));
152 verticalLayout_2->addWidget(textBrowser);
154 stackedWidget->addWidget(page);
155 page_2 =
new QWidget();
156 page_2->setObjectName(QStringLiteral(
"page_2"));
157 verticalLayout_3 =
new QVBoxLayout(page_2);
158 verticalLayout_3->setObjectName(QStringLiteral(
"verticalLayout_3"));
159 verticalLayout_3->setContentsMargins(0, 0, 0, 0);
160 tableView =
new PlaylistTable(page_2);
161 tableView->setObjectName(QStringLiteral(
"tableView"));
162 tableView->setContextMenuPolicy(Qt::CustomContextMenu);
163 tableView->setDragEnabled(
false);
164 tableView->setAlternatingRowColors(
true);
165 tableView->setSelectionMode(QAbstractItemView::SingleSelection);
166 tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
167 tableView->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
168 tableView->horizontalHeader()->setHighlightSections(
false);
169 tableView->verticalHeader()->setVisible(
false);
171 verticalLayout_3->addWidget(tableView);
173 listView =
new QListView(page_2);
174 listView->setObjectName(QStringLiteral(
"listView"));
175 listView->setContextMenuPolicy(Qt::CustomContextMenu);
176 listView->setMovement(QListView::Static);
178 verticalLayout_3->addWidget(listView);
180 stackedWidget->addWidget(page_2);
182 verticalLayout->addWidget(stackedWidget);
184 horizontalLayout =
new QHBoxLayout();
185 horizontalLayout->setSpacing(6);
186 horizontalLayout->setObjectName(QStringLiteral(
"horizontalLayout"));
187 addButton =
new QPushButton(dockWidgetContents);
188 addButton->setObjectName(QStringLiteral(
"addButton"));
189 addButton->setEnabled(
false);
191 iconThemeName = QStringLiteral(
"list-add");
192 if (QIcon::hasThemeIcon(iconThemeName)) {
193 icon2 = QIcon::fromTheme(iconThemeName);
195 icon2.addFile(QStringLiteral(
":/icons/oxygen/32x32/actions/list-add.png"), QSize(), QIcon::Normal, QIcon::Off);
197 addButton->setIcon(icon2);
199 horizontalLayout->addWidget(addButton);
201 removeButton =
new QPushButton(dockWidgetContents);
202 removeButton->setObjectName(QStringLiteral(
"removeButton"));
203 removeButton->setEnabled(
false);
205 iconThemeName = QStringLiteral(
"list-remove");
206 if (QIcon::hasThemeIcon(iconThemeName)) {
207 icon3 = QIcon::fromTheme(iconThemeName);
209 icon3.addFile(QStringLiteral(
":/icons/oxygen/32x32/actions/list-remove.png"), QSize(), QIcon::Normal, QIcon::Off);
211 removeButton->setIcon(icon3);
213 horizontalLayout->addWidget(removeButton);
215 updateButton =
new QPushButton(dockWidgetContents);
216 updateButton->setObjectName(QStringLiteral(
"updateButton"));
217 updateButton->setEnabled(
false);
219 iconThemeName = QStringLiteral(
"dialog-ok");
220 if (QIcon::hasThemeIcon(iconThemeName)) {
221 icon4 = QIcon::fromTheme(iconThemeName);
223 icon4.addFile(QStringLiteral(
":/icons/oxygen/32x32/actions/dialog-ok.png"), QSize(), QIcon::Normal, QIcon::Off);
225 updateButton->setIcon(icon4);
227 horizontalLayout->addWidget(updateButton);
229 tilesButton =
new QPushButton(dockWidgetContents);
230 tilesButton->setObjectName(QStringLiteral(
"tilesButton"));
232 iconThemeName = QStringLiteral(
"view-list-details");
233 if (QIcon::hasThemeIcon(iconThemeName)) {
234 icon5 = QIcon::fromTheme(iconThemeName);
236 icon5.addFile(QStringLiteral(
":/icons/oxygen/32x32/actions/view-list-details.png"), QSize(), QIcon::Normal, QIcon::Off);
238 tilesButton->setIcon(icon5);
240 horizontalLayout->addWidget(tilesButton);
242 iconsButton =
new QPushButton(dockWidgetContents);
243 iconsButton->setObjectName(QStringLiteral(
"iconsButton"));
245 iconThemeName = QStringLiteral(
"view-list-icons");
246 if (QIcon::hasThemeIcon(iconThemeName)) {
247 icon6 = QIcon::fromTheme(iconThemeName);
249 icon6.addFile(QStringLiteral(
":/icons/oxygen/32x32/actions/view-list-icons.png"), QSize(), QIcon::Normal, QIcon::Off);
251 iconsButton->setIcon(icon6);
253 horizontalLayout->addWidget(iconsButton);
255 detailsButton =
new QPushButton(dockWidgetContents);
256 detailsButton->setObjectName(QStringLiteral(
"detailsButton"));
258 iconThemeName = QStringLiteral(
"view-list-text");
259 if (QIcon::hasThemeIcon(iconThemeName)) {
260 icon7 = QIcon::fromTheme(iconThemeName);
262 icon7.addFile(QStringLiteral(
":/icons/oxygen/32x32/actions/view-list-text.png"), QSize(), QIcon::Normal, QIcon::Off);
264 detailsButton->setIcon(icon7);
266 horizontalLayout->addWidget(detailsButton);
268 menuButton =
new QPushButton(dockWidgetContents);
269 menuButton->setObjectName(QStringLiteral(
"menuButton"));
270 menuButton->setEnabled(
false);
272 iconThemeName = QStringLiteral(
"format-justify-fill");
273 if (QIcon::hasThemeIcon(iconThemeName)) {
274 icon8 = QIcon::fromTheme(iconThemeName);
276 icon8.addFile(QStringLiteral(
":/icons/oxygen/32x32/actions/format-justify-fill.png"), QSize(), QIcon::Normal, QIcon::Off);
278 menuButton->setIcon(icon8);
280 horizontalLayout->addWidget(menuButton);
282 horizontalSpacer =
new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
284 horizontalLayout->addItem(horizontalSpacer);
287 verticalLayout->addLayout(horizontalLayout);
289 PlaylistDock->setWidget(dockWidgetContents);
291 retranslateUi(PlaylistDock);
293 stackedWidget->setCurrentIndex(0);
296 QMetaObject::connectSlotsByName(PlaylistDock);
299 void retranslateUi(QDockWidget *PlaylistDock)
301 PlaylistDock->setWindowTitle(QApplication::translate(
"PlaylistDock",
"Playlist", Q_NULLPTR));
302 actionInsertCut->setText(QApplication::translate(
"PlaylistDock",
"Insert Cut", Q_NULLPTR));
303 actionAppendCut->setText(QApplication::translate(
"PlaylistDock",
"Append Cut", Q_NULLPTR));
304 actionInsertBlank->setText(QApplication::translate(
"PlaylistDock",
"Insert Blank", Q_NULLPTR));
305 actionAppendBlank->setText(QApplication::translate(
"PlaylistDock",
"Append Blank", Q_NULLPTR));
306 actionUpdate->setText(QApplication::translate(
"PlaylistDock",
"Replace", Q_NULLPTR));
307 actionOpen->setText(QApplication::translate(
"PlaylistDock",
"Open As Clip", Q_NULLPTR));
308 #ifndef QT_NO_TOOLTIP 309 actionOpen->setToolTip(QApplication::translate(
"PlaylistDock",
"Open the cut in the player", Q_NULLPTR));
310 #endif // QT_NO_TOOLTIP 311 actionRemove->setText(QApplication::translate(
"PlaylistDock",
"Remove", Q_NULLPTR));
312 actionGoto->setText(QApplication::translate(
"PlaylistDock",
"Goto", Q_NULLPTR));
313 #ifndef QT_NO_TOOLTIP 314 actionGoto->setToolTip(QApplication::translate(
"PlaylistDock",
"Go to the start of this cut in the playlist", Q_NULLPTR));
315 #endif // QT_NO_TOOLTIP 316 actionRemoveAll->setText(QApplication::translate(
"PlaylistDock",
"Remove All", Q_NULLPTR));
317 #ifndef QT_NO_TOOLTIP 318 actionRemoveAll->setToolTip(QApplication::translate(
"PlaylistDock",
"Remove all items from the playlist", Q_NULLPTR));
319 #endif // QT_NO_TOOLTIP 320 actionThumbnailsHidden->setText(QApplication::translate(
"PlaylistDock",
"Hidden", Q_NULLPTR));
321 actionLeftAndRight->setText(QApplication::translate(
"PlaylistDock",
"In and Out - Left/Right", Q_NULLPTR));
322 #ifndef QT_NO_TOOLTIP 323 actionLeftAndRight->setToolTip(QApplication::translate(
"PlaylistDock",
"In and Out - Left/Right", Q_NULLPTR));
324 #endif // QT_NO_TOOLTIP 325 actionTopAndBottom->setText(QApplication::translate(
"PlaylistDock",
"In and Out - Top/Bottom", Q_NULLPTR));
326 #ifndef QT_NO_TOOLTIP 327 actionTopAndBottom->setToolTip(QApplication::translate(
"PlaylistDock",
"In and Out - Top/Bottom", Q_NULLPTR));
328 #endif // QT_NO_TOOLTIP 329 actionInOnlySmall->setText(QApplication::translate(
"PlaylistDock",
"In Only - Small", Q_NULLPTR));
330 actionInOnlyLarge->setText(QApplication::translate(
"PlaylistDock",
"In Only - Large", Q_NULLPTR));
331 actionAddToTimeline->setText(QApplication::translate(
"PlaylistDock",
"Add All to Timeline", Q_NULLPTR));
332 actionDetailed->setText(QApplication::translate(
"PlaylistDock",
"Details", Q_NULLPTR));
333 #ifndef QT_NO_TOOLTIP 334 actionDetailed->setToolTip(QApplication::translate(
"PlaylistDock",
"View as details", Q_NULLPTR));
335 #endif // QT_NO_TOOLTIP 336 actionTiled->setText(QApplication::translate(
"PlaylistDock",
"Tiles", Q_NULLPTR));
337 #ifndef QT_NO_TOOLTIP 338 actionTiled->setToolTip(QApplication::translate(
"PlaylistDock",
"View as tiles", Q_NULLPTR));
339 #endif // QT_NO_TOOLTIP 340 actionIcons->setText(QApplication::translate(
"PlaylistDock",
"Icons", Q_NULLPTR));
341 #ifndef QT_NO_TOOLTIP 342 actionIcons->setToolTip(QApplication::translate(
"PlaylistDock",
"View as icons", Q_NULLPTR));
343 #endif // QT_NO_TOOLTIP 344 textBrowser->setHtml(QApplication::translate(
"PlaylistDock",
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" 345 "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" 346 "p, li { white-space: pre-wrap; }\n" 347 "</style></head><body>\n" 348 "<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" 349 "<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" 350 "<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" 352 "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>", Q_NULLPTR));
353 #ifndef QT_NO_TOOLTIP 354 tableView->setToolTip(QApplication::translate(
"PlaylistDock",
"<html><head/><body><p>Double-click a playlist item to open it in the player.</p></body></html>", Q_NULLPTR));
355 #endif // QT_NO_TOOLTIP 356 #ifndef QT_NO_TOOLTIP 357 addButton->setToolTip(QApplication::translate(
"PlaylistDock",
"Add the Source to the playlist", Q_NULLPTR));
358 #endif // QT_NO_TOOLTIP 359 addButton->setText(QString());
360 #ifndef QT_NO_TOOLTIP 361 removeButton->setToolTip(QApplication::translate(
"PlaylistDock",
"Remove cut", Q_NULLPTR));
362 #endif // QT_NO_TOOLTIP 363 removeButton->setText(QString());
364 #ifndef QT_NO_TOOLTIP 365 updateButton->setToolTip(QApplication::translate(
"PlaylistDock",
"Update", Q_NULLPTR));
366 #endif // QT_NO_TOOLTIP 367 updateButton->setText(QString());
368 #ifndef QT_NO_TOOLTIP 369 tilesButton->setToolTip(QApplication::translate(
"PlaylistDock",
"View as tiles", Q_NULLPTR));
370 #endif // QT_NO_TOOLTIP 371 tilesButton->setText(QString());
372 #ifndef QT_NO_TOOLTIP 373 iconsButton->setToolTip(QApplication::translate(
"PlaylistDock",
"View as icons", Q_NULLPTR));
374 #endif // QT_NO_TOOLTIP 375 iconsButton->setText(QString());
376 #ifndef QT_NO_TOOLTIP 377 detailsButton->setToolTip(QApplication::translate(
"PlaylistDock",
"View as details", Q_NULLPTR));
378 #endif // QT_NO_TOOLTIP 379 detailsButton->setText(QString());
380 #ifndef QT_NO_TOOLTIP 381 menuButton->setToolTip(QApplication::translate(
"PlaylistDock",
"Display a menu of additional actions", Q_NULLPTR));
382 #endif // QT_NO_TOOLTIP 383 menuButton->setText(QString());
389 class PlaylistDock:
public Ui_PlaylistDock {};
394 #endif // UI_PLAYLISTDOCK_H Definition: addencodepresetdialog.h:24