File indexing completed on 2024-05-12 05:11:10
0001 /* 0002 SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com> 0003 SPDX-FileCopyrightText: 2010 Andras Mantia <andras@kdab.com> 0004 0005 SPDX-License-Identifier: LGPL-2.1-or-later 0006 */ 0007 0008 #pragma once 0009 0010 #include "akonadi-mime_export.h" 0011 #include <QObject> 0012 namespace Akonadi 0013 { 0014 class AKONADI_MIME_EXPORT CommandBase : public QObject 0015 { 0016 Q_OBJECT 0017 0018 public: 0019 explicit CommandBase(QObject *parent = nullptr); 0020 virtual void execute() = 0; 0021 0022 enum Result { 0023 Undefined, 0024 OK, 0025 Canceled, 0026 Failed, 0027 }; 0028 0029 Q_SIGNALS: 0030 void result(Akonadi::CommandBase::Result); 0031 0032 protected Q_SLOTS: 0033 virtual void emitResult(Akonadi::CommandBase::Result result); 0034 }; 0035 }