created task manager classes

This commit is contained in:
itsmattkc
2019-06-27 09:45:45 -07:00
parent ff17c5d167
commit f0f74e0f3b
6 changed files with 73 additions and 0 deletions
+1
View File
@@ -27,6 +27,7 @@ add_subdirectory(decoder)
add_subdirectory(panel)
add_subdirectory(project)
add_subdirectory(render)
add_subdirectory(task)
add_subdirectory(tool)
add_subdirectory(ui)
add_subdirectory(widget)
+24
View File
@@ -0,0 +1,24 @@
# Olive - Non-Linear Video Editor
# Copyright (C) 2019 Olive Team
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set(OLIVE_SOURCES
${OLIVE_SOURCES}
task/task.h
task/task.cpp
task/taskmanager.h
task/taskmanager.cpp
PARENT_SCOPE
)
+6
View File
@@ -0,0 +1,6 @@
#include "task.h"
Task::Task()
{
}
+11
View File
@@ -0,0 +1,11 @@
#ifndef TASK_H
#define TASK_H
class Task
{
public:
Task();
};
#endif // TASK_H
+10
View File
@@ -0,0 +1,10 @@
#include "taskmanager.h"
#include <QThread>
TaskManager olive::task_manager;
TaskManager::TaskManager()
{
maximum_task_count_ = QThread::idealThreadCount();
}
+21
View File
@@ -0,0 +1,21 @@
#ifndef TASKMANAGER_H
#define TASKMANAGER_H
class TaskManager
{
public:
TaskManager();
void AddTask();
private:
int maximum_task_count_;
};
namespace olive {
extern TaskManager task_manager;
}
#endif // TASKMANAGER_H