2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2022 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2010-08-26 12:27:16 +02:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2010-08-26 12:27:16 +02:00
|
|
|
|
2022-06-21 13:15:05 +02:00
|
|
|
#include "itaskhandler.h"
|
2010-08-26 12:27:16 +02:00
|
|
|
|
2022-06-21 13:15:05 +02:00
|
|
|
#include <coreplugin/idocument.h>
|
2010-08-26 12:27:16 +02:00
|
|
|
|
2022-06-21 13:15:05 +02:00
|
|
|
namespace ProjectExplorer {
|
2010-08-26 12:27:16 +02:00
|
|
|
namespace Internal {
|
|
|
|
|
|
2022-06-21 13:15:05 +02:00
|
|
|
class StopMonitoringHandler : public ITaskHandler
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
bool canHandle(const ProjectExplorer::Task &) const override;
|
|
|
|
|
void handle(const ProjectExplorer::Task &) override;
|
|
|
|
|
QAction *createAction(QObject *parent) const override;
|
|
|
|
|
};
|
|
|
|
|
|
2012-02-14 16:43:51 +01:00
|
|
|
class TaskFile : public Core::IDocument
|
2010-08-26 12:27:16 +02:00
|
|
|
{
|
2022-10-14 14:52:54 +02:00
|
|
|
Q_DECLARE_TR_FUNCTIONS(TaskList::Internal::TaskListPlugin)
|
2010-08-26 12:27:16 +02:00
|
|
|
public:
|
2010-08-27 16:26:16 +02:00
|
|
|
TaskFile(QObject *parent);
|
2010-08-26 12:27:16 +02:00
|
|
|
|
2015-06-04 15:54:10 +02:00
|
|
|
ReloadBehavior reloadBehavior(ChangeTrigger state, ChangeType type) const override;
|
|
|
|
|
bool reload(QString *errorString, ReloadFlag flag, ChangeType type) override;
|
2010-08-26 12:27:16 +02:00
|
|
|
|
2019-05-28 13:49:26 +02:00
|
|
|
bool load(QString *errorString, const Utils::FilePath &fileName);
|
2022-06-21 13:15:05 +02:00
|
|
|
|
|
|
|
|
static TaskFile *openTasks(const Utils::FilePath &filePath);
|
|
|
|
|
static void stopMonitoring();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
static QList<TaskFile *> openFiles;
|
2010-08-26 12:27:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
2022-06-21 13:15:05 +02:00
|
|
|
} // namespace ProjectExplorer
|