Added menu entries for removing all "complete" jobs ((includes failed/aborted jobs) and for removing all "enqueued" jobs.
This commit is contained in:
parent
fd6486e009
commit
4c93c52b79
@ -319,9 +319,23 @@
|
|||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuFile">
|
<widget class="QMenu" name="menuFile">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>File</string>
|
<string>Application</string>
|
||||||
</property>
|
</property>
|
||||||
|
<widget class="QMenu" name="menuRemove_Jobs">
|
||||||
|
<property name="title">
|
||||||
|
<string>Clean-Up</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../res/resources.qrc">
|
||||||
|
<normaloff>:/buttons/clean.png</normaloff>:/buttons/clean.png</iconset>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionCleanup_Finished"/>
|
||||||
|
<addaction name="actionCleanup_Enqueued"/>
|
||||||
|
</widget>
|
||||||
<addaction name="actionOpen"/>
|
<addaction name="actionOpen"/>
|
||||||
|
<addaction name="actionCreateJob"/>
|
||||||
|
<addaction name="separator"/>
|
||||||
|
<addaction name="menuRemove_Jobs"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionPreferences"/>
|
<addaction name="actionPreferences"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
@ -395,8 +409,6 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Job</string>
|
<string>Job</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="actionJob_New"/>
|
|
||||||
<addaction name="separator"/>
|
|
||||||
<addaction name="actionJob_Start"/>
|
<addaction name="actionJob_Start"/>
|
||||||
<addaction name="actionJob_Pause"/>
|
<addaction name="actionJob_Pause"/>
|
||||||
<addaction name="actionJob_Abort"/>
|
<addaction name="actionJob_Abort"/>
|
||||||
@ -484,13 +496,13 @@
|
|||||||
<string>BluRay Authoring Guide</string>
|
<string>BluRay Authoring Guide</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionJob_New">
|
<action name="actionCreateJob">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../res/resources.qrc">
|
<iconset resource="../res/resources.qrc">
|
||||||
<normaloff>:/buttons/add.png</normaloff>:/buttons/add.png</iconset>
|
<normaloff>:/buttons/add.png</normaloff>:/buttons/add.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Create Job</string>
|
<string>Create New Job</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionJob_Start">
|
<action name="actionJob_Start">
|
||||||
@ -778,6 +790,29 @@
|
|||||||
<string>x265 Online Documentation</string>
|
<string>x265 Online Documentation</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionRemove_Jobs">
|
||||||
|
<property name="text">
|
||||||
|
<string>Remove Jobs</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionCleanup_Finished">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../res/resources.qrc">
|
||||||
|
<normaloff>:/buttons/trash.png</normaloff>:/buttons/trash.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Remove Completed/Failed Jobs</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionCleanup_Enqueued">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../res/resources.qrc">
|
||||||
|
<normaloff>:/buttons/trash.png</normaloff>:/buttons/trash.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Remove Enqued Jobs</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>buttonAddJob</tabstop>
|
<tabstop>buttonAddJob</tabstop>
|
||||||
@ -808,7 +843,7 @@
|
|||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
<connection>
|
||||||
<sender>actionJob_New</sender>
|
<sender>actionCreateJob</sender>
|
||||||
<signal>triggered()</signal>
|
<signal>triggered()</signal>
|
||||||
<receiver>buttonAddJob</receiver>
|
<receiver>buttonAddJob</receiver>
|
||||||
<slot>click()</slot>
|
<slot>click()</slot>
|
||||||
|
BIN
res/buttons/clean.png
Normal file
BIN
res/buttons/clean.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 784 B |
@ -9,6 +9,7 @@
|
|||||||
<file>buttons/bomb.png</file>
|
<file>buttons/bomb.png</file>
|
||||||
<file>buttons/book_open.png</file>
|
<file>buttons/book_open.png</file>
|
||||||
<file>buttons/cancel.png</file>
|
<file>buttons/cancel.png</file>
|
||||||
|
<file>buttons/clean.png</file>
|
||||||
<file>buttons/clock.png</file>
|
<file>buttons/clock.png</file>
|
||||||
<file>buttons/clock_pause.png</file>
|
<file>buttons/clock_pause.png</file>
|
||||||
<file>buttons/clock_play.png</file>
|
<file>buttons/clock_play.png</file>
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
#define VER_X264_MAJOR 2
|
#define VER_X264_MAJOR 2
|
||||||
#define VER_X264_MINOR 6
|
#define VER_X264_MINOR 6
|
||||||
#define VER_X264_PATCH 4
|
#define VER_X264_PATCH 5
|
||||||
#define VER_X264_BUILD 1000
|
#define VER_X264_BUILD 1002
|
||||||
|
|
||||||
#define VER_X264_PORTABLE_EDITION (0)
|
#define VER_X264_PORTABLE_EDITION (0)
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ static const int vsynth_rev = 24;
|
|||||||
#define INIT_ERROR_EXIT() do { close(); qApp->exit(-1); return; } while(0)
|
#define INIT_ERROR_EXIT() do { close(); qApp->exit(-1); return; } while(0)
|
||||||
#define SETUP_WEBLINK(OBJ, URL) do { (OBJ)->setData(QVariant(QUrl(URL))); connect((OBJ), SIGNAL(triggered()), this, SLOT(showWebLink())); } while(0)
|
#define SETUP_WEBLINK(OBJ, URL) do { (OBJ)->setData(QVariant(QUrl(URL))); connect((OBJ), SIGNAL(triggered()), this, SLOT(showWebLink())); } while(0)
|
||||||
#define APP_IS_READY (m_initialized && (!m_fileTimer->isActive()) && (QApplication::activeModalWidget() == NULL))
|
#define APP_IS_READY (m_initialized && (!m_fileTimer->isActive()) && (QApplication::activeModalWidget() == NULL))
|
||||||
#define ENSURE_APP_IS_READY() do { if(!APP_IS_READY) { MUtils::Sound::beep(MUtils::Sound::BEEP_WRN); qWarning("Cannot perfrom this action at this time!"); return; } } while(0)
|
#define ENSURE_APP_IS_READY() do { if(!APP_IS_READY) { MUtils::Sound::beep(MUtils::Sound::BEEP_WRN); qWarning("Cannot perfrom this action at this time!"); return; } } while(0)
|
||||||
#define X264_STRCMP(X,Y) ((X).compare((Y), Qt::CaseInsensitive) == 0)
|
#define X264_STRCMP(X,Y) ((X).compare((Y), Qt::CaseInsensitive) == 0)
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
@ -214,10 +214,14 @@ MainWindow::MainWindow(const MUtils::CPUFetaures::cpu_info_t &cpuFeatures, MUtil
|
|||||||
connect(ui->actionJob_MoveDown, SIGNAL(triggered()), this, SLOT(moveButtonPressed() ));
|
connect(ui->actionJob_MoveDown, SIGNAL(triggered()), this, SLOT(moveButtonPressed() ));
|
||||||
|
|
||||||
//Enable menu
|
//Enable menu
|
||||||
connect(ui->actionOpen, SIGNAL(triggered()), this, SLOT(openActionTriggered()));
|
connect(ui->actionOpen, SIGNAL(triggered()), this, SLOT(openActionTriggered()));
|
||||||
connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(showAbout()));
|
connect(ui->actionCleanup_Finished, SIGNAL(triggered()), this, SLOT(cleanupActionTriggered()));
|
||||||
connect(ui->actionPreferences, SIGNAL(triggered()), this, SLOT(showPreferences()));
|
connect(ui->actionCleanup_Enqueued, SIGNAL(triggered()), this, SLOT(cleanupActionTriggered()));
|
||||||
connect(ui->actionCheckForUpdates, SIGNAL(triggered()), this, SLOT(checkUpdates()));
|
connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(showAbout()));
|
||||||
|
connect(ui->actionPreferences, SIGNAL(triggered()), this, SLOT(showPreferences()));
|
||||||
|
connect(ui->actionCheckForUpdates, SIGNAL(triggered()), this, SLOT(checkUpdates()));
|
||||||
|
ui->actionCleanup_Finished->setData(QVariant(bool(0)));
|
||||||
|
ui->actionCleanup_Enqueued->setData(QVariant(bool(1)));
|
||||||
|
|
||||||
//Setup web-links
|
//Setup web-links
|
||||||
SETUP_WEBLINK(ui->actionWebMulder, home_url);
|
SETUP_WEBLINK(ui->actionWebMulder, home_url);
|
||||||
@ -342,6 +346,7 @@ void MainWindow::addButtonPressed()
|
|||||||
void MainWindow::openActionTriggered()
|
void MainWindow::openActionTriggered()
|
||||||
{
|
{
|
||||||
ENSURE_APP_IS_READY();
|
ENSURE_APP_IS_READY();
|
||||||
|
qWarning("openActionTriggered()");
|
||||||
|
|
||||||
QStringList fileList = QFileDialog::getOpenFileNames(this, tr("Open Source File(s)"), m_recentlyUsed->sourceDirectory(), AddJobDialog::getInputFilterLst(), NULL, QFileDialog::DontUseNativeDialog);
|
QStringList fileList = QFileDialog::getOpenFileNames(this, tr("Open Source File(s)"), m_recentlyUsed->sourceDirectory(), AddJobDialog::getInputFilterLst(), NULL, QFileDialog::DontUseNativeDialog);
|
||||||
if(!fileList.empty())
|
if(!fileList.empty())
|
||||||
@ -363,6 +368,51 @@ void MainWindow::openActionTriggered()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The "clean-up" action was invoked
|
||||||
|
*/
|
||||||
|
void MainWindow::cleanupActionTriggered(void)
|
||||||
|
{
|
||||||
|
ENSURE_APP_IS_READY();
|
||||||
|
|
||||||
|
QAction *const sender = dynamic_cast<QAction*>(QObject::sender());
|
||||||
|
if (sender)
|
||||||
|
{
|
||||||
|
const QVariant data = sender->data();
|
||||||
|
if (data.isValid() && (data.type() == QVariant::Bool))
|
||||||
|
{
|
||||||
|
const bool mode = data.toBool();
|
||||||
|
const int rows = m_jobList->rowCount(QModelIndex());
|
||||||
|
QList<int> jobIndices;
|
||||||
|
for (int i = 0; i < rows; i++)
|
||||||
|
{
|
||||||
|
const JobStatus status = m_jobList->getJobStatus(m_jobList->index(i, 0, QModelIndex()));
|
||||||
|
if (mode && (status == JobStatus_Enqueued))
|
||||||
|
{
|
||||||
|
jobIndices.append(i);
|
||||||
|
}
|
||||||
|
else if ((!mode) && ((status == JobStatus_Completed) || (status == JobStatus_Aborted) || (status == JobStatus_Failed)))
|
||||||
|
{
|
||||||
|
jobIndices.append(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!jobIndices.isEmpty())
|
||||||
|
{
|
||||||
|
QListIterator<int> iter(jobIndices);
|
||||||
|
iter.toBack();
|
||||||
|
while(iter.hasPrevious())
|
||||||
|
{
|
||||||
|
m_jobList->deleteJob(m_jobList->index(iter.previous(), 0, QModelIndex()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MUtils::Sound::beep(MUtils::Sound::BEEP_WRN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The "start" button was clicked
|
* The "start" button was clicked
|
||||||
*/
|
*/
|
||||||
|
@ -112,6 +112,7 @@ private:
|
|||||||
private slots:
|
private slots:
|
||||||
void addButtonPressed();
|
void addButtonPressed();
|
||||||
void openActionTriggered();
|
void openActionTriggered();
|
||||||
|
void cleanupActionTriggered(void);
|
||||||
void abortButtonPressed(void);
|
void abortButtonPressed(void);
|
||||||
void browseButtonPressed(void);
|
void browseButtonPressed(void);
|
||||||
void deleteButtonPressed(void);
|
void deleteButtonPressed(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user