From f0f74e0f3b74413b060b981018f29be77dbc321e Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Thu, 27 Jun 2019 09:45:45 -0700 Subject: [PATCH] created task manager classes --- app/CMakeLists.txt | 1 + app/task/CMakeLists.txt | 24 ++++++++++++++++++++++++ app/task/task.cpp | 6 ++++++ app/task/task.h | 11 +++++++++++ app/task/taskmanager.cpp | 10 ++++++++++ app/task/taskmanager.h | 21 +++++++++++++++++++++ 6 files changed, 73 insertions(+) create mode 100644 app/task/CMakeLists.txt create mode 100644 app/task/task.cpp create mode 100644 app/task/task.h create mode 100644 app/task/taskmanager.cpp create mode 100644 app/task/taskmanager.h diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 7fc0b9e4f..d53985115 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -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) diff --git a/app/task/CMakeLists.txt b/app/task/CMakeLists.txt new file mode 100644 index 000000000..bc0d0bb4b --- /dev/null +++ b/app/task/CMakeLists.txt @@ -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 . + +set(OLIVE_SOURCES + ${OLIVE_SOURCES} + task/task.h + task/task.cpp + task/taskmanager.h + task/taskmanager.cpp + PARENT_SCOPE +) diff --git a/app/task/task.cpp b/app/task/task.cpp new file mode 100644 index 000000000..85a7a2990 --- /dev/null +++ b/app/task/task.cpp @@ -0,0 +1,6 @@ +#include "task.h" + +Task::Task() +{ + +} diff --git a/app/task/task.h b/app/task/task.h new file mode 100644 index 000000000..730ba6821 --- /dev/null +++ b/app/task/task.h @@ -0,0 +1,11 @@ +#ifndef TASK_H +#define TASK_H + + +class Task +{ +public: + Task(); +}; + +#endif // TASK_H diff --git a/app/task/taskmanager.cpp b/app/task/taskmanager.cpp new file mode 100644 index 000000000..e86536f54 --- /dev/null +++ b/app/task/taskmanager.cpp @@ -0,0 +1,10 @@ +#include "taskmanager.h" + +#include + +TaskManager olive::task_manager; + +TaskManager::TaskManager() +{ + maximum_task_count_ = QThread::idealThreadCount(); +} diff --git a/app/task/taskmanager.h b/app/task/taskmanager.h new file mode 100644 index 000000000..b5b76eca3 --- /dev/null +++ b/app/task/taskmanager.h @@ -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