libktorrent  2.2.0
exitoperation.h
1 /***************************************************************************
2  * Copyright (C) 2005 by Joris Guisson *
3  * joris.guisson@gmail.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19  ***************************************************************************/
20 #ifndef BTEXITOPERATION_H
21 #define BTEXITOPERATION_H
22 
23 #include <qobject.h>
24 #include <kio/job.h>
25 #include <ktorrent_export.h>
26 
27 namespace bt
28 {
29 
39  class KTORRENT_EXPORT ExitOperation : public QObject
40  {
41  Q_OBJECT
42  public:
43  ExitOperation();
44  ~ExitOperation() override;
45 
47  virtual bool deleteAllowed() const {return true;}
48  Q_SIGNALS:
49  void operationFinished(ExitOperation* opt);
50  };
51 
56  {
57  Q_OBJECT
58  public:
59  ExitJobOperation(KJob* j);
60  ~ExitJobOperation() override;
61 
62  bool deleteAllowed() const override {return true;}
63  private Q_SLOTS:
64  virtual void onResult(KJob* j);
65  };
66 }
67 
68 #endif
bt::ExitJobOperation
Definition: exitoperation.h:56
bt::ExitOperation::deleteAllowed
virtual bool deleteAllowed() const
whether or not we can do a deleteLater on the job after it has finished.
Definition: exitoperation.h:47
bt::ExitJobOperation::deleteAllowed
bool deleteAllowed() const override
whether or not we can do a deleteLater on the job after it has finished.
Definition: exitoperation.h:62
bt::ExitOperation
Definition: exitoperation.h:40