12 #include <QtCore/QVariant>
13 #include <QtGui/QIcon>
14 #include <QtWidgets/QAction>
15 #include <QtWidgets/QApplication>
16 #include <QtWidgets/QDockWidget>
17 #include <QtWidgets/QHBoxLayout>
18 #include <QtWidgets/QHeaderView>
19 #include <QtWidgets/QPushButton>
20 #include <QtWidgets/QScrollArea>
21 #include <QtWidgets/QSpacerItem>
22 #include <QtWidgets/QTreeView>
23 #include <QtWidgets/QVBoxLayout>
24 #include <QtWidgets/QWidget>
31 QAction *actionStopJob;
32 QAction *actionViewLog;
34 QAction *actionRemove;
35 QAction *actionRemoveFinished;
36 QWidget *dockWidgetContents;
37 QVBoxLayout *verticalLayout_2;
38 QScrollArea *scrollArea;
39 QWidget *scrollAreaWidgetContents;
40 QVBoxLayout *verticalLayout;
42 QHBoxLayout *horizontalLayout;
43 QPushButton *menuButton;
44 QPushButton *pauseButton;
45 QPushButton *cleanButton;
46 QSpacerItem *horizontalSpacer;
48 void setupUi(QDockWidget *JobsDock)
50 if (JobsDock->objectName().isEmpty())
51 JobsDock->setObjectName(QString::fromUtf8(
"JobsDock"));
52 JobsDock->resize(283, 279);
54 QString iconThemeName = QString::fromUtf8(
"run-build");
55 if (QIcon::hasThemeIcon(iconThemeName)) {
56 icon = QIcon::fromTheme(iconThemeName);
58 icon.addFile(QString::fromUtf8(
":/icons/oxygen/32x32/actions/run-build.png"), QSize(), QIcon::Normal, QIcon::Off);
60 JobsDock->setWindowIcon(icon);
61 actionStopJob =
new QAction(JobsDock);
62 actionStopJob->setObjectName(QString::fromUtf8(
"actionStopJob"));
63 actionViewLog =
new QAction(JobsDock);
64 actionViewLog->setObjectName(QString::fromUtf8(
"actionViewLog"));
65 actionRun =
new QAction(JobsDock);
66 actionRun->setObjectName(QString::fromUtf8(
"actionRun"));
67 actionRemove =
new QAction(JobsDock);
68 actionRemove->setObjectName(QString::fromUtf8(
"actionRemove"));
69 actionRemoveFinished =
new QAction(JobsDock);
70 actionRemoveFinished->setObjectName(QString::fromUtf8(
"actionRemoveFinished"));
71 dockWidgetContents =
new QWidget();
72 dockWidgetContents->setObjectName(QString::fromUtf8(
"dockWidgetContents"));
73 verticalLayout_2 =
new QVBoxLayout(dockWidgetContents);
74 verticalLayout_2->setSpacing(0);
75 verticalLayout_2->setObjectName(QString::fromUtf8(
"verticalLayout_2"));
76 verticalLayout_2->setContentsMargins(0, 0, 0, 0);
77 scrollArea =
new QScrollArea(dockWidgetContents);
78 scrollArea->setObjectName(QString::fromUtf8(
"scrollArea"));
79 scrollArea->setFrameShape(QFrame::NoFrame);
80 scrollArea->setWidgetResizable(
true);
81 scrollAreaWidgetContents =
new QWidget();
82 scrollAreaWidgetContents->setObjectName(QString::fromUtf8(
"scrollAreaWidgetContents"));
83 scrollAreaWidgetContents->setGeometry(QRect(0, 0, 283, 211));
84 verticalLayout =
new QVBoxLayout(scrollAreaWidgetContents);
85 verticalLayout->setObjectName(QString::fromUtf8(
"verticalLayout"));
86 verticalLayout->setContentsMargins(0, 0, 0, 0);
87 treeView =
new QTreeView(scrollAreaWidgetContents);
88 treeView->setObjectName(QString::fromUtf8(
"treeView"));
89 treeView->setContextMenuPolicy(Qt::CustomContextMenu);
90 treeView->setEditTriggers(QAbstractItemView::NoEditTriggers);
91 treeView->setAlternatingRowColors(
true);
92 treeView->setTextElideMode(Qt::ElideMiddle);
93 treeView->setRootIsDecorated(
false);
94 treeView->setUniformRowHeights(
true);
95 treeView->header()->setVisible(
false);
97 verticalLayout->addWidget(treeView);
99 scrollArea->setWidget(scrollAreaWidgetContents);
101 verticalLayout_2->addWidget(scrollArea);
103 horizontalLayout =
new QHBoxLayout();
104 horizontalLayout->setSpacing(6);
105 horizontalLayout->setObjectName(QString::fromUtf8(
"horizontalLayout"));
106 menuButton =
new QPushButton(dockWidgetContents);
107 menuButton->setObjectName(QString::fromUtf8(
"menuButton"));
109 iconThemeName = QString::fromUtf8(
"show-menu");
110 if (QIcon::hasThemeIcon(iconThemeName)) {
111 icon1 = QIcon::fromTheme(iconThemeName);
113 icon1.addFile(QString::fromUtf8(
":/icons/light/32x32/format-justify-fill.png"), QSize(), QIcon::Normal, QIcon::Off);
115 menuButton->setIcon(icon1);
117 horizontalLayout->addWidget(menuButton);
119 pauseButton =
new QPushButton(dockWidgetContents);
120 pauseButton->setObjectName(QString::fromUtf8(
"pauseButton"));
121 pauseButton->setCheckable(
true);
123 horizontalLayout->addWidget(pauseButton);
125 cleanButton =
new QPushButton(dockWidgetContents);
126 cleanButton->setObjectName(QString::fromUtf8(
"cleanButton"));
128 horizontalLayout->addWidget(cleanButton);
130 horizontalSpacer =
new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
132 horizontalLayout->addItem(horizontalSpacer);
135 verticalLayout_2->addLayout(horizontalLayout);
137 JobsDock->setWidget(dockWidgetContents);
139 retranslateUi(JobsDock);
141 QMetaObject::connectSlotsByName(JobsDock);
144 void retranslateUi(QDockWidget *JobsDock)
146 JobsDock->setWindowTitle(QCoreApplication::translate(
"JobsDock",
"Jobs",
nullptr));
147 actionStopJob->setText(QCoreApplication::translate(
"JobsDock",
"Stop This Job",
nullptr));
148 #if QT_CONFIG(tooltip)
149 actionStopJob->setToolTip(QCoreApplication::translate(
"JobsDock",
"Stop the currently selected job",
nullptr));
151 actionViewLog->setText(QCoreApplication::translate(
"JobsDock",
"View Log",
nullptr));
152 #if QT_CONFIG(tooltip)
153 actionViewLog->setToolTip(QCoreApplication::translate(
"JobsDock",
"View the messages of MLT and FFmpeg ",
nullptr));
155 actionRun->setText(QCoreApplication::translate(
"JobsDock",
"Run",
nullptr));
156 #if QT_CONFIG(tooltip)
157 actionRun->setToolTip(QCoreApplication::translate(
"JobsDock",
"Restart a stopped job",
nullptr));
159 actionRemove->setText(QCoreApplication::translate(
"JobsDock",
"Remove",
nullptr));
160 actionRemoveFinished->setText(QCoreApplication::translate(
"JobsDock",
"Remove Finished",
nullptr));
161 #if QT_CONFIG(tooltip)
162 actionRemoveFinished->setToolTip(QCoreApplication::translate(
"JobsDock",
"Remove Finished",
nullptr));
164 #if QT_CONFIG(tooltip)
165 menuButton->setToolTip(QCoreApplication::translate(
"JobsDock",
"Jobs Menu",
nullptr));
167 #if QT_CONFIG(tooltip)
168 pauseButton->setToolTip(QCoreApplication::translate(
"JobsDock",
"Stop automatically processing the next pending job in\n"
169 "the list. This does not stop a currently running job. Right-\n"
170 "-click a job to open a menu to stop a currently running job.",
nullptr));
172 pauseButton->setText(QCoreApplication::translate(
"JobsDock",
"Pause",
nullptr));
173 #if QT_CONFIG(tooltip)
174 cleanButton->setToolTip(QCoreApplication::translate(
"JobsDock",
"Remove all of the completed and failed jobs from the list",
nullptr));
176 cleanButton->setText(QCoreApplication::translate(
"JobsDock",
"Clean",
nullptr));
182 class JobsDock:
public Ui_JobsDock {};